Fix/accountancy pdf wrong labels (#37153)
* FIX #37147 Limit account fetch to active chart of accounts in PDF exports When multiple chart of accounts have the same account number, the PDF exports (balance and ledger) could retrieve the wrong account label. * FIX #37147 Decode HTML entities in balance PDF account group labels The balance PDF export was displaying HTML entities (like É) instead of properly decoded characters (like É) in account group labels.
This commit is contained in:
parent
9ec77dada2
commit
4951edfbd0
2 changed files with 4 additions and 4 deletions
|
|
@ -303,7 +303,7 @@ class pdf_balance extends ModelePdfAccountancy
|
|||
$groupDebit = $groupCredit = $totalDebit = $totalCredit = 0;
|
||||
for ($i = 0; $i < $nblines; $i++) {
|
||||
$accountingAccount = new AccountingAccount($this->db);
|
||||
$accountingAccount->fetch(0, $object->lines[$i]->numero_compte);
|
||||
$accountingAccount->fetch(0, $object->lines[$i]->numero_compte, true);
|
||||
|
||||
// Init the first account group
|
||||
if (empty($accountGroup)) {
|
||||
|
|
@ -317,7 +317,7 @@ class pdf_balance extends ModelePdfAccountancy
|
|||
$curY,
|
||||
$nexY,
|
||||
$default_font_size,
|
||||
$langs->trans('Total') . ' ' . $langs->trans('AccountancyGroup' . $accountGroup),
|
||||
$langs->transnoentitiesnoconv('Total') . ' ' . $langs->transnoentitiesnoconv('AccountancyGroup' . $accountGroup),
|
||||
$tab_top_newpage,
|
||||
$groupDebit,
|
||||
$groupCredit
|
||||
|
|
@ -503,7 +503,7 @@ class pdf_balance extends ModelePdfAccountancy
|
|||
$curY,
|
||||
$nexY,
|
||||
$default_font_size,
|
||||
$langs->trans('Total') . ' ' . $langs->trans('AccountancyGroup' . $accountingAccount->pcg_type),
|
||||
$langs->transnoentitiesnoconv('Total') . ' ' . $langs->transnoentitiesnoconv('AccountancyGroup' . $accountingAccount->pcg_type),
|
||||
$tab_top_newpage,
|
||||
$groupDebit,
|
||||
$groupCredit
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ class pdf_ledger extends ModelePdfAccountancy
|
|||
} else {
|
||||
if (empty($account) || $account != $object->lines[$i]->numero_compte) {
|
||||
$accountingAccount = new AccountingAccount($this->db);
|
||||
$accountingAccount->fetch(0, $object->lines[$i]->numero_compte);
|
||||
$accountingAccount->fetch(0, $object->lines[$i]->numero_compte, true);
|
||||
|
||||
// Add the subtotal line
|
||||
if (!empty($account)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue