diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index eb6446ae13d..992dc5ec739 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -41,15 +41,23 @@ $langs->load("main"); $langs->load("accountancy"); $action = GETPOST('action'); + +//Select Box $codeventil = GETPOST('codeventil', 'array'); $mesCasesCochees = GETPOST('mesCasesCochees', 'array'); + +//Search Getpost +$search_invoice = GETPOST('search_invoice','alpha'); $search_ref = GETPOST('search_ref','alpha'); $search_label = GETPOST('search_label','alpha'); $search_desc = GETPOST('search_desc','alpha'); +$search_amount = GETPOST('search_amount','alpha'); +$search_account = GETPOST('search_account','alpha'); +$search_vat = GETPOST('search_vat','alpha'); +//Getpost Order and column and limit page $sortfield = GETPOST('sortfield','alpha'); $sortorder = GETPOST('sortorder','alpha'); -//Should move to top with all GETPOST $page = GETPOST('page'); if ($page < 0) $page = 0; @@ -61,17 +69,9 @@ if (! empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)) { $limit = $conf->liste_limit; } $offset = $limit * $page; -//End Should move to top with all GETPOST -// TODO : remove comment -//elarifr we can not use only -//$sql .= " ORDER BY l.rowid"; -// f.datef will order like FA08 FA09 FA10 FA05 FA06 FA07 FA04... -// f.facnumber will not order properly invoice / avoir / accompte you can have All AC then All AV and all FA -// l.rowid when an invoice is edited rowid are added at end of table & facturedet.rowid are not ordered -//if (! $sortfield) $sortfield="l.rowid"; if (! $sortfield) $sortfield="f.datef, f.facnumber, l.rowid"; -//if (! $sortorder) $sortorder="DESC"; + if (! $sortorder) { if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO > 0) { $sortorder = " DESC "; @@ -86,20 +86,20 @@ if (! $user->rights->accounting->ventilation->dispatch) $formventilation = new FormVentilation($db); -//Defaut AccountingAccount RowId Product / Service -//at this time ACCOUNTING_SERVICE_SOLD_ACCOUNT & ACCOUNTING_PRODUCT_SOLD_ACCOUNT are account number not accountingacount rowid -//so we need to get those default value rowid first $accounting = new AccountingAccount($db); -//TODO: we should need to check if result is a really exist accountaccount rowid..... $aarowid_s = $accounting->fetch('', ACCOUNTING_SERVICE_SOLD_ACCOUNT); $aarowid_p = $accounting->fetch('', ACCOUNTING_PRODUCT_SOLD_ACCOUNT); // Purge search criteria -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) { $search_ref=''; + $search_invoice=''; $search_label=''; $search_desc=''; + $search_amount=''; + $search_account=''; + $search_vat=''; } /* * View @@ -107,10 +107,6 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both llxHeader('', $langs->trans("Ventilation")); -//debug -//print_r($aarowid_s); -//print_r($aarowid_p); - print '