@@ -1121,7 +1121,9 @@ discard block |
||
1121 | 1121 | $sql .= ", batch_mask"; |
1122 | 1122 | $sql .= ", fk_unit"; |
1123 | 1123 | $sql .= ", mandatory_period"; |
1124 | - if (!empty($this->default_vat_code)) $sql.=", default_vat_code"; |
|
1124 | + if (!empty($this->default_vat_code)) { |
|
1125 | + $sql.=", default_vat_code"; |
|
1126 | + } |
|
1125 | 1127 | $sql .= ") VALUES ("; |
1126 | 1128 | $sql .= "'".$this->db->idate($this->date_creation)."'"; |
1127 | 1129 | $sql .= ", ".(!empty($this->entity) ? (int) $this->entity : (int) $conf->entity); |
@@ -1153,7 +1155,9 @@ discard block |
||
1153 | 1155 | $sql .= ", '".$this->db->escape($this->batch_mask)."'"; |
1154 | 1156 | $sql .= ", ".($this->fk_unit > 0 ? ((int) $this->fk_unit) : 'NULL'); |
1155 | 1157 | $sql .= ", '".$this->db->escape((string) $this->mandatory_period)."'"; |
1156 | - if (!empty($this->default_vat_code)) $sql.=", '".$this->db->escape($this->default_vat_code)."'"; |
|
1158 | + if (!empty($this->default_vat_code)) { |
|
1159 | + $sql.=", '".$this->db->escape($this->default_vat_code)."'"; |
|
1160 | + } |
|
1157 | 1161 | $sql .= ")"; |
1158 | 1162 | dol_syslog(get_class($this)."::Create", LOG_DEBUG); |
1159 | 1163 |