Merge pull request #8839 from ATM-Nicolas/fix_shipping_fetch

FIX : Fetch shipping will now fetch project id
This commit is contained in:
Laurent Destailleur 2018-05-25 11:46:06 +02:00 committed by GitHub
commit 1a1f0fbc62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -487,7 +487,7 @@ class Expedition extends CommonObject
$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";
$sql.= ', e.fk_incoterms, e.location_incoterms';
$sql.= ', e.fk_incoterms, e.location_incoterms, e.fk_projet';
$sql.= ', i.libelle as libelle_incoterms';
$sql.= " FROM ".MAIN_DB_PREFIX."expedition as e";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_target = e.rowid AND el.targettype = '".$this->db->escape($this->element)."'";
@ -527,6 +527,7 @@ class Expedition extends CommonObject
$this->origin = ($obj->origin?$obj->origin:'commande'); // For compatibility
$this->origin_id = $obj->origin_id;
$this->billed = ($obj->fk_statut==2?1:0);
$this->fk_project = $obj->fk_projet;
$this->trueWeight = $obj->weight;
$this->weight_units = $obj->weight_units;