From ea478721e7d59101c63408e10619a4a62459304e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 Aug 2020 14:36:03 +0200 Subject: [PATCH] Update invoice.php --- htdocs/takepos/invoice.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index ebfb5fa5c5f..7d645f0bd70 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -249,8 +249,10 @@ 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); + $payment->addPaymentToBank($user, 'payment', '(CustomerInvoicePayment)', $bankaccount, '', ''); + } $remaintopay = $invoice->getRemainToPay(); // Recalculate remain to pay after the payment is recorded if ($remaintopay == 0) {