Change variable to pos_change

This commit is contained in:
andreubisquerra 2020-08-23 22:28:26 +02:00 committed by GitHub
parent e032ddc035
commit 8f933c324a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -241,7 +241,7 @@ if ($action == 'valid' && $user->rights->facture->creer)
$payment->datepaye = $now;
$payment->fk_account = $bankaccount;
$payment->amounts[$invoice->id] = $amountofpayment;
if ($pay == 'cash') $payment->takepos_change = price2num(GETPOST('excess', 'alpha'));
if ($pay == 'cash') $payment->pos_change = price2num(GETPOST('excess', 'alpha'));
// If user has not used change control, add total invoice payment
// Or if user has used change control and the amount of payment is higher than remain to pay, add the remain to pay