Update invoice.php
This commit is contained in:
parent
f57f729d40
commit
ea478721e7
@ -249,8 +249,10 @@ if ($action == 'valid' && $user->rights->facture->creer)
|
|||||||
$payment->paiementid = $paiementid;
|
$payment->paiementid = $paiementid;
|
||||||
$payment->num_payment = $invoice->ref;
|
$payment->num_payment = $invoice->ref;
|
||||||
|
|
||||||
if ($pay != "delayed") $payment->create($user);
|
if ($pay != "delayed") {
|
||||||
if ($pay != "delayed") $payment->addPaymentToBank($user, 'payment', '(CustomerInvoicePayment)', $bankaccount, '', '');
|
$payment->create($user);
|
||||||
|
$payment->addPaymentToBank($user, 'payment', '(CustomerInvoicePayment)', $bankaccount, '', '');
|
||||||
|
}
|
||||||
|
|
||||||
$remaintopay = $invoice->getRemainToPay(); // Recalculate remain to pay after the payment is recorded
|
$remaintopay = $invoice->getRemainToPay(); // Recalculate remain to pay after the payment is recorded
|
||||||
if ($remaintopay == 0) {
|
if ($remaintopay == 0) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user