FIX: Loan - Payment in not integrate in bank due to a problem with the type of payment
This commit is contained in:
parent
8f4fc046ec
commit
62d91c3631
@ -475,7 +475,7 @@ class PaymentLoan extends CommonObject
|
||||
// Insert payment into llx_bank
|
||||
$bank_line_id = $acc->addline(
|
||||
$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,
|
||||
$total,
|
||||
$this->num_payment,
|
||||
|
||||
@ -152,7 +152,7 @@ if ($action == 'add_payment')
|
||||
|
||||
// Create a line of payments
|
||||
$payment = new PaymentLoan($db);
|
||||
$payment->chid = $chid;
|
||||
$payment->chid = $chid;
|
||||
$payment->datep = $datepaid;
|
||||
$payment->label = $loan->label;
|
||||
$payment->amount_capital = $pay_amount_capital;
|
||||
@ -176,7 +176,7 @@ if ($action == 'add_payment')
|
||||
|
||||
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)
|
||||
{
|
||||
setEventMessages($payment->error, $payment->errors, 'errors');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user