diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 63643f75502..08bf971aeee 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -2163,11 +2163,11 @@ class Commande extends CommonObject /** - \brief Renvoie nom clicable (avec eventuellement le picto) - \param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul - \param option Sur quoi pointe le lien: 0=fiche commande,3=fiche compta commande,4=fiche expedition commande - \return string Chaine avec URL - */ + * \brief Renvoie nom clicable (avec eventuellement le picto) + * \param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul + * \param option Sur quoi pointe le lien: 0=fiche commande,3=fiche compta commande,4=fiche expedition commande + * \return string Chaine avec URL + */ function getNomUrl($withpicto=0,$option=0) { global $langs; diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index e41d4d60694..d7aa941d70b 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -793,6 +793,31 @@ class Expedition extends CommonObject } } + /** + * \brief Renvoie nom clicable (avec eventuellement le picto) + * \param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul + * \return string Chaine avec URL + */ + function getNomUrl($withpicto=0) + { + global $langs; + + $result=''; + $urlOption=''; + + + $lien = ''; + $lienfin=''; + + $picto='sending'; + $label=$langs->trans("ShowSending").': '.$this->ref; + + if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin); + if ($withpicto && $withpicto != 2) $result.=' '; + $result.=$lien.$this->ref.$lienfin; + return $result; + } + /** * \brief Retourne le libelle du statut d'une expedition * \return string Libelle diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index 483c0c74a13..809b87820d7 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -21,12 +21,13 @@ /** * \file htdocs/expedition/index.php * \ingroup expedition - * \brief Page accueil du module expedition + * \brief Home page of shipping area. * \version $Id$ */ require("../main.inc.php"); require(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php"); +require(DOL_DOCUMENT_ROOT."/expedition/class/expedition.class.php"); $langs->load("orders"); $langs->load("sendings"); @@ -37,6 +38,7 @@ $langs->load("sendings"); $orderstatic=new Commande($db); $companystatic=new Societe($db); +$shipment=new Expedition($db); $helpurl='EN:Module_Shipments|FR:Module_Expéditions|ES:Módulo_Expediciones'; llxHeader('',$langs->trans("Sendings"),$helpurl); @@ -92,9 +94,17 @@ if ($resql) { $var=!$var; $obj = $db->fetch_object($resql); - print "
| rowid."\">".img_object($langs->trans("ShowSending"),"sending").' '; - print "rowid."\">".$objp->ref." | \n"; + print ""; + $shipment->id=$objp->rowid; + $shipment->ref=$objp->ref; + print $shipment->getNomUrl(1); + print " | \n"; // Third party print ''; $companystatic->id=$objp->socid; @@ -120,14 +125,18 @@ if ($resql) $companystatic->nom=$objp->socname; print $companystatic->getNomUrl(1); print ' | '; - // Date + // Date delivery planed print ""; - print dol_print_date($db->jdate($objp->date_expedition),"day"); + print dol_print_date($db->jdate($objp->date_delivery),"day"); /*$now = time(); if ( ($now - $db->jdate($objp->date_expedition)) > $conf->warnings->lim && $objp->statutid == 1 ) { }*/ print " | \n"; + // Date real + print ""; + print dol_print_date($db->jdate($objp->date_expedition),"day"); + print " | \n"; print ''.$expedition->LibStatut($objp->fk_statut,5).' | '; print "