Fix some problems & presentation
This commit is contained in:
parent
a4d3c4bed0
commit
c41a9291f1
@ -10,6 +10,7 @@ LoanCapital=Capital
|
|||||||
Insurance=Insurance
|
Insurance=Insurance
|
||||||
Interest=Interest
|
Interest=Interest
|
||||||
Nbterms=Number of terms
|
Nbterms=Number of terms
|
||||||
|
Term=Term
|
||||||
LoanAccountancyCapitalCode=Accounting account capital
|
LoanAccountancyCapitalCode=Accounting account capital
|
||||||
LoanAccountancyInsuranceCode=Accounting account insurance
|
LoanAccountancyInsuranceCode=Accounting account insurance
|
||||||
LoanAccountancyInterestCode=Accounting account interest
|
LoanAccountancyInterestCode=Accounting account interest
|
||||||
@ -22,12 +23,9 @@ AddLoan=Create loan
|
|||||||
FinancialCommitment=Financial commitment
|
FinancialCommitment=Financial commitment
|
||||||
InterestAmount=Interest
|
InterestAmount=Interest
|
||||||
CapitalRemain=Capital remain
|
CapitalRemain=Capital remain
|
||||||
DueDate=Date
|
|
||||||
# Admin
|
# Admin
|
||||||
ConfigLoan=Configuration of the module loan
|
ConfigLoan=Configuration of the module loan
|
||||||
LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Accounting account capital by default
|
LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Accounting account capital by default
|
||||||
LOAN_ACCOUNTING_ACCOUNT_INTEREST=Accounting account interest by default
|
LOAN_ACCOUNTING_ACCOUNT_INTEREST=Accounting account interest by default
|
||||||
LOAN_ACCOUNTING_ACCOUNT_INSURANCE=Accounting account insurance by default
|
LOAN_ACCOUNTING_ACCOUNT_INSURANCE=Accounting account insurance by default
|
||||||
FinancialCommitment=Financial commitment
|
|
||||||
CreateCalcSchedule=Edit financial commitment
|
CreateCalcSchedule=Edit financial commitment
|
||||||
InterestAmount=Interest amount
|
|
||||||
|
|||||||
@ -697,8 +697,8 @@ if ($id > 0)
|
|||||||
print '<td>'.$langs->trans("Type").'</td>';
|
print '<td>'.$langs->trans("Type").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Insurance").'</td>';
|
print '<td align="right">'.$langs->trans("Insurance").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Interest").'</td>';
|
print '<td align="right">'.$langs->trans("Interest").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("LoanCapital").'</td>';
|
print '<td align="right">'.$langs->trans("LoanCapital").'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
@ -708,9 +708,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, $langs, 0, 0, -1, $conf->currency)."</td>\n";
|
print '<td align="right">'.price($objp->amount_insurance, 0, $outputlangs, 1, -1, -1, $conf->currency)."</td>\n";
|
||||||
print '<td align="right">'.price($objp->amount_interest, 0, $langs, 0, 0, -1, $conf->currency)."</td>\n";
|
print '<td align="right">'.price($objp->amount_interest, 0, $outputlangs, 1, -1, -1, $conf->currency)."</td>\n";
|
||||||
print '<td align="right">'.price($objp->amount_capital, 0, $langs, 0, 0, -1, $conf->currency)."</td>\n";
|
print '<td align="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++;
|
||||||
|
|||||||
@ -344,7 +344,7 @@ class Loan extends CommonObject
|
|||||||
$this->error=$this->db->lasterror();
|
$this->error=$this->db->lasterror();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return label of loan status (unpaid, paid)
|
* Return label of loan status (unpaid, paid)
|
||||||
|
|||||||
@ -148,7 +148,7 @@ print '</th>';
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
Print '<th width="10%" align="center">'.$langs->trans("DueDate").'</th>';
|
Print '<th width="10%" align="center">'.$langs->trans("Term").'</th>';
|
||||||
Print '<th width="10%" align="center">'.$langs->trans("Date").'</th>';
|
Print '<th width="10%" align="center">'.$langs->trans("Date").'</th>';
|
||||||
Print '<th width="10%" align="center">'.$langs->trans("Amount").'</th>';
|
Print '<th width="10%" align="center">'.$langs->trans("Amount").'</th>';
|
||||||
Print '<th width="20%" align="center">'.$langs->trans("InterestAmount").'</th>';
|
Print '<th width="20%" align="center">'.$langs->trans("InterestAmount").'</th>';
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/loan/index.php
|
* \file htdocs/loan/index.php
|
||||||
* \ingroup loan
|
* \ingroup loan
|
||||||
* \brief Page to list all loans
|
* \brief Page to list all loans
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
@ -54,7 +54,7 @@ $optioncss = GETPOST('optioncss','alpha');
|
|||||||
// Purge search criteria
|
// Purge search criteria
|
||||||
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter','alpha')) // Both test are required to be compatible with all browsers
|
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter','alpha')) // Both test are required to be compatible with all browsers
|
||||||
{
|
{
|
||||||
$search_ref="";
|
$search_ref="";
|
||||||
$search_label="";
|
$search_label="";
|
||||||
$search_amount="";
|
$search_amount="";
|
||||||
}
|
}
|
||||||
@ -68,7 +68,7 @@ $loan_static = new Loan($db);
|
|||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$sql = "SELECT l.rowid, l.label, l.capital, l.datestart, l.dateend,";
|
$sql = "SELECT l.rowid, l.label, l.capital, l.datestart, l.dateend, l.paid,";
|
||||||
$sql.= " SUM(pl.amount_capital) as alreadypayed";
|
$sql.= " SUM(pl.amount_capital) as alreadypayed";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."loan as l LEFT JOIN ".MAIN_DB_PREFIX."payment_loan AS pl";
|
$sql.= " FROM ".MAIN_DB_PREFIX."loan as l LEFT JOIN ".MAIN_DB_PREFIX."payment_loan AS pl";
|
||||||
$sql.= " ON l.rowid = pl.fk_loan";
|
$sql.= " ON l.rowid = pl.fk_loan";
|
||||||
@ -77,8 +77,8 @@ if ($search_amount) $sql.= natural_search("l.capital", $search_amount, 1);
|
|||||||
if ($search_ref) $sql.= " AND l.rowid = ".$db->escape($search_ref);
|
if ($search_ref) $sql.= " AND l.rowid = ".$db->escape($search_ref);
|
||||||
if ($search_label) $sql.= natural_search("l.label", $search_label);
|
if ($search_label) $sql.= natural_search("l.label", $search_label);
|
||||||
if ($filtre) {
|
if ($filtre) {
|
||||||
$filtre=str_replace(":","=",$filtre);
|
$filtre=str_replace(":","=",$filtre);
|
||||||
$sql .= " AND ".$filtre;
|
$sql .= " AND ".$filtre;
|
||||||
}
|
}
|
||||||
$sql.= " GROUP BY l.rowid, l.label, l.capital, l.datestart, l.dateend";
|
$sql.= " GROUP BY l.rowid, l.label, l.capital, l.datestart, l.dateend";
|
||||||
$sql.= $db->order($sortfield,$sortorder);
|
$sql.= $db->order($sortfield,$sortorder);
|
||||||
@ -86,13 +86,13 @@ $sql.= $db->order($sortfield,$sortorder);
|
|||||||
$nbtotalofrecords = '';
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
{
|
{
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
$nbtotalofrecords = $db->num_rows($result);
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
|
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
|
||||||
{
|
{
|
||||||
$page = 0;
|
$page = 0;
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql.= $db->plimit($limit+1, $offset);
|
$sql.= $db->plimit($limit+1, $offset);
|
||||||
@ -105,35 +105,35 @@ if ($resql)
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
$param='';
|
$param='';
|
||||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
||||||
if ($search_ref) $param.="&search_ref=".urlencode($search_ref);
|
if ($search_ref) $param.="&search_ref=".urlencode($search_ref);
|
||||||
if ($search_label) $param.="&search_label=".urlencode($search_user);
|
if ($search_label) $param.="&search_label=".urlencode($search_user);
|
||||||
if ($search_amount) $param.="&search_amount=".urlencode($search_amount_ht);
|
if ($search_amount) $param.="&search_amount=".urlencode($search_amount_ht);
|
||||||
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
|
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
|
||||||
|
|
||||||
$newcardbutton='';
|
$newcardbutton='';
|
||||||
if ($user->rights->loan->write)
|
if ($user->rights->loan->write)
|
||||||
{
|
{
|
||||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/loan/card.php?action=create">'.$langs->trans('NewLoan');
|
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/loan/card.php?action=create">'.$langs->trans('NewLoan');
|
||||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||||
$newcardbutton.= '</a>';
|
$newcardbutton.= '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="list">';
|
print '<input type="hidden" name="action" value="list">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||||
|
|
||||||
print_barre_liste($langs->trans("Loans"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, $newcardbutton, '', $limit);
|
print_barre_liste($langs->trans("Loans"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, $newcardbutton, '', $limit);
|
||||||
|
|
||||||
print '<div class="div-table-responsive">';
|
print '<div class="div-table-responsive">';
|
||||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
|
|
||||||
// Filters lines
|
// Filters lines
|
||||||
print '<tr class="liste_titre_filter">';
|
print '<tr class="liste_titre_filter">';
|
||||||
@ -141,6 +141,7 @@ if ($resql)
|
|||||||
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" align="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 align="right" class="liste_titre">';
|
print '<td align="right" class="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")).'">';
|
||||||
@ -153,6 +154,7 @@ if ($resql)
|
|||||||
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,'align="left"',$sortfield,$sortorder);
|
||||||
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,'align="right"',$sortfield,$sortorder);
|
||||||
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,'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("Status",$_SERVER["PHP_SELF"],"l.paid","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre('');
|
print_liste_field_titre('');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -160,9 +162,9 @@ if ($resql)
|
|||||||
while ($i < min($num,$limit))
|
while ($i < min($num,$limit))
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
$loan_static->id = $obj->rowid;
|
$loan_static->id = $obj->rowid;
|
||||||
$loan_static->ref = $obj->rowid;
|
$loan_static->ref = $obj->rowid;
|
||||||
$loan_static->label = $obj->label;
|
$loan_static->label = $obj->label;
|
||||||
|
|
||||||
$var = !$var;
|
$var = !$var;
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
@ -179,23 +181,26 @@ if ($resql)
|
|||||||
// Date start
|
// Date start
|
||||||
print '<td width="110" align="center">'.dol_print_date($db->jdate($obj->datestart), 'day').'</td>';
|
print '<td width="110" align="center">'.dol_print_date($db->jdate($obj->datestart), 'day').'</td>';
|
||||||
|
|
||||||
|
// Date end
|
||||||
|
print '<td width="110" align="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 align="right" class="nowrap">'.$loan_static->LibStatut($obj->paid,5,$obj->alreadypayed).'</a></td>';
|
||||||
|
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
@ -16,9 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/loan/payment/card.php
|
* \file htdocs/loan/payment/card.php
|
||||||
* \ingroup loan
|
* \ingroup loan
|
||||||
* \brief Payment's card of loan
|
* \brief Payment's card of loan
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
@ -56,14 +56,14 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->loan->del
|
|||||||
$result = $payment->delete($user);
|
$result = $payment->delete($user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
header("Location: ".DOL_URL_ROOT."/loan/index.php");
|
header("Location: ".DOL_URL_ROOT."/loan/index.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessages($payment->error, $payment->errors, 'errors');
|
setEventMessages($payment->error, $payment->errors, 'errors');
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,18 +170,18 @@ print '<tr><td>'.$langs->trans('NotePublic').'</td><td>'.nl2br($payment->note_pu
|
|||||||
// Bank account
|
// Bank account
|
||||||
if (! empty($conf->banque->enabled))
|
if (! empty($conf->banque->enabled))
|
||||||
{
|
{
|
||||||
if ($payment->bank_account)
|
if ($payment->bank_account)
|
||||||
{
|
{
|
||||||
$bankline=new AccountLine($db);
|
$bankline=new AccountLine($db);
|
||||||
$bankline->fetch($payment->bank_line);
|
$bankline->fetch($payment->bank_line);
|
||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans('BankTransactionLine').'</td>';
|
print '<td>'.$langs->trans('BankTransactionLine').'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $bankline->getNomUrl(1,0,'showall');
|
print $bankline->getNomUrl(1,0,'showall');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
@ -210,7 +210,7 @@ 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 align="right">'.$langs->trans('ExpectedToPay').'</td>';
|
||||||
print '<td align="center">'.$langs->trans('Status').'</td>';
|
print '<td align="center">'.$langs->trans('Status').'</td>';
|
||||||
print '<td align="right">'.$langs->trans('PayedByThisPayment').'</td>';
|
print '<td align="right">'.$langs->trans('PayedByThisPayment').'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -230,11 +230,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 align="right">'.price($objp->capital).'</td>';
|
||||||
// Status
|
// Status
|
||||||
print '<td align="center">'.$loan->getLibStatut(4,$objp->amount_capital).'</td>';
|
print '<td align="center">'.$loan->getLibStatut(4,$objp->amount_capital).'</td>';
|
||||||
// Amount payed
|
// Amount payed
|
||||||
print '<td align="right">'.price($objp->amount_capital).'</td>';
|
$amount_payed = $objp->amount_capital + $objp->amount_insurance + $objp->amount_interest;
|
||||||
|
|
||||||
|
print '<td align="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
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user