Lines 859-867
Link Here
|
859 |
|
859 |
|
860 |
function _update_unitprice() { |
860 |
function _update_unitprice() { |
861 |
var rate = Number($("select[name='currency'] option:selected").val()); |
861 |
var rate = Number($("select[name='currency'] option:selected").val()); |
862 |
var unitprice = $("#unitprice_currency").val(); |
862 |
var unitprice = $("#unitprice").val(); |
863 |
var new_unitprice = Number( unitprice * rate ).toFixed(2); |
863 |
var new_unitprice = Number( unitprice * rate ).toFixed(2); |
864 |
$("#unitprice").val(new_unitprice).change(); |
864 |
$("#unitprice_currency").val(new_unitprice).change(); |
865 |
} |
865 |
} |
866 |
$("#order_edit").on("change", "select[name='currency']", _update_unitprice ); |
866 |
$("#order_edit").on("change", "select[name='currency']", _update_unitprice ); |
867 |
$("#order_edit").on("change", "#unitprice_currency", _update_unitprice ); |
867 |
$("#order_edit").on("change", "#unitprice_currency", _update_unitprice ); |
868 |
- |
|
|