Merge branch 'bug_9346' into 3.12-master

This commit is contained in:
Jared Camins-Esakov 2013-01-07 20:47:41 -05:00
commit 3c9d931120
3 changed files with 9 additions and 7 deletions

View file

@ -336,8 +336,6 @@ my @gst_values = map {
option => $_
}, split( '\|', C4::Context->preference("gist") );
my $cur = GetCurrency();
$template->param(
existing => $biblionumber,
ordernumber => $ordernumber,
@ -371,7 +369,6 @@ $template->param(
cur_active_sym => $active_currency->{'symbol'},
cur_active => $active_currency->{'currency'},
loop_currencies => \@loop_currency,
currency_rate => $cur->{rate},
orderexists => ( $new eq 'yes' ) ? 0 : 1,
title => $data->{'title'},
author => $data->{'author'},

View file

@ -644,7 +644,8 @@ function updateCosts(){
var discount = new Number($("#discount").val());
var applygst = new Number ($("#applygst").val());
var listprice = new Number($("#listprice").val());
var exchangerate = new Number($("#currency_rate").val());
var currcode = new String($("#currency").val());
var exchangerate = new Number($("#currency_rate_"+currcode).val());
var gst_on=false;
var rrp = new Number(listprice*exchangerate);
@ -669,7 +670,7 @@ function calcNewsuggTotal(){
// var currency = f.currency.value;
var currcode = new String(document.getElementById('currency').value);
var price = new Number(document.getElementById('price').value);
var exchangerate = new Number(document.getElementById(currcode).value);
var exchangerate = new Number(document.getElementById('currency_rate_'+currcode).value);
var total = new Number(quantity*price*exchangerate);

View file

@ -125,6 +125,7 @@ $(document).ready(function()
alert(_("You can't add a new item, please create a new order line"));
// and we replace the original value
$(this).val([% quantityrec %])
updateCosts(); // blur is invoked after change which updated values
return false;
}
});
@ -146,7 +147,7 @@ $(document).ready(function()
//]]>
</script>
</head>
<body id="acq_neworderempty" class="acq" onload="updateCosts()">
<body id="acq_neworderempty" class="acq">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'acquisitions-search.inc' %]
@ -230,7 +231,10 @@ $(document).ready(function()
<input type="hidden" name="invoiceincgst" id="invoiceincgst" value="[% invoiceincgst %]" />
<input type="hidden" name="suggestionid" value="[% suggestionid %]" />
<input type="hidden" name="import_batch_id" value="[% import_batch_id %]" />
<input type="hidden" name="currency_rate" id="currency_rate" value="[% currency_rate %]" />
[% FOREACH loop_currencie IN loop_currencies %]
<input type="hidden" id="currency_rate_[% loop_currencie.currcode %]" name="[% loop_currencie.currcode %]" value="[% loop_currencie.rate %]" />
[% END %]
<ol><li>
[% IF ( biblionumber ) %]