mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Clean code
This commit is contained in:
@@ -934,8 +934,8 @@ class Commande extends CommonOrder
|
||||
$sql .= ", multicurrency_code";
|
||||
$sql .= ", multicurrency_tx";
|
||||
$sql .= ")";
|
||||
$sql .= " VALUES ('(PROV)', ".$this->socid.", '".$this->db->idate($now)."', ".$user->id;
|
||||
$sql .= ", ".($this->fk_project > 0 ? $this->fk_project : "null");
|
||||
$sql .= " VALUES ('(PROV)', ".((int) $this->socid).", '".$this->db->idate($now)."', ".((int) $user->id);
|
||||
$sql .= ", ".($this->fk_project > 0 ? ((int) $this->fk_project) : "null");
|
||||
$sql .= ", '".$this->db->idate($date)."'";
|
||||
$sql .= ", ".($this->source >= 0 && $this->source != '' ? $this->db->escape($this->source) : 'null');
|
||||
$sql .= ", '".$this->db->escape($this->note_private)."'";
|
||||
@@ -944,15 +944,15 @@ class Commande extends CommonOrder
|
||||
$sql .= ", ".($this->ref_client ? "'".$this->db->escape($this->ref_client)."'" : "null");
|
||||
$sql .= ", ".($this->ref_int ? "'".$this->db->escape($this->ref_int)."'" : "null");
|
||||
$sql .= ", '".$this->db->escape($this->model_pdf)."'";
|
||||
$sql .= ", ".($this->cond_reglement_id > 0 ? $this->cond_reglement_id : "null");
|
||||
$sql .= ", ".($this->mode_reglement_id > 0 ? $this->mode_reglement_id : "null");
|
||||
$sql .= ", ".($this->fk_account > 0 ? $this->fk_account : 'NULL');
|
||||
$sql .= ", ".($this->availability_id > 0 ? $this->availability_id : "null");
|
||||
$sql .= ", ".($this->demand_reason_id > 0 ? $this->demand_reason_id : "null");
|
||||
$sql .= ", ".($this->cond_reglement_id > 0 ? ((int) $this->cond_reglement_id) : "null");
|
||||
$sql .= ", ".($this->mode_reglement_id > 0 ? ((int) $this->mode_reglement_id) : "null");
|
||||
$sql .= ", ".($this->fk_account > 0 ? ((int) $this->fk_account) : 'NULL');
|
||||
$sql .= ", ".($this->availability_id > 0 ? ((int) $this->availability_id) : "null");
|
||||
$sql .= ", ".($this->demand_reason_id > 0 ? ((int) $this->demand_reason_id) : "null");
|
||||
$sql .= ", ".($delivery_date ? "'".$this->db->idate($delivery_date)."'" : "null");
|
||||
$sql .= ", ".($this->fk_delivery_address > 0 ? $this->fk_delivery_address : 'NULL');
|
||||
$sql .= ", ".(!empty($this->shipping_method_id) && $this->shipping_method_id > 0 ? $this->shipping_method_id : 'NULL');
|
||||
$sql .= ", ".(!empty($this->warehouse_id) && $this->warehouse_id > 0 ? $this->warehouse_id : 'NULL');
|
||||
$sql .= ", ".($this->fk_delivery_address > 0 ? ((int) $this->fk_delivery_address) : 'NULL');
|
||||
$sql .= ", ".(!empty($this->shipping_method_id) && $this->shipping_method_id > 0 ? ((int) $this->shipping_method_id) : 'NULL');
|
||||
$sql .= ", ".(!empty($this->warehouse_id) && $this->warehouse_id > 0 ? ((int) $this->warehouse_id) : 'NULL');
|
||||
$sql .= ", ".($this->remise_absolue > 0 ? $this->db->escape($this->remise_absolue) : 'NULL');
|
||||
$sql .= ", ".($this->remise_percent > 0 ? $this->db->escape($this->remise_percent) : 0);
|
||||
$sql .= ", ".(int) $this->fk_incoterms;
|
||||
@@ -962,7 +962,7 @@ class Commande extends CommonOrder
|
||||
$sql .= ", ".($this->pos_source != '' ? "'".$this->db->escape($this->pos_source)."'" : "null");
|
||||
$sql .= ", ".(int) $this->fk_multicurrency;
|
||||
$sql .= ", '".$this->db->escape($this->multicurrency_code)."'";
|
||||
$sql .= ", ".(double) $this->multicurrency_tx;
|
||||
$sql .= ", ".(float) $this->multicurrency_tx;
|
||||
$sql .= ")";
|
||||
|
||||
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
||||
|
||||
Reference in New Issue
Block a user