Merge pull request #20354 from fappels/14_fix_set_move_stock_on_close_wehen_batch
FIX: Stock move on shipment close and reception close disabled for lot/serial type
This commit is contained in:
commit
97fc58c799
@ -616,15 +616,15 @@ class Conf
|
|||||||
if (!empty($this->productbatch->enabled)) {
|
if (!empty($this->productbatch->enabled)) {
|
||||||
$this->global->STOCK_CALCULATE_ON_BILL = 0;
|
$this->global->STOCK_CALCULATE_ON_BILL = 0;
|
||||||
$this->global->STOCK_CALCULATE_ON_VALIDATE_ORDER = 0;
|
$this->global->STOCK_CALCULATE_ON_VALIDATE_ORDER = 0;
|
||||||
$this->global->STOCK_CALCULATE_ON_SHIPMENT = 1;
|
if (empty($this->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) $this->global->STOCK_CALCULATE_ON_SHIPMENT = 1;
|
||||||
$this->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE = 0;
|
if (empty($this->global->STOCK_CALCULATE_ON_SHIPMENT)) $this->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE = 1;
|
||||||
$this->global->STOCK_CALCULATE_ON_SUPPLIER_BILL = 0;
|
$this->global->STOCK_CALCULATE_ON_SUPPLIER_BILL = 0;
|
||||||
$this->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER = 0;
|
$this->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER = 0;
|
||||||
if (empty($this->reception->enabled)) {
|
if (empty($this->reception->enabled)) {
|
||||||
$this->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER = 1;
|
$this->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER = 1;
|
||||||
} else {
|
} else {
|
||||||
$this->global->STOCK_CALCULATE_ON_RECEPTION = 1;
|
if (empty($this->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)) $this->global->STOCK_CALCULATE_ON_RECEPTION = 1;
|
||||||
$this->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE = 0;
|
if (empty($this->global->STOCK_CALCULATE_ON_RECEPTION)) $this->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -395,9 +395,9 @@ class Utils
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
fwrite($handle, $read.($execmethod == 2 ? '' : "\n"));
|
fwrite($handle, $read.($execmethod == 2 ? '' : "\n"));
|
||||||
if (preg_match('/'.preg_quote('-- Dump completed').'/i', $read)) {
|
if (preg_match('/'.preg_quote('-- Dump completed', '/').'/i', $read)) {
|
||||||
$ok = 1;
|
$ok = 1;
|
||||||
} elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i', $read)) {
|
} elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES', '/').'/i', $read)) {
|
||||||
$ok = 1;
|
$ok = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user