mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
New: Loan - Show accounting account in card in view mode
This commit is contained in:
parent
fda07997d2
commit
bc92818c1a
|
|
@ -405,6 +405,39 @@ if ($id > 0)
|
|||
// Note Public
|
||||
print '<tr><td>'.$langs->trans('NotePublic').'</td><td>'.nl2br($object->note_public).'</td></tr>';
|
||||
|
||||
// Accountancy account capital
|
||||
print '<tr><td class="nowrap">';
|
||||
print $langs->trans("LoanAccountancyCapitalCode");
|
||||
print '</td><td>';
|
||||
if (! empty($conf->accounting->enabled)) {
|
||||
print length_accountg($object->account_capital);
|
||||
} else {
|
||||
print $object->account_capital;
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Accountancy account insurance
|
||||
print '<tr><td class="nowrap">';
|
||||
print $langs->trans("LoanAccountancyInsuranceCode");
|
||||
print '</td><td>';
|
||||
if (! empty($conf->accounting->enabled)) {
|
||||
print length_accountg($object->account_insurance);
|
||||
} else {
|
||||
print $object->account_insurance;
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Accountancy account interest
|
||||
print '<tr><td class="nowrap">';
|
||||
print $langs->trans("LoanAccountancyInterestCode");
|
||||
print '</td><td>';
|
||||
if (! empty($conf->accounting->enabled)) {
|
||||
print length_accountg($object->account_interest);
|
||||
} else {
|
||||
print $object->account_interest;
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4, $totalpaye).'</td></tr>';
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ class Loan extends CommonObject
|
|||
function fetch($id)
|
||||
{
|
||||
$sql = "SELECT l.rowid, l.label, l.capital, l.datestart, l.dateend, l.nbterm, l.rate, l.note_private, l.note_public,";
|
||||
$sql.= " l.paid";
|
||||
$sql.= " l.paid, l.accountancy_account_capital, l.accountancy_account_insurance, l.accountancy_account_interest";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."loan as l";
|
||||
$sql.= " WHERE l.rowid = ".$id;
|
||||
|
||||
|
|
@ -84,17 +84,22 @@ class Loan extends CommonObject
|
|||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$this->id = $obj->rowid;
|
||||
$this->ref = $obj->rowid;
|
||||
$this->datestart = $this->db->jdate($obj->datestart);
|
||||
$this->dateend = $this->db->jdate($obj->dateend);
|
||||
$this->label = $obj->label;
|
||||
$this->capital = $obj->capital;
|
||||
$this->nbterm = $obj->nbterm;
|
||||
$this->rate = $obj->rate;
|
||||
$this->note_private = $obj->note_private;
|
||||
$this->note_public = $obj->note_public;
|
||||
$this->paid = $obj->paid;
|
||||
$this->id = $obj->rowid;
|
||||
$this->ref = $obj->rowid;
|
||||
$this->datestart = $this->db->jdate($obj->datestart);
|
||||
$this->dateend = $this->db->jdate($obj->dateend);
|
||||
$this->label = $obj->label;
|
||||
$this->capital = $obj->capital;
|
||||
$this->nbterm = $obj->nbterm;
|
||||
$this->rate = $obj->rate;
|
||||
$this->note_private = $obj->note_private;
|
||||
$this->note_public = $obj->note_public;
|
||||
$this->paid = $obj->paid;
|
||||
|
||||
$this->account_capital = $obj->accountancy_account_capital;
|
||||
$this->account_insurance = $obj->accountancy_account_insurance;
|
||||
$this->account_interest = $obj->accountancy_account_interest;
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user