This commit is contained in:
Laurent Destailleur 2024-09-26 18:00:37 +02:00
parent 1a5e42692e
commit cc80841a2e
3 changed files with 17 additions and 17 deletions

View File

@ -3680,20 +3680,20 @@ class Form
/**
* Return list of suppliers products
*
* @param int $socid Id of supplier thirdparty (0 = no filter)
* @param string $selected Product price preselected (must be 'id' in product_fournisseur_price or 'idprod_IDPROD')
* @param string $htmlname Name of HTML select
* @param string $filtertype Filter on product type (''=nofilter, 0=product, 1=service)
* @param string $filtre Generic filter. Data must not come from user input.
* @param string $filterkey Filter of produdts
* @param int $statut -1=Return all products, 0=Products not on buy, 1=Products on buy
* @param int $outputmode 0=HTML select string, 1=Array
* @param int $limit Limit of line number
* @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices
* @param string $morecss Add more CSS
* @param int $showstockinlist Show stock information (slower).
* @param string $placeholder Placeholder
* @return array|string Array of keys for json or HTML component
* @param int $socid Id of supplier thirdparty (0 = no filter)
* @param string $selected Product price preselected (must be 'id' in product_fournisseur_price or 'idprod_IDPROD')
* @param string $htmlname Name of HTML select
* @param string $filtertype Filter on product type (''=nofilter, 0=product, 1=service)
* @param string $filtre Generic filter. Data must not come from user input.
* @param string $filterkey Filter of produdts
* @param int $statut -1=Return all products, 0=Products not on buy, 1=Products on buy
* @param int $outputmode 0=HTML select string, 1=Array
* @param int $limit Limit of line number
* @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices
* @param string $morecss Add more CSS
* @param int $showstockinlist Show stock information (slower).
* @param string $placeholder Placeholder
* @return array|string Array of keys for json or HTML component
*/
public function select_produits_fournisseurs_list($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $filterkey = '', $statut = -1, $outputmode = 0, $limit = 100, $alsoproductwithnosupplierprice = 0, $morecss = '', $showstockinlist = 0, $placeholder = '')
{

View File

@ -674,7 +674,7 @@ print '</tr>';
print '<tr class="oddeven">';
print '<td>'.$langs->trans("NumberOfProductShowInSelect").'</td>';
print '<td class="right"><input size="3" type="text" class="flat" name="value_PRODUIT_LIMIT_SIZE" value="' . getDolGlobalString('PRODUIT_LIMIT_SIZE').'"></td>';
print '<td class="right"><input size="3" type="text" class="flat" name="value_PRODUIT_LIMIT_SIZE" value="' . getDolGlobalString('PRODUIT_LIMIT_SIZE', 1000).'"></td>';
print '</tr>';

View File

@ -315,9 +315,9 @@ if ($action == 'fetch' && !empty($id)) {
}
if (empty($mode) || $mode == 1) { // mode=1: customer
$arrayresult = $form->select_produits_list("", $htmlname, $type, getDolGlobalInt('PRODUIT_LIMIT_SIZE', 50), $price_level, $searchkey, $status, $finished, $outjson, $socid, '1', 0, '', $hidepriceinlabel, $warehouseStatus, $status_purchase, $warehouseId);
$arrayresult = $form->select_produits_list("", $htmlname, $type, getDolGlobalInt('PRODUIT_LIMIT_SIZE', 1000), $price_level, $searchkey, $status, $finished, $outjson, $socid, '1', 0, '', $hidepriceinlabel, $warehouseStatus, $status_purchase, $warehouseId);
} elseif ($mode == 2) { // mode=2: supplier
$arrayresult = $form->select_produits_fournisseurs_list($socid, "", $htmlname, $type, "", $searchkey, $status, $outjson, 0, $alsoproductwithnosupplierprice);
$arrayresult = $form->select_produits_fournisseurs_list($socid, "", $htmlname, $type, "", $searchkey, $status, $outjson, getDolGlobalInt('PRODUIT_LIMIT_SIZE', 1000), $alsoproductwithnosupplierprice);
}
$db->close();