Merge pull request #12477 from code-chicken/develop

Use virtual stock when it has been configured
This commit is contained in:
Laurent Destailleur 2019-11-22 14:47:32 +01:00 committed by GitHub
commit 7cf71f7283
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,7 +89,9 @@ if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)
{
$virtualdiffersfromphysical = 1; // According to increase/decrease stock options, virtual and physical stock may differs.
}
$usevirtualstock = 0;
$usevirtualstock = !empty($conf->global->STOCK_USE_VIRTUAL_STOCK);
if ($mode == 'physical') $usevirtualstock = 0;
if ($mode == 'virtual') $usevirtualstock = 1;
$parameters = array();