Commit 6fb0918a0e669fb801251cf9787c208c1d352db7
1 parent
22792c6e
Exists in
3.5
and in
1 other branch
bug label accounting account journaux
Showing
1 changed file
with
17 additions
and
3 deletions
Show diff stats
accountingex/journal/sellsjournal.php
... | ... | @@ -152,8 +152,11 @@ if ($result) { |
152 | 152 | $tabfac[$obj->rowid]["ref"] = $obj->facnumber; |
153 | 153 | $tabfac[$obj->rowid]["type"] = $obj->type; |
154 | 154 | if (!empty($conf->global->ACCOUNTINGEX_GROUPBYACCOUNT)) { |
155 | - $tabfac[$obj->rowid]["description"] = $obj->label_compte; | |
156 | - } else { | |
155 | + $compte = new AccountingAccount($db); | |
156 | + if ($compte->fetch(null, $k)) | |
157 | + { | |
158 | + $tabfac[$obj->rowid]["description"] = $compte->label; | |
159 | + } }else { | |
157 | 160 | $tabfac[$obj->rowid]["description"] = $obj->description; |
158 | 161 | } |
159 | 162 | $tabfac[$obj->rowid]["fk_facturedet"] = $obj->fdid; |
... | ... | @@ -479,7 +482,18 @@ if ($action == 'export_csv') { |
479 | 482 | print "<td>" . $date . "</td>"; |
480 | 483 | print "<td>" . $invoicestatic->getNomUrl(1) . "</td>"; |
481 | 484 | print "<td>" . length_accountg($k) . "</td>"; |
482 | - print "<td>" . $invoicestatic->description . "</td>"; | |
485 | + | |
486 | + if (!empty($conf->global->ACCOUNTINGEX_GROUPBYACCOUNT)) { | |
487 | + $compte = new AccountingAccount($db); | |
488 | + if ($compte->fetch(null, $k)) | |
489 | + { | |
490 | + print "<td>" . $compte->label . "</td>"; | |
491 | + | |
492 | + } else { | |
493 | + print "<td>" . $invoicestatic->description . "</td>"; | |
494 | + } | |
495 | + | |
496 | + } | |
483 | 497 | print "<td align='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>"; |
484 | 498 | print "<td align='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>"; |
485 | 499 | print "</tr>"; | ... | ... |