From db2937715df40c1177567a03906482b760e059e3 Mon Sep 17 00:00:00 2001 From: atm-greg Date: Thu, 18 Oct 2018 17:27:08 +0200 Subject: [PATCH] create payment from loan schedule --- htdocs/loan/schedule.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/loan/schedule.php b/htdocs/loan/schedule.php index 58130c2c26a..d775ebaca84 100644 --- a/htdocs/loan/schedule.php +++ b/htdocs/loan/schedule.php @@ -208,10 +208,11 @@ elseif(count($echeance->lines)>0) $mens = $line->amount_capital+$line->amount_insurance+$line->amount_interest; $int = $line->amount_interest; $cap_rest = price2num($capital - ($mens-$int), 'MT'); + $insu = ($insurance+(($i == 1) ? $regulInsurance : 0)); print ''; print '' . $i .''; print '' . dol_print_date($line->datep,'day') . ''; - print ''.price($insurance+(($i == 1) ? $regulInsurance : 0),0,'',1).' €'; + print ''.price($insu,0,'',1).' €'; print ''.price($int,0,'',1).' €'; if($line->datep > dol_now()){ print ' €'; @@ -221,7 +222,7 @@ elseif(count($echeance->lines)>0) print ''.price($cap_rest).' €'; print ''; - print ''.$langs->trans('DoPayment').''; + print ''.$langs->trans('DoPayment').''; print ''; print ''."\n"; $i++;