Merge pull request #11700 from andreubisquerra/master
If user has not used change control in TakePOS, add total invoice payment
This commit is contained in:
commit
2dbf98283a
@ -175,6 +175,9 @@ if ($action == 'valid' && $user->rights->facture->creer)
|
||||
$payment->datepaye = $now;
|
||||
$payment->fk_account = $bankaccount;
|
||||
$payment->amounts[$invoice->id] = $amountofpayment;
|
||||
|
||||
// If user has not used change control, add total invoice payment
|
||||
if ($amountofpayment == 0) $payment->amounts[$invoice->id] = $invoice->total_ttc;
|
||||
|
||||
$payment->paiementid=$paiementid;
|
||||
$payment->num_payment=$invoice->ref;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user