Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 8.0

This commit is contained in:
Laurent Destailleur 2018-08-29 21:13:10 +02:00
commit e2865ff75f

View File

@ -511,25 +511,24 @@ if ($id > 0 || ! empty($ref)) {
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>' . $langs->trans("Description") . '</td>'; print '<td>' . $langs->trans("Description") . '</td>';
print '<td></td>'; if (!empty($conf->productbatch->enabled))
print '<td></td>'; {
print '<td></td>'; print '<td class="dispatch_batch_number_title">'.$langs->trans("batch_number").'</td>';
print '<td class="dispatch_dluo_title">'.$langs->trans("EatByDate").'</td>';
print '<td class="dispatch_dlc_title">'.$langs->trans("SellByDate").'</td>';
}
else
{
print '<td></td>';
print '<td></td>';
print '<td></td>';
}
print '<td align="right">' . $langs->trans("QtyOrdered") . '</td>'; print '<td align="right">' . $langs->trans("QtyOrdered") . '</td>';
print '<td align="right">' . $langs->trans("QtyDispatchedShort") . '</td>'; print '<td align="right">' . $langs->trans("QtyDispatchedShort") . '</td>';
print '<td align="right">' . $langs->trans("QtyToDispatchShort") . '</td>'; print '<td align="right">' . $langs->trans("QtyToDispatchShort") . '</td>';
print '<td width="32"></td>'; print '<td width="32"></td>';
print '<td align="right">' . $langs->trans("Warehouse") . '</td>'; print '<td align="right">' . $langs->trans("Warehouse") . '</td>';
print "</tr>\n"; print "</tr>\n";
if (! empty($conf->productbatch->enabled)) {
print '<tr class="liste_titre">';
print '<td></td>';
print '<td>' . $langs->trans("batch_number") . '</td>';
print '<td>' . $langs->trans("EatByDate") . '</td>';
print '<td>' . $langs->trans("SellByDate") . '</td>';
print '<td colspan="5">&nbsp;</td>';
print "</tr>\n";
}
} }
$nbfreeproduct = 0; // Nb of lins of free products/services $nbfreeproduct = 0; // Nb of lins of free products/services
@ -568,16 +567,21 @@ if ($id > 0 || ! empty($ref)) {
if (! empty($conf->productbatch->enabled)) { if (! empty($conf->productbatch->enabled)) {
if ($objp->tobatch) { if ($objp->tobatch) {
print '<td colspan="4">'; print '<td>';
print $linktoprod; print $linktoprod;
print "</td>"; print "</td>";
print '<td class="dispatch_batch_number"></td>';
print '<td class="dispatch_dluo"></td>';
print '<td class="dispatch_dlc"></td>';
} else { } else {
print '<td>'; print '<td>';
print $linktoprod; print $linktoprod;
print "</td>"; print "</td>";
print '<td colspan="3">'; print '<td class="dispatch_batch_number">';
print $langs->trans("ProductDoesNotUseBatchSerial"); print $langs->trans("ProductDoesNotUseBatchSerial");
print '</td>'; print '</td>';
print '<td class="dispatch_dluo"></td>';
print '<td class="dispatch_dlc"></td>';
} }
} else { } else {
print '<td colspan="4">'; print '<td colspan="4">';
@ -636,6 +640,7 @@ if ($id > 0 || ! empty($ref)) {
print '</td>'; print '</td>';
print '<td colspan="2">&nbsp</td>'; // Qty ordered + qty already dispatached print '<td colspan="2">&nbsp</td>'; // Qty ordered + qty already dispatached
} else { } else {
$type = 'dispatch'; $type = 'dispatch';
print '<td align="right">'; print '<td align="right">';
print '</td>'; // Qty to dispatch print '</td>'; // Qty to dispatch
@ -710,21 +715,27 @@ if ($id > 0 || ! empty($ref)) {
if ($nbproduct) if ($nbproduct)
{ {
$checkboxlabel=$langs->trans("CloseReceivedSupplierOrdersAutomatically", $langs->transnoentitiesnoconv('StatusOrderReceivedAll')); $checkboxlabel = $langs->trans("CloseReceivedSupplierOrdersAutomatically", $langs->transnoentitiesnoconv('StatusOrderReceivedAll'));
print '<br><div class="center">'; print '<br><div class="center">';
print $langs->trans("Comment") . ' : '; $parameters = array();
print '<input type="text" class="minwidth400" maxlength="128" name="comment" value="'; $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
print $_POST["comment"] ? GETPOST("comment") : $langs->trans("DispatchSupplierOrder", $object->ref); // modified by hook
// print ' / '.$object->ref_supplier; // Not yet available if (empty($reshook))
print '" class="flat"><br>'; {
print $langs->trans("Comment").' : ';
print '<input type="text" class="minwidth400" maxlength="128" name="comment" value="';
print $_POST["comment"] ? GETPOST("comment") : $langs->trans("DispatchSupplierOrder", $object->ref);
// print ' / '.$object->ref_supplier; // Not yet available
print '" class="flat"><br>';
print '<input type="checkbox" checked="checked" name="closeopenorder"> '.$checkboxlabel; print '<input type="checkbox" checked="checked" name="closeopenorder"> '.$checkboxlabel;
print '<br><input type="submit" class="button" value="' . $langs->trans("DispatchVerb") . '"'; print '<br><input type="submit" class="button" value="'.$langs->trans("DispatchVerb").'"';
if (count($listwarehouses) <= 0) if (count($listwarehouses) <= 0)
print ' disabled'; print ' disabled';
print '>'; print '>';
}
print '</div>'; print '</div>';
} }
@ -764,14 +775,14 @@ if ($id > 0 || ! empty($ref)) {
print load_fiche_titre($langs->trans("ReceivingForSameOrder")); print load_fiche_titre($langs->trans("ReceivingForSameOrder"));
print '<div class="div-table-responsive">'; print '<div class="div-table-responsive">';
print '<table class="noborder" width="100%">'; print '<table id="dispatch_received_products" class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>' . $langs->trans("Product") . '</td>'; print '<td>' . $langs->trans("Product") . '</td>';
if (! empty($conf->productbatch->enabled)) { if (! empty($conf->productbatch->enabled)) {
print '<td>' . $langs->trans("batch_number") . '</td>'; print '<td class="dispatch_batch_number_title">' . $langs->trans("batch_number") . '</td>';
print '<td>' . $langs->trans("EatByDate") . '</td>'; print '<td class="dispatch_dluo_title">' . $langs->trans("EatByDate") . '</td>';
print '<td>' . $langs->trans("SellByDate") . '</td>'; print '<td class="dispatch_dlc_title">' . $langs->trans("SellByDate") . '</td>';
} }
print '<td align="right">' . $langs->trans("QtyDispatched") . '</td>'; print '<td align="right">' . $langs->trans("QtyDispatched") . '</td>';
print '<td></td>'; print '<td></td>';
@ -794,9 +805,9 @@ if ($id > 0 || ! empty($ref)) {
print "</td>\n"; print "</td>\n";
if (! empty($conf->productbatch->enabled)) { if (! empty($conf->productbatch->enabled)) {
print '<td>' . $objp->batch . '</td>'; print '<td class="dispatch_batch_number">' . $objp->batch . '</td>';
print '<td>' . dol_print_date($db->jdate($objp->eatby), 'day') . '</td>'; print '<td class="dispatch_dluo">' . dol_print_date($db->jdate($objp->eatby), 'day') . '</td>';
print '<td>' . dol_print_date($db->jdate($objp->sellby), 'day') . '</td>'; print '<td class="dispatch_dlc">' . dol_print_date($db->jdate($objp->sellby), 'day') . '</td>';
} }
// Qty // Qty