diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index a97ea89b31a..ea51bcdb4d7 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -246,7 +246,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) // We ask to move a qty if (GETPOST($qty) != 0) { if (! (GETPOST($ent, 'int') > 0)) { - dol_syslog('No dispatch for line ' . $key . ' as no warehouse choosed'); + dol_syslog('No dispatch for line ' . $key . ' as no warehouse was chosen.'); $text = $langs->transnoentities('Warehouse') . ', ' . $langs->transnoentities('Line') . ' ' . ($numline); setEventMessages($langs->trans('ErrorFieldRequired', $text), null, 'errors'); $error ++; @@ -283,7 +283,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) // We ask to move a qty if (GETPOST($qty) > 0) { if (! (GETPOST($ent, 'int') > 0)) { - dol_syslog('No dispatch for line ' . $key . ' as no warehouse choosed'); + dol_syslog('No dispatch for line ' . $key . ' as no warehouse was chosen.'); $text = $langs->transnoentities('Warehouse') . ', ' . $langs->transnoentities('Line') . ' ' . ($numline) . '-' . ($reg[1] + 1); setEventMessages($langs->trans('ErrorFieldRequired', $text), null, 'errors'); $error ++; @@ -418,13 +418,13 @@ if ($id > 0 || ! empty($ref)) { print '
| ' . $langs->trans("Date") . ' | '; if ($object->date_commande) { - print dol_print_date($object->date_commande, "dayhourtext") . "\n"; + print dol_print_date($object->date_commande, "dayhour") . "\n"; } print " | |||||||||||
| ' . $langs->trans("Description") . ' | '; @@ -546,12 +571,24 @@ if ($id > 0 || ! empty($ref)) { print ''; print ' | '; } - print ' | ' . $langs->trans("SupplierRef") . ' | '; + //print '' . $langs->trans("SupplierRef") . ' | '; print '' . $langs->trans("QtyOrdered") . ' | '; print '' . $langs->trans("QtyDispatchedShort") . ' | '; print '' . $langs->trans("QtyToDispatchShort") . ' | '; print ''; - print ' | ' . $langs->trans("Warehouse") . ' | '; + print '' . $langs->trans("Warehouse") . ' | '; + + // Enable hooks to append additional columns + $parameters = array(); + $reshook = $hookmanager->executeHooks( + 'printFieldListTitle', + $parameters, + $object, + $action + ); + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + print $hookmanager->resPrint; + print "'.$objp->sref.' | '; + //print ''.$objp->sref.' | '; // Qty ordered print '' . $objp->qty . ' | '; @@ -634,6 +671,23 @@ if ($id > 0 || ! empty($ref)) { //print img_picto($langs->trans('AddDispatchBatchLine'), 'split.png', 'onClick="addDispatchLine(' . $i . ',\'' . $type . '\')"'); print ''; // Dispatch column print ''; // Warehouse column + + // Enable hooks to append additional columns + $parameters = array( + 'is_information_row' => true, // allows hook to distinguish between the + // rows with information and the rows with + // dispatch form input + 'objp' => $objp + ); + $reshook = $hookmanager->executeHooks( + 'printFieldListValue', + $parameters, + $object, + $action + ); + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + print $hookmanager->resPrint; + print ''; print ' |
| '; // Warehouse column + + // Enable hooks to append additional columns + $parameters = array( + 'is_information_row' => true, // allows hook to distinguish between the + // rows with information and the rows with + // dispatch form input + 'objp' => $objp + ); + $reshook = $hookmanager->executeHooks( + 'printFieldListValue', + $parameters, + $object, + $action + ); + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + print $hookmanager->resPrint; + print ' | ||||||||||||
| '; + print ' | '; print ''; print ''; @@ -725,6 +796,19 @@ if ($id > 0 || ! empty($ref)) { } print " | \n"; + // Enable hooks to append additional columns + $parameters = array( + 'is_information_row' => false // this is a dispatch form row + ); + $reshook = $hookmanager->executeHooks( + 'printFieldListValue', + $parameters, + $object, + $action + ); + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + print $hookmanager->resPrint; + print "|||||||||||