New constant warhouse internal not sell

To no show stock of products in internal warehouse
This commit is contained in:
Lenin Rivas 2022-10-28 16:14:50 -05:00 committed by GitHub
parent 29d819be5e
commit 27ee846562
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'));
}