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 |
}); |
js/locale/de.js | ||
---|---|---|
58 | 58 |
"The option field is empty.":"Das Optionsfeld ist leer.", |
59 | 59 |
"The recipient, subject or body is missing.":"Der Empfäger, der Betreff oder der Text ist leer.", |
60 | 60 |
"The selected database is still configured for client \"#1\". If you delete the database that client will stop working until you re-configure it. Do you still want to delete the database?":"Die auswählte Datenbank ist noch für Mandant \"#1\" konfiguriert. Wenn Sie die Datenbank löschen, wird der Mandanten nicht mehr funktionieren, bis er anders konfiguriert wurde. Wollen Sie die Datenbank trotzdem löschen?", |
61 |
"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?":"Einige der Lagerbewegungen sind nicht vollständig und Lagerbewegungen können nachträglich nicht mehr verändert werden. Wollen Sie wirklich fortfahren?", |
|
61 | 62 |
"There is one or more sections for which no part has been assigned yet; therefore creating the new record is not possible yet.":"Es gibt einen oder mehrere Abschnitte ohne Artikelzuweisung; daher kann der neue Beleg noch nicht erstellt werden.", |
62 | 63 |
"This sales order has an active configuration for periodic invoices. If you save then all subsequently created invoices will contain those changes as well, but not those that have already been created. Do you want to continue?":"Dieser Auftrag besitzt eine aktive Konfiguration für wiederkehrende Rechnungen. Wenn Sie jetzt speichern, so werden alle zukünftig hieraus erzeugten Rechnungen die Änderungen enthalten, nicht aber die bereits erzeugten Rechnungen. Wollen Sie speichern?", |
63 | 64 |
"Time/cost estimate actions":"Aktionen für Kosten-/Zeitabschätzung", |
templates/webpages/do/form_footer.html | ||
---|---|---|
73 | 73 |
[%- UNLESS delivered %] |
74 | 74 |
<input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]"> |
75 | 75 |
[%- IF vc == 'customer' %] |
76 |
<input class="submit" type="submit" name="action_transfer_out" onclick="return check_transfer_qty()" value="[% 'Transfer out' | $T8 %]">
|
|
76 |
<input class="submit" type="submit" name="action_transfer_out" value="[% 'Transfer out' | $T8 %]" data-check-transfer-qty="1">
|
|
77 | 77 |
[% IF transfer_default %] |
78 | 78 |
<input class="submit" type="submit" name="action_transfer_out_default" value="[% 'Transfer out via default' | $T8 %]"> |
79 | 79 |
[%- END %] |
80 | 80 |
[%- ELSE %] |
81 |
<input class="submit" type="submit" name="action_transfer_in" onclick="return check_transfer_qty()" value="[% 'Transfer in' | $T8 %]">
|
|
81 |
<input class="submit" type="submit" name="action_transfer_in" value="[% 'Transfer in' | $T8 %]" data-check-transfer-qty="1">
|
|
82 | 82 |
[% IF transfer_default %] |
83 | 83 |
<input class="submit" type="submit" name="action_transfer_in_default" value="[% 'Transfer in via default' | $T8 %]"> |
84 | 84 |
[%- END %] |
... | ... | |
109 | 109 |
|
110 | 110 |
</form> |
111 | 111 |
<script type='text/javascript'> |
112 |
function check_transfer_qty() { |
|
113 |
var all_match = true; |
|
114 |
var rowcount = $('input[name=rowcount]').val(); |
|
115 |
for (var i = 1; i < rowcount; i++) { |
|
116 |
if ($('#stock_in_out_qty_matches_' + i).val() != 1) { |
|
117 |
all_match = false; |
|
118 |
} |
|
119 |
} |
|
120 |
|
|
121 |
if (all_match) { |
|
122 |
return true; |
|
123 |
} else { |
|
124 |
return confirm("[% '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?' | $T8 %]"); |
|
125 |
} |
|
126 |
} |
|
112 |
$(kivi.SalesPurchase.init_on_submit_checks); |
|
127 | 113 |
</script> |
templates/webpages/do/form_header.html | ||
---|---|---|
11 | 11 |
<script type="text/javascript" src="js/calculate_qty.js"></script> |
12 | 12 |
<script type="text/javascript" src="js/stock_in_out.js"></script> |
13 | 13 |
<script type="text/javascript" src="js/follow_up.js"></script> |
14 |
<script type="text/javascript" src="js/kivi.SalesPurchase.js"></script> |
|
14 | 15 |
|
15 | 16 |
<style type="text/css"> |
16 | 17 |
.fixed_width { |
Auch abrufbar als: Unified diff
Lieferscheinmaske: JavaScript-Checks für Lagermenge nach kivi.SalesPurchase verschoben