Merge pull request #8827 from ATM-Marc/FIX_shipment_fk_project
FIX: shipment: fk_proje(c)t not handled in fetch() and update() methods
This commit is contained in:
commit
131ddd6984
@ -481,7 +481,7 @@ class Expedition extends CommonObject
|
||||
// Check parameters
|
||||
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";
|
||||
$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";
|
||||
$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";
|
||||
@ -513,6 +513,7 @@ class Expedition extends CommonObject
|
||||
$this->ref_ext = $obj->ref_ext;
|
||||
$this->ref_int = $obj->ref_int;
|
||||
$this->statut = $obj->fk_statut;
|
||||
$this->fk_project = $obj->fk_projet;
|
||||
$this->user_author_id = $obj->fk_user_author;
|
||||
$this->date_creation = $this->db->jdate($obj->date_creation);
|
||||
$this->date = $this->db->jdate($obj->date_expedition); // TODO deprecated
|
||||
@ -1052,6 +1053,7 @@ class Expedition extends CommonObject
|
||||
$sql.= " fk_shipping_method=".((isset($this->shipping_method_id) && $this->shipping_method_id > 0)?$this->shipping_method_id:"null").",";
|
||||
$sql.= " tracking_number=".(isset($this->tracking_number)?"'".$this->db->escape($this->tracking_number)."'":"null").",";
|
||||
$sql.= " fk_statut=".(isset($this->statut)?$this->statut:"null").",";
|
||||
$sql.= " fk_projet=".(isset($this->fk_project)?$this->fk_project:"null").",";
|
||||
$sql.= " height=".(($this->trueHeight != '')?$this->trueHeight:"null").",";
|
||||
$sql.= " width=".(($this->trueWidth != '')?$this->trueWidth:"null").",";
|
||||
$sql.= " size_units=".(isset($this->size_units)?$this->size_units:"null").",";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user