diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index 2bb530ef5d6..2d9501ea549 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -72,7 +72,7 @@ class PaymentLoan extends CommonObject public $amount_interest; /** - * @var int Payment type ID + * @var int Payment mode ID */ public $fk_typepayment; @@ -450,7 +450,7 @@ class PaymentLoan extends CommonObject // Insert payment into llx_bank $bank_line_id = $acc->addline( $this->datep, - $this->paymenttype, // Payment mode id or code ("CHQ or VIR for example") + $this->fk_typepayment, // Payment mode ID or code ("CHQ or VIR for example") $label, $total, $this->num_payment, diff --git a/htdocs/loan/payment/payment.php b/htdocs/loan/payment/payment.php index 07002965079..4b305dedabf 100644 --- a/htdocs/loan/payment/payment.php +++ b/htdocs/loan/payment/payment.php @@ -314,7 +314,7 @@ if ($action == 'create') print ''; print ''.$langs->trans("PaymentMode").''; - $form->select_types_paiements(isset($_POST["paymenttype"]) ? $_POST["paymenttype"] : $loan->paymenttype, "paymenttype"); + $form->select_types_paiements(GETPOSTISSET("paymenttype") ? GETPOST("paymenttype", 'alphanohtml') : $loan->fk_typepayment, "paymenttype"); print "\n"; print ''; @@ -328,7 +328,7 @@ if ($action == 'create') print ''.$langs->trans('Numero'); print ' ('.$langs->trans("ChequeOrTransferNumber").')'; print ''; - print ''."\n"; + print ''."\n"; print ''; print ''.$langs->trans("NotePrivate").'';