mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 09:01:40 +01:00
Develop fix STOCK_MUST_BE_ENOUGH_FOR_(PROPAL|ORDER|INVOICE) (#33517)
* Manage STOCK_MUST_BE_ENOUGH_FOR_(PROPAL|ORDER|INVOICE) with new attribute stockable_product * Use static properties for product types. Controle product type service. * simpler condition for STOCK_MUST_BE_ENOUGH_FOR_PROPOSAL
This commit is contained in:
committed by
GitHub
parent
63ec276f5c
commit
1cd82c88cb
@@ -1673,7 +1673,7 @@ class Commande extends CommonOrder
|
||||
$result = $product->fetch($fk_product);
|
||||
$product_type = $product->type;
|
||||
|
||||
if (getDolGlobalString('STOCK_MUST_BE_ENOUGH_FOR_ORDER') && $product_type == 0) {
|
||||
if (getDolGlobalString('STOCK_MUST_BE_ENOUGH_FOR_ORDER') && $product->isStockManaged()) {
|
||||
// get real stock
|
||||
$productChildrenNb = 0;
|
||||
if (getDolGlobalInt('PRODUIT_SOUSPRODUITS')) {
|
||||
@@ -3228,7 +3228,7 @@ class Commande extends CommonOrder
|
||||
$result = $product->fetch($line->fk_product);
|
||||
$product_type = $product->type;
|
||||
|
||||
if (getDolGlobalString('STOCK_MUST_BE_ENOUGH_FOR_ORDER') && $product_type == 0) {
|
||||
if (getDolGlobalString('STOCK_MUST_BE_ENOUGH_FOR_ORDER') && $product->isStockManaged()) {
|
||||
// get real stock
|
||||
$productChildrenNb = 0;
|
||||
if (getDolGlobalInt('PRODUIT_SOUSPRODUITS')) {
|
||||
|
||||
Reference in New Issue
Block a user