From 27b7cf8beaa34985efc3c193504a9d9c0a16a3d0 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 16 Oct 2018 23:31:19 +0200 Subject: [PATCH 1/3] Fix uniformization dates of order in API --- htdocs/commande/class/commande.class.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index c588830d83d..7f2a8c98dbe 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -155,7 +155,10 @@ class Commande extends CommonOrder public $demand_reason_id; // Source reason. Why we receive order (after a phone campaign, ...) public $demand_reason_code; public $date; // Date commande - + public $date_creation; // Date commande + public $date_validation; // Date commande + public $date_modification; // Date commande + /** * @deprecated * @see date @@ -1620,7 +1623,7 @@ class Commande extends CommonOrder $sql = 'SELECT c.rowid, c.entity, c.date_creation, c.ref, c.fk_soc, c.fk_user_author, c.fk_user_valid, c.fk_statut'; $sql.= ', c.amount_ht, c.total_ht, c.total_ttc, c.tva as total_tva, c.localtax1 as total_localtax1, c.localtax2 as total_localtax2, c.fk_cond_reglement, c.fk_mode_reglement, c.fk_availability, c.fk_input_reason'; $sql.= ', c.fk_account'; - $sql.= ', c.date_commande'; + $sql.= ', c.date_commande, c.date_valid, c.tms'; $sql.= ', c.date_livraison'; $sql.= ', c.fk_shipping_method'; $sql.= ', c.fk_warehouse'; @@ -1673,6 +1676,9 @@ class Commande extends CommonOrder $this->total_ttc = $obj->total_ttc; $this->date = $this->db->jdate($obj->date_commande); $this->date_commande = $this->db->jdate($obj->date_commande); + $this->date_creation = $this->db->jdate($obj->date_creation); + $this->date_validation = $this->db->jdate($obj->date_valid); + $this->date_modification = $this->db->jdate($obj->tms); $this->remise = $obj->remise; $this->remise_percent = $obj->remise_percent; $this->remise_absolue = $obj->remise_absolue; From 7c35eae2026ac0eb96e1ed6f11acf71cf2981936 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Wed, 17 Oct 2018 00:06:24 +0200 Subject: [PATCH 2/3] Update commande.class.php --- htdocs/commande/class/commande.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 7f2a8c98dbe..4f5051f3411 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -155,9 +155,9 @@ class Commande extends CommonOrder public $demand_reason_id; // Source reason. Why we receive order (after a phone campaign, ...) public $demand_reason_code; public $date; // Date commande - public $date_creation; // Date commande - public $date_validation; // Date commande - public $date_modification; // Date commande + public $date_creation; // Date commande + public $date_validation; // Date commande + public $date_modification; // Date commande /** * @deprecated @@ -1676,9 +1676,9 @@ class Commande extends CommonOrder $this->total_ttc = $obj->total_ttc; $this->date = $this->db->jdate($obj->date_commande); $this->date_commande = $this->db->jdate($obj->date_commande); - $this->date_creation = $this->db->jdate($obj->date_creation); - $this->date_validation = $this->db->jdate($obj->date_valid); - $this->date_modification = $this->db->jdate($obj->tms); + $this->date_creation = $this->db->jdate($obj->date_creation); + $this->date_validation = $this->db->jdate($obj->date_valid); + $this->date_modification = $this->db->jdate($obj->tms); $this->remise = $obj->remise; $this->remise_percent = $obj->remise_percent; $this->remise_absolue = $obj->remise_absolue; From 5f309bf155887f48cd3a6a6e3ab5ed56eb83e84f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 19 Oct 2018 13:38:23 +0200 Subject: [PATCH 3/3] Update commande.class.php --- htdocs/commande/class/commande.class.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 4f5051f3411..1925b71992e 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -155,9 +155,6 @@ class Commande extends CommonOrder public $demand_reason_id; // Source reason. Why we receive order (after a phone campaign, ...) public $demand_reason_code; public $date; // Date commande - public $date_creation; // Date commande - public $date_validation; // Date commande - public $date_modification; // Date commande /** * @deprecated