Merge pull request #22704 from leninrivas/patch-8

New constant warhouse internal not sell
This commit is contained in:
Laurent Destailleur 2022-11-01 21:43:31 +01:00 committed by GitHub
commit fb405fd358
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -258,9 +258,11 @@ if ($nolinesbefore) {
}
if (empty($senderissupplier)) {
$statustoshow = 1;
$statuswarehouse = 'warehouseopen,warehouseinternal';
if (!empty($conf->global->ENTREPOT_WAREHOUSEINTERNAL_NOT_SELL)) $statuswarehouse = 'warehouseopen';
if (!empty($conf->global->ENTREPOT_EXTRA_STATUS)) {
// hide products in closed warehouse, but show products for internal transfer
$form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, 'warehouseopen,warehouseinternal', GETPOST('combinations', 'array'));
$form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, $statuswarehouse, GETPOST('combinations', 'array'));
} else {
$form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, '', GETPOST('combinations', 'array'));
}