Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
9562b68f7f
3 changed files with 5 additions and 5 deletions
|
|
@ -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')) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue