diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 0fabdc4d54b..49879a8d829 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -232,25 +232,25 @@ else { // Permet d'afficher le compte comptable if ($root_account_description != $displayed_account) { - + // Affiche un Sous-Total par compte comptable if ($displayed_account != "") { print ''.$langs->trans("SubTotal") . ':'.price($sous_total_debit).''.price($sous_total_credit).''.price($sous_total_credit-$sous_total_debit).''; print " \n"; print ''; } - + // Affiche le compte comptable en début de ligne print ""; print ''. $root_account_description .''; print ''; - + $displayed_account = $root_account_description; $sous_total_debit = 0; $sous_total_credit = 0; } - // $object->get_compte_racine($line->numero_compte); + // $object->get_compte_racine($line->numero_compte); print '' . length_accountg($line->numero_compte) . ''; @@ -261,13 +261,13 @@ else { print '' . $link; print ''; print "\n"; - + // Comptabilise le sous-total $sous_total_debit += $line->debit; $sous_total_credit += $line->credit; - + } - + print ''.$langs->trans("SubTotal") . ':'.price($sous_total_debit).''.price($sous_total_credit).''.price($sous_total_credit-$sous_total_debit).''; print " \n"; print ''; diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index f086b28d244..a215e318e32 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -1,5 +1,5 @@ * largely based on the great work of : * - Copyright (C) 2013-2016 Olivier Geffroy @@ -20,14 +20,14 @@ * along with this program. If not, see . * */ - + /** * \file htdocs/accountancy/bookkeeping/listbyaccount.php * \ingroup Advanced accountancy * \brief List operation of book keeping ordered by account number */ - + require '../../main.inc.php'; // Class @@ -84,8 +84,8 @@ if ($sortorder == "") $sortorder = "ASC"; if ($sortfield == "") $sortfield = "t.rowid"; - - + + $options = ''; $filter = array (); @@ -100,11 +100,11 @@ if (! empty($search_date_end)) { if (! empty($search_doc_date)) { $filter['t.doc_date'] = $search_doc_date; $options .= '&doc_datemonth=' . GETPOST('doc_datemonth', 'int') . '&doc_dateday=' . GETPOST('doc_dateday', 'int') . '&doc_dateyear=' . GETPOST('doc_dateyear', 'int'); -} - - +} + + if (!GETPOST("button_removefilter_x") && !GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers -{ +{ if (! empty($search_accountancy_code_start)) { $filter['t.numero_compte'] = $search_accountancy_code_start; $options .= '&search_accountancy_code_start=' . $search_accountancy_code_start; @@ -217,7 +217,7 @@ print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield // Reverse sort order if ( preg_match('/^asc/i', $sortorder) ) $sortorder = "asc"; -else +else $sortorder = "desc"; print '
' . "\n"; @@ -274,24 +274,24 @@ foreach ( $object->lines as $line ) { // Permet d'afficher le compte comptable if (length_accountg($line->numero_compte) != $displayed_account_number) { - + // Affiche un Sous-Total par compte comptable if ($displayed_account_number != "") { print ''.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''; print " \n"; print ''; } - + // Affiche le compte comptable en début de ligne print ""; print ''.length_accountg($line->numero_compte) . ' : ' . $object->get_compte_desc($line->numero_compte).''; print ''; - + $displayed_account_number = length_accountg($line->numero_compte); $sous_total_debit = 0; $sous_total_credit = 0; } - + print ''; print ' '; print '' . dol_print_date($line->doc_date, 'day') . ''; @@ -299,14 +299,14 @@ foreach ( $object->lines as $line ) { // Affiche un lien vers la facture client/fournisseur $doc_ref = preg_replace('/\(.*\)/', '', $line->doc_ref); - if ($line->doc_type == 'supplier_invoice') + if ($line->doc_type == 'supplier_invoice') print strlen(length_accounta($line->code_tiers)) == 0 ? '' . $line->label_compte . '' : '' . $line->label_compte . '
(' . length_accounta($line->code_tiers) . ')'; elseif ($line->doc_type == 'customer_invoice') print strlen(length_accounta($line->code_tiers)) == 0 ? '' . $line->label_compte . '' : '' . $line->label_compte . '
(' . length_accounta($line->code_tiers) . ')'; else print strlen(length_accounta($line->code_tiers)) == 0 ? '' . $line->label_compte . '' : '' . $line->label_compte . '
(' . length_accounta($line->code_tiers) . ')'; - - + + print '' . price($line->debit) . ''; print '' . price($line->credit) . ''; print '' . $line->code_journal . ''; @@ -315,11 +315,11 @@ foreach ( $object->lines as $line ) { print '' . img_delete() . ''; print ''; print "\n"; - + // Comptabilise le sous-total $sous_total_debit += $line->debit; $sous_total_credit += $line->credit; - + } // Affiche un Sous-Total du dernier compte comptable affiché