2
0
forked from Wavyzz/dolibarr

Compare commits

...

10 Commits
10.0.4 ... 5.0

Author SHA1 Message Date
Laurent Destailleur
474260e526 Merge pull request #13447 from c3do/patch-1
Fix can set desiredstock to (int) 0 from API Rest
2020-03-30 19:46:02 +02:00
Cédric
eead9a93d3 Fix can set desiredstock to (int) 0 from API Rest
When you set desiredstock to 0 as an integer from the API, it registers to null in the database. Using is_numeric() fixes this.
2020-03-30 13:03:13 +02:00
Laurent Destailleur
ef00cb0736 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
Conflicts:
	htdocs/fourn/class/fournisseur.commande.class.php
2020-01-10 19:44:52 +01:00
Laurent Destailleur
d7f7f5bf3d Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2020-01-10 19:42:34 +01:00
Laurent Destailleur
7c0a6946a7 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2020-01-10 19:42:15 +01:00
Laurent Destailleur
1ecc1afa9e Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2020-01-10 19:41:49 +01:00
Laurent Destailleur
ceb1e699b7 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.7 2020-01-10 19:37:16 +01:00
Laurent Destailleur
c028819cab FIX clone of purchase order 2020-01-10 19:35:49 +01:00
Laurent Destailleur
d59b1bb0c6 Merge 2018-11-23 11:44:07 +01:00
Laurent Destailleur
9d582a53ca Fix compatibility with new mysql versions 2018-11-23 11:28:28 +01:00

View File

@@ -763,7 +763,7 @@ class Product extends CommonObject
$sql.= ", duration = '" . $this->db->escape($this->duration_value . $this->duration_unit) ."'";
$sql.= ", accountancy_code_buy = '" . $this->db->escape($this->accountancy_code_buy)."'";
$sql.= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell)."'";
$sql.= ", desiredstock = " . ((isset($this->desiredstock) && $this->desiredstock != '') ? $this->desiredstock : "null");
$sql.= ", desiredstock = " . ((isset($this->desiredstock) && is_numeric($this->desiredstock)) ? $this->desiredstock : "null");
$sql.= ", cost_price = " . ($this->cost_price != '' ? $this->db->escape($this->cost_price) : 'null');
$sql.= ", fk_unit= " . (!$this->fk_unit ? 'NULL' : $this->fk_unit);
$sql.= ", price_autogen = " . (!$this->price_autogen ? 0 : 1);