forked from Wavyzz/dolibarr
Fix better setup tooltip for shipment/reception module
This commit is contained in:
@@ -635,18 +635,19 @@ class Conf
|
||||
unset($this->global->PROJECT_USE_SEARCH_TO_SELECT);
|
||||
}
|
||||
|
||||
if (!empty($this->productbatch->enabled)) {
|
||||
if (isModEnabled('productbatch')) {
|
||||
// If module lot/serial enabled, we force the inc/dec mode to STOCK_CALCULATE_ON_SHIPMENT_CLOSE and STOCK_CALCULATE_ON_RECEPTION_CLOSE
|
||||
$this->global->STOCK_CALCULATE_ON_BILL = 0;
|
||||
$this->global->STOCK_CALCULATE_ON_VALIDATE_ORDER = 0;
|
||||
if (empty($this->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) $this->global->STOCK_CALCULATE_ON_SHIPMENT = 1;
|
||||
if (empty($this->global->STOCK_CALCULATE_ON_SHIPMENT)) $this->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE = 1;
|
||||
if (empty($this->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) $this->global->STOCK_CALCULATE_ON_SHIPMENT = 1;
|
||||
$this->global->STOCK_CALCULATE_ON_SUPPLIER_BILL = 0;
|
||||
$this->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER = 0;
|
||||
if (empty($this->reception->enabled)) {
|
||||
if (!isModEnabled('reception')) {
|
||||
$this->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER = 1;
|
||||
} else {
|
||||
if (empty($this->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)) $this->global->STOCK_CALCULATE_ON_RECEPTION = 1;
|
||||
if (empty($this->global->STOCK_CALCULATE_ON_RECEPTION)) $this->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE = 1;
|
||||
if (empty($this->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)) $this->global->STOCK_CALCULATE_ON_RECEPTION = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user