Merge pull request #11311 from OPEN-DSI/fix-expedition-fecth-date-valid

Fix fetch date valid in expedition object
This commit is contained in:
Laurent Destailleur 2019-06-07 15:08:29 +02:00 committed by GitHub
commit e606092376
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -528,6 +528,7 @@ class Expedition extends CommonObject
if (empty($id) && empty($ref) && empty($ref_ext) && empty($ref_int)) return -1;
$sql = "SELECT e.rowid, e.ref, e.fk_soc as socid, e.date_creation, e.ref_customer, e.ref_ext, e.ref_int, e.fk_user_author, e.fk_statut, e.fk_projet as fk_project, e.billed";
$sql.= ", e.date_valid";
$sql.= ", e.weight, e.weight_units, e.size, e.size_units, e.width, e.height";
$sql.= ", e.date_expedition as date_expedition, e.model_pdf, e.fk_address, e.date_delivery";
$sql.= ", e.fk_shipping_method, e.tracking_number";
@ -563,6 +564,7 @@ class Expedition extends CommonObject
$this->statut = $obj->fk_statut;
$this->user_author_id = $obj->fk_user_author;
$this->date_creation = $this->db->jdate($obj->date_creation);
$this->date_valid = $this->db->jdate($obj->date_valid);
$this->date = $this->db->jdate($obj->date_expedition); // TODO deprecated
$this->date_expedition = $this->db->jdate($obj->date_expedition); // TODO deprecated
$this->date_shipping = $this->db->jdate($obj->date_expedition); // Date real