Merge pull request #18945 from PyroShape/14b

FIX : Remove not complete order from the virtual stock
This commit is contained in:
Laurent Destailleur 2021-10-12 12:44:22 +02:00 committed by GitHub
commit 3a7681c186
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5271,7 +5271,7 @@ class Product extends CommonObject
$stock_sending_client = $this->stats_expedition['qty'];
}
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) {
$filterStatus = empty($conf->global->SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK) ? '2,3,4' : $conf->global->SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK;
$filterStatus = empty($conf->global->SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK) ? '3,4' : $conf->global->SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK;
if (isset($includedraftpoforvirtual)) {
$filterStatus = '0,1,2,'.$filterStatus; // 1,2 may have already been inside $filterStatus but it is better to have twice than missing $filterStatus does not include them
}