Skip to content

Commit

Permalink
Update product.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ptibogxiv committed Nov 3, 2023
1 parent acb5012 commit aee86bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/product.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function doliProductStock($product, $refresh = false, $nohtml = false, $array_op
$mstock = array();
$warehouse = doliconst('DOLICONNECT_ID_WAREHOUSE', $refresh);
if (!empty($product->type) && empty(doliconst('STOCK_SUPPORTS_SERVICES', $refresh))) {
$mstock['stock'] = 1;
$mstock['stock'] = 999999;
} elseif (isset($product->stock_warehouse) && !empty($product->stock_warehouse) && !empty($warehouse) && $warehouse > 0) {
if (isset($product->stock_warehouse->$warehouse)) {
$mstock['stock'] = min(array($product->stock_reel,$product->stock_warehouse->$warehouse->real,$product->stock_theorique));
Expand All @@ -113,7 +113,7 @@ function doliProductStock($product, $refresh = false, $nohtml = false, $array_op
} elseif (isset($product->stock_theorique) && isset($product->stock_reel)) {
$mstock['stock'] = min(array($product->stock_theorique,$product->stock_reel));
} else {
$mstock['stock'] = 99;
$mstock['stock'] = 999999;
}
if (isset($product->array_options->options_packaging) && !empty($product->array_options->options_packaging)) {
$mstock['step'] = $product->array_options->options_packaging;
Expand Down

0 comments on commit aee86bb

Please sign in to comment.