Fix error on change payment term
This commit is contained in:
parent
be729ab5f3
commit
2fe29627e6
@ -2649,7 +2649,8 @@ abstract class CommonObject
|
||||
|
||||
$sql = 'UPDATE '.$this->db->prefix().$this->table_element;
|
||||
$sql .= " SET ".$fieldname." = ".(($id > 0 || $id == '0') ? ((int) $id) : 'NULL');
|
||||
$sql .= " , deposit_percent = " . (! empty($deposit_percent) ? "'".$this->db->escape($deposit_percent)."'" : 'NULL');
|
||||
if (in_array($this->table_element, array('propal', 'commande')))
|
||||
$sql .= " , deposit_percent = " . (! empty($deposit_percent) ? "'".$this->db->escape($deposit_percent)."'" : 'NULL');
|
||||
$sql .= ' WHERE rowid='.((int) $this->id);
|
||||
|
||||
if ($this->db->query($sql)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user