Skip to content

Commit

Permalink
FIX: empty date_valid property when fetching a Reception (#31697)
Browse files Browse the repository at this point in the history
  • Loading branch information
jyhere authored Nov 5, 2024
1 parent 24e7285 commit 7e2ac74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion htdocs/reception/class/reception.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ public function fetch($id, $ref = '', $ref_ext = '')

$sql = "SELECT e.rowid, e.entity, e.ref, e.fk_soc as socid, e.date_creation, e.ref_supplier, e.ref_ext, e.fk_user_author, e.fk_statut as status, e.billed";
$sql .= ", e.weight, e.weight_units, e.size, e.size_units, e.width, e.height";
$sql .= ", e.date_reception as date_reception, e.model_pdf, e.date_delivery";
$sql .= ", e.date_reception as date_reception, e.model_pdf, e.date_delivery, e.date_valid";
$sql .= ", e.fk_shipping_method, e.tracking_number";
$sql .= ", el.fk_source as origin_id, el.sourcetype as origin";
$sql .= ", e.note_private, e.note_public";
Expand Down Expand Up @@ -473,6 +473,7 @@ public function fetch($id, $ref = '', $ref_ext = '')
$this->date = $this->db->jdate($obj->date_reception); // TODO deprecated
$this->date_reception = $this->db->jdate($obj->date_reception); // Date real
$this->date_delivery = $this->db->jdate($obj->date_delivery); // Date planned
$this->date_valid = $this->db->jdate($obj->date_valid); // Date validation
$this->model_pdf = $obj->model_pdf;
$this->shipping_method_id = $obj->fk_shipping_method;
$this->tracking_number = $obj->tracking_number;
Expand Down

0 comments on commit 7e2ac74

Please sign in to comment.