diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index 43e610c3052..41816d72f7a 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -383,10 +383,13 @@ print ''; print '
'; $virtualdiffersfromphysical = 0; -if ( - !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) - || !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) -) { +if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) + || !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) + || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE) + || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION) + || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE) + || !empty($conf->mrp->enabled)) +{ $virtualdiffersfromphysical = 1; // According to increase/decrease stock options, virtual and physical stock may differs. } diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 17dd18b567b..57eacb75ed4 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -129,7 +129,12 @@ else $result = restrictedArea($user, 'produit|service', '', '', '', '', '', $obj // Define virtualdiffersfromphysical $virtualdiffersfromphysical = 0; -if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION)) +if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) + || !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) + || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE) + || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION) + || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE) + || !empty($conf->mrp->enabled)) { $virtualdiffersfromphysical = 1; // According to increase/decrease stock options, virtual and physical stock may differs. } diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index 94d2e80c303..2cbe113fe69 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -78,7 +78,12 @@ if (!empty($canvas)) // Define virtualdiffersfromphysical $virtualdiffersfromphysical = 0; -if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION)) +if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) + || !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) + || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE) + || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION) + || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE) + || !empty($conf->mrp->enabled)) { $virtualdiffersfromphysical = 1; // According to increase/decrease stock options, virtual and physical stock may differs. } diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 97d3871c027..358ca742361 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -82,10 +82,11 @@ if (!$sortorder) { // Define virtualdiffersfromphysical $virtualdiffersfromphysical = 0; if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) -|| !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) -|| !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE) -|| !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION) -|| !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)) + || !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) + || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE) + || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION) + || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE) + || !empty($conf->mrp->enabled)) { $virtualdiffersfromphysical = 1; // According to increase/decrease stock options, virtual and physical stock may differs. }