*
* 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
| '.$langs->trans("QtyOrdered").' | '; print ''.$langs->trans("SendingSheet").' | '; print ''.$langs->trans("Description").' | '; print ''.$langs->trans("DateCreation").' | '; print ''.$langs->trans("DateDeliveryPlanned").' | '; print ''.$langs->trans("QtyShipped").' | '; if ($conf->livraison_bon->enabled) { print ''.$langs->trans("DeliveryOrder").' | '; //print ''.$langs->trans("QtyReceived").' | '; print ''.$langs->trans("DeliveryDate").' | '; } print "||||
| '.img_object($langs->trans("ShowSending"),'sending').' '.$objp->exp_ref.' | '; // Description if ($objp->fk_product > 0) { // Define output language if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $object = new $origin($db); $object->fetch($origin_id); $object->fetch_thirdparty(); $prod = new Product($db, $objp->fk_product); $outputlangs = $langs; $newlang=''; if (empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id']; if (empty($newlang)) $newlang=$object->client->default_lang; if (! empty($newlang)) { $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } $label = (! empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $objp->product; } else $label = $objp->product; print '';
// Show product and description
$product_static->type=$objp->fk_product_type;
$product_static->id=$objp->fk_product;
$product_static->ref=$objp->ref;
$product_static->libelle=$label;
$text=$product_static->getNomUrl(1);
$text.= ' - '.$label;
$description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($objp->description));
print $form->textwithtooltip($text,$description,3,'','',$i);
// Show range
print_date_range($objp->date_start,$objp->date_end);
// Add description in form
if ($conf->global->PRODUIT_DESC_IN_FORM)
{
print ($objp->description && $objp->description!=$objp->product)?' '.dol_htmlentitiesbr($objp->description):''; } print ' | ';
}
else
{
print ""; if ($objp->fk_product_type==1) $text = img_object($langs->trans('Service'),'service'); else $text = img_object($langs->trans('Product'),'product'); print $text.' '.nl2br($objp->description); // Show range print_date_range($objp->date_start,$objp->date_end); print " | \n"; } //print ''.$objp->qty_asked.' | '; // Date creation print ''.dol_print_date($db->jdate($objp->date_creation),'day').' | '; // Date shipping creation print ''.dol_print_date($db->jdate($objp->date_delivery),'day').' | '; // Qty shipped print ''.$objp->qty_shipped.' | '; // Informations on receipt if ($conf->livraison_bon->enabled) { include_once(DOL_DOCUMENT_ROOT.'/livraison/class/livraison.class.php'); $expedition->id=$objp->sendingid; $expedition->fetchObjectLinked($expedition->id,$expedition->element); //var_dump($expedition->linkedObjects); $receiving=$expedition->linkedObjects['delivery'][0]; if (! empty($receiving)) { // $expedition->fk_origin_line = id of det line of order // $receiving->fk_origin_line = id of det line of order // $receiving->origin may be 'shipping' // $receiving->origin_id may be id of shipping // Ref print ''; print $receiving->getNomUrl($db); //print ''.img_object($langs->trans("ShowReceiving"),'sending').' '.$objp->livraison_ref.''; print ' | '; // Qty received //print ''; // TODO No solution for the moment to link a line det of receipt with a line det of shipping, // so no way to know the qty received for this line of shipping. //print $langs->trans("FeatureNotYetAvailable"); //print ' | '; // Date shipping real print ''; print dol_print_date($receiving->date_delivery,'day'); print ' | '; } else { //print ''; print ' | '; print ' | '; } } print ' |