Avoid higher payments than remain in TakePOS
This commit is contained in:
parent
148e2e58e5
commit
2af9904c04
@ -226,7 +226,8 @@ if ($action == 'valid' && $user->rights->facture->creer)
|
||||
$payment->amounts[$invoice->id] = $amountofpayment;
|
||||
|
||||
// If user has not used change control, add total invoice payment
|
||||
if ($amountofpayment == 0) $payment->amounts[$invoice->id] = $remaintopay;
|
||||
// Or if user has used change control and the amount of payment is higher than remain to pay, add the remain to pay
|
||||
if ($amountofpayment == 0 || $amountofpayment>$remaintopay) $payment->amounts[$invoice->id] = $remaintopay;
|
||||
|
||||
$payment->paiementid = $paiementid;
|
||||
$payment->num_payment = $invoice->ref;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user