mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-09-16 15:28:12 -04:00
Substract refund from total rewards (#3536)
This commit is contained in:
1 parent
e09875e5f3
commit
f061a83317
1 file changed
+4
-3
@@ -644,11 +644,12 @@ class Sale extends CI_Model
|
||||
|
||||
$this->db->insert('sales_payments', $sales_payments_data);
|
||||
|
||||
$total_amount = floatval($total_amount) + floatval($payment['payment_amount']);
|
||||
$total_amount = floatval($total_amount) + floatval($payment['payment_amount']) - floatval($payment['cash_refund']);
|
||||
|
||||
}
|
||||
|
||||
|
||||
$this->save_customer_rewards($customer_id, $sale_id, $total_amount, $total_amount_used);
|
||||
|
||||
|
||||
$customer = $this->Customer->get_info($customer_id);
|
||||
|
||||
foreach($items as $line=>$item)
|
||||
|
||||
Reference in new issue
Block a user