Skip to content

Commit

Permalink
Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Aug 29, 2018
2 parents 6ca9854 + 617adc7 commit e2865ff
Showing 1 changed file with 46 additions and 35 deletions.
81 changes: 46 additions & 35 deletions htdocs/fourn/commande/dispatch.php
Expand Up @@ -511,25 +511,24 @@
print '<tr class="liste_titre">';

print '<td>' . $langs->trans("Description") . '</td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
if (!empty($conf->productbatch->enabled))
{
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("QtyDispatchedShort") . '</td>';
print '<td align="right">' . $langs->trans("QtyToDispatchShort") . '</td>';
print '<td width="32"></td>';
print '<td align="right">' . $langs->trans("Warehouse") . '</td>';
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
Expand Down Expand Up @@ -568,16 +567,21 @@

if (! empty($conf->productbatch->enabled)) {
if ($objp->tobatch) {
print '<td colspan="4">';
print '<td>';
print $linktoprod;
print "</td>";
print '<td class="dispatch_batch_number"></td>';
print '<td class="dispatch_dluo"></td>';
print '<td class="dispatch_dlc"></td>';
} else {
print '<td>';
print $linktoprod;
print "</td>";
print '<td colspan="3">';
print '<td class="dispatch_batch_number">';
print $langs->trans("ProductDoesNotUseBatchSerial");
print '</td>';
print '<td class="dispatch_dluo"></td>';
print '<td class="dispatch_dlc"></td>';
}
} else {
print '<td colspan="4">';
Expand Down Expand Up @@ -636,6 +640,7 @@
print '</td>';
print '<td colspan="2">&nbsp</td>'; // Qty ordered + qty already dispatached
} else {

$type = 'dispatch';
print '<td align="right">';
print '</td>'; // Qty to dispatch
Expand Down Expand Up @@ -710,21 +715,27 @@

if ($nbproduct)
{
$checkboxlabel=$langs->trans("CloseReceivedSupplierOrdersAutomatically", $langs->transnoentitiesnoconv('StatusOrderReceivedAll'));
$checkboxlabel = $langs->trans("CloseReceivedSupplierOrdersAutomatically", $langs->transnoentitiesnoconv('StatusOrderReceivedAll'));

print '<br><div class="center">';
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 '<br><input type="submit" class="button" value="' . $langs->trans("DispatchVerb") . '"';
if (count($listwarehouses) <= 0)
print ' disabled';
print '>';
$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 '<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 '<br><input type="submit" class="button" value="'.$langs->trans("DispatchVerb").'"';
if (count($listwarehouses) <= 0)
print ' disabled';
print '>';
}
print '</div>';
}

Expand Down Expand Up @@ -764,14 +775,14 @@
print load_fiche_titre($langs->trans("ReceivingForSameOrder"));

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 '<td>' . $langs->trans("Product") . '</td>';
if (! empty($conf->productbatch->enabled)) {
print '<td>' . $langs->trans("batch_number") . '</td>';
print '<td>' . $langs->trans("EatByDate") . '</td>';
print '<td>' . $langs->trans("SellByDate") . '</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>';
}
print '<td align="right">' . $langs->trans("QtyDispatched") . '</td>';
print '<td></td>';
Expand All @@ -794,9 +805,9 @@
print "</td>\n";

if (! empty($conf->productbatch->enabled)) {
print '<td>' . $objp->batch . '</td>';
print '<td>' . dol_print_date($db->jdate($objp->eatby), 'day') . '</td>';
print '<td>' . dol_print_date($db->jdate($objp->sellby), 'day') . '</td>';
print '<td class="dispatch_batch_number">' . $objp->batch . '</td>';
print '<td class="dispatch_dluo">' . dol_print_date($db->jdate($objp->eatby), 'day') . '</td>';
print '<td class="dispatch_dlc">' . dol_print_date($db->jdate($objp->sellby), 'day') . '</td>';
}

// Qty
Expand Down

0 comments on commit e2865ff

Please sign in to comment.