Skip to content

Commit

Permalink
fix: enabled default wharehouse field on service if STOCK_SUPPORTS_SE…
Browse files Browse the repository at this point in the history
…RVICES (#28354)
  • Loading branch information
FHenry authored Feb 22, 2024
1 parent 9874d00 commit 38095cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions htdocs/product/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@
print '</td></tr>';
}

if ($type != 1 && isModEnabled('stock')) {
if (($type != 1 || getDolGlobalInt('STOCK_SUPPORTS_SERVICES')) && isModEnabled('stock')) {
// Default warehouse
print '<tr><td>'.$langs->trans("DefaultWarehouse").'</td><td>';
print img_picto($langs->trans("DefaultWarehouse"), 'stock', 'class="pictofixedwidth"');
Expand Down Expand Up @@ -2053,7 +2053,7 @@
}

// Stock
if ($object->isProduct() && isModEnabled('stock')) {
if (($object->isProduct() || getDolGlobalInt('STOCK_SUPPORTS_SERVICES')) && isModEnabled('stock')) {
// Default warehouse
print '<tr><td>'.$langs->trans("DefaultWarehouse").'</td><td>';
print img_picto($langs->trans("DefaultWarehouse"), 'stock', 'class="pictofixedwidth"');
Expand Down Expand Up @@ -2557,7 +2557,7 @@
}

// Default warehouse
if ($object->isProduct() && isModEnabled('stock')) {
if (($object->isProduct() || getDolGlobalInt('STOCK_SUPPORTS_SERVICES')) && isModEnabled('stock')) {
$warehouse = new Entrepot($db);
$warehouse->fetch($object->fk_default_warehouse);

Expand Down

0 comments on commit 38095cf

Please sign in to comment.