From 4c4dd53385bc8259b7bfdd33421f62f16e294b0d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 31 Jul 2022 22:46:53 +0200 Subject: [PATCH] Fix filter on company --- htdocs/compta/facture/list.php | 11 ++++++----- htdocs/fourn/facture/list.php | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index f5d1f519698..b7d20f3f0f8 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -363,11 +363,11 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', $search_datelimit_start = ''; $search_datelimit_end = ''; $search_fac_rec_source_title = ''; - $option = ''; - $filter = ''; $toselect = array(); $search_array_options = array(); $search_categ_cus = 0; + $option = ''; + $socid = 0; } if (empty($reshook)) { @@ -919,7 +919,7 @@ if ($resql) { llxHeader('', $langs->trans('CustomersInvoices'), 'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes'); - if ($socid) { + if ($socid > 0) { $soc = new Societe($db); $soc->fetch($socid); if (empty($search_company)) { @@ -1151,8 +1151,9 @@ if ($resql) { print ''; print ''; print ''; + print ''; - print_barre_liste($langs->trans('BillsCustomers').' '.($socid ? ' '.$soc->name : ''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bill', 0, $newcardbutton, '', $limit, 0, 0, 1); + print_barre_liste($langs->trans('BillsCustomers').' '.($socid > 0 ? ' '.$soc->name : ''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bill', 0, $newcardbutton, '', $limit, 0, 0, 1); $topicmail = "SendBillRef"; $modelmail = "facture_send"; @@ -1320,7 +1321,7 @@ if ($resql) { } // Thirdparty if (!empty($arrayfields['s.nom']['checked'])) { - print ''; + print ' 0 ? " disabled" : "").'>'; } // Alias if (!empty($arrayfields['s.name_alias']['checked'])) { diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 70a7334196a..df5cd0d090d 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -1002,7 +1002,7 @@ if ($resql) { } // Thirpdarty if (!empty($arrayfields['s.nom']['checked'])) { - print ''; + print ' 0 ? " disabled" : "").'>'; } // Town if (!empty($arrayfields['s.town']['checked'])) {