Revision ffbde3ef
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
js/kivi.SalesPurchase.js | ||
---|---|---|
35 | 35 |
$element.val($edit.val()); |
36 | 36 |
$('#edit_longdescription_dialog').dialog('close'); |
37 | 37 |
}; |
38 |
|
|
39 |
this.delivery_order_check_transfer_qty = function() { |
|
40 |
var all_match = true; |
|
41 |
var rowcount = $('input[name=rowcount]').val(); |
|
42 |
for (var i = 1; i < rowcount; i++) |
|
43 |
if ($('#stock_in_out_qty_matches_' + i).val() != 1) |
|
44 |
all_match = false; |
|
45 |
|
|
46 |
if (all_match) |
|
47 |
return true; |
|
48 |
|
|
49 |
return confirm(kivi.t8('There are still transfers not matching the qty of the delivery order. Stock operations can not be changed later. Do you really want to proceed?')); |
|
50 |
}; |
|
51 |
|
|
52 |
this.on_submit_checks = function() { |
|
53 |
var $button = $(this); |
|
54 |
if (($button.data('check-transfer-qty') == 1) && !kivi.SalesPurchase.delivery_order_check_transfer_qty()) |
|
55 |
return false; |
|
56 |
|
|
57 |
return true; |
|
58 |
}; |
|
59 |
|
|
60 |
this.init_on_submit_checks = function() { |
|
61 |
$('input[type=submit]').click(kivi.SalesPurchase.on_submit_checks); |
|
62 |
}; |
|
38 | 63 |
}); |
Auch abrufbar als: Unified diff
Lieferscheinmaske: JavaScript-Checks für Lagermenge nach kivi.SalesPurchase verschoben