Modify int to float for stock limit alert and desired stock
This commit is contained in:
parent
a53f7ff9c9
commit
10810bc5bb
@ -219,3 +219,10 @@ create table llx_c_recruitment_origin
|
|||||||
label varchar(64) NOT NULL,
|
label varchar(64) NOT NULL,
|
||||||
active tinyint DEFAULT 1 NOT NULL
|
active tinyint DEFAULT 1 NOT NULL
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_product MODIFY COLUMN seuil_stock_alerte float;
|
||||||
|
ALTER TABLE llx_product MODIFY COLUMN desiredstock float;
|
||||||
|
ALTER TABLE llx_product_warehouse_properties MODIFY COLUMN seuil_stock_alerte float;
|
||||||
|
ALTER TABLE llx_product_warehouse_properties MODIFY COLUMN desiredstock float;
|
||||||
|
|||||||
@ -60,7 +60,7 @@ create table llx_product
|
|||||||
tobatch tinyint DEFAULT 0 NOT NULL, -- Is it a product that need a batch management (eat-by or lot management)
|
tobatch tinyint DEFAULT 0 NOT NULL, -- Is it a product that need a batch management (eat-by or lot management)
|
||||||
fk_product_type integer DEFAULT 0, -- Type of product: 0 for regular product, 1 for service, 9 for other (used by external module)
|
fk_product_type integer DEFAULT 0, -- Type of product: 0 for regular product, 1 for service, 9 for other (used by external module)
|
||||||
duration varchar(6),
|
duration varchar(6),
|
||||||
seuil_stock_alerte integer DEFAULT NULL,
|
seuil_stock_alerte float DEFAULT NULL,
|
||||||
url varchar(255),
|
url varchar(255),
|
||||||
barcode varchar(180) DEFAULT NULL, -- barcode
|
barcode varchar(180) DEFAULT NULL, -- barcode
|
||||||
fk_barcode_type integer DEFAULT NULL, -- barcode type
|
fk_barcode_type integer DEFAULT NULL, -- barcode type
|
||||||
@ -96,7 +96,7 @@ create table llx_product
|
|||||||
import_key varchar(14), -- Import key
|
import_key varchar(14), -- Import key
|
||||||
model_pdf varchar(255), -- model save dodument used
|
model_pdf varchar(255), -- model save dodument used
|
||||||
fk_price_expression integer, -- Link to the rule for dynamic price calculation
|
fk_price_expression integer, -- Link to the rule for dynamic price calculation
|
||||||
desiredstock integer DEFAULT 0,
|
desiredstock float DEFAULT 0,
|
||||||
fk_unit integer DEFAULT NULL,
|
fk_unit integer DEFAULT NULL,
|
||||||
price_autogen tinyint DEFAULT 0,
|
price_autogen tinyint DEFAULT 0,
|
||||||
fk_project integer DEFAULT NULL -- Used when product was generated by a project or is specifif to a project
|
fk_project integer DEFAULT NULL -- Used when product was generated by a project or is specifif to a project
|
||||||
|
|||||||
@ -24,8 +24,8 @@ create table llx_product_warehouse_properties
|
|||||||
tms timestamp,
|
tms timestamp,
|
||||||
fk_product integer NOT NULL,
|
fk_product integer NOT NULL,
|
||||||
fk_entrepot integer NOT NULL,
|
fk_entrepot integer NOT NULL,
|
||||||
seuil_stock_alerte integer DEFAULT '0',
|
seuil_stock_alerte float DEFAULT '0',
|
||||||
desiredstock integer DEFAULT '0',
|
desiredstock float DEFAULT '0',
|
||||||
import_key varchar(14) -- Import key
|
import_key varchar(14) -- Import key
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
|||||||
@ -205,7 +205,7 @@ class Product extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Stock alert
|
* Stock alert
|
||||||
*
|
*
|
||||||
* @var int
|
* @var float
|
||||||
*/
|
*/
|
||||||
public $seuil_stock_alerte = 0;
|
public $seuil_stock_alerte = 0;
|
||||||
|
|
||||||
@ -995,7 +995,7 @@ class Product extends CommonObject
|
|||||||
$sql .= ", volume = ".($this->volume != '' ? "'".$this->db->escape($this->volume)."'" : 'null');
|
$sql .= ", volume = ".($this->volume != '' ? "'".$this->db->escape($this->volume)."'" : 'null');
|
||||||
$sql .= ", volume_units = ".($this->volume_units != '' ? "'".$this->db->escape($this->volume_units)."'" : 'null');
|
$sql .= ", volume_units = ".($this->volume_units != '' ? "'".$this->db->escape($this->volume_units)."'" : 'null');
|
||||||
$sql .= ", fk_default_warehouse = ".($this->fk_default_warehouse > 0 ? $this->db->escape($this->fk_default_warehouse) : 'null');
|
$sql .= ", fk_default_warehouse = ".($this->fk_default_warehouse > 0 ? $this->db->escape($this->fk_default_warehouse) : 'null');
|
||||||
$sql .= ", seuil_stock_alerte = ".((isset($this->seuil_stock_alerte) && is_numeric($this->seuil_stock_alerte)) ? (int) $this->seuil_stock_alerte : 'null');
|
$sql .= ", seuil_stock_alerte = ".((isset($this->seuil_stock_alerte) && is_numeric($this->seuil_stock_alerte)) ? (float) $this->seuil_stock_alerte : 'null');
|
||||||
$sql .= ", description = '".$this->db->escape($this->description)."'";
|
$sql .= ", description = '".$this->db->escape($this->description)."'";
|
||||||
$sql .= ", url = ".($this->url ? "'".$this->db->escape($this->url)."'" : 'null');
|
$sql .= ", url = ".($this->url ? "'".$this->db->escape($this->url)."'" : 'null');
|
||||||
$sql .= ", customcode = '".$this->db->escape($this->customcode)."'";
|
$sql .= ", customcode = '".$this->db->escape($this->customcode)."'";
|
||||||
@ -1008,7 +1008,7 @@ class Product extends CommonObject
|
|||||||
$sql .= ", accountancy_code_sell= '".$this->db->escape($this->accountancy_code_sell)."'";
|
$sql .= ", accountancy_code_sell= '".$this->db->escape($this->accountancy_code_sell)."'";
|
||||||
$sql .= ", accountancy_code_sell_intra= '".$this->db->escape($this->accountancy_code_sell_intra)."'";
|
$sql .= ", accountancy_code_sell_intra= '".$this->db->escape($this->accountancy_code_sell_intra)."'";
|
||||||
$sql .= ", accountancy_code_sell_export= '".$this->db->escape($this->accountancy_code_sell_export)."'";
|
$sql .= ", accountancy_code_sell_export= '".$this->db->escape($this->accountancy_code_sell_export)."'";
|
||||||
$sql .= ", desiredstock = ".((isset($this->desiredstock) && is_numeric($this->desiredstock)) ? (int) $this->desiredstock : "null");
|
$sql .= ", desiredstock = ".((isset($this->desiredstock) && is_numeric($this->desiredstock)) ? (float) $this->desiredstock : "null");
|
||||||
$sql .= ", cost_price = ".($this->cost_price != '' ? $this->db->escape($this->cost_price) : 'null');
|
$sql .= ", cost_price = ".($this->cost_price != '' ? $this->db->escape($this->cost_price) : 'null');
|
||||||
$sql .= ", fk_unit= ".(!$this->fk_unit ? 'NULL' : (int) $this->fk_unit);
|
$sql .= ", fk_unit= ".(!$this->fk_unit ? 'NULL' : (int) $this->fk_unit);
|
||||||
$sql .= ", price_autogen = ".(!$this->price_autogen ? 0 : 1);
|
$sql .= ", price_autogen = ".(!$this->price_autogen ? 0 : 1);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user