FIX: when STOCK_CALCULATE_ON_SHIPMENT_CLOSE is set, deleting a "closed" shipment now increases stock as expected
This commit is contained in:
parent
53688e2d0f
commit
c45b191330
@ -1111,7 +1111,9 @@ class Expedition extends CommonObject
|
||||
}
|
||||
|
||||
// Stock control
|
||||
if (! $error && $conf->stock->enabled && $conf->global->STOCK_CALCULATE_ON_SHIPMENT && $this->statut > self::STATUS_DRAFT)
|
||||
if (! $error && $conf->stock->enabled &&
|
||||
(($conf->global->STOCK_CALCULATE_ON_SHIPMENT && $this->statut > self::STATUS_DRAFT) ||
|
||||
($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE && $this->statut == 2)))
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php");
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user