->run('row_table_scroll_down')
->run('row_set_keyboard_events_by_id', $item_id)
->on('.recalc', 'change', 'recalc_amounts_and_taxes')
+ ->on('.reformat_number', 'change', 'reformat_number')
->focus('#add_item_parts_id_name');
$self->_js_redisplay_amounts_and_taxes;
recalc_amounts_and_taxes();
}
+function reformat_number(event) {
+ $(event.target).val(kivi.format_amount(kivi.parse_amount($(event.target).val()), -2));
+}
+
function recalc_amounts_and_taxes() {
var data = $('#order_form').serialize();
data += '&action=Order/recalc_amounts_and_taxes';
});
row_set_keyboard_events($('.row_entry'));
$('.recalc').change(recalc_amounts_and_taxes);
+ $('.reformat_number').change(reformat_number);
});
</script>