diff --git a/classes/stock/SupplierOrderState.php b/classes/stock/SupplierOrderState.php index 700f4a345..b535c6a36 100755 --- a/classes/stock/SupplierOrderState.php +++ b/classes/stock/SupplierOrderState.php @@ -55,6 +55,11 @@ class SupplierOrderStateCore extends ObjectModel */ public $pending_receipt; + /** + * @var bool Tells if the the order is in an enclosed state + */ + public $enclosed; + /** * @var string Display state in the specified color (Ex. #FFFF00) */ @@ -65,6 +70,7 @@ class SupplierOrderStateCore extends ObjectModel 'editable' => 'isBool', 'receipt_state' => 'isBool', 'pending_receipt' => 'isBool', + 'enclosed' => 'isBool', 'color' => 'isColor' ); @@ -92,6 +98,7 @@ class SupplierOrderStateCore extends ObjectModel $fields['editable'] = (bool)$this->editable; $fields['receipt_state'] = (bool)$this->receipt_state; $fields['pending_receipt'] = (bool)$this->pending_receipt; + $fields['enclosed'] = (bool)$this->enclosed; $fields['color'] = pSQL($this->color); return $fields; diff --git a/install-dev/sql/db.sql b/install-dev/sql/db.sql index 6370e3e00..41d357abf 100644 --- a/install-dev/sql/db.sql +++ b/install-dev/sql/db.sql @@ -2170,6 +2170,7 @@ CREATE TABLE `PREFIX_supplier_order_state` ( `editable` tinyint(1) NOT NULL DEFAULT 0, `receipt_state` tinyint(1) NOT NULL DEFAULT 0, `pending_receipt` tinyint(1) NOT NULL DEFAULT 0, +`enclosed` tinyint(1) NOT NULL DEFAULT 0, `color` VARCHAR(32) DEFAULT NULL, PRIMARY KEY (`id_supplier_order_state`) ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; diff --git a/install-dev/sql/db_settings_lite.sql b/install-dev/sql/db_settings_lite.sql index 3c8e5ac36..b42100d06 100644 --- a/install-dev/sql/db_settings_lite.sql +++ b/install-dev/sql/db_settings_lite.sql @@ -1419,13 +1419,13 @@ city State:name postcode Country:name phone' WHERE `PREFIX_address_format`.`id_country` = 4; -INSERT INTO `ps_supplier_order_state` (`id_supplier_order_state`, `delivery_note`, `editable`, `receipt_state`, `pending_receipt`, `color`) VALUES -(1, 0, 1, 0, 0, 'lightblue'), -(2, 1, 0, 0, 0, '#e7fbff'), -(3, 0, 0, 0, 1, '#ffdbfd'), -(4, 0, 0, 1, 1, '#ffd3d3'), -(5, 0, 0, 1, 0, '#d8ffd7'), -(6, 0, 0, 0, 0, '#cccccc'); +INSERT INTO `ps_supplier_order_state` (`id_supplier_order_state`, `delivery_note`, `editable`, `receipt_state`, `pending_receipt`, `enclosed`, `color`) VALUES +(1, 0, 1, 0, 0, 0, 'lightblue'), +(2, 1, 0, 0, 0, 0, '#e7fbff'), +(3, 0, 0, 0, 1, 0, '#ffdbfd'), +(4, 0, 0, 1, 1, 0, '#ffd3d3'), +(5, 0, 0, 1, 0, 1, '#d8ffd7'), +(6, 0, 0, 0, 0, 1, '#cccccc'); INSERT INTO `ps_supplier_order_state_lang` (`id_supplier_order_state`, `id_lang`, `name`) VALUES (1, 1, 'creation in progress'),