Revision a0d3ac64
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
js/edit_periodic_invoices_config.js | ||
---|---|---|
14 | 14 |
// alert(url); |
15 | 15 |
window.open(url, "_new_generic", parm); |
16 | 16 |
} |
17 |
|
|
18 |
function warn_save_active_periodic_invoice() { |
|
19 |
return confirm(kivi.t8('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?')); |
|
20 |
} |
js/kivi.SalesPurchase.js | ||
---|---|---|
49 | 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 | 50 |
}; |
51 | 51 |
|
52 |
this.oe_warn_save_active_periodic_invoice = function() { |
|
53 |
return confirm(kivi.t8('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?')); |
|
54 |
}; |
|
55 |
|
|
52 | 56 |
this.on_submit_checks = function() { |
53 | 57 |
var $button = $(this); |
54 | 58 |
if (($button.data('check-transfer-qty') == 1) && !kivi.SalesPurchase.delivery_order_check_transfer_qty()) |
55 | 59 |
return false; |
56 | 60 |
|
61 |
if (($button.data('warn-save-active-periodic-invoice') == 1) && !kivi.SalesPurchase.oe_warn_save_active_periodic_invoice()) |
|
62 |
return false; |
|
63 |
|
|
57 | 64 |
return true; |
58 | 65 |
}; |
59 | 66 |
|
templates/webpages/oe/form_footer.html | ||
---|---|---|
131 | 131 |
<input class="submit" type="submit" name="action_ship_to" value="[% 'Ship to' | $T8 %]"> |
132 | 132 |
<input class="submit" type="submit" name="action_print" value="[% 'Print' | $T8 %]"> |
133 | 133 |
<input class="submit" type="submit" name="action_e_mail" value="[% 'E-mail' | $T8 %]"> |
134 |
<input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]"[% IF warn_save_active_periodic_invoice %] onclick="return warn_save_active_periodic_invoice();"[% END %]>
|
|
135 |
<input class="submit" type="submit" name="action_save_and_close" value="[% 'Save and Close' | $T8 %]"[% IF warn_save_active_periodic_invoice %] onclick="return warn_save_active_periodic_invoice();"[% END %]>
|
|
134 |
<input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]"[% IF warn_save_active_periodic_invoice %] data-warn-save-active-periodic-invoice="1"[% END %]>
|
|
135 |
<input class="submit" type="submit" name="action_save_and_close" value="[% 'Save and Close' | $T8 %]"[% IF warn_save_active_periodic_invoice %] data-warn-save-active-periodic-invoice="1"[% END %]>
|
|
136 | 136 |
|
137 | 137 |
[%- IF id %] |
138 | 138 |
<input type="button" class="submit" onclick="follow_up_window()" value="[% 'Follow-Up' | $T8 %]"> |
... | ... | |
183 | 183 |
[% END %] |
184 | 184 |
|
185 | 185 |
</form> |
186 |
<script type='text/javascript'> |
|
187 |
$(kivi.SalesPurchase.init_on_submit_checks); |
|
188 |
</script> |
Auch abrufbar als: Unified diff
Auftragsmaske: JavaScript-Checks für Speichern aktiver per. Rechnungen nach kivi.SalesPurchase verschoben