FIX : fk_product of inventory should take care of conf STOCK_SUPPORTS… (#30726)

* FIX : fk_product of inventory should take care of conf STOCK_SUPPORTS_SERVICE

* Update inventory.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
VIAL-GOUTEYRON Quentin 2024-08-23 15:07:54 +02:00 committed by GitHub
parent bcfaaa414f
commit 35aa236a8b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -967,7 +967,12 @@ if ($object->status == $object::STATUS_DRAFT || $object->status == $object::STAT
print $formproduct->selectWarehouses((GETPOSTISSET('fk_warehouse') ? GETPOSTINT('fk_warehouse') : $object->fk_warehouse), 'fk_warehouse', 'warehouseopen', 1, 0, 0, '', 0, 0, array(), 'maxwidth300');
print '</td>';
print '<td>';
print $form->select_produits((GETPOSTISSET('fk_product') ? GETPOSTINT('fk_product') : $object->fk_product), 'fk_product', '', 0, 0, -1, 2, '', 0, null, 0, '1', 0, 'maxwidth300');
if (getDolGlobalString('STOCK_SUPPORTS_SERVICES')) {
$filtertype = '';
} else {
$filtertype = 0;
}
print $form->select_produits((GETPOSTISSET('fk_product') ? GETPOSTINT('fk_product') : $object->fk_product), 'fk_product', $filtertype, 0, 0, -1, 2, '', 0, null, 0, '1', 0, 'maxwidth300');
print '</td>';
if (isModEnabled('productbatch')) {
print '<td>';