diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 3f5c11691ad..3544f98d418 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -202,9 +202,9 @@ class AccountingAccount extends CommonObject $sql .= ", " . (empty($this->pcg_type) ? 'NULL' : "'" . $this->db->escape($this->pcg_type) . "'"); $sql .= ", " . (empty($this->pcg_subtype) ? 'NULL' : "'" . $this->db->escape($this->pcg_subtype) . "'"); $sql .= ", " . (empty($this->account_number) ? 'NULL' : "'" . $this->db->escape($this->account_number) . "'"); - $sql .= ", " . (empty($this->account_parent) ? 'NULL' : "'" . $this->db->escape($this->account_parent) . "'"); + $sql .= ", " . (empty($this->account_parent) ? '0' : "'" . $this->db->escape($this->account_parent) . "'"); $sql .= ", " . (empty($this->label) ? 'NULL' : "'" . $this->db->escape($this->label) . "'"); - $sql .= ", " . (empty($this->account_category) ? '0' : $this->db->escape($this->account_category)); + $sql .= ", " . (empty($this->account_category) ? 0 : $this->db->escape($this->account_category)); $sql .= ", " . $user->id; $sql .= ", " . (! isset($this->active) ? 'NULL' : $this->db->escape($this->active)); $sql .= ")"; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index b89263bae01..eba1d77a03f 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -417,6 +417,7 @@ if ($action == 'update') $object->location = GETPOST('location'); $object->socid = GETPOST("socid"); $socpeopleassigned = GETPOST("socpeopleassigned",'array'); + $object->socpeopleassigned = array(); foreach ($socpeopleassigned as $cid) $object->socpeopleassigned[$cid] = array('id' => $cid); $object->contactid = GETPOST("contactid",'int'); $object->fk_project = GETPOST("projectid",'int');