diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index d4290d2d3aa..c64a334ddbe 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -1272,7 +1272,7 @@ if ($ispaymentok) { } if ($bankaccountid > 0) { $label = '(CustomerInvoicePayment)'; - if ($object->type == Facture::TYPE_CREDIT_NOTE) { + if ($invoice->type == Facture::TYPE_CREDIT_NOTE) { $label = '(CustomerInvoicePaymentBack)'; // Refund of a credit note } $result = $paiement->addPaymentToBank($user, 'payment', $label, $bankaccountid, '', ''); @@ -2014,7 +2014,7 @@ if ($ispaymentok) { } if ($bankaccountid > 0) { $label = '(CustomerInvoicePayment)'; - if ($object->type == Facture::TYPE_CREDIT_NOTE) { + if ($invoice->type == Facture::TYPE_CREDIT_NOTE) { $label = '(CustomerInvoicePaymentBack)'; // Refund of a credit note } $result = $paiement->addPaymentToBank($user, 'payment', $label, $bankaccountid, '', '');