This commit is contained in:
Florian HENRY 2020-10-14 18:15:48 +02:00
parent fd1fa1c777
commit 50a9bd368c
2 changed files with 1 additions and 2 deletions

View File

@ -23,7 +23,6 @@
-- de l'install et tous les sigles '--' sont supprimés.
--
INSERT INTO llx_c_product_nature (code, label, active) VALUES (-1, '', 1);
INSERT INTO llx_c_product_nature (code, label, active) VALUES (0, 'RowMaterial', 1);
INSERT INTO llx_c_product_nature (code, label, active) VALUES (1, 'Finished', 1);

View File

@ -4563,7 +4563,7 @@ class Product extends CommonObject
$langs->load('products');
if (isset($this->finished) && $this->finished>=0) {
$sql = 'SELECT label, code FROM '.MAIN_DB_PREFIX.'c_product_nature where code='.$this->finished.' AND active=1';
$sql = 'SELECT label, code FROM '.MAIN_DB_PREFIX.'c_product_nature where code='.((int) $this->finished).' AND active=1';
$resql = $this->db->query($sql);
if ($resql && $this->db->num_rows($resql) > 0) {
$res = $this->db->fetch_array($resql);