diff --git a/application/helpers/table_helper.php b/application/helpers/table_helper.php index 0c335943d..87ae30168 100644 --- a/application/helpers/table_helper.php +++ b/application/helpers/table_helper.php @@ -109,9 +109,9 @@ function get_sales_manage_payments_summary($payments, $sales, $controller) $amount -= $sale['change_due']; } } - $table.='
'.$payment['payment_type'].': '.to_currency( $amount );'
'; + $table.='
'.$payment['payment_type'].': '.to_currency( $amount ) . '
'; } - + $table.=''; return $table; } diff --git a/application/models/sale.php b/application/models/sale.php index b2f4f8a00..50c565e47 100644 --- a/application/models/sale.php +++ b/application/models/sale.php @@ -88,7 +88,7 @@ class Sale extends CI_Model $this->db->select('sales_payments.payment_type, count(*) AS count, SUM(payment_amount) AS payment_amount', FALSE); $this->db->from('sales_payments'); $this->db->join('sales_items_temp', 'sales_items_temp.sale_id=sales_payments.sale_id'); - $this->db->join('people', 'people.person_id = sales_items_temp.sale_id', 'left'); + $this->db->join('people', 'people.person_id = sales_items_temp.customer_id', 'left'); if (empty($inputs['search'])) {