Skip to content

Commit

Permalink
Update product.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ptibogxiv committed Oct 29, 2023
1 parent 4ac92ad commit f9903ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion functions/product.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ function doliProductStock($product, $refresh = false, $nohtml = false, $array_op
} else {
$mstock['stock'] = 0;
}
} else {
} elseif (isset($product->stock_theoriqu) && isset($product->stock_reel)) {
$mstock['stock'] = min(array($product->stock_theorique,$product->stock_reel));
} else {
$mstock['stock'] = 99;
}
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 f9903ed

Please sign in to comment.