Skip to content

Commit

Permalink
Fix look and feel on shipment/reception
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 3, 2023
1 parent 82f69c6 commit 4cb9770
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
8 changes: 4 additions & 4 deletions htdocs/expedition/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@
* View
*/

$title = $langs->trans("Shipment");
$title = $object->ref.' - '.$langs->trans("Shipment");
if ($action == 'create2') {
$title = $langs->trans("CreateShipment");
}
Expand Down Expand Up @@ -1370,7 +1370,7 @@
//var_dump($dbatch);
$batchStock = + $dbatch->qty; // To get a numeric
$deliverableQty = min($quantityToBeDelivered, $batchStock);
print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? $bc[$var] : '').'>';
print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? 'oddeven' : '').'>';
print '<td colspan="3" ></td><td class="center">';
print '<input class="qtyl" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="'.$deliverableQty.'">';
print '</td>';
Expand Down Expand Up @@ -1442,7 +1442,7 @@
$deliverableQty = min($quantityToBeDelivered, $stock);
$deliverableQty = max(0, $deliverableQty);
// Quantity to send
print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? $bc[$var] : '').'>';
print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? 'oddeven' : '').'>';
print '<td colspan="3" ></td><td class="center"><!-- qty to ship (no lot management for product line indiceAsked='.$indiceAsked.') -->';
if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
if (isset($alreadyQtySetted[$line->fk_product][intval($warehouse_id)])) {
Expand Down Expand Up @@ -1582,7 +1582,7 @@
}
$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = $deliverableQty + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];

print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? $bc[$var] : '').'><td colspan="3"></td><td class="center">';
print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ?'oddeven' : '').'><td colspan="3"></td><td class="center">';
print '<input class="qtyl '.$tooltipClass.'" title="'.$tooltipTitle.'" name="'.$inputName.'" id="'.$inputName.'" type="text" size="4" value="'.$deliverableQty.'">';
print '</td>';

Expand Down
2 changes: 1 addition & 1 deletion htdocs/expedition/dispatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
}

// Load translation files required by the page
$langs->loadLangs(array("sendings", "companies", "bills", 'deliveries', 'orders', 'stocks', 'other', 'propal'));
$langs->loadLangs(array("sendings", "companies", "bills", 'deliveries', 'orders', 'stocks', 'other', 'propal', 'receptions'));

if (isModEnabled('productbatch')) {
$langs->load('productbatch');
Expand Down
10 changes: 6 additions & 4 deletions htdocs/reception/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -1037,14 +1037,16 @@

print '<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#autofill").click(function() {';
jQuery("#autofill").click(function(event) {
event.preventDefault();';
$i = 1;
while ($i <= $numAsked) {
print 'jQuery("#qtyl'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n";
$i++;
}
print '});
jQuery("#autoreset").click(function() {';
jQuery("#autoreset").click(function(event) {
event.preventDefault();';
$i = 1;
while ($i <= $numAsked) {
print 'jQuery("#qtyl'.$i.'").val(0);'."\n";
Expand Down Expand Up @@ -1072,8 +1074,8 @@
print '<td>'.$langs->trans("BuyingPrice").'</td>';
}
if (isModEnabled('productbatch')) {
print ' <br>(<a href="#" id="autofill">'.$langs->trans("Fill").'</a>';
print ' / <a href="#" id="autoreset">'.$langs->trans("Reset").'</a>)';
print ' <br><center><a href="#" id="autofill"><span class="fas fa-fill pictofixedwidth" style=""></span> '.$langs->trans("Fill").'</a>';
print ' &nbsp; &nbsp; <a href="#" id="autoreset"><span class="fas fa-eraser pictofixedwidth" style=""></span>'.$langs->trans("Reset").'</a></center><br>';
}
print '</td>';
if (isModEnabled('stock')) {
Expand Down

0 comments on commit 4cb9770

Please sign in to comment.