Update invoice.php

This commit is contained in:
Laurent Destailleur 2020-08-19 14:35:15 +02:00 committed by GitHub
parent 3be723f3a1
commit f57f729d40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -249,8 +249,8 @@ if ($action == 'valid' && $user->rights->facture->creer)
$payment->paiementid = $paiementid;
$payment->num_payment = $invoice->ref;
if ($pay!="delayed") $payment->create($user);
if ($pay!="delayed") $payment->addPaymentToBank($user, 'payment', '(CustomerInvoicePayment)', $bankaccount, '', '');
if ($pay != "delayed") $payment->create($user);
if ($pay != "delayed") $payment->addPaymentToBank($user, 'payment', '(CustomerInvoicePayment)', $bankaccount, '', '');
$remaintopay = $invoice->getRemainToPay(); // Recalculate remain to pay after the payment is recorded
if ($remaintopay == 0) {