mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -725,7 +725,7 @@ class Propal extends CommonObject
|
||||
$result = $product->fetch($fk_product);
|
||||
$product_type = $product->type;
|
||||
|
||||
if (getDolGlobalString('STOCK_MUST_BE_ENOUGH_FOR_PROPOSAL') && $product_type == 0 && $product->stock_reel < $qty) {
|
||||
if ($product->isStockManaged() && $product->stock_reel < $qty && getDolGlobalString('STOCK_MUST_BE_ENOUGH_FOR_PROPOSAL')) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorStockIsNotEnoughToAddProductOnProposal', $product->ref);
|
||||
$this->db->rollback();
|
||||
|
||||
@@ -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')) {
|
||||
|
||||
@@ -4282,7 +4282,7 @@ class Facture extends CommonInvoice
|
||||
$result = $product->fetch($fk_product);
|
||||
$product_type = $product->type;
|
||||
|
||||
if (getDolGlobalString('STOCK_MUST_BE_ENOUGH_FOR_INVOICE') && $product_type == 0) {
|
||||
if (getDolGlobalString('STOCK_MUST_BE_ENOUGH_FOR_INVOICE') && $product->isStockManaged()) {
|
||||
// get real stock
|
||||
$productChildrenNb = 0;
|
||||
if (getDolGlobalInt('PRODUIT_SOUSPRODUITS')) {
|
||||
@@ -4632,7 +4632,7 @@ class Facture extends CommonInvoice
|
||||
$result = $product->fetch($line->fk_product);
|
||||
$product_type = $product->type;
|
||||
|
||||
if (getDolGlobalString('STOCK_MUST_BE_ENOUGH_FOR_INVOICE') && $product_type == 0) {
|
||||
if (getDolGlobalString('STOCK_MUST_BE_ENOUGH_FOR_INVOICE') && $product->isStockManaged()) {
|
||||
// get real stock
|
||||
$productChildrenNb = 0;
|
||||
if (getDolGlobalInt('PRODUIT_SOUSPRODUITS')) {
|
||||
|
||||
Reference in New Issue
Block a user