diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index c5d38d1148d..1c9d6f97a01 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -304,7 +304,7 @@ if ($action == 'create') // insurance amount print ''.$langs->trans("Insurance").''; - + // Project if (! empty($conf->projet->enabled)) { @@ -499,7 +499,7 @@ if ($id > 0) { print ''.$langs->trans("LoanCapital").''.price($object->capital, 0, $outputlangs, 1, -1, -1, $conf->currency).''; } - + // Insurance if ($action == 'edit') { @@ -712,9 +712,9 @@ if ($id > 0) print ''.$langs->trans("RefPayment").''; print ''.$langs->trans("Date").''; print ''.$langs->trans("Type").''; - print ''.$langs->trans("Insurance").''; - print ''.$langs->trans("Interest").''; - print ''.$langs->trans("LoanCapital").''; + print ''.$langs->trans("Insurance").''; + print ''.$langs->trans("Interest").''; + print ''.$langs->trans("LoanCapital").''; print ''; while ($i < $num) @@ -725,9 +725,9 @@ if ($id > 0) print ''.img_object($langs->trans("Payment"), "payment").' '.$objp->rowid.''; print ''.dol_print_date($db->jdate($objp->dp), 'day')."\n"; print "".$objp->paiement_type.' '.$objp->num_payment."\n"; - print ''.price($objp->amount_insurance, 0, $outputlangs, 1, -1, -1, $conf->currency)."\n"; - print ''.price($objp->amount_interest, 0, $outputlangs, 1, -1, -1, $conf->currency)."\n"; - print ''.price($objp->amount_capital, 0, $outputlangs, 1, -1, -1, $conf->currency)."\n"; + print ''.price($objp->amount_insurance, 0, $outputlangs, 1, -1, -1, $conf->currency)."\n"; + print ''.price($objp->amount_interest, 0, $outputlangs, 1, -1, -1, $conf->currency)."\n"; + print ''.price($objp->amount_capital, 0, $outputlangs, 1, -1, -1, $conf->currency)."\n"; print ""; $total_capital += $objp->amount_capital; $i++; @@ -737,13 +737,13 @@ if ($id > 0) if ($object->paid == 0) { - print ''.$langs->trans("AlreadyPaid").' :'.price($totalpaid, 0, $langs, 0, 0, -1, $conf->currency).''; - print ''.$langs->trans("AmountExpected").' :'.price($object->capital, 0, $outputlangs, 1, -1, -1, $conf->currency).''; + print ''.$langs->trans("AlreadyPaid").' :'.price($totalpaid, 0, $langs, 0, 0, -1, $conf->currency).''; + print ''.$langs->trans("AmountExpected").' :'.price($object->capital, 0, $outputlangs, 1, -1, -1, $conf->currency).''; $staytopay = $object->capital - $totalpaid; - print ''.$langs->trans("RemainderToPay").' :'; - print ''; + print ''.$langs->trans("RemainderToPay").' :'; + print ''; print price($staytopay, 0, $langs, 0, 0, -1, $conf->currency); print ''; } diff --git a/htdocs/loan/createschedule.php b/htdocs/loan/createschedule.php index 76bbaef715c..96c84b2306a 100644 --- a/htdocs/loan/createschedule.php +++ b/htdocs/loan/createschedule.php @@ -77,7 +77,7 @@ if ($action == 'updateecheancier') { $int = GETPOST('hi_interets'.$i); $id = GETPOST('hi_rowid'.$i); $insurance = GETPOST('hi_insurance'.$i); - + $echeance = new LoanSchedule($db); $echeance->fetch($id); $echeance->tms = dol_now(); @@ -148,18 +148,18 @@ print ''; print ''; $colspan = 6; if (count($echeance->lines)>0) $colspan++; -print ''; print ''; print ''; -Print ''; -Print ''; -print ''; -Print ''; -Print ''; +Print ''; +print ''; +Print ''; +Print ''; @@ -180,12 +180,12 @@ if ($object->nbterm > 0 && count($echeance->lines)==0) $int = price2num($int, 'MT'); $cap_rest = price2num($capital - ($mens-$int), 'MT'); print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; print ''."\n"; $i++; $capital = $cap_rest; @@ -203,18 +203,18 @@ elseif(count($echeance->lines)>0) $int = $line->amount_interest; $cap_rest = price2num($capital - ($mens-$int), 'MT'); print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; if($line->datep > dol_now()){ - print ''; + print ''; }else{ - print ''; + print ''; } - - print ''; - print ''; + + print ''; + print ''; print ''."\n"; $i++; $capital = $cap_rest; @@ -224,7 +224,7 @@ elseif(count($echeance->lines)>0) print '
'; +print ''; print $langs->trans("FinancialCommitment"); print '
'.$langs->trans("Term").''.$langs->trans("Date").''.$langs->trans("Insurance"); -Print ''.$langs->trans("InterestAmount").''.$langs->trans("Amount").''.$langs->trans("CapitalRemain"); +Print ''.$langs->trans("Term").''.$langs->trans("Date").''.$langs->trans("Insurance"); +Print ''.$langs->trans("InterestAmount").''.$langs->trans("Amount").''.$langs->trans("CapitalRemain"); print ' ('.price2num($object->capital).')'; print ''; print '
' . $i .'' . dol_print_date(dol_time_plus_duree($object->datestart, $i-1, 'm'), 'day') . ''.price($insurance+(($i == 1) ? $regulInsurance : 0), 0, '', 1).' €'.price($int, 0, '', 1).' €'.price($cap_rest).' €' . $i .'' . dol_print_date(dol_time_plus_duree($object->datestart, $i-1, 'm'), 'day') . ''.price($insurance+(($i == 1) ? $regulInsurance : 0), 0, '', 1).' €'.price($int, 0, '', 1).' €'.price($cap_rest).' €
' . $i .'' . dol_print_date($line->datep, 'day') . ''.price($insurance+(($i == 1) ? $regulInsurance : 0), 0, '', 1).' €'.price($int, 0, '', 1).' €' . $i .'' . dol_print_date($line->datep, 'day') . ''.price($insurance+(($i == 1) ? $regulInsurance : 0), 0, '', 1).' €'.price($int, 0, '', 1).' €' . price($mens) . ' €' . price($mens) . ' €'.price($cap_rest).' €'.$langs->trans('DoPayment').''.price($cap_rest).' €'.$langs->trans('DoPayment').'
'; print '
'; print '
'; -print '
'; +print '
'; print ''; // End of page diff --git a/htdocs/loan/list.php b/htdocs/loan/list.php index be3de3a81d1..2fb58d6132c 100644 --- a/htdocs/loan/list.php +++ b/htdocs/loan/list.php @@ -139,11 +139,11 @@ if ($resql) print ''; print ''; print ''; - print ''; + print ''; print ' '; print ' '; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -151,11 +151,11 @@ if ($resql) print ''; print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "l.rowid", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "l.label", "", $param, 'align="left"', $sortfield, $sortorder); - print_liste_field_titre("LoanCapital", $_SERVER["PHP_SELF"], "l.capital", "", $param, 'align="right"', $sortfield, $sortorder); - print_liste_field_titre("DateStart", $_SERVER["PHP_SELF"], "l.datestart", "", $param, 'align="center"', $sortfield, $sortorder); - print_liste_field_titre("DateEnd", $_SERVER["PHP_SELF"], "l.dateend", "", $param, 'align="center"', $sortfield, $sortorder); - print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "l.paid", "", $param, 'align="right"', $sortfield, $sortorder); + print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "l.label", "", $param, '', $sortfield, $sortorder, 'left '); + print_liste_field_titre("LoanCapital", $_SERVER["PHP_SELF"], "l.capital", "", $param, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre("DateStart", $_SERVER["PHP_SELF"], "l.datestart", "", $param, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre("DateEnd", $_SERVER["PHP_SELF"], "l.dateend", "", $param, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "l.paid", "", $param, '', $sortfield, $sortorder, 'right '); print_liste_field_titre(''); print "\n"; @@ -175,15 +175,15 @@ if ($resql) print ''.dol_trunc($obj->label, 42).''; // Capital - print ''.price($obj->capital).''; + print ''.price($obj->capital).''; // Date start - print ''.dol_print_date($db->jdate($obj->datestart), 'day').''; + print ''.dol_print_date($db->jdate($obj->datestart), 'day').''; // Date end - print ''.dol_print_date($db->jdate($obj->dateend), 'day').''; + print ''.dol_print_date($db->jdate($obj->dateend), 'day').''; - print ''.$loan_static->LibStatut($obj->paid, 5, $obj->alreadypayed).''; + print ''.$loan_static->LibStatut($obj->paid, 5, $obj->alreadypayed).''; print ''; diff --git a/htdocs/loan/payment/card.php b/htdocs/loan/payment/card.php index 23251c21375..2a5d8c73e76 100644 --- a/htdocs/loan/payment/card.php +++ b/htdocs/loan/payment/card.php @@ -56,7 +56,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->loan->del $sql = "UPDATE ".MAIN_DB_PREFIX."loan_schedule SET fk_bank = 0 WHERE fk_bank = ".$payment->fk_bank; $db->query($sql); - + $result = $payment->delete($user); if ($result > 0) { @@ -214,9 +214,9 @@ if ($resql) print ''; print ''.$langs->trans('Loan').''; print ''.$langs->trans('Label').''; - // print ''.$langs->trans('ExpectedToPay').''; - print ''.$langs->trans('Status').''; - print ''.$langs->trans('PayedByThisPayment').''; + // print ''.$langs->trans('ExpectedToPay').''; + print ''.$langs->trans('Status').''; + print ''.$langs->trans('PayedByThisPayment').''; print "\n"; if ($num > 0) @@ -234,13 +234,13 @@ if ($resql) // Label print ''.$objp->label.''; // Expected to pay - // print ''.price($objp->capital).''; + // print ''.price($objp->capital).''; // Status - print ''.$loan->getLibStatut(4, $objp->amount_capital).''; + print ''.$loan->getLibStatut(4, $objp->amount_capital).''; // Amount payed $amount_payed = $objp->amount_capital + $objp->amount_insurance + $objp->amount_interest; - print ''.price($amount_payed).''; + print ''.price($amount_payed).''; print "\n"; if ($objp->paid == 1) // If at least one invoice is paid, disable delete { diff --git a/htdocs/loan/payment/payment.php b/htdocs/loan/payment/payment.php index db858c95ed8..2b50e27ad9b 100644 --- a/htdocs/loan/payment/payment.php +++ b/htdocs/loan/payment/payment.php @@ -279,30 +279,30 @@ if ($action == 'create') print ''; print ''; print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; print "\n"; print ''; if ($loan->datestart > 0) { - print ''; + print ''; } else { - print ''; + print ''; } - print '"; + print '"; - print '"; + print '"; - print '"; + print '"; - print '
'.$langs->trans("DateDue").''.$langs->trans("LoanCapital").''.$langs->trans("AlreadyPaid").''.$langs->trans("RemainderToPay").''.$langs->trans("Amount").''.$langs->trans("LoanCapital").''.$langs->trans("AlreadyPaid").''.$langs->trans("RemainderToPay").''.$langs->trans("Amount").'
'.dol_print_date($loan->datestart, 'day').''.dol_print_date($loan->datestart, 'day').'!!!!!!'.price($loan->capital)."'.price($loan->capital)."'.price($sumpaid)."'.price($sumpaid)."'.price($loan->capital - $sumpaid)."'.price($loan->capital - $sumpaid)."'; + print ''; if ($sumpaid < $loan->capital) { print $langs->trans("LoanCapital") .': '; diff --git a/htdocs/loan/schedule.php b/htdocs/loan/schedule.php index 2041445b24b..d422f541b10 100644 --- a/htdocs/loan/schedule.php +++ b/htdocs/loan/schedule.php @@ -45,17 +45,17 @@ $head=loan_prepare_head($object); dol_fiche_head($head, 'FinancialCommitment', $langs->trans("Loan"), -1, 'bill'); if ($action == 'createecheancier') { - + $i=1; while($i <$object->nbterm+1){ - + $date = GETPOST('hi_date'.$i, 'int'); $mens = GETPOST('mens'.$i); $int = GETPOST('hi_interets'.$i); $insurance = GETPOST('hi_insurance'.$i); - + $echeance = new LoanSchedule($db); - + $echeance->fk_loan = $object->id; $echeance->datec = dol_now(); $echeance->tms = dol_now(); @@ -76,15 +76,15 @@ if ($action == 'createecheancier') { } if ($action == 'updateecheancier') { - + $i=1; while($i <$object->nbterm+1){ - + $mens = GETPOST('mens'.$i); $int = GETPOST('hi_interets'.$i); $id = GETPOST('hi_rowid'.$i); $insurance = GETPOST('hi_insurance'.$i); - + $echeance = new LoanSchedule($db); $echeance->fetch($id); $echeance->tms = dol_now(); @@ -154,18 +154,18 @@ print ''; print ''; $colspan = 6; if (count($echeance->lines)>0) $colspan++; -print ''; print ''; print ''; -Print ''; -Print ''; -print ''; -Print ''; -Print ''; +Print ''; +print ''; +Print ''; +Print ''; @@ -187,12 +187,12 @@ if ($object->nbterm > 0 && count($echeance->lines)==0) $insu = ($insurance+(($i == 1) ? $regulInsurance : 0)); $cap_rest = price2num($capital - ($mens-$int), 'MT'); print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; print ''."\n"; $i++; $capital = $cap_rest; @@ -211,20 +211,20 @@ elseif(count($echeance->lines)>0) $int = $line->amount_interest; $insu = ($insurance+(($i == 1) ? $regulInsurance : 0)); $cap_rest = price2num($capital - ($mens-$int), 'MT'); - + print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; if($line->datep > dol_now() && empty($line->fk_bank)){ - print ''; + print ''; }else{ - print ''; + print ''; } - - print ''; - print ''; + print '
'; +print ''; print $langs->trans("FinancialCommitment"); print '
'.$langs->trans("Term").''.$langs->trans("Date").''.$langs->trans("Insurance"); -Print ''.$langs->trans("InterestAmount").''.$langs->trans("Amount").''.$langs->trans("CapitalRemain"); +Print ''.$langs->trans("Term").''.$langs->trans("Date").''.$langs->trans("Insurance"); +Print ''.$langs->trans("InterestAmount").''.$langs->trans("Amount").''.$langs->trans("CapitalRemain"); print ' ('.price2num($object->capital).')'; print ''; print '
' . $i .'' . dol_print_date(dol_time_plus_duree($object->datestart, $i-1, 'm'), 'day') . ''.price($insurance+(($i == 1) ? $regulInsurance : 0), 0, '', 1).' €'.price($int, 0, '', 1).' €'.price($cap_rest).' €' . $i .'' . dol_print_date(dol_time_plus_duree($object->datestart, $i-1, 'm'), 'day') . ''.price($insurance+(($i == 1) ? $regulInsurance : 0), 0, '', 1).' €'.price($int, 0, '', 1).' €'.price($cap_rest).' €
' . $i .'' . dol_print_date($line->datep, 'day') . ''.price($insu, 0, '', 1).' €'.price($int, 0, '', 1).' €' . $i .'' . dol_print_date($line->datep, 'day') . ''.price($insu, 0, '', 1).' €'.price($int, 0, '', 1).' €' . price($mens) . ' €' . price($mens) . ' €'.price($cap_rest).' €'; + + print ''.price($cap_rest).' €'; if (!empty($line->fk_bank)) print $langs->trans('Paid'); elseif (!$printed) { @@ -243,7 +243,7 @@ print '
'; print '
'; if (count($echeance->lines)==0) $label = $langs->trans("Create"); else $label = $langs->trans("Save"); -print '
'; +print '
'; print ''; // End of page