Skip to content

Commit

Permalink
Revert "CLOSE Dolibarr#26384 Implement STATUS_OPENEXT_ALL for use of …
Browse files Browse the repository at this point in the history
…non-counting warehouses e.g. quarantine"

This reverts commit 0d069b4.
  • Loading branch information
DaBootO committed Jun 30, 2024
1 parent ebc3950 commit cff25de
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
1 change: 0 additions & 1 deletion htdocs/langs/en_US/stocks.lang
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ NoPendingReceptionOnSupplierOrder=No pending reception due to open purchase orde
ThisSerialAlreadyExistWithDifferentDate=This lot/serial number (<strong>%s</strong>) already exists but with different eatby or sellby date (found <strong>%s</strong> but you enter <strong>%s</strong>).
OpenAnyMovement=Open (all movement)
OpenInternal=Open (only internal movement)
OpenExtAll=Open (omitted from stock calculation)
UseDispatchStatus=Use a dispatch status (approve/refuse) for product lines on purchase order reception
OptionMULTIPRICESIsOn=Option "several prices per segment" is on. It means a product has several selling price so value for sell can't be calculated
ProductStockWarehouseCreated=Stock limit for alert and desired optimal stock correctly created
Expand Down
7 changes: 3 additions & 4 deletions htdocs/product/class/html.formproduct.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,13 @@ public function loadWarehouses($fk_product = 0, $batch = '', $status = '', $sumS
$warehouseStatus = array();

if (preg_match('/warehouseclosed/', $status)) {
$warehouseStatus[Entrepot::STATUS_CLOSED] = Entrepot::STATUS_CLOSED;
$warehouseStatus[] = Entrepot::STATUS_CLOSED;
}
if (preg_match('/warehouseopen/', $status)) {
$warehouseStatus[Entrepot::STATUS_OPEN_ALL] = Entrepot::STATUS_OPEN_ALL;
$warehouseStatus[] = Entrepot::STATUS_OPEN_ALL;
}
if (preg_match('/warehouseinternal/', $status)) {
$warehouseStatus[Entrepot::STATUS_OPEN_INTERNAL] = Entrepot::STATUS_OPEN_INTERNAL;
$warehouseStatus[Entrepot::STATUS_OPENEXT_ALL] = Entrepot::STATUS_OPENEXT_ALL;
$warehouseStatus[] = Entrepot::STATUS_OPEN_INTERNAL;
}

$sql = "SELECT e.rowid, e.ref as label, e.description, e.fk_parent";
Expand Down
1 change: 0 additions & 1 deletion htdocs/product/class/product.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -5863,7 +5863,6 @@ public function load_stock($option = '', $includedraftpoforvirtual = null, $date
if (preg_match('/warehouseinternal/', $option)) {
if (getDolGlobalString('ENTREPOT_EXTRA_STATUS')) {
$warehouseStatus[Entrepot::STATUS_OPEN_INTERNAL] = Entrepot::STATUS_OPEN_INTERNAL;
$warehouseStatus[Entrepot::STATUS_OPENEXT_ALL] = Entrepot::STATUS_OPENEXT_ALL;
} else {
$warehouseStatus[Entrepot::STATUS_OPEN_ALL] = Entrepot::STATUS_OPEN_ALL;
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/product/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -1581,7 +1581,7 @@
// STOCK_DISABLE_OPTIM_LOAD can be set to force load_stock whatever is permissions on stock.
if ((isModEnabled('stock') && $user->hasRight('stock', 'lire') && $search_type != 1) || getDolGlobalString('STOCK_DISABLE_OPTIM_LOAD')) { // To optimize call of load_stock
if ($product_static->type != 1 || getDolGlobalString('STOCK_SUPPORTS_SERVICES')) { // Not a service
$option = 'nobatch,warehouseopen';
$option = 'nobatch';
if (empty($arrayfields['stock_virtual']['checked'])) {
$option .= ',novirtual';
}
Expand Down
3 changes: 1 addition & 2 deletions htdocs/product/stock/class/entrepot.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class Entrepot extends CommonObject
/**
* Warehouse open and any operations are allowed, but warehouse is not included into calculation of stock.
*/
const STATUS_OPENEXT_ALL = 3;
const STATUS_OPENEXT_ALL = 3; // TODO Implement this



Expand All @@ -220,7 +220,6 @@ public function __construct($db)
if (getDolGlobalString('ENTREPOT_EXTRA_STATUS')) {
$this->labelStatus[self::STATUS_OPEN_ALL] = 'OpenAnyMovement';
$this->labelStatus[self::STATUS_OPEN_INTERNAL] = 'OpenInternal';
$this->labelStatus[self::STATUS_OPENEXT_ALL] = 'OpenExtAll';
} else {
$this->labelStatus[self::STATUS_OPEN_ALL] = 'Opened';
}
Expand Down

0 comments on commit cff25de

Please sign in to comment.