* Copyright (C) 2005-2009 Laurent Destailleur * Copyright (C) 2005 Simon TOSSER * Copyright (C) 2005-2010 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ // Code identique a /expedition/shipment.php /** * \file htdocs/expedition/fiche.php * \ingroup expedition * \brief Fiche descriptive d'une expedition * \version $Id$ */ require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/expedition/class/expedition.class.php"); require_once(DOL_DOCUMENT_ROOT."/includes/modules/expedition/pdf/ModelePdfExpedition.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php"); require_once(DOL_DOCUMENT_ROOT."/product/class/html.formproduct.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/product.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/sendings.lib.php"); if ($conf->product->enabled || $conf->service->enabled) require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php"); if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php"); if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php"); if ($conf->stock->enabled) require_once(DOL_DOCUMENT_ROOT."/product/stock/class/entrepot.class.php"); $langs->load("sendings"); $langs->load("companies"); $langs->load("bills"); $langs->load('deliveries'); $langs->load('orders'); $langs->load('stocks'); $langs->load('other'); $langs->load('propal'); $origin = "expedition"; $origin_id = isset($_GET["id"])?$_GET["id"]:''; $id = $origin_id; $origin = $_GET["origin"]?$_GET["origin"]:$_POST["origin"]; // Example: commande, propal $origin_id = $_GET["origin_id"]?$_GET["origin_id"]:$_POST["origin_id"]; // Id of order or propal // Security check if ($user->societe_id) $socid=$user->societe_id; $result=restrictedArea($user,$origin,$origin_id,''); /* * Actions */ if ($_POST["action"] == 'add') { $db->begin(); // Creation de l'objet expedition $expedition = new Expedition($db); $expedition->date_expedition = time(); $expedition->note = $_POST["note"]; $expedition->origin = $origin; $expedition->origin_id = $origin_id; $expedition->weight = $_POST["weight"]==""?"NULL":$_POST["weight"]; $expedition->sizeH = $_POST["sizeH"]==""?"NULL":$_POST["sizeH"]; $expedition->sizeW = $_POST["sizeW"]==""?"NULL":$_POST["sizeW"]; $expedition->sizeS = $_POST["sizeS"]==""?"NULL":$_POST["sizeS"]; $expedition->size_units = $_POST["size_units"]; $expedition->weight_units = $_POST["weight_units"]; // On boucle sur chaque ligne du document d'origine pour completer objet expedition // avec qte a livrer $classname = ucfirst($expedition->origin); $object = new $classname($db); $object->fetch($expedition->origin_id); //$object->fetch_lines(); $expedition->socid = $object->socid; $expedition->ref_customer = $object->ref_client; $expedition->date_delivery = $object->date_livraison; $expedition->fk_delivery_address = $object->fk_delivery_address; $expedition->expedition_method_id = $_POST["expedition_method_id"]; $expedition->tracking_number = $_POST["tracking_number"]; for ($i = 0 ; $i < sizeof($object->lignes) ; $i++) { $ent = "entl".$i; $idl = "idl".$i; $qty = "qtyl".$i; $entrepot_id = $_POST[$ent]?$_POST[$ent]:$_POST["entrepot_id"]; if ($_POST[$qty] > 0) { $expedition->addline($entrepot_id,$_POST[$idl],$_POST[$qty]); } } $ret=$expedition->create($user); if ($ret > 0) { $db->commit(); Header("Location: fiche.php?id=".$expedition->id); exit; } else { $db->rollback(); $mesg='
'.$expedition->error.'
'; $_GET["commande_id"]=$_POST["commande_id"]; $_GET["action"]='create'; } } /* * Genere un bon de livraison */ if ($_GET["action"] == 'create_delivery' && $conf->livraison_bon->enabled && $user->rights->expedition->livraison->creer) { $expedition = new Expedition($db); $expedition->fetch($_GET["id"]); $result = $expedition->create_delivery($user); if ($result > 0) { Header("Location: ".DOL_URL_ROOT.'/livraison/fiche.php?id='.$result); exit; } else { $mesg=$expedition->error; } } if ($_REQUEST["action"] == 'confirm_valid' && $_REQUEST["confirm"] == 'yes' && $user->rights->expedition->valider) { $expedition = new Expedition($db); $expedition->fetch($_GET["id"]); $expedition->fetch_client(); $result = $expedition->valid($user); // Define output language $outputlangs = $langs; $newlang=''; if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id']; if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$expedition->client->default_lang; if (! empty($newlang)) { $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } $result=expedition_pdf_create($db,$expedition->id,$expedition->modelpdf,$outputlangs); if ($result <= 0) { dol_print_error($db,$result); exit; } } if ($_REQUEST["action"] == 'confirm_delete' && $_REQUEST["confirm"] == 'yes') { if ($user->rights->expedition->supprimer ) { $expedition = new Expedition($db); $expedition->fetch($_GET["id"]); $result = $expedition->delete(); if ($result > 0) { Header("Location: liste.php"); exit; } else { $mesg = $expedition->error; } } } /* * Build doc */ if ($_REQUEST['action'] == 'builddoc') // En get ou en post { require_once(DOL_DOCUMENT_ROOT."/includes/modules/expedition/pdf/ModelePdfExpedition.class.php"); // Sauvegarde le dernier modele choisi pour generer un document $shipment = new Expedition($db, 0, $_REQUEST['id']); $shipment->fetch($_REQUEST['id']); $shipment->fetch_client(); if ($_REQUEST['model']) { $shipment->setDocModel($user, $_REQUEST['model']); } // Define output language $outputlangs = $langs; $newlang=''; if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id']; if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$shipment->client->default_lang; if (! empty($newlang)) { $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } $result=expedition_pdf_create($db,$_REQUEST['id'],$_REQUEST['model'],$outputlangs); if ($result <= 0) { dol_print_error($db,$result); exit; } } /* * View */ llxHeader('',$langs->trans('Sending'),'Expedition'); $html = new Form($db); $formfile = new FormFile($db); $formproduct = new FormProduct($db); /********************************************************************* * * Mode creation * *********************************************************************/ if ($_GET["action"] == 'create') { $expe = new Expedition($db); print_fiche_titre($langs->trans("CreateASending")); if (! $origin) { $mesg='
'.$langs->trans("ErrorBadParameters").'
'; } if ($mesg) { print $mesg.'
'; } if ($origin) { $classname = ucfirst($origin); $object = new $classname($db); if ($object->fetch($origin_id)) { $soc = new Societe($db); $soc->fetch($object->socid); $author = new User($db); $author->fetch($object->user_author_id); if ($conf->stock->enabled) $entrepot = new Entrepot($db); /* * Document source */ print '
'; print ''; print ''; print ''; print ''; if ($_GET["entrepot_id"]) { print ''; } print ''; // Ref print ''; print "\n"; // Ref client print ''; print ''; // Tiers print ''; print ''; print ''; // Date print ""; print '\n"; // Date delivery planned print ''; print '\n"; print ''; // Delivery address if (($origin == 'commande' && $conf->global->COMMANDE_ADD_DELIVERY_ADDRESS) || ($origin == 'propal' && $conf->global->PROPAL_ADD_DELIVERY_ADDRESS)) { print ''; print ''."\n"; } // Warehouse (id forced) if ($conf->stock->enabled && $_GET["entrepot_id"]) { print ''; print ''; } if ($object->note && ! $user->societe_id) { print '"; } print ''; print ''; print ''; // Delivery method print ""; print '\n"; // Tracking number print ""; print '\n"; print "
'; if ($conf->commande->enabled) { print $langs->trans("RefOrder").''.img_object($langs->trans("ShowOrder"),'order').' '.$object->ref; } else { print $langs->trans("RefProposal").''.img_object($langs->trans("ShowProposal"),'propal').' '.$object->ref; } print '
'; print $langs->trans('RefCustomer').''; print $object->ref_client; print '
'.$langs->trans('Company').''.$soc->getNomUrl(1).'
".$langs->trans("Date")."'.dol_print_date($object->date,"day")."
'.$langs->trans("DateDeliveryPlanned").''.dol_print_date($object->date_livraison,'day')."
'.$langs->trans('DeliveryAddress').''; if (!empty($object->fk_delivery_address)) { $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$_GET['socid'],'none','commande',$object->id); } print '
'.$langs->trans("Warehouse").''; $ents = $entrepot->list_array(); print ''.img_object($langs->trans("ShowWarehouse"),'stock').' '.$ents[$_GET["entrepot_id"]].''; print '
'.$langs->trans("NotePrivate").': '.nl2br($object->note)."
'; print $langs->trans("Weight"); print ''; print $formproduct->select_measuring_units("weight_units","weight"); print '
'; print $langs->trans("Width"); print '  
'; print $langs->trans("Height"); print ''; print $formproduct->select_measuring_units("size_units","size"); print '
'; print $langs->trans("Depth"); print ' 
".$langs->trans("DeliveryMethod")."'; $expe->fetch_delivery_methods(); $html->select_array("expedition_method_id",$expe->meths,'',1,0,0,0,"",1); print "
".$langs->trans("TrackingNumber")."'; print ''; print "
"; /* * Lignes de commandes * */ print '
'; //$lignes = $object->fetch_lines(1); $numAsked = sizeof($object->lignes); /* Lecture des expeditions deja effectuees */ $object->loadExpeditions(); if ($numAsked) { print ''; print ''; print ''; print ''; print ''; if ($conf->stock->enabled) { if ($_GET["entrepot_id"]) { print ''; } else { print ''; } } print "\n"; } $var=true; $indiceAsked = 0; while ($indiceAsked < $numAsked) { $product = new Product($db); $line = $object->lines[$indiceAsked]; $var=!$var; print "\n"; // Desc if ($line->fk_product > 0) { $product->fetch($line->fk_product); print ''; } else { //var_dump($ligne); print "\n"; } // Qty print ''; $qtyProdCom=$line->qty; // Sendings print ''; $quantityAsked = $line->qty; $quantityToBeDelivered = $quantityAsked - $quantityDelivered; if ($conf->stock->enabled && $line->product_type == 0) { $defaultqty=0; if ($_GET["entrepot_id"]) { $stock = $product->stock_entrepot[$_GET["entrepot_id"]]; $stock+=0; // Convertit en numerique $defaultqty=min($quantityToBeDelivered, $stock); if ($defaultqty < 0) $defaultqty=0; } // Quantity print ''; // Stock if ($_GET["entrepot_id"]) { print ''; } else { $array=array(); $sql = "SELECT e.rowid, e.label, ps.reel"; $sql.= " FROM ".MAIN_DB_PREFIX."product_stock as ps"; $sql.= ", ".MAIN_DB_PREFIX."entrepot as e"; $sql.= " WHERE ps.fk_entrepot = e.rowid"; $sql.= " AND fk_product = '".$product->id."'"; $result = $db->query($sql) ; if ($result) { $num = $db->num_rows($result); $i=0; if ($num > 0) { while ($i < $num) { $obj = $db->fetch_object($result); $array[$obj->rowid] = $obj->label.' ('.$obj->reel.')'; $i++; } } $db->free($result); } else { $this->error=$db->error(); return -1; } print ''; } } else { // Quantity print ''; if ($line->product_type == 1) print ''; } print "\n"; // Show subproducts of product if (! empty($conf->global->PRODUIT_SOUSPRODUITS) && $line->fk_product > 0) { $product->get_sousproduits_arbo (); $prods_arbo = $product->get_arbo_each_prod($qtyProdCom); if(sizeof($prods_arbo) > 0) { foreach($prods_arbo as $key => $value) { //print $value[0]; $img=''; if ($value['stock'] < $value['stock_alert']) { $img=img_warning($langs->trans("StockTooLow")); } print ""; } } } $indiceAsked++; } print ''; print "
'.$langs->trans("Description").''.$langs->trans("QtyOrdered").''.$langs->trans("QtyShipped").''.$langs->trans("QtyToShip").''.$langs->trans("Stock").''.$langs->trans("Warehouse").'
'; print ''; if ($line->product_type == 1) { print img_object($langs->trans("ShowService"),"service"); } else { print img_object($langs->trans("ShowProduct"),"product"); } print ' '.$product->ref.' - '.$product->libelle; if ($line->desc) print '
'.dol_nl2br(dol_htmlcleanlastbr($line->desc),1); print '
".nl2br($line->desc)."'.$line->qty.''; $quantityDelivered = $object->expeditions[$line->id]; print $quantityDelivered; print ''; print ''; print ''; print ''; print $stock; if ($stock < $quantityToBeDelivered) { print ' '.img_warning($langs->trans("StockTooLow")); } print ''; $html->select_array('entl'.$i,$array,'',1,0,0); print ''; print ''; print ''; print ' 
      -> ".$value['fullpath']." (".$value['nb'].") ".$value['nb_total']."   ".$value['stock']." ".$img."

"; print '
'; } else { dol_print_error($db); } } } else /* *************************************************************************** */ /* */ /* Edit and view mode */ /* */ /* *************************************************************************** */ { if ($_GET["id"] > 0) { $expedition = new Expedition($db); $result = $expedition->fetch($_GET["id"]); if ($result < 0) { dol_print_error($db,$expedition->error); exit -1; } $lignes = $expedition->lignes; $num_prod = sizeof($lignes); if ($expedition->id > 0) { if ($mesg) { print '
'.$mesg.'
'; } if (!empty($expedition->origin)) { $typeobject = $expedition->origin; $origin = $expedition->origin; $expedition->fetch_object(); } if (strlen($expedition->tracking_number)) { $expedition->GetUrlTrackingStatus(); } $soc = new Societe($db); $soc->fetch($expedition->socid); // delivery link $expedition->load_object_linked($expedition->id,$expedition->element,-1,-1); $head=shipping_prepare_head($expedition); dol_fiche_head($head, 'shipping', $langs->trans("Sending"), 0, 'sending'); if ($mesg) print $mesg; /* * Confirmation de la suppression * */ if ($_GET["action"] == 'delete') { $ret=$html->form_confirm($_SERVER['PHP_SELF'].'?id='.$expedition->id,$langs->trans('DeleteSending'),$langs->trans("ConfirmDeleteSending",$expedition->ref),'confirm_delete','',0,1); if ($ret == 'html') print '
'; } /* * Confirmation de la validation * */ if ($_GET["action"] == 'valid') { $ret=$html->form_confirm($_SERVER['PHP_SELF'].'?id='.$expedition->id,$langs->trans('ValidateSending'),$langs->trans("ConfirmValidateSending",$expedition->ref),'confirm_valid','',0,1); if ($ret == 'html') print '
'; } /* * Confirmation de l'annulation * */ if ($_GET["action"] == 'annuler') { $ret=$html->form_confirm($_SERVER['PHP_SELF'].'?id='.$expedition->id,$langs->trans('CancelSending'),$langs->trans("ConfirmCancelSending",$expedition->ref),'confirm_cancel','',0,1); if ($ret == 'html') print '
'; } // Calcul du poids total et du volume total des produits $totalWeight = ''; $totalVolume = ''; for ($i = 0 ; $i < $num_prod ; $i++) { $weightUnit=0; $volumeUnit=0; if (! empty($lignes[$i]->weight_units)) $weightUnit = $lignes[$i]->weight_units; $trueWeightUnit=pow(10,$weightUnit); $totalWeight += $lignes[$i]->weight*$lignes[$i]->qty_shipped*$trueWeightUnit; if (! empty($lignes[$i]->volume_units)) $volumeUnit = $lignes[$i]->volume_units; $trueVolumeUnit=pow(10,$volumeUnit); $totalVolume += $lignes[$i]->volume*$lignes[$i]->qty_shipped*$trueVolumeUnit; } $totalVolume=$totalVolume; print ''; // Ref print ''; print ''; // Customer print ''; print ''; print ""; // Linked documents if ($typeobject == 'commande' && $expedition->$typeobject->id && $conf->commande->enabled) { print ''; print '\n"; print ''; } if ($typeobject == 'propal' && $expedition->$typeobject->id && $conf->propal->enabled) { print ''; print '\n"; print ''; } // Ref customer print ''; print '\n"; print ''; // Date print ''; print '\n"; print ''; // Date delivery planned print ''; print '\n"; print ''; // Delivery address if (($origin == 'commande' && $conf->global->COMMANDE_ADD_DELIVERY_ADDRESS) || ($origin == 'propal' && $conf->global->PROPAL_ADD_DELIVERY_ADDRESS)) { print ''; print ''."\n"; } // Weight print ''; print ''; // Volume Total print ''; print '\n"; print ''; // Taille print ''; print '\n"; print ''; // Status print ''; print '\n"; print ''; // Sending method print ''; print ''; print ''; // Tracking Number print ''; print ''; if ($expedition->tracking_url) { print '\n"; } print ''; print "
'.$langs->trans("Ref").''.$expedition->ref.'
'.$langs->trans("Customer").''.$soc->getNomUrl(1).'
'; $object=new Commande($db); $object->fetch($expedition->$typeobject->id); print $langs->trans("RefOrder").''; print $object->getNomUrl(1,'commande'); print "
'; $object=new Propal($db); $object->fetch($expedition->$typeobject->id); print $langs->trans("RefProposal").''; print $object->getNomUrl(1,'expedition'); print "
'.$langs->trans("RefCustomer").''.$expedition->ref_customer."
'.$langs->trans("Date").''.dol_print_date($expedition->date,"daytext")."
'.$langs->trans("DateDeliveryPlanned").''.dol_print_date($expedition->date_delivery,'daytext')."
'.$langs->trans('DeliveryAddress').''; if (!empty($expedition->fk_delivery_address)) { $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$expedition->id,$expedition->fk_delivery_address,$expedition->deliveryaddress->socid,'none','shipment',$expedition->id); } print '
'.$langs->trans("TotalWeight").''; if ($expedition->trueWeight) { // If sending weigth defined print $expedition->trueWeight.' '.measuring_units_string($expedition->weight_units,"weight"); } else { // If sending Weight not defined we use sum of products // TODO Show in best unit if ($totalWeight > 0) print $totalWeight.' '.measuring_units_string(0,"weight"); else print ' '; } print '
'.$langs->trans("TotalVolume").''; if ($expedition->trueVolume) { // If sending volume defined print $expedition->trueVolume.' '.measuring_units_string($expedition->volumeUnit,"volume"); } else { // If sending volume not defined we use sum of products // TODO Show in best unit if ($totalVolume > 0) print $totalVolume.' '.measuring_units_string(0,"volume"); else print ' '; } print "
'.$langs->trans("Size").''; if ($expedition->trueWidth || $expedition->trueHeight || $expedition->trueDepth) { // If sending size defined print $expedition->trueSize.' '.measuring_units_string($expedition->size_units,"size"); } else print ' '; print "
'.$langs->trans("Status").''.$expedition->getLibStatut(4)."
'.$langs->trans("SendingMethod").''; if ($expedition->expedition_method_id > 0) { // Get code using getLabelFromKey $code=$langs->getLabelFromKey($db,$expedition->expedition_method_id,'expedition_methode','rowid','code'); print $langs->trans("SendingMethod".strtoupper($code)); } else print ' '; print '
'.$langs->trans("TrackingNumber").''.$expedition->tracking_number.''.$expedition->tracking_url."
\n"; /* * Lignes produits */ print '
'; print ''; print ''; print ''; if ($expedition->fk_statut <= 1) { print ''; } else { print ''; } print ''; print ''; if ($conf->stock->enabled) { print ''; } print "\n"; $var=false; for ($i = 0 ; $i < $num_prod ; $i++) { print ""; if ($lignes[$i]->fk_product > 0) { print '\n"; } // Qte commande print ''; // Qte a expedier ou expedier print ''; // Poids print ''; // Volume print ''; // Entrepot source if ($conf->stock->enabled) { $entrepot = new Entrepot($db); $entrepot->fetch($lignes[$i]->entrepot_id); print ''; } print ""; $var=!$var; } } print "
'.$langs->trans("Products").''.$langs->trans("QtyOrdered").''.$langs->trans("QtyToShip").''.$langs->trans("QtyShipped").''.$langs->trans("Weight").''.$langs->trans("Volume").''.$langs->trans("WarehouseSource").'
'; // Affiche ligne produit $text = ''; if ($lignes[$i]->fk_product_type==1) $text.= img_object($langs->trans('ShowService'),'service'); else $text.= img_object($langs->trans('ShowProduct'),'product'); $text.= ' '.$lignes[$i]->ref.''; $text.= ' - '.$lignes[$i]->label; $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($lignes[$i]->description)); //print $description; print $html->textwithtooltip($text,$description,3,'','',$i); print_date_range($lignes[$i]->date_start,$lignes[$i]->date_end); if ($conf->global->PRODUIT_DESC_IN_FORM) { print ($lignes[$i]->description && $lignes[$i]->description!=$lignes[$i]->product)?'
'.dol_htmlentitiesbr($lignes[$i]->description):''; } } else { print "
"; if ($lignes[$i]->fk_product_type==1) $text = img_object($langs->trans('Service'),'service'); else $text = img_object($langs->trans('Product'),'product'); print $text.' '.nl2br($lignes[$i]->description); print_date_range($lignes[$i]->date_start,$lignes[$i]->date_end); print "'.$lignes[$i]->qty_asked.''.$lignes[$i]->qty_shipped.''.$lignes[$i]->weight*$lignes[$i]->qty_shipped.' '.measuring_units_string($lignes[$i]->weight_units,"weight").''.$lignes[$i]->volume*$lignes[$i]->qty_shipped.' '.measuring_units_string($lignes[$i]->volume_units,"volume").''.$entrepot->getNomUrl(1).'
\n"; print "\n\n"; /* * Boutons actions */ if ($user->societe_id == 0) { print '
'; if ($expedition->statut == 0 && $num_prod > 0) { if ($user->rights->expedition->valider) { print ''.$langs->trans("Validate").''; } else { print ''.$langs->trans("Validate").''; } } if ($conf->livraison_bon->enabled && $expedition->statut == 1 && $user->rights->expedition->livraison->creer && empty($expedition->linked_object)) { print ''.$langs->trans("DeliveryOrder").''; } if ($user->rights->expedition->supprimer) { print ''.$langs->trans("Delete").''; } print '
'; } print "\n"; print "
"; /* * Documents generated */ if ($conf->expedition_bon->enabled) { $expeditionref = dol_sanitizeFileName($expedition->ref); $filedir = $conf->expedition->dir_output . "/sending/" .$expeditionref; $urlsource = $_SERVER["PHP_SELF"]."?id=".$expedition->id; $genallowed=$user->rights->expedition->lire; $delallowed=$user->rights->expedition->supprimer; //$genallowed=1; //$delallowed=0; $somethingshown=$formfile->show_documents('expedition',$expeditionref,$filedir,$urlsource,$genallowed,$delallowed,$expedition->modelpdf,1,0,0,28,0,'','','',$soc->default_lang); if ($genallowed && ! $somethingshown) $somethingshown=1; } print ''; // Rien a droite print '
'; if (!empty($origin) && $expedition->$origin->id) { print '
'; //show_list_sending_receive($expedition->origin,$expedition->origin_id," AND e.rowid <> ".$expedition->id); show_list_sending_receive($expedition->origin,$expedition->origin_id); } } else { print "Expedition inexistante ou acces refuse"; } } $db->close(); llxFooter('$Date$ - $Revision$'); ?>