From eb4e42bc405aae0db2ffcc5589994bfea04b7454 Mon Sep 17 00:00:00 2001 From: atm-ph Date: Sun, 26 Aug 2018 18:08:10 +0200 Subject: [PATCH 1/3] Fix datec and tms missing in fetch method for API --- htdocs/contact/class/contact.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index b95bc62b008..036ee75a43d 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -681,6 +681,7 @@ class Contact extends CommonObject $sql.= " c.photo,"; $sql.= " c.priv, c.note_private, c.note_public, c.default_lang, c.no_email, c.canvas,"; $sql.= " c.import_key,"; + $sql.= " c.datec as date_creation, c.tms as date_modification,"; $sql.= " co.label as country, co.code as country_code,"; $sql.= " d.nom as state, d.code_departement as state_code,"; $sql.= " u.rowid as user_id, u.login as user_login,"; @@ -712,6 +713,9 @@ class Contact extends CommonObject $this->zip = $obj->zip; $this->town = $obj->town; + $this->date_creation = $this->db->jdate($obj->date_creation); + $this->date_modification = $this->db->jdate($obj->date_modification); + $this->fk_departement = $obj->fk_departement; // deprecated $this->state_id = $obj->fk_departement; $this->departement_code = $obj->state_code; // deprecated From d9beb3f88230188c731e7a75fcc64df0bc3fe4bb Mon Sep 17 00:00:00 2001 From: atm-ph Date: Mon, 27 Aug 2018 10:19:07 +0200 Subject: [PATCH 2/3] Fix tms missing in fetch propal --- htdocs/comm/propal/class/propal.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 56567c24ee3..a9782d21dac 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1343,6 +1343,7 @@ class Propal extends CommonObject $sql.= ", p.fk_shipping_method"; $sql.= ", p.fk_incoterms, p.location_incoterms"; $sql.= ", p.fk_multicurrency, p.multicurrency_code, p.multicurrency_tx, p.multicurrency_total_ht, p.multicurrency_total_tva, p.multicurrency_total_ttc"; + $sql.= ", p.tms as date_modification"; $sql.= ", i.libelle as libelle_incoterms"; $sql.= ", c.label as statut_label"; $sql.= ", ca.code as availability_code, ca.label as availability"; @@ -1396,6 +1397,7 @@ class Propal extends CommonObject $this->datev = $this->db->jdate($obj->datev); // TODO deprecated $this->date_creation = $this->db->jdate($obj->datec); //Creation date $this->date_validation = $this->db->jdate($obj->datev); //Validation date + $this->date_modification = $this->db->jdate($obj->date_modification); // tms $this->date = $this->db->jdate($obj->dp); // Proposal date $this->datep = $this->db->jdate($obj->dp); // deprecated $this->fin_validite = $this->db->jdate($obj->dfv); From f9c1dd8edd127cae6555acee11619f1b8fc37916 Mon Sep 17 00:00:00 2001 From: Norbert Penel Date: Thu, 23 Aug 2018 17:40:40 +0200 Subject: [PATCH 3/3] There is a begin transaction without rollback In this Select, there is no need of this Begin Transaction on my understanding. Don't know why this line code is here for. --- htdocs/product/class/product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index e293ba94bbe..8dab6864346 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -4572,7 +4572,7 @@ class Product extends CommonObject $langs->load('products'); - $this->db->begin(); + //$this->db->begin(); $label_type = 'label';