Lines 429-440
Link Here
|
429 |
</li> |
429 |
</li> |
430 |
<li id="select_currency"> |
430 |
<li id="select_currency"> |
431 |
<label for="invoice_unitprice"></label> |
431 |
<label for="invoice_unitprice"></label> |
432 |
<input type="text" size="20" name="invoice_unitprice" id="invoice_unitprice" value="" /> |
432 |
<input type="text" size="20" name="invoice_unitprice" id="invoice_unitprice" value="[% order.invoice_unitprice | $Price on_editing => 1 %]" /> |
433 |
[% IF currencies.count %] |
433 |
[% IF currencies.count %] |
434 |
<select name="invoice_currency"> |
434 |
<select name="invoice_currency"> |
435 |
<option value="[% active_currency.currency | html %]" data-rate="[% active_currency.rate | html %]" selected="selected">[% active_currency.currency | html %] ([% active_currency.symbol | html %])</option> |
435 |
[% IF order.invoice_currency == active_currency.currency %] |
|
|
436 |
<option value="[% active_currency.currency | html %]" data-rate="[% active_currency.rate | html %]" selected="selected">[% active_currency.currency | html %] ([% active_currency.symbol | html %])</option> |
437 |
[% ELSE %] |
438 |
<option value="[% active_currency.currency | html %]" data-rate="[% active_currency.rate | html %]">[% active_currency.currency | html %] ([% active_currency.symbol | html %])</option> |
439 |
[% END %] |
436 |
[% FOR currency IN currencies %] |
440 |
[% FOR currency IN currencies %] |
437 |
<option value="[% currency.currency | html%]" data-rate="[% currency.rate | html %]">[% currency.currency | html %] ([% currency.symbol | html %])</option> |
441 |
[% IF order.invoice_currency == currency.currency %] |
|
|
442 |
<option value="[% currency.currency | html%]" data-rate="[% currency.rate | html %]" selected="selected">[% currency.currency | html %] ([% currency.symbol | html %])</option> |
443 |
[% ELSE %] |
444 |
<option value="[% currency.currency | html%]" data-rate="[% currency.rate | html %]">[% currency.currency | html %] ([% currency.symbol | html %])</option> |
445 |
[% END %] |
438 |
[% END %] |
446 |
[% END %] |
439 |
</select> |
447 |
</select> |
440 |
[% END %] |
448 |
[% END %] |
Lines 607-612
Link Here
|
607 |
} |
615 |
} |
608 |
}).change(); |
616 |
}).change(); |
609 |
|
617 |
|
|
|
618 |
[% IF order.invoice_unitprice %] |
619 |
$("input[name='change_currency']").click().trigger('change'); |
620 |
[% END %] |
621 |
|
610 |
function update_unitprice() { |
622 |
function update_unitprice() { |
611 |
var rate = Number($("select[name='invoice_currency'] option:selected").data('rate')); |
623 |
var rate = Number($("select[name='invoice_currency'] option:selected").data('rate')); |
612 |
var unitprice = $("#invoice_unitprice").val(); |
624 |
var unitprice = $("#invoice_unitprice").val(); |
613 |
- |
|
|