diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 38e4babc87d..dd1f0b6e703 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -174,7 +174,7 @@ $formcompany=new FormCompany($db); $helpurl='EN:Module_Shipments|FR:Module_Expéditions|ES:Módulo_Expediciones'; llxHeader('',$langs->trans('ListOfSendings'),$helpurl); -$sql = "SELECT e.rowid, e.ref, e.date_expedition as date_expedition, e.date_delivery as date_livraison, l.date_delivery as date_reception, e.fk_statut,"; +$sql = "SELECT e.rowid, e.ref, e.ref_customer, e.date_expedition as date_expedition, e.date_delivery as date_livraison, l.date_delivery as date_reception, e.fk_statut,"; $sql.= ' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client, '; $sql.= " typent.code as typent_code,"; $sql.= " state.code_departement as state_code, state.nom as state_name,"; @@ -310,6 +310,7 @@ if ($resql) print ''; if (! empty($arrayfields['e.ref']['checked'])) print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"],"e.ref","",$param,'',$sortfield,$sortorder); + if (! empty($arrayfields['e.ref_customer']['checked'])) print_liste_field_titre($arrayfields['e.ref_customer']['label'], $_SERVER["PHP_SELF"],"e.ref_customer","",$param,'',$sortfield,$sortorder); if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"],"s.nom", "", $param,'align="left"',$sortfield,$sortorder); if (! empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'],$_SERVER["PHP_SELF"],'s.town','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'],$_SERVER["PHP_SELF"],'s.zip','',$param,'',$sortfield,$sortorder); @@ -348,14 +349,21 @@ if ($resql) if (! empty($arrayfields['e.ref']['checked'])) { print ''; - print ''; + print ''; + print ''; + } + // Ref customer + if (! empty($arrayfields['e.ref_customer']['checked'])) + { + print ''; + print ''; print ''; } // Thirdparty if (! empty($arrayfields['s.nom']['checked'])) { print ''; - print ''; + print ''; print ''; } // Town @@ -460,13 +468,17 @@ if ($resql) { $obj = $db->fetch_object($resql); - $var=!$var; - - print ""; - $shipment->id=$obj->rowid; $shipment->ref=$obj->ref; + $companystatic->id=$obj->socid; + $companystatic->ref=$obj->name; + $companystatic->name=$obj->name; + + $var=!$var; + + print ""; + // Ref if (! empty($arrayfields['e.ref']['checked'])) { @@ -476,9 +488,14 @@ if ($resql) if (! $i) $totalarray['nbfield']++; } - $companystatic->id=$obj->socid; - $companystatic->ref=$obj->name; - $companystatic->name=$obj->name; + // Ref customer + if (! empty($arrayfields['e.ref_customer']['checked'])) + { + print ""; + print $obj->ref_customer; + print "\n"; + if (! $i) $totalarray['nbfield']++; + } // Third party if (! empty($arrayfields['s.nom']['checked']))