FIX: Loan - Payment in not integrate in bank due to a problem with the type of payment
This commit is contained in:
parent
f8fe7b5a0e
commit
9cea8b8244
@ -475,7 +475,7 @@ class PaymentLoan extends CommonObject
|
|||||||
// Insert payment into llx_bank
|
// Insert payment into llx_bank
|
||||||
$bank_line_id = $acc->addline(
|
$bank_line_id = $acc->addline(
|
||||||
$this->datep,
|
$this->datep,
|
||||||
$this->fk_typepayment, // Payment mode ID or code ("CHQ or VIR for example")
|
$this->paymenttype, // Payment mode ID or code ("CHQ or VIR for example")
|
||||||
$label,
|
$label,
|
||||||
$total,
|
$total,
|
||||||
$this->num_payment,
|
$this->num_payment,
|
||||||
|
|||||||
@ -176,7 +176,7 @@ if ($action == 'add_payment')
|
|||||||
|
|
||||||
if (!$error)
|
if (!$error)
|
||||||
{
|
{
|
||||||
$result = $payment->addPaymentToBank($user, $chid, 'payment_loan', '(LoanPayment)', GETPOST('accountid', 'int'), '', '');
|
$result = $payment->addPaymentToBank($user, $chid, 'payment_loan', '(LoanPayment)', $payment->fk_bank, '', '');
|
||||||
if (!$result > 0)
|
if (!$result > 0)
|
||||||
{
|
{
|
||||||
setEventMessages($payment->error, $payment->errors, 'errors');
|
setEventMessages($payment->error, $payment->errors, 'errors');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user