mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-24 08:20:54 -04:00
Fix Graphical Summary Payment report
This commit is contained in:
@@ -866,8 +866,11 @@ class Reports extends Secure_Controller
|
||||
{
|
||||
$row = $this->xss_clean($row);
|
||||
|
||||
$labels[] = $row['payment_type'];
|
||||
$series[] = array('meta' => $row['payment_type'] . ' ' . round($row['payment_amount'] / $summary['total'] * 100, 2) . '%', 'value' => $row['payment_amount']);
|
||||
if($row['trans_group'] == $this->lang->line('reports_trans_payments'))
|
||||
{
|
||||
$labels[] = $row['trans_type'];
|
||||
$series[] = array('meta' => $row['trans_type'] . ' ' . round($row['trans_amount'] / $summary['total'] * 100, 2) . '%', 'value' => $row['trans_amount']);
|
||||
}
|
||||
}
|
||||
|
||||
$data = array(
|
||||
|
||||
@@ -61,7 +61,7 @@ class Summary_payments extends Summary_report
|
||||
$this->db->where('sales.sale_status', COMPLETED);
|
||||
$this->_where($inputs);
|
||||
|
||||
$this->db->group_by("trans_type");
|
||||
$this->db->group_by('trans_type');
|
||||
|
||||
$sales = $this->db->get()->result_array();
|
||||
|
||||
@@ -89,7 +89,7 @@ class Summary_payments extends Summary_report
|
||||
$this->db->where('sales.sale_status', COMPLETED);
|
||||
$this->_where($inputs);
|
||||
|
||||
$this->db->group_by("sales_payments.payment_type");
|
||||
$this->db->group_by('sales_payments.payment_type');
|
||||
|
||||
$payments = $this->db->get()->result_array();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user