From ab7f11894942cb9729ca3701fe6d31ce02303bce Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 18 Dec 2021 21:59:46 +0100 Subject: [PATCH] Add info to help debug report --- htdocs/compta/resultat/clientfourn.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 9ee55de6649..8cfa0f3dd73 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -774,9 +774,17 @@ if ($modecompta == 'BOOKKEEPING') { $subtotal_ht += $obj->amount; $subtotal_ttc += $obj->amount; + $titletoshow = ''; + if ($obj->accountancy_code) { + $titletoshow = $langs->trans("AccountingCode").': '.$obj->accountancy_code; + $tmpaccountingaccount = new AccountingAccount($db); + $tmpaccountingaccount->fetch(0, $obj->accountancy_code, 1); + $titletoshow .= ' - '.$langs->trans("AccountingCategory").': '.$tmpaccountingaccount->pcg_type; + } + print ''; print ' '; - print 'accountancy_code ? ' title="'.dol_escape_htmltag($langs->trans("AccountingCategory").': '.$obj->accountancy_code).'"' : '').'>'.dol_escape_htmltag($obj->label).''; + print 'accountancy_code ? ' title="'.dol_escape_htmltag($titletoshow).'"' : '').'>'.dol_escape_htmltag($obj->label).''; print ''; if ($modecompta == 'CREANCES-DETTES') { print ''.price(-$obj->amount).''; @@ -869,9 +877,17 @@ if ($modecompta == 'BOOKKEEPING') { $subtotal_ht += $obj->amount; $subtotal_ttc += $obj->amount; + $titletoshow = ''; + if ($obj->accountancy_code) { + $titletoshow = $langs->trans("AccountingCode").': '.$obj->accountancy_code; + $tmpaccountingaccount = new AccountingAccount($db); + $tmpaccountingaccount->fetch(0, $obj->accountancy_code, 1); + $titletoshow .= ' - '.$langs->trans("AccountingCategory").': '.$tmpaccountingaccount->pcg_type; + } + print ''; print ' '; - print 'accountancy_code ? ' title="'.dol_escape_htmltag($langs->trans("AccountingCategory").': '.$obj->accountancy_code).'"' : '').'>'.dol_escape_htmltag($obj->label).''; + print 'accountancy_code ? ' title="'.dol_escape_htmltag($titletoshow).'"' : '').'>'.dol_escape_htmltag($obj->label).''; print ''; if ($modecompta == 'CREANCES-DETTES') { print ''.price(-$obj->amount).'';