Revision e8a62150
Von Felix Eichler vor mehr als 4 Jahren hinzugefügt
js/kivi.Order.js | ||
---|---|---|
210 | 210 |
}); |
211 | 211 |
}; |
212 | 212 |
|
213 |
ns.exchangerate_changed = function(event) { |
|
214 |
if (kivi.parse_amount($('#order_exchangerate_as_number').val()) != kivi.parse_amount($('#old_exchangerate').val())) { |
|
215 |
kivi.display_flash('warning', kivi.t8('You have changed the currency or exchange rate. Please update prices.')); |
|
216 |
$('#old_exchangerate').val($('#order_exchangerate_as_number').val()); |
|
217 |
} |
|
218 |
}; |
|
219 |
|
|
213 | 220 |
ns.recalc_amounts_and_taxes = function() { |
214 | 221 |
var data = $('#order_form').serializeArray(); |
215 | 222 |
data.push({ name: 'action', value: 'Order/recalc_amounts_and_taxes' }); |
... | ... | |
830 | 837 |
|
831 | 838 |
$('#order_currency_id').change(kivi.Order.update_exchangerate); |
832 | 839 |
$('#order_transdate_as_date').change(kivi.Order.update_exchangerate); |
840 |
$('#order_exchangerate_as_number').change(kivi.Order.exchangerate_changed); |
|
833 | 841 |
|
834 | 842 |
if ($('#type').val() == 'sales_order' || $('#type').val() == 'sales_quotation' ) { |
835 | 843 |
$('#add_item_parts_id').on('set_item:PartPicker', function(e,o) { $('#add_item_sellprice_as_number').val(kivi.format_amount(o.sellprice, -2)) }); |
Auch abrufbar als: Unified diff
Auftragsschnellerfassung: Warnung wenn neuer Wechselkurs eingegeben
(cherry picked from commit 3825bc25c386674446879946bd73a16a2c3e3314)
(cherry pick von odyn)