replace html by html5 in loan
This commit is contained in:
parent
4cb5c9ef35
commit
3f84cd95df
@ -712,9 +712,9 @@ if ($id > 0)
|
|||||||
print '<td>'.$langs->trans("RefPayment").'</td>';
|
print '<td>'.$langs->trans("RefPayment").'</td>';
|
||||||
print '<td>'.$langs->trans("Date").'</td>';
|
print '<td>'.$langs->trans("Date").'</td>';
|
||||||
print '<td>'.$langs->trans("Type").'</td>';
|
print '<td>'.$langs->trans("Type").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Insurance").'</td>';
|
print '<td class="right">'.$langs->trans("Insurance").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Interest").'</td>';
|
print '<td class="right">'.$langs->trans("Interest").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("LoanCapital").'</td>';
|
print '<td class="right">'.$langs->trans("LoanCapital").'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
@ -725,9 +725,9 @@ if ($id > 0)
|
|||||||
print '<td><a href="'.DOL_URL_ROOT.'/loan/payment/card.php?id='.$objp->rowid.'">'.img_object($langs->trans("Payment"), "payment").' '.$objp->rowid.'</a></td>';
|
print '<td><a href="'.DOL_URL_ROOT.'/loan/payment/card.php?id='.$objp->rowid.'">'.img_object($langs->trans("Payment"), "payment").' '.$objp->rowid.'</a></td>';
|
||||||
print '<td>'.dol_print_date($db->jdate($objp->dp), 'day')."</td>\n";
|
print '<td>'.dol_print_date($db->jdate($objp->dp), 'day')."</td>\n";
|
||||||
print "<td>".$objp->paiement_type.' '.$objp->num_payment."</td>\n";
|
print "<td>".$objp->paiement_type.' '.$objp->num_payment."</td>\n";
|
||||||
print '<td align="right">'.price($objp->amount_insurance, 0, $outputlangs, 1, -1, -1, $conf->currency)."</td>\n";
|
print '<td class="right">'.price($objp->amount_insurance, 0, $outputlangs, 1, -1, -1, $conf->currency)."</td>\n";
|
||||||
print '<td align="right">'.price($objp->amount_interest, 0, $outputlangs, 1, -1, -1, $conf->currency)."</td>\n";
|
print '<td class="right">'.price($objp->amount_interest, 0, $outputlangs, 1, -1, -1, $conf->currency)."</td>\n";
|
||||||
print '<td align="right">'.price($objp->amount_capital, 0, $outputlangs, 1, -1, -1, $conf->currency)."</td>\n";
|
print '<td class="right">'.price($objp->amount_capital, 0, $outputlangs, 1, -1, -1, $conf->currency)."</td>\n";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
$total_capital += $objp->amount_capital;
|
$total_capital += $objp->amount_capital;
|
||||||
$i++;
|
$i++;
|
||||||
@ -737,13 +737,13 @@ if ($id > 0)
|
|||||||
|
|
||||||
if ($object->paid == 0)
|
if ($object->paid == 0)
|
||||||
{
|
{
|
||||||
print '<tr><td colspan="5" align="right">'.$langs->trans("AlreadyPaid").' :</td><td align="right">'.price($totalpaid, 0, $langs, 0, 0, -1, $conf->currency).'</td></tr>';
|
print '<tr><td colspan="5" class="right">'.$langs->trans("AlreadyPaid").' :</td><td class="right">'.price($totalpaid, 0, $langs, 0, 0, -1, $conf->currency).'</td></tr>';
|
||||||
print '<tr><td colspan="5" align="right">'.$langs->trans("AmountExpected").' :</td><td align="right">'.price($object->capital, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
|
print '<tr><td colspan="5" class="right">'.$langs->trans("AmountExpected").' :</td><td class="right">'.price($object->capital, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
|
||||||
|
|
||||||
$staytopay = $object->capital - $totalpaid;
|
$staytopay = $object->capital - $totalpaid;
|
||||||
|
|
||||||
print '<tr><td colspan="5" align="right">'.$langs->trans("RemainderToPay").' :</td>';
|
print '<tr><td colspan="5" class="right">'.$langs->trans("RemainderToPay").' :</td>';
|
||||||
print '<td align="right"'.($staytopay?' class="amountremaintopay"':'class="amountpaymentcomplete"').'>';
|
print '<td class="right"'.($staytopay?' class="amountremaintopay"':'class="amountpaymentcomplete"').'>';
|
||||||
print price($staytopay, 0, $langs, 0, 0, -1, $conf->currency);
|
print price($staytopay, 0, $langs, 0, 0, -1, $conf->currency);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -148,18 +148,18 @@ print '<table class="border" width="100%">';
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
$colspan = 6;
|
$colspan = 6;
|
||||||
if (count($echeance->lines)>0) $colspan++;
|
if (count($echeance->lines)>0) $colspan++;
|
||||||
print '<th align="center" colspan="'.$colspan.'">';
|
print '<th class="center" colspan="'.$colspan.'">';
|
||||||
print $langs->trans("FinancialCommitment");
|
print $langs->trans("FinancialCommitment");
|
||||||
print '</th>';
|
print '</th>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
Print '<th width="5%" align="center">'.$langs->trans("Term").'</th>';
|
Print '<th width="5%" class="center">'.$langs->trans("Term").'</th>';
|
||||||
Print '<th width="5%" align="center">'.$langs->trans("Date").'</th>';
|
Print '<th width="5%" class="center">'.$langs->trans("Date").'</th>';
|
||||||
print '<th width="15%" align="center">'.$langs->trans("Insurance");
|
print '<th width="15%" class="center">'.$langs->trans("Insurance");
|
||||||
Print '<th width="15%" align="center">'.$langs->trans("InterestAmount").'</th>';
|
Print '<th width="15%" class="center">'.$langs->trans("InterestAmount").'</th>';
|
||||||
Print '<th width="10%" align="center">'.$langs->trans("Amount").'</th>';
|
Print '<th width="10%" class="center">'.$langs->trans("Amount").'</th>';
|
||||||
Print '<th width="40%" align="center">'.$langs->trans("CapitalRemain");
|
Print '<th width="40%" class="center">'.$langs->trans("CapitalRemain");
|
||||||
print ' ('.price2num($object->capital).')';
|
print ' ('.price2num($object->capital).')';
|
||||||
print '<input type="hidden" name="hi_capital0" id ="hi_capital0" value="'.$object->capital.'">';
|
print '<input type="hidden" name="hi_capital0" id ="hi_capital0" value="'.$object->capital.'">';
|
||||||
print '</th>';
|
print '</th>';
|
||||||
@ -180,12 +180,12 @@ if ($object->nbterm > 0 && count($echeance->lines)==0)
|
|||||||
$int = price2num($int, 'MT');
|
$int = price2num($int, 'MT');
|
||||||
$cap_rest = price2num($capital - ($mens-$int), 'MT');
|
$cap_rest = price2num($capital - ($mens-$int), 'MT');
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td align="center" id="n'.$i.'">' . $i .'</td>';
|
print '<td class="center" id="n'.$i.'">' . $i .'</td>';
|
||||||
print '<td align="center" id ="date' .$i .'"><input type="hidden" name="hi_date' .$i .'" id ="hi_date' .$i .'" value="' . dol_time_plus_duree($object->datestart, $i-1, 'm') . '">' . dol_print_date(dol_time_plus_duree($object->datestart, $i-1, 'm'), 'day') . '</td>';
|
print '<td class="center" id ="date' .$i .'"><input type="hidden" name="hi_date' .$i .'" id ="hi_date' .$i .'" value="' . dol_time_plus_duree($object->datestart, $i-1, 'm') . '">' . dol_print_date(dol_time_plus_duree($object->datestart, $i-1, 'm'), 'day') . '</td>';
|
||||||
print '<td align="center" id="insurance'.$i.'">'.price($insurance+(($i == 1) ? $regulInsurance : 0), 0, '', 1).' €</td><input type="hidden" name="hi_insurance' .$i .'" id ="hi_insurance' .$i .'" value="' . ($insurance+(($i == 1) ? $regulInsurance : 0)) . '">';
|
print '<td class="center" id="insurance'.$i.'">'.price($insurance+(($i == 1) ? $regulInsurance : 0), 0, '', 1).' €</td><input type="hidden" name="hi_insurance' .$i .'" id ="hi_insurance' .$i .'" value="' . ($insurance+(($i == 1) ? $regulInsurance : 0)) . '">';
|
||||||
print '<td align="center" id="interets'.$i.'">'.price($int, 0, '', 1).' €</td><input type="hidden" name="hi_interets' .$i .'" id ="hi_interets' .$i .'" value="' . $int . '">';
|
print '<td class="center" id="interets'.$i.'">'.price($int, 0, '', 1).' €</td><input type="hidden" name="hi_interets' .$i .'" id ="hi_interets' .$i .'" value="' . $int . '">';
|
||||||
print '<td align="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"> €</td>';
|
print '<td class="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"> €</td>';
|
||||||
print '<td align="center" id="capital'.$i.'">'.price($cap_rest).' €</td><input type="hidden" name="hi_capital' .$i .'" id ="hi_capital' .$i .'" value="' . $cap_rest . '">';
|
print '<td class="center" id="capital'.$i.'">'.price($cap_rest).' €</td><input type="hidden" name="hi_capital' .$i .'" id ="hi_capital' .$i .'" value="' . $cap_rest . '">';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
$i++;
|
$i++;
|
||||||
$capital = $cap_rest;
|
$capital = $cap_rest;
|
||||||
@ -203,18 +203,18 @@ elseif(count($echeance->lines)>0)
|
|||||||
$int = $line->amount_interest;
|
$int = $line->amount_interest;
|
||||||
$cap_rest = price2num($capital - ($mens-$int), 'MT');
|
$cap_rest = price2num($capital - ($mens-$int), 'MT');
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td align="center" id="n'.$i.'"><input type="hidden" name="hi_rowid' .$i .'" id ="hi_rowid' .$i .'" value="' . $line->id . '">' . $i .'</td>';
|
print '<td class="center" id="n'.$i.'"><input type="hidden" name="hi_rowid' .$i .'" id ="hi_rowid' .$i .'" value="' . $line->id . '">' . $i .'</td>';
|
||||||
print '<td align="center" id ="date' .$i .'"><input type="hidden" name="hi_date' .$i .'" id ="hi_date' .$i .'" value="' . $line->datep . '">' . dol_print_date($line->datep, 'day') . '</td>';
|
print '<td class="center" id ="date' .$i .'"><input type="hidden" name="hi_date' .$i .'" id ="hi_date' .$i .'" value="' . $line->datep . '">' . dol_print_date($line->datep, 'day') . '</td>';
|
||||||
print '<td align="center" id="insurance'.$i.'">'.price($insurance+(($i == 1) ? $regulInsurance : 0), 0, '', 1).' €</td><input type="hidden" name="hi_insurance' .$i .'" id ="hi_insurance' .$i .'" value="' . ($insurance+(($i == 1) ? $regulInsurance : 0)) . '">';
|
print '<td class="center" id="insurance'.$i.'">'.price($insurance+(($i == 1) ? $regulInsurance : 0), 0, '', 1).' €</td><input type="hidden" name="hi_insurance' .$i .'" id ="hi_insurance' .$i .'" value="' . ($insurance+(($i == 1) ? $regulInsurance : 0)) . '">';
|
||||||
print '<td align="center" id="interets'.$i.'">'.price($int, 0, '', 1).' €</td><input type="hidden" name="hi_interets' .$i .'" id ="hi_interets' .$i .'" value="' . $int . '">';
|
print '<td class="center" id="interets'.$i.'">'.price($int, 0, '', 1).' €</td><input type="hidden" name="hi_interets' .$i .'" id ="hi_interets' .$i .'" value="' . $int . '">';
|
||||||
if($line->datep > dol_now()){
|
if($line->datep > dol_now()){
|
||||||
print '<td align="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"> €</td>';
|
print '<td class="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"> €</td>';
|
||||||
}else{
|
}else{
|
||||||
print '<td align="center">' . price($mens) . ' €</td><input type="hidden" name="mens' .$i .'" id ="mens' .$i .'" value="' . $mens . '">';
|
print '<td class="center">' . price($mens) . ' €</td><input type="hidden" name="mens' .$i .'" id ="mens' .$i .'" value="' . $mens . '">';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td align="center" id="capital'.$i.'">'.price($cap_rest).' €</td><input type="hidden" name="hi_capital' .$i .'" id ="hi_capital' .$i .'" value="' . $cap_rest . '">';
|
print '<td class="center" id="capital'.$i.'">'.price($cap_rest).' €</td><input type="hidden" name="hi_capital' .$i .'" id ="hi_capital' .$i .'" value="' . $cap_rest . '">';
|
||||||
print '<td align="center"><a class="butAction" href="'.DOL_URL_ROOT.'/loan/payment/payment.php?id='.$object->id.'&action=create">'.$langs->trans('DoPayment').'</a></td>';
|
print '<td class="center"><a class="butAction" href="'.DOL_URL_ROOT.'/loan/payment/payment.php?id='.$object->id.'&action=create">'.$langs->trans('DoPayment').'</a></td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
$i++;
|
$i++;
|
||||||
$capital = $cap_rest;
|
$capital = $cap_rest;
|
||||||
@ -224,7 +224,7 @@ elseif(count($echeance->lines)>0)
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
print '</br>';
|
print '</br>';
|
||||||
print '</br>';
|
print '</br>';
|
||||||
print '<div align="center"><input class="button" type="submit" value="'.$langs->trans("Save").'"></div>';
|
print '<div class="center"><input class="button" type="submit" value="'.$langs->trans("Save").'"></div>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
|
|||||||
@ -139,11 +139,11 @@ if ($resql)
|
|||||||
print '<tr class="liste_titre_filter">';
|
print '<tr class="liste_titre_filter">';
|
||||||
print '<td class="liste_titre"><input class="flat" size="4" type="text" name="search_ref" value="'.$search_ref.'"></td>';
|
print '<td class="liste_titre"><input class="flat" size="4" type="text" name="search_ref" value="'.$search_ref.'"></td>';
|
||||||
print '<td class="liste_titre"><input class="flat" size="12" type="text" name="search_label" value="'.$search_label.'"></td>';
|
print '<td class="liste_titre"><input class="flat" size="12" type="text" name="search_label" value="'.$search_label.'"></td>';
|
||||||
print '<td class="liste_titre" align="right" ><input class="flat" size="8" type="text" name="search_amount" value="'.$search_amount.'"></td>';
|
print '<td class="liste_titre right" ><input class="flat" size="8" type="text" name="search_amount" value="'.$search_amount.'"></td>';
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
print '<td class="liste_titre"></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
print '<td align="right" class="liste_titre">';
|
print '<td class="right liste_titre">';
|
||||||
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||||
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1).'" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1).'" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -151,11 +151,11 @@ if ($resql)
|
|||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "l.rowid", "", $param, "", $sortfield, $sortorder);
|
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("Label", $_SERVER["PHP_SELF"], "l.label", "", $param, '', $sortfield, $sortorder, 'left ');
|
||||||
print_liste_field_titre("LoanCapital", $_SERVER["PHP_SELF"], "l.capital", "", $param, 'align="right"', $sortfield, $sortorder);
|
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, 'align="center"', $sortfield, $sortorder);
|
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, 'align="center"', $sortfield, $sortorder);
|
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, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "l.paid", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
print_liste_field_titre('');
|
print_liste_field_titre('');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -175,15 +175,15 @@ if ($resql)
|
|||||||
print '<td>'.dol_trunc($obj->label, 42).'</td>';
|
print '<td>'.dol_trunc($obj->label, 42).'</td>';
|
||||||
|
|
||||||
// Capital
|
// Capital
|
||||||
print '<td align="right" width="100">'.price($obj->capital).'</td>';
|
print '<td class="right" width="100">'.price($obj->capital).'</td>';
|
||||||
|
|
||||||
// Date start
|
// Date start
|
||||||
print '<td width="110" align="center">'.dol_print_date($db->jdate($obj->datestart), 'day').'</td>';
|
print '<td width="110" class="center">'.dol_print_date($db->jdate($obj->datestart), 'day').'</td>';
|
||||||
|
|
||||||
// Date end
|
// Date end
|
||||||
print '<td width="110" align="center">'.dol_print_date($db->jdate($obj->dateend), 'day').'</td>';
|
print '<td width="110" class="center">'.dol_print_date($db->jdate($obj->dateend), 'day').'</td>';
|
||||||
|
|
||||||
print '<td align="right" class="nowrap">'.$loan_static->LibStatut($obj->paid, 5, $obj->alreadypayed).'</a></td>';
|
print '<td class="right nowrap">'.$loan_static->LibStatut($obj->paid, 5, $obj->alreadypayed).'</a></td>';
|
||||||
|
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
|
|
||||||
|
|||||||
@ -214,9 +214,9 @@ if ($resql)
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans('Loan').'</td>';
|
print '<td>'.$langs->trans('Loan').'</td>';
|
||||||
print '<td>'.$langs->trans('Label').'</td>';
|
print '<td>'.$langs->trans('Label').'</td>';
|
||||||
// print '<td align="right">'.$langs->trans('ExpectedToPay').'</td>';
|
// print '<td class="right">'.$langs->trans('ExpectedToPay').'</td>';
|
||||||
print '<td align="center">'.$langs->trans('Status').'</td>';
|
print '<td class="center">'.$langs->trans('Status').'</td>';
|
||||||
print '<td align="right">'.$langs->trans('PayedByThisPayment').'</td>';
|
print '<td class="right">'.$langs->trans('PayedByThisPayment').'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
@ -234,13 +234,13 @@ if ($resql)
|
|||||||
// Label
|
// Label
|
||||||
print '<td>'.$objp->label.'</td>';
|
print '<td>'.$objp->label.'</td>';
|
||||||
// Expected to pay
|
// Expected to pay
|
||||||
// print '<td align="right">'.price($objp->capital).'</td>';
|
// print '<td class="right">'.price($objp->capital).'</td>';
|
||||||
// Status
|
// Status
|
||||||
print '<td align="center">'.$loan->getLibStatut(4, $objp->amount_capital).'</td>';
|
print '<td class="center">'.$loan->getLibStatut(4, $objp->amount_capital).'</td>';
|
||||||
// Amount payed
|
// Amount payed
|
||||||
$amount_payed = $objp->amount_capital + $objp->amount_insurance + $objp->amount_interest;
|
$amount_payed = $objp->amount_capital + $objp->amount_insurance + $objp->amount_interest;
|
||||||
|
|
||||||
print '<td align="right">'.price($amount_payed).'</td>';
|
print '<td class="right">'.price($amount_payed).'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
if ($objp->paid == 1) // If at least one invoice is paid, disable delete
|
if ($objp->paid == 1) // If at least one invoice is paid, disable delete
|
||||||
{
|
{
|
||||||
|
|||||||
@ -279,30 +279,30 @@ if ($action == 'create')
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="left">'.$langs->trans("DateDue").'</td>';
|
print '<td class="left">'.$langs->trans("DateDue").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("LoanCapital").'</td>';
|
print '<td class="right">'.$langs->trans("LoanCapital").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("AlreadyPaid").'</td>';
|
print '<td class="right">'.$langs->trans("AlreadyPaid").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("RemainderToPay").'</td>';
|
print '<td class="right">'.$langs->trans("RemainderToPay").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
print '<td class="right">'.$langs->trans("Amount").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
if ($loan->datestart > 0)
|
if ($loan->datestart > 0)
|
||||||
{
|
{
|
||||||
print '<td align="left" valign="center">'.dol_print_date($loan->datestart, 'day').'</td>';
|
print '<td class="left" valign="center">'.dol_print_date($loan->datestart, 'day').'</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center" valign="center"><b>!!!</b></td>';
|
print '<td class="center" valign="center"><b>!!!</b></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td align="right" valign="center">'.price($loan->capital)."</td>";
|
print '<td class="right" valign="center">'.price($loan->capital)."</td>";
|
||||||
|
|
||||||
print '<td align="right" valign="center">'.price($sumpaid)."</td>";
|
print '<td class="right" valign="center">'.price($sumpaid)."</td>";
|
||||||
|
|
||||||
print '<td align="right" valign="center">'.price($loan->capital - $sumpaid)."</td>";
|
print '<td class="right" valign="center">'.price($loan->capital - $sumpaid)."</td>";
|
||||||
|
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($sumpaid < $loan->capital)
|
if ($sumpaid < $loan->capital)
|
||||||
{
|
{
|
||||||
print $langs->trans("LoanCapital") .': <input type="text" size="8" name="amount_capital" value="'.$amount_capital.'">';
|
print $langs->trans("LoanCapital") .': <input type="text" size="8" name="amount_capital" value="'.$amount_capital.'">';
|
||||||
|
|||||||
@ -154,18 +154,18 @@ print '<table class="border" width="100%">';
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
$colspan = 6;
|
$colspan = 6;
|
||||||
if (count($echeance->lines)>0) $colspan++;
|
if (count($echeance->lines)>0) $colspan++;
|
||||||
print '<th align="center" colspan="'.$colspan.'">';
|
print '<th class="center" colspan="'.$colspan.'">';
|
||||||
print $langs->trans("FinancialCommitment");
|
print $langs->trans("FinancialCommitment");
|
||||||
print '</th>';
|
print '</th>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
Print '<th width="5%" align="center">'.$langs->trans("Term").'</th>';
|
Print '<th width="5%" class="center">'.$langs->trans("Term").'</th>';
|
||||||
Print '<th width="5%" align="center">'.$langs->trans("Date").'</th>';
|
Print '<th width="5%" class="center">'.$langs->trans("Date").'</th>';
|
||||||
print '<th width="15%" align="center">'.$langs->trans("Insurance");
|
print '<th width="15%" class="center">'.$langs->trans("Insurance");
|
||||||
Print '<th width="15%" align="center">'.$langs->trans("InterestAmount").'</th>';
|
Print '<th width="15%" class="center">'.$langs->trans("InterestAmount").'</th>';
|
||||||
Print '<th width="10%" align="center">'.$langs->trans("Amount").'</th>';
|
Print '<th width="10%" class="center">'.$langs->trans("Amount").'</th>';
|
||||||
Print '<th width="40%" align="center">'.$langs->trans("CapitalRemain");
|
Print '<th width="40%" class="center">'.$langs->trans("CapitalRemain");
|
||||||
print ' ('.price2num($object->capital).')';
|
print ' ('.price2num($object->capital).')';
|
||||||
print '<input type="hidden" name="hi_capital0" id ="hi_capital0" value="'.$object->capital.'">';
|
print '<input type="hidden" name="hi_capital0" id ="hi_capital0" value="'.$object->capital.'">';
|
||||||
print '</th>';
|
print '</th>';
|
||||||
@ -187,12 +187,12 @@ if ($object->nbterm > 0 && count($echeance->lines)==0)
|
|||||||
$insu = ($insurance+(($i == 1) ? $regulInsurance : 0));
|
$insu = ($insurance+(($i == 1) ? $regulInsurance : 0));
|
||||||
$cap_rest = price2num($capital - ($mens-$int), 'MT');
|
$cap_rest = price2num($capital - ($mens-$int), 'MT');
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td align="center" id="n'.$i.'">' . $i .'</td>';
|
print '<td class="center" id="n'.$i.'">' . $i .'</td>';
|
||||||
print '<td align="center" id ="date' .$i .'"><input type="hidden" name="hi_date' .$i .'" id ="hi_date' .$i .'" value="' . dol_time_plus_duree($object->datestart, $i-1, 'm') . '">' . dol_print_date(dol_time_plus_duree($object->datestart, $i-1, 'm'), 'day') . '</td>';
|
print '<td class="center" id ="date' .$i .'"><input type="hidden" name="hi_date' .$i .'" id ="hi_date' .$i .'" value="' . dol_time_plus_duree($object->datestart, $i-1, 'm') . '">' . dol_print_date(dol_time_plus_duree($object->datestart, $i-1, 'm'), 'day') . '</td>';
|
||||||
print '<td align="center" id="insurance'.$i.'">'.price($insurance+(($i == 1) ? $regulInsurance : 0), 0, '', 1).' €</td><input type="hidden" name="hi_insurance' .$i .'" id ="hi_insurance' .$i .'" value="' . ($insurance+(($i == 1) ? $regulInsurance : 0)) . '">';
|
print '<td class="center" id="insurance'.$i.'">'.price($insurance+(($i == 1) ? $regulInsurance : 0), 0, '', 1).' €</td><input type="hidden" name="hi_insurance' .$i .'" id ="hi_insurance' .$i .'" value="' . ($insurance+(($i == 1) ? $regulInsurance : 0)) . '">';
|
||||||
print '<td align="center" id="interets'.$i.'">'.price($int, 0, '', 1).' €</td><input type="hidden" name="hi_interets' .$i .'" id ="hi_interets' .$i .'" value="' . $int . '">';
|
print '<td class="center" id="interets'.$i.'">'.price($int, 0, '', 1).' €</td><input type="hidden" name="hi_interets' .$i .'" id ="hi_interets' .$i .'" value="' . $int . '">';
|
||||||
print '<td align="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"> €</td>';
|
print '<td class="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"> €</td>';
|
||||||
print '<td align="center" id="capital'.$i.'">'.price($cap_rest).' €</td><input type="hidden" name="hi_capital' .$i .'" id ="hi_capital' .$i .'" value="' . $cap_rest . '">';
|
print '<td class="center" id="capital'.$i.'">'.price($cap_rest).' €</td><input type="hidden" name="hi_capital' .$i .'" id ="hi_capital' .$i .'" value="' . $cap_rest . '">';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
$i++;
|
$i++;
|
||||||
$capital = $cap_rest;
|
$capital = $cap_rest;
|
||||||
@ -213,18 +213,18 @@ elseif(count($echeance->lines)>0)
|
|||||||
$cap_rest = price2num($capital - ($mens-$int), 'MT');
|
$cap_rest = price2num($capital - ($mens-$int), 'MT');
|
||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td align="center" id="n'.$i.'"><input type="hidden" name="hi_rowid' .$i .'" id ="hi_rowid' .$i .'" value="' . $line->id . '">' . $i .'</td>';
|
print '<td class="center" id="n'.$i.'"><input type="hidden" name="hi_rowid' .$i .'" id ="hi_rowid' .$i .'" value="' . $line->id . '">' . $i .'</td>';
|
||||||
print '<td align="center" id ="date' .$i .'"><input type="hidden" name="hi_date' .$i .'" id ="hi_date' .$i .'" value="' . $line->datep . '">' . dol_print_date($line->datep, 'day') . '</td>';
|
print '<td class="center" id ="date' .$i .'"><input type="hidden" name="hi_date' .$i .'" id ="hi_date' .$i .'" value="' . $line->datep . '">' . dol_print_date($line->datep, 'day') . '</td>';
|
||||||
print '<td align="center" id="insurance'.$i.'">'.price($insu, 0, '', 1).' €</td><input type="hidden" name="hi_insurance' .$i .'" id ="hi_insurance' .$i .'" value="' . $insu . '">';
|
print '<td class="center" id="insurance'.$i.'">'.price($insu, 0, '', 1).' €</td><input type="hidden" name="hi_insurance' .$i .'" id ="hi_insurance' .$i .'" value="' . $insu . '">';
|
||||||
print '<td align="center" id="interets'.$i.'">'.price($int, 0, '', 1).' €</td><input type="hidden" name="hi_interets' .$i .'" id ="hi_interets' .$i .'" value="' . $int . '">';
|
print '<td class="center" id="interets'.$i.'">'.price($int, 0, '', 1).' €</td><input type="hidden" name="hi_interets' .$i .'" id ="hi_interets' .$i .'" value="' . $int . '">';
|
||||||
if($line->datep > dol_now() && empty($line->fk_bank)){
|
if($line->datep > dol_now() && empty($line->fk_bank)){
|
||||||
print '<td align="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"> €</td>';
|
print '<td class="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"> €</td>';
|
||||||
}else{
|
}else{
|
||||||
print '<td align="center">' . price($mens) . ' €</td><input type="hidden" name="mens' .$i .'" id ="mens' .$i .'" value="' . $mens . '">';
|
print '<td class="center">' . price($mens) . ' €</td><input type="hidden" name="mens' .$i .'" id ="mens' .$i .'" value="' . $mens . '">';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td align="center" id="capital'.$i.'">'.price($cap_rest).' €</td><input type="hidden" name="hi_capital' .$i .'" id ="hi_capital' .$i .'" value="' . $cap_rest . '">';
|
print '<td class="center" id="capital'.$i.'">'.price($cap_rest).' €</td><input type="hidden" name="hi_capital' .$i .'" id ="hi_capital' .$i .'" value="' . $cap_rest . '">';
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if (!empty($line->fk_bank)) print $langs->trans('Paid');
|
if (!empty($line->fk_bank)) print $langs->trans('Paid');
|
||||||
elseif (!$printed)
|
elseif (!$printed)
|
||||||
{
|
{
|
||||||
@ -243,7 +243,7 @@ print '</br>';
|
|||||||
print '</br>';
|
print '</br>';
|
||||||
if (count($echeance->lines)==0) $label = $langs->trans("Create");
|
if (count($echeance->lines)==0) $label = $langs->trans("Create");
|
||||||
else $label = $langs->trans("Save");
|
else $label = $langs->trans("Save");
|
||||||
print '<div align="center"><input class="button" type="submit" value="'.$label.'"></div>';
|
print '<div class="center"><input class="button" type="submit" value="'.$label.'"></div>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user