From d43f2bbfaec85c10cdb3893d1d6d22912393a083 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Thu, 10 Oct 2019 11:44:21 +0200 Subject: [PATCH 1/2] NEW : Accountancy - List by account - Modify sortfield, nowrap on amount and sum of sous-total --- htdocs/accountancy/bookkeeping/listbyaccount.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index d3dc9b4a190..2b9fc4fde29 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -71,7 +71,7 @@ $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if ($sortorder == "") $sortorder = "ASC"; -if ($sortfield == "") $sortfield = "t.rowid"; +if ($sortfield == "") $sortfield = "t.doc_date"; if (empty($search_date_start) && empty($search_date_end)) { $sql = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear "; @@ -376,8 +376,8 @@ while ($i < min($num, $limit)) print strlen(length_accounta($line->subledger_account)) == 0 ? '' . $line->label_operation . '' : '' . $line->label_operation . '
(' . length_accounta($line->subledger_account) . ')'; - print '' . ($line->debit ? price($line->debit) :''). ''; - print '' . ($line->credit ? price($line->credit) : '') . ''; + print '' . ($line->debit ? price($line->debit) :''). ''; + print '' . ($line->credit ? price($line->credit) : '') . ''; $accountingjournal = new AccountingJournal($db); $result = $accountingjournal->fetch('', $line->code_journal); @@ -400,18 +400,19 @@ while ($i < min($num, $limit)) // Affiche un Sous-Total du dernier compte comptable affiché print ''; print ''.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''; -print " \n"; -print " \n"; +print ''; +print price($sous_total_debit - $sous_total_credit); +print '\n'; print ''; // Affiche le Total print ''; print ''.$langs->trans("Total").':'; -print ''; +print ''; print price($total_debit); print ''; -print ''; +print ''; print price($total_credit); print ''; print ''; From fbc4e3b441515c482338c9d137f89cc7ee584f81 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Oct 2019 16:37:10 +0200 Subject: [PATCH 2/2] Update listbyaccount.php --- htdocs/accountancy/bookkeeping/listbyaccount.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 2b9fc4fde29..640cf87d496 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -397,25 +397,27 @@ while ($i < min($num, $limit)) $i++; } -// Affiche un Sous-Total du dernier compte comptable affiché +// Show sub-total of last shown account print ''; print ''.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''; -print ''; +print ''; print price($sous_total_debit - $sous_total_credit); -print '\n'; +print ''; +print ''; print ''; -// Affiche le Total +// Show total print ''; print ''.$langs->trans("Total").':'; -print ''; +print ''; print price($total_debit); print ''; -print ''; +print ''; print price($total_credit); print ''; -print ''; +print ''; +print ''; print ''; print "";