Merge pull request #15133 from ptibogxiv/patch-390
Fix takeposlist thirdparty
This commit is contained in:
commit
9ccafcb651
@ -120,7 +120,7 @@ $pagenext = $page + 1;
|
||||
|
||||
if ($type == 'c') { if (empty($contextpage) || $contextpage == 'thirdpartylist') $contextpage = 'customerlist'; if ($search_type == '') $search_type = '1,3'; }
|
||||
if ($type == 'p') { if (empty($contextpage) || $contextpage == 'thirdpartylist') $contextpage = 'prospectlist'; if ($search_type == '') $search_type = '2,3'; }
|
||||
if ($type == 't') { if (empty($contextpage) || $contextpage == 'thirdpartylist') $contextpage = 'customerlist'; if ($search_type == '') $search_type = '1,2,3'; }
|
||||
if ($type == 't') { if (empty($contextpage) || $contextpage == 'poslist') $contextpage = 'poslist'; if ($search_type == '') $search_type = '1,2,3'; }
|
||||
if ($type == 'f') { if (empty($contextpage) || $contextpage == 'thirdpartylist') $contextpage = 'supplierlist'; if ($search_type == '') $search_type = '4'; }
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
@ -471,7 +471,7 @@ if (strlen($search_idprof5)) $sql .= natural_search("s.idprof5", $search_idprof5
|
||||
if (strlen($search_idprof6)) $sql .= natural_search("s.idprof6", $search_idprof6);
|
||||
if (strlen($search_vat)) $sql .= natural_search("s.tva_intra", $search_vat);
|
||||
// Filter on type of thirdparty
|
||||
if ($search_type > 0 && in_array($search_type, array('1,3', '2,3'))) $sql .= " AND s.client IN (".$db->sanitize($db->escape($search_type)).")";
|
||||
if ($search_type > 0 && in_array($search_type, array('1,3', '1,2,3', '2,3'))) $sql .= " AND s.client IN (".$db->sanitize($db->escape($search_type)).")";
|
||||
if ($search_type > 0 && in_array($search_type, array('4'))) $sql .= " AND s.fournisseur = 1";
|
||||
if ($search_type == '0') $sql .= " AND s.client = 0 AND s.fournisseur = 0";
|
||||
if ($search_status != '' && $search_status >= 0) $sql .= natural_search("s.status", $search_status, 2);
|
||||
@ -610,7 +610,7 @@ if (!empty($type))
|
||||
if ($type == 'f') $label = 'NewSupplier';
|
||||
}
|
||||
|
||||
if ($contextpage = 'poslist' && ( !empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES))) {
|
||||
if ($contextpage = 'poslist' && $type == 't' && ( !empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES))) {
|
||||
print get_htmloutput_mesg(img_warning('default') . ' ' . $langs->trans("BecarefullChangeThirdpartyBeforeAddProductToInvoice"), '', 'warning', 1);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user