Merge pull request #13302 from andreubisquerra/develop
Avoid higher payments than remain in TakePOS
This commit is contained in:
commit
068f435146
@ -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