Trans and clean code

This commit is contained in:
Laurent Destailleur 2020-10-09 19:34:57 +02:00
parent cc82a15688
commit 967e7997e6
4 changed files with 18 additions and 9 deletions

View File

@ -414,18 +414,24 @@ if ($resql)
// Account parent
if (!empty($arrayfields['aa.account_parent']['checked']))
{
if (!empty($obj->account_parent))
// Note: obj->account_parent is a foreign key to a rowid. It is field in child table and obj->rowid2 is same, but in parent table.
// So for orphans, obj->account_parent is set but not obj->rowid2
if (!empty($obj->account_parent) && !empty($obj->rowid2))
{
print "<td>";
print '<!-- obj->account_parent = '.$obj->account_parent.' obj->rowid2 = '.$obj->rowid2.' -->';
$accountparent->id = $obj->rowid2;
$accountparent->label = $obj->label2;
$accountparent->account_number = $obj->account_number2;
print "<td>";
$accountparent->account_number = $obj->account_number2; // Sotre an account number for output
print $accountparent->getNomUrl(1);
print "</td>\n";
if (!$i) $totalarray['nbfield']++;
} else {
print '<td>&nbsp;</td>';
print '<td>';
if (!empty($obj->account_parent)) {
print '<!-- Bad value for obj->account_parent = '.$obj->account_parent.': is a rowid that does not exists -->';
}
print '</td>';
if (!$i) $totalarray['nbfield']++;
}
}

View File

@ -100,7 +100,9 @@ if (empty($reshook))
$form = new Form($db);
llxHeader('', $langs->trans("ReportThirdParty"));
$title = $langs->trans('ChartOfIndividualAccountsOfSubsidiaryLedger');
llxHeader('', $title);
// Customer
$sql = "SELECT sa.rowid, sa.nom as label, sa.code_compta as subaccount, '0' as type, sa.entity";
@ -268,7 +270,7 @@ if ($resql)
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print_barre_liste($langs->trans('ReportThirdParty'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit, 0, 0, 1);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit, 0, 0, 1);
print '<div class="warning">'.$langs->trans("WarningCreateSubAccounts").'</div>';

View File

@ -24,7 +24,8 @@ Journals=Journals
JournalFinancial=Financial journals
BackToChartofaccounts=Return chart of accounts
Chartofaccounts=Chart of accounts
ChartOfSubaccounts=Chart of subaccounts
ChartOfSubaccounts=Chart of individual accounts
ChartOfIndividualAccountsOfSubsidiaryLedger=Chart of individual accounts of the subsidiary ledger
CurrentDedicatedAccountingAccount=Current dedicated account
AssignDedicatedAccountingAccount=New account to assign
InvoiceLabel=Invoice label

View File

@ -658,7 +658,7 @@ Module50200Desc=Offer customers a PayPal online payment page (PayPal account or
Module50300Name=Stripe
Module50300Desc=Offer customers a Stripe online payment page (credit/debit cards). This can be used to allow your customers to make ad-hoc payments or payments related to a specific Dolibarr object (invoice, order etc...)
Module50400Name=Accounting (double entry)
Module50400Desc=Accounting management (double entries, support general and auxiliary ledgers). Export the ledger in several other accounting software formats.
Module50400Desc=Accounting management (double entries, support General and Subsidiary Ledgers). Export the ledger in several other accounting software formats.
Module54000Name=PrintIPP
Module54000Desc=Direct print (without opening the documents) using Cups IPP interface (Printer must be visible from server, and CUPS must be installed on server).
Module55000Name=Poll, Survey or Vote