Merge pull request #14365 from bafbes/abb120131

NEW Add link to reset qty on supplier dispatch page
This commit is contained in:
Laurent Destailleur 2020-08-04 12:00:47 +02:00 committed by GitHub
commit cc88fe9b68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -743,7 +743,8 @@ if ($id > 0 || !empty($ref)) {
print '<td class="right">'.$langs->trans("SupplierRef").'</td>';
print '<td class="right">'.$langs->trans("QtyOrdered").'</td>';
print '<td class="right">'.$langs->trans("QtyDispatchedShort").'</td>';
print '<td class="right">'.$langs->trans("QtyToDispatchShort").'</td>';
print ' <td class="right">'.$langs->trans("QtyToDispatchShort");
print '<br><a href="#" id="autoreset">'.$langs->trans("Reset").'</a></td>';
print '<td width="32"></td>';
if (!empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) {
@ -1068,7 +1069,16 @@ if ($id > 0 || !empty($ref)) {
$("select[name=fk_default_warehouse]").change(function() {
var fk_default_warehouse = $("option:selected", this).val();
$("select[name^=entrepot_]").val(fk_default_warehouse).change();
});
});
jQuery("#autoreset").click(function() {';
$i = 0;
while ($i < $nbproduct) {
print ' jQuery("#qty_0_'.$i.'").val("");';
$i++;
}
print '
});
});
</script>';