diff --git a/htdocs/don/list.php b/htdocs/don/list.php
index 70e3b38da39..52525009516 100644
--- a/htdocs/don/list.php
+++ b/htdocs/don/list.php
@@ -199,14 +199,14 @@ if ($resql)
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "d.rowid", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "d.societe", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Name", $_SERVER["PHP_SELF"], "d.lastname", "", $param, "", $sortfield, $sortorder);
- print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "d.datedon", "", $param, 'align="center"', $sortfield, $sortorder);
+ print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "d.datedon", "", $param, '', $sortfield, $sortorder, 'center ');
if (! empty($conf->projet->enabled))
{
$langs->load("projects");
print_liste_field_titre("Project", $_SERVER["PHP_SELF"], "fk_projet", "", $param, "", $sortfield, $sortorder);
}
- print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "d.amount", "", $param, 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "d.fk_statut", "", $param, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "d.amount", "", $param, '', $sortfield, $sortorder, 'right ');
+ print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "d.fk_statut", "", $param, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre('');
print "\n";
diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php
index c386327bea6..62ab3452562 100644
--- a/htdocs/expedition/card.php
+++ b/htdocs/expedition/card.php
@@ -1106,9 +1106,9 @@ if ($action == 'create')
{
print '
';
print ''.$langs->trans("Description").' ';
- print ''.$langs->trans("QtyOrdered").' ';
- print ''.$langs->trans("QtyShipped").' ';
- print ''.$langs->trans("QtyToShip");
+ print ' '.$langs->trans("QtyOrdered").' ';
+ print ''.$langs->trans("QtyShipped").' ';
+ print ''.$langs->trans("QtyToShip");
if (empty($conf->productbatch->enabled))
{
print ' ('.$langs->trans("Fill").' ';
@@ -1197,13 +1197,13 @@ if ($action == 'create')
}
// Qty
- print ' '.$line->qty;
+ print ' '.$line->qty;
print ' ';
print ' ';
$qtyProdCom=$line->qty;
// Qty already shipped
- print '';
+ print ' ';
$quantityDelivered = $object->expeditions[$line->id];
print $quantityDelivered;
print ' ';
@@ -1232,7 +1232,7 @@ if ($action == 'create')
if (empty($conf->productbatch->enabled) || ! $product->hasbatch())
{
// Quantity to send
- print ' ';
+ print ' ';
if ($line->product_type == Product::TYPE_PRODUCT || ! empty($conf->global->STOCK_SUPPORTS_SERVICES))
{
if (GETPOST('qtyl'.$indiceAsked, 'int')) $deliverableQty=GETPOST('qtyl'.$indiceAsked, 'int');
@@ -1292,8 +1292,8 @@ if ($action == 'create')
}
print " ->
".$value['fullpath']."
- (".$value['nb'].") ".$value['nb_total']."    
- ".$value['stock']." ".$img." ";
+ (".$value['nb'].") ".$value['nb_total']."    
+ ".$value['stock']." ".$img." ";
}
}
}
@@ -1326,7 +1326,7 @@ if ($action == 'create')
$batchStock = + $dbatch->qty; // To get a numeric
$deliverableQty = min($quantityToBeDelivered, $batchStock);
print '';
- print '';
+ print ' ';
print ' ';
print ' ';
@@ -1357,7 +1357,7 @@ if ($action == 'create')
else
{
print '';
- print ' ';
+ print ' ';
print ' ';
print ' ';
@@ -1397,7 +1397,7 @@ if ($action == 'create')
$deliverableQty = max(0, $deliverableQty);
// Quantity to send
print '';
- print '';
+ print ' ';
if ($line->product_type == Product::TYPE_PRODUCT || ! empty($conf->global->STOCK_SUPPORTS_SERVICES))
{
print ' ';
@@ -1450,8 +1450,8 @@ if ($action == 'create')
print ' ';
print " ->
".$value['fullpath']."
- (".$value['nb'].") ".$value['nb_total']."    
- ".$value['stock']." ".$img." ";
+ (".$value['nb'].") ".$value['nb_total']."    
+ ".$value['stock']." ".$img." ";
print " ";
}
}
@@ -1488,7 +1488,7 @@ if ($action == 'create')
$batchStock = + $dbatch->qty; // To get a numeric
$deliverableQty = min($quantityToBeDelivered, $batchStock);
if ($deliverableQty < 0) $deliverableQty = 0;
- print '';
+ print ' ';
print ' ';
print ' ';
@@ -1520,7 +1520,7 @@ if ($action == 'create')
if ($subj == 0) // Line not shown yet, we show it
{
print '';
- print '';
+ print ' ';
if ($line->product_type == Product::TYPE_PRODUCT || ! empty($conf->global->STOCK_SUPPORTS_SERVICES))
{
$disabled='';
@@ -1782,7 +1782,7 @@ elseif ($id || $ref)
print $langs->trans('DateDeliveryPlanned');
print ' ';
- if ($action != 'editdate_livraison') print 'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).' ';
+ if ($action != 'editdate_livraison') print 'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).' ';
print ' ';
print '';
if ($action == 'editdate_livraison')
@@ -1921,7 +1921,7 @@ elseif ($id || $ref)
print $langs->trans('SendingMethod');
print ' ';
- if ($action != 'editshipping_method_id') print 'id.'">'.img_edit($langs->trans('SetSendingMethod'), 1).' ';
+ if ($action != 'editshipping_method_id') print 'id.'">'.img_edit($langs->trans('SetSendingMethod'), 1).' ';
print '';
print '';
if ($action == 'editshipping_method_id')
@@ -1958,7 +1958,7 @@ elseif ($id || $ref)
print ' ';
print '';
print $langs->trans('IncotermLabel');
- print ' ';
+ print ' ';
if ($user->rights->expedition->creer) print ''.img_edit().' ';
else print ' ';
print '
';
@@ -2003,22 +2003,22 @@ elseif ($id || $ref)
// Adds a line numbering column
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER))
{
- print ' ';
+ print ' ';
}
// Product/Service
print ''.$langs->trans("Products").' ';
// Qty
- print ''.$langs->trans("QtyOrdered").' ';
+ print ''.$langs->trans("QtyOrdered").' ';
if ($origin && $origin_id > 0)
{
- print ''.$langs->trans("QtyInOtherShipments").' ';
+ print ''.$langs->trans("QtyInOtherShipments").' ';
}
if ($action == 'editline')
{
$editColspan = 3;
if (empty($conf->stock->enabled)) $editColspan--;
if (empty($conf->productbatch->enabled)) $editColspan--;
- print '';
+ print ' ';
if ($object->statut <= 1)
{
print $langs->trans("QtyToShip").' - ';
@@ -2041,11 +2041,11 @@ elseif ($id || $ref)
{
if ($object->statut <= 1)
{
- print ' '.$langs->trans("QtyToShip").' ';
+ print ''.$langs->trans("QtyToShip").' ';
}
else
{
- print ''.$langs->trans("QtyShipped").' ';
+ print ''.$langs->trans("QtyShipped").' ';
}
if (! empty($conf->stock->enabled))
{
@@ -2057,9 +2057,9 @@ elseif ($id || $ref)
print ''.$langs->trans("Batch").' ';
}
}
- print ''.$langs->trans("CalculatedWeight").' ';
- print ''.$langs->trans("CalculatedVolume").' ';
- //print ''.$langs->trans("Size").' ';
+ print ''.$langs->trans("CalculatedWeight").' ';
+ print ''.$langs->trans("CalculatedVolume").' ';
+ //print ''.$langs->trans("Size").' ';
if ($object->statut == 0)
{
print ' ';
@@ -2135,7 +2135,7 @@ elseif ($id || $ref)
// Adds a line numbering column
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER))
{
- print ''.($i+1).' ';
+ print ''.($i+1).' ';
}
// Predefined product or service
@@ -2187,12 +2187,12 @@ elseif ($id || $ref)
}
// Qty ordered
- print ''.$lines[$i]->qty_asked.' ';
+ print ''.$lines[$i]->qty_asked.' ';
// Qty in other shipments (with shipment and warehouse used)
if ($origin && $origin_id > 0)
{
- print '';
+ print ' ';
foreach ($alreadysent as $key => $val)
{
if ($lines[$i]->fk_origin_line == $key)
@@ -2223,7 +2223,7 @@ elseif ($id || $ref)
if ($action == 'editline' && $lines[$i]->id == $line_id)
{
// edit mode
- print ' ';
+ print '';
if (is_array($lines[$i]->detail_batch) && count($lines[$i]->detail_batch) > 0)
{
print '';
@@ -2305,7 +2305,7 @@ elseif ($id || $ref)
else
{
// Qty to ship or shipped
- print ''.$lines[$i]->qty_shipped.' ';
+ print ''.$lines[$i]->qty_shipped.' ';
// Warehouse source
if (! empty($conf->stock->enabled))
@@ -2366,30 +2366,30 @@ elseif ($id || $ref)
}
// Weight
- print '';
+ print ' ';
if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->weight*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->weight_units, "weight");
else print ' ';
print ' ';
// Volume
- print '';
+ print ' ';
if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->volume_units, "volume");
else print ' ';
print ' ';
// Size
- //print ''.$lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->volume_units,"volume").' ';
+ //print ''.$lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->volume_units,"volume").' ';
if ($action == 'editline' && $lines[$i]->id == $line_id)
{
- print '';
+ print ' ';
print ' ';
print ' ';
}
elseif ($object->statut == 0)
{
// edit-delete buttons
- print ' ';
+ print ' ';
print 'id . '&action=editline&lineid=' . $lines[$i]->id . '">' . img_edit() . ' ';
print ' ';
print '';
diff --git a/htdocs/expedition/class/api_shipments.class.php b/htdocs/expedition/class/api_shipments.class.php
index 0c8f8717aea..462115f6cf7 100644
--- a/htdocs/expedition/class/api_shipments.class.php
+++ b/htdocs/expedition/class/api_shipments.class.php
@@ -1,6 +1,6 @@
- * Copyright (C) 2016 Laurent Destailleur
+/* Copyright (C) 2015 Jean-François Ferry
+ * Copyright (C) 2016 Laurent Destailleur
*
* 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
diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php
index 41784fa57b5..bbb5ef58c36 100644
--- a/htdocs/expedition/index.php
+++ b/htdocs/expedition/index.php
@@ -160,7 +160,7 @@ if ($resql)
print '';
print $companystatic->getNomUrl(1, 'customer', 32);
print ' ';
- print '';
+ print ' ';
print $orderstatic->getLibStatut(3);
print ' ';
print '';
@@ -219,7 +219,7 @@ if ( $resql )
print '';
print $companystatic->getNomUrl(1, 'customer');
print ' ';
- print '';
+ print ' ';
print $orderstatic->getLibStatut(3);
print ' ';
print '';
diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php
index be7bcfa50ef..371be10adbd 100644
--- a/htdocs/expedition/list.php
+++ b/htdocs/expedition/list.php
@@ -338,7 +338,7 @@ if ($resql)
// Thirdparty
if (! empty($arrayfields['s.nom']['checked']))
{
- print '';
+ print ' ';
print ' ';
print ' ';
}
@@ -356,14 +356,14 @@ if ($resql)
// Country
if (! empty($arrayfields['country.code_iso']['checked']))
{
- print '';
+ print ' ';
print $form->select_country($search_country, 'search_country', '', 0, 'minwidth100imp maxwidth100');
print ' ';
}
// Company type
if (! empty($arrayfields['typent.code']['checked']))
{
- print '';
+ print ' ';
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT));
print ' ';
}
@@ -406,19 +406,19 @@ if ($resql)
// Status
if (! empty($arrayfields['e.fk_statut']['checked']))
{
- print '';
+ print ' ';
print $form->selectarray('viewstatut', array('0'=>$langs->trans('StatusSendingDraftShort'),'1'=>$langs->trans('StatusSendingValidatedShort'),'2'=>$langs->trans('StatusSendingProcessedShort')), $viewstatut, 1);
print ' ';
}
// Status billed
if (! empty($arrayfields['e.billed']['checked']))
{
- print '';
+ print ' ';
print $form->selectyesno('search_billed', $search_billed, 1, 0, 1);
print ' ';
}
// Action column
- print '';
+ print ' ';
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
print ' ';
@@ -427,15 +427,15 @@ 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.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder, 'left ');
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);
if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder);
- if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, 'align="center"', $sortfield, $sortorder);
- if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, 'align="center"', $sortfield, $sortorder);
- if (! empty($arrayfields['e.date_delivery']['checked'])) print_liste_field_titre($arrayfields['e.date_delivery']['label'], $_SERVER["PHP_SELF"], "e.date_delivery", "", $param, 'align="center"', $sortfield, $sortorder);
+ if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $sortfield, $sortorder, 'center ');
+ if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, '', $sortfield, $sortorder, 'center ');
+ if (! empty($arrayfields['e.date_delivery']['checked'])) print_liste_field_titre($arrayfields['e.date_delivery']['label'], $_SERVER["PHP_SELF"], "e.date_delivery", "", $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['l.ref']['checked'])) print_liste_field_titre($arrayfields['l.ref']['label'], $_SERVER["PHP_SELF"], "l.ref", "", $param, '', $sortfield, $sortorder);
- if (! empty($arrayfields['l.date_delivery']['checked'])) print_liste_field_titre($arrayfields['l.date_delivery']['label'], $_SERVER["PHP_SELF"], "l.date_delivery", "", $param, 'align="center"', $sortfield, $sortorder);
+ if (! empty($arrayfields['l.date_delivery']['checked'])) print_liste_field_titre($arrayfields['l.date_delivery']['label'], $_SERVER["PHP_SELF"], "l.date_delivery", "", $param, '', $sortfield, $sortorder, 'center ');
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
@@ -454,11 +454,11 @@ if ($resql)
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
- if (! empty($arrayfields['e.datec']['checked'])) print_liste_field_titre($arrayfields['e.datec']['label'], $_SERVER["PHP_SELF"], "e.date_creation", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
- if (! empty($arrayfields['e.tms']['checked'])) print_liste_field_titre($arrayfields['e.tms']['label'], $_SERVER["PHP_SELF"], "e.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
- if (! empty($arrayfields['e.fk_statut']['checked'])) print_liste_field_titre($arrayfields['e.fk_statut']['label'], $_SERVER["PHP_SELF"], "e.fk_statut", "", $param, 'align="right"', $sortfield, $sortorder);
- if (! empty($arrayfields['e.billed']['checked'])) print_liste_field_titre($arrayfields['e.billed']['label'], $_SERVER["PHP_SELF"], "e.billed", "", $param, 'align="center"', $sortfield, $sortorder);
- print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
+ if (! empty($arrayfields['e.datec']['checked'])) print_liste_field_titre($arrayfields['e.datec']['label'], $_SERVER["PHP_SELF"], "e.date_creation", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
+ if (! empty($arrayfields['e.tms']['checked'])) print_liste_field_titre($arrayfields['e.tms']['label'], $_SERVER["PHP_SELF"], "e.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
+ if (! empty($arrayfields['e.fk_statut']['checked'])) print_liste_field_titre($arrayfields['e.fk_statut']['label'], $_SERVER["PHP_SELF"], "e.fk_statut", "", $param, '', $sortfield, $sortorder, 'right ');
+ if (! empty($arrayfields['e.billed']['checked'])) print_liste_field_titre($arrayfields['e.billed']['label'], $_SERVER["PHP_SELF"], "e.billed", "", $param, '', $sortfield, $sortorder, 'center ');
+ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
print " \n";
$i=0;
@@ -528,7 +528,7 @@ if ($resql)
// Country
if (! empty($arrayfields['country.code_iso']['checked']))
{
- print '';
+ print ' ';
$tmparray=getCountry($obj->fk_pays, 'all');
print $tmparray['label'];
print ' ';
@@ -537,7 +537,7 @@ if ($resql)
// Type ent
if (! empty($arrayfields['typent.code']['checked']))
{
- print '';
+ print ' ';
if (count($typenArray)==0) $typenArray = $formcompany->typent_array(1);
print $typenArray[$obj->typent_code];
print ' ';
@@ -547,7 +547,7 @@ if ($resql)
// Date delivery planed
if (! empty($arrayfields['e.date_delivery']['checked']))
{
- print '';
+ print ' ';
print dol_print_date($db->jdate($obj->date_livraison), "day");
/*$now = time();
if ( ($now - $db->jdate($obj->date_expedition)) > $conf->warnings->lim && $obj->statutid == 1 )
@@ -573,7 +573,7 @@ if ($resql)
if (! empty($arrayfields['l.date_delivery']['checked']))
{
// Date received
- print ' ';
+ print ' ';
print dol_print_date($db->jdate($obj->date_reception), "day");
print ' '."\n";
}
@@ -588,7 +588,7 @@ if ($resql)
// Date creation
if (! empty($arrayfields['e.datec']['checked']))
{
- print '';
+ print ' ';
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
print ' ';
if (! $i) $totalarray['nbfield']++;
@@ -596,7 +596,7 @@ if ($resql)
// Date modification
if (! empty($arrayfields['e.tms']['checked']))
{
- print '';
+ print ' ';
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
print ' ';
if (! $i) $totalarray['nbfield']++;
@@ -604,13 +604,13 @@ if ($resql)
// Status
if (! empty($arrayfields['e.fk_statut']['checked']))
{
- print ''.$shipment->LibStatut($obj->fk_statut, 5).' ';
+ print ''.$shipment->LibStatut($obj->fk_statut, 5).' ';
if (! $i) $totalarray['nbfield']++;
}
// Billed
if (! empty($arrayfields['e.billed']['checked']))
{
- print ''.yn($obj->billed).' ';
+ print ''.yn($obj->billed).' ';
if (! $i) $totalarray['nbfield']++;
}
@@ -630,7 +630,7 @@ if ($resql)
}
else
{
- dol_print_error($db);
+ dol_print_error($db);
}
// End of page
diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php
index 9da07ec45cd..50c67354dde 100644
--- a/htdocs/expedition/shipment.php
+++ b/htdocs/expedition/shipment.php
@@ -362,7 +362,7 @@ if ($id > 0 || ! empty($ref))
print $langs->trans('DateDeliveryPlanned');
print ' ';
- if ($action != 'editdate_livraison') print 'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).' ';
+ if ($action != 'editdate_livraison') print 'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).' ';
print '
';
print '';
if ($action == 'editdate_livraison')
@@ -394,7 +394,7 @@ if ($id > 0 || ! empty($ref))
print $langs->trans('SendingMethod');
print ' ';
if ($action != 'editshippingmethod' && $user->rights->expedition->creer)
- print 'id.'">'.img_edit($langs->trans('SetShippingMode'), 1).' ';
+ print 'id.'">'.img_edit($langs->trans('SetShippingMode'), 1).' ';
print '
';
print '';
if ($action == 'editshippingmethod') {
@@ -414,7 +414,7 @@ if ($id > 0 || ! empty($ref))
print $langs->trans('Warehouse');
print ' ';
if ($action != 'editwarehouse' && $user->rights->commande->creer)
- print 'id.'">'.img_edit($langs->trans('SetWarehouse'), 1).' ';
+ print 'id.'">'.img_edit($langs->trans('SetWarehouse'), 1).' ';
print ' ';
print '';
if ($action == 'editwarehouse') {
@@ -433,7 +433,7 @@ if ($id > 0 || ! empty($ref))
print $langs->trans('PaymentConditionsShort');
print ' ';
- if ($action != 'editconditions' && ! empty($object->brouillon)) print 'id.'">'.img_edit($langs->trans('SetConditions'),1).' ';
+ if ($action != 'editconditions' && ! empty($object->brouillon)) print 'id.'">'.img_edit($langs->trans('SetConditions'),1).' ';
print '';
print '';
if ($action == 'editconditions')
@@ -451,7 +451,7 @@ if ($id > 0 || ! empty($ref))
print '';
print ' ';
if ($action == 'editmode')
@@ -470,7 +470,7 @@ if ($id > 0 || ! empty($ref))
print $langs->trans('AvailabilityPeriod');
print ' ';
if ($action != 'editavailability')
- print 'id . '">' . img_edit($langs->trans('SetAvailability'), 1) . ' ';
+ print 'id . '">' . img_edit($langs->trans('SetAvailability'), 1) . ' ';
print '';
print '';
if ($action == 'editavailability') {
@@ -486,7 +486,7 @@ if ($id > 0 || ! empty($ref))
print $langs->trans('Source');
print ' ';
if ($action != 'editdemandreason')
- print 'id . '">' . img_edit($langs->trans('SetDemandReason'), 1) . ' ';
+ print 'id . '">' . img_edit($langs->trans('SetDemandReason'), 1) . ' ';
print '';
print '';
if ($action == 'editdemandreason') {
@@ -518,7 +518,7 @@ if ($id > 0 || ! empty($ref))
print ' ';
print '';
print $langs->trans('IncotermLabel');
- print ' ';
+ print ' ';
if ($user->rights->commande->creer) print ''.img_edit().' ';
else print ' ';
print '
';
@@ -628,12 +628,12 @@ if ($id > 0 || ! empty($ref))
print ' ';
print ''.$langs->trans("Description").' ';
- print ''.$langs->trans("QtyOrdered").' ';
- print ''.$langs->trans("QtyShipped").' ';
- print ''.$langs->trans("KeepToShip").' ';
+ print ''.$langs->trans("QtyOrdered").' ';
+ print ''.$langs->trans("QtyShipped").' ';
+ print ''.$langs->trans("KeepToShip").' ';
if (! empty($conf->stock->enabled))
{
- print ''.$langs->trans("RealStock").' ';
+ print ''.$langs->trans("RealStock").' ';
}
else
{
@@ -730,18 +730,18 @@ if ($id > 0 || ! empty($ref))
}
// Qty ordered
- print '' . $objp->qty . ' ';
+ print '' . $objp->qty . ' ';
// Qty already shipped
$qtyProdCom=$objp->qty;
- print '';
+ print ' ';
// Nb of sending products for this line of order
$qtyAlreadyShipped = (! empty($object->expeditions[$objp->rowid])?$object->expeditions[$objp->rowid]:0);
print $qtyAlreadyShipped;
print ' ';
// Qty remains to ship
- print '';
+ print ' ';
if ($type == 0 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES))
{
$toBeShipped[$objp->fk_product] = $objp->qty - $qtyAlreadyShipped;
@@ -763,7 +763,7 @@ if ($id > 0 || ! empty($ref))
if ($objp->fk_product > 0 && ($type == Product::TYPE_PRODUCT || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) && ! empty($conf->stock->enabled))
{
- print ' ';
+ print ' ';
print $product->stock_reel;
if ($product->stock_reel < $toBeShipped[$objp->fk_product])
{
@@ -797,10 +797,10 @@ if ($id > 0 || ! empty($ref))
$img=img_warning($langs->trans("StockTooLow"));
}
print ' -> '.$value['fullpath'].' ('.$value['nb'].') ';
- print ' '.$value['nb_total'].' ';
+ print ' '.$value['nb_total'].' ';
print '  ';
print '  ';
- print ''.$value['stock'].' '.$img.' '."\n";
+ print ''.$value['stock'].' '.$img.' '."\n";
}
}
}
@@ -892,7 +892,7 @@ if ($id > 0 || ! empty($ref))
}
//print '';
}
- //print '';
+ //print ' ';
print ' ';
if ($toBeShippedTotal <= 0)
{
diff --git a/htdocs/expedition/stats/index.php b/htdocs/expedition/stats/index.php
index 37f1b051760..c678c6d934d 100644
--- a/htdocs/expedition/stats/index.php
+++ b/htdocs/expedition/stats/index.php
@@ -253,7 +253,7 @@ print '';
arsort($arrayyears);
print $form->selectarray('year', $arrayyears, $year, 0);
print '
';
- print ' ';
+ print ' ';
print '';
print '';
print ' ';
@@ -263,10 +263,10 @@ print '';
print '
';
print '
';
print '';
-print ''.$langs->trans("Year").' ';
-print ''.$langs->trans("NbOfSendings").' ';
-/*print ''.$langs->trans("AmountTotal").' ';
-print ''.$langs->trans("AmountAverage").' ';*/
+print ''.$langs->trans("Year").' ';
+print ''.$langs->trans("NbOfSendings").' ';
+/*print ''.$langs->trans("AmountTotal").' ';
+print ''.$langs->trans("AmountAverage").' ';*/
print ' ';
$oldyear=0;
@@ -279,22 +279,22 @@ foreach ($data as $val)
print '';
- print ''.$oldyear.' ';
+ print ''.$oldyear.' ';
- print '0 ';
- /*print '0 ';
- print '0 ';*/
+ print '0 ';
+ /*print '0 ';
+ print '0 ';*/
print ' ';
}
print '';
- print '';
+ print ' ';
if ($year) print ''.$year.' ';
else print $langs->trans("ValidationDateNotDefinedEvenIfShipmentValidated");
print ' ';
- print ''.$val['nb'].' ';
- /*print ''.price(price2num($val['total'],'MT'),1).' ';
- print ''.price(price2num($val['avg'],'MT'),1).' ';*/
+ print ''.$val['nb'].' ';
+ /*print ''.price(price2num($val['total'],'MT'),1).' ';
+ print ''.price(price2num($val['avg'],'MT'),1).' ';*/
print ' ';
$oldyear=$year;
}
@@ -307,7 +307,7 @@ print '';
// Show graphs
-print '
';
+print '';
if ($mesg) { print $mesg; }
else {
print $px1->show();
@@ -329,8 +329,8 @@ dol_fiche_end();
// TODO USe code similar to commande/stats/index.php instead of this one.
/*
print '';
-print ''.$langs->trans("Year").' ';
-print ''.$langs->trans("NbOfSendings").' ';
+print ''.$langs->trans("Year").' ';
+print ''.$langs->trans("NbOfSendings").' ';
$sql = "SELECT count(*) as nb, date_format(date_expedition,'%Y') as dm";
$sql.= " FROM ".MAIN_DB_PREFIX."expedition";
@@ -349,7 +349,7 @@ if ($resql)
$nbproduct = $row[0];
$year = $row[1];
print "";
- print ''.$year.' '.$nbproduct.' ';
+ print ''.$year.' '.$nbproduct.' ';
$i++;
}
}
diff --git a/htdocs/expedition/stats/month.php b/htdocs/expedition/stats/month.php
index 7f00effc574..5c448198980 100644
--- a/htdocs/expedition/stats/month.php
+++ b/htdocs/expedition/stats/month.php
@@ -1,6 +1,6 @@
- * Copyright (C) 2004-2009 Laurent Destailleur
+/* Copyright (C) 2001-2003 Rodolphe Quiedeville
+ * Copyright (C) 2004-2009 Laurent Destailleur
*
* 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
@@ -53,22 +53,21 @@ $fileurl = DOL_URL_ROOT.'/viewimage.php?modulepart=expeditionstats&file=expediti
$px = new DolGraph();
$mesg = $px->isGraphKo();
-if (! $mesg)
-{
+if (! $mesg) {
$px->SetData($data);
$px->SetMaxValue($px->GetCeilMaxValue());
$px->SetWidth($WIDTH);
$px->SetHeight($HEIGHT);
- $px->SetYLabel($langs->trans("NbOfOrders"));
+ $px->SetYLabel($langs->trans("NbOfSendings"));
$px->SetShading(3);
- $px->SetHorizTickIncrement(1);
- $px->SetPrecisionY(0);
+ $px->SetHorizTickIncrement(1);
+ $px->SetPrecisionY(0);
$px->draw($filename, $fileurl);
}
print '';
-print 'Nombre d expedition par mois ';
-print '';
+print ' '.$langs->trans("NbOfSendingsByMonth").' ';
+print '';
print $px->show();
print ' ';
print '
';
diff --git a/htdocs/expedition/tpl/linkedobjectblock.tpl.php b/htdocs/expedition/tpl/linkedobjectblock.tpl.php
index f1eb3289b99..5bfc81c642a 100644
--- a/htdocs/expedition/tpl/linkedobjectblock.tpl.php
+++ b/htdocs/expedition/tpl/linkedobjectblock.tpl.php
@@ -1,6 +1,6 @@
- * Copyright (C) 2014 Marcos García
+/* Copyright (C) 2012 Regis Houssin
+ * Copyright (C) 2014 Marcos García
*
* 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
@@ -49,14 +49,14 @@ foreach($linkedObjectBlock as $key => $objectlink)
trans("Shipment"); ?>
getNomUrl(1); ?>
- date_delivery, 'day'); ?>
- date_delivery, 'day'); ?>
+ rights->expedition->lire) {
$total = $total + $objectlink->total_ht;
echo price($objectlink->total_ht);
} ?>
- getLibStatut(3); ?>
-
+ getLibStatut(3); ?>
+
element != 'commande') {
@@ -68,17 +68,16 @@ foreach($linkedObjectBlock as $key => $objectlink)
1)
-{
+if (count($linkedObjectBlock) > 1) {
?>
trans("Total"); ?>
-
-
-
-
-
+
+
+
+
+