diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php
index 5b4adc39638..761cce030f7 100644
--- a/htdocs/fourn/commande/dispatch.php
+++ b/htdocs/fourn/commande/dispatch.php
@@ -511,25 +511,24 @@ if ($id > 0 || ! empty($ref)) {
print '
';
print '| ' . $langs->trans("Description") . ' | ';
- print ' | ';
- print ' | ';
- print ' | ';
+ if (!empty($conf->productbatch->enabled))
+ {
+ print ''.$langs->trans("batch_number").' | ';
+ print ''.$langs->trans("EatByDate").' | ';
+ print ''.$langs->trans("SellByDate").' | ';
+ }
+ else
+ {
+ print ' | ';
+ print ' | ';
+ print ' | ';
+ }
print '' . $langs->trans("QtyOrdered") . ' | ';
print '' . $langs->trans("QtyDispatchedShort") . ' | ';
print '' . $langs->trans("QtyToDispatchShort") . ' | ';
print ' | ';
print '' . $langs->trans("Warehouse") . ' | ';
print "
\n";
-
- if (! empty($conf->productbatch->enabled)) {
- print '';
- print ' | ';
- print '' . $langs->trans("batch_number") . ' | ';
- print '' . $langs->trans("EatByDate") . ' | ';
- print '' . $langs->trans("SellByDate") . ' | ';
- print ' | ';
- print "
\n";
- }
}
$nbfreeproduct = 0; // Nb of lins of free products/services
@@ -568,16 +567,21 @@ if ($id > 0 || ! empty($ref)) {
if (! empty($conf->productbatch->enabled)) {
if ($objp->tobatch) {
- print '';
+ print ' | ';
print $linktoprod;
print " | ";
+ print ' | ';
+ print ' | ';
+ print ' | ';
} else {
print '';
print $linktoprod;
print " | ";
- print '';
+ print ' | ';
print $langs->trans("ProductDoesNotUseBatchSerial");
print ' | ';
+ print ' | ';
+ print ' | ';
}
} else {
print '';
@@ -636,6 +640,7 @@ if ($id > 0 || ! empty($ref)) {
print ' | ';
print '  | '; // Qty ordered + qty already dispatached
} else {
+
$type = 'dispatch';
print '';
print ' | '; // Qty to dispatch
@@ -710,21 +715,27 @@ if ($id > 0 || ! empty($ref)) {
if ($nbproduct)
{
- $checkboxlabel=$langs->trans("CloseReceivedSupplierOrdersAutomatically", $langs->transnoentitiesnoconv('StatusOrderReceivedAll'));
+ $checkboxlabel = $langs->trans("CloseReceivedSupplierOrdersAutomatically", $langs->transnoentitiesnoconv('StatusOrderReceivedAll'));
print '
';
- print $langs->trans("Comment") . ' : ';
- print 'trans("DispatchSupplierOrder", $object->ref);
- // print ' / '.$object->ref_supplier; // Not yet available
- print '" class="flat">
';
+ $parameters = array();
+ $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
+ // modified by hook
+ if (empty($reshook))
+ {
+ print $langs->trans("Comment").' : ';
+ print 'trans("DispatchSupplierOrder", $object->ref);
+ // print ' / '.$object->ref_supplier; // Not yet available
+ print '" class="flat">
';
- print ' '.$checkboxlabel;
+ print ' '.$checkboxlabel;
- print '
';
+ print '
';
+ }
print '
';
}
@@ -764,14 +775,14 @@ if ($id > 0 || ! empty($ref)) {
print load_fiche_titre($langs->trans("ReceivingForSameOrder"));
print '';
- print '
';
+ print '';
print '';
print '| ' . $langs->trans("Product") . ' | ';
if (! empty($conf->productbatch->enabled)) {
- print '' . $langs->trans("batch_number") . ' | ';
- print '' . $langs->trans("EatByDate") . ' | ';
- print '' . $langs->trans("SellByDate") . ' | ';
+ print '' . $langs->trans("batch_number") . ' | ';
+ print '' . $langs->trans("EatByDate") . ' | ';
+ print '' . $langs->trans("SellByDate") . ' | ';
}
print '' . $langs->trans("QtyDispatched") . ' | ';
print ' | ';
@@ -794,9 +805,9 @@ if ($id > 0 || ! empty($ref)) {
print "\n";
if (! empty($conf->productbatch->enabled)) {
- print '' . $objp->batch . ' | ';
- print '' . dol_print_date($db->jdate($objp->eatby), 'day') . ' | ';
- print '' . dol_print_date($db->jdate($objp->sellby), 'day') . ' | ';
+ print '' . $objp->batch . ' | ';
+ print '' . dol_print_date($db->jdate($objp->eatby), 'day') . ' | ';
+ print '' . dol_print_date($db->jdate($objp->sellby), 'day') . ' | ';
}
// Qty