View | Details | Raw Unified | Return to bug 9346
Collapse All | Expand All

(-)a/acqui/neworderempty.pl (-3 lines)
Lines 336-343 my @gst_values = map { Link Here
336
    option => $_
336
    option => $_
337
}, split( '\|', C4::Context->preference("gist") );
337
}, split( '\|', C4::Context->preference("gist") );
338
338
339
my $cur = GetCurrency();
340
341
$template->param(
339
$template->param(
342
    existing         => $biblionumber,
340
    existing         => $biblionumber,
343
    ordernumber           => $ordernumber,
341
    ordernumber           => $ordernumber,
Lines 371-377 $template->param( Link Here
371
    cur_active_sym   => $active_currency->{'symbol'},
369
    cur_active_sym   => $active_currency->{'symbol'},
372
    cur_active       => $active_currency->{'currency'},
370
    cur_active       => $active_currency->{'currency'},
373
    loop_currencies  => \@loop_currency,
371
    loop_currencies  => \@loop_currency,
374
    currency_rate    => $cur->{rate},
375
    orderexists      => ( $new eq 'yes' ) ? 0 : 1,
372
    orderexists      => ( $new eq 'yes' ) ? 0 : 1,
376
    title            => $data->{'title'},
373
    title            => $data->{'title'},
377
    author           => $data->{'author'},
374
    author           => $data->{'author'},
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js (-2 / +3 lines)
Lines 644-650 function updateCosts(){ Link Here
644
    var discount = new Number($("#discount").val());
644
    var discount = new Number($("#discount").val());
645
    var applygst = new Number ($("#applygst").val());
645
    var applygst = new Number ($("#applygst").val());
646
    var listprice   =  new Number($("#listprice").val());
646
    var listprice   =  new Number($("#listprice").val());
647
    var exchangerate =  new Number($("#currency_rate").val());
647
    var currcode = new String($("#currency").val());
648
    var exchangerate =  new Number($("#currency_rate_"+currcode).val());
648
    var gst_on=false;
649
    var gst_on=false;
649
650
650
    var rrp   = new Number(listprice*exchangerate);
651
    var rrp   = new Number(listprice*exchangerate);
Lines 669-675 function calcNewsuggTotal(){ Link Here
669
//    var currency = f.currency.value;
670
//    var currency = f.currency.value;
670
    var currcode = new String(document.getElementById('currency').value);
671
    var currcode = new String(document.getElementById('currency').value);
671
    var price   =  new Number(document.getElementById('price').value);
672
    var price   =  new Number(document.getElementById('price').value);
672
    var exchangerate =  new Number(document.getElementById(currcode).value);
673
    var exchangerate =  new Number(document.getElementById('currency_rate_'+currcode).value);
673
674
674
    var total =  new Number(quantity*price*exchangerate);
675
    var total =  new Number(quantity*price*exchangerate);
675
676
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt (-3 / +6 lines)
Lines 125-130 $(document).ready(function() Link Here
125
                alert(_("You can't add a new item, please create a new order line"));
125
                alert(_("You can't add a new item, please create a new order line"));
126
                // and we replace the original value
126
                // and we replace the original value
127
                $(this).val([% quantityrec %])
127
                $(this).val([% quantityrec %])
128
                updateCosts(); // blur is invoked after change which updated values
128
                return false;
129
                return false;
129
            }
130
            }
130
        });
131
        });
Lines 146-152 $(document).ready(function() Link Here
146
//]]>
147
//]]>
147
</script>
148
</script>
148
</head>
149
</head>
149
<body id="acq_neworderempty" class="acq" onload="updateCosts()">
150
<body id="acq_neworderempty" class="acq">
150
151
151
[% INCLUDE 'header.inc' %]
152
[% INCLUDE 'header.inc' %]
152
[% INCLUDE 'acquisitions-search.inc' %]
153
[% INCLUDE 'acquisitions-search.inc' %]
Lines 230-236 $(document).ready(function() Link Here
230
        <input type="hidden" name="invoiceincgst" id="invoiceincgst" value="[% invoiceincgst %]" />
231
        <input type="hidden" name="invoiceincgst" id="invoiceincgst" value="[% invoiceincgst %]" />
231
        <input type="hidden" name="suggestionid" value="[% suggestionid %]" />
232
        <input type="hidden" name="suggestionid" value="[% suggestionid %]" />
232
        <input type="hidden" name="import_batch_id" value="[% import_batch_id %]" />
233
        <input type="hidden" name="import_batch_id" value="[% import_batch_id %]" />
233
        <input type="hidden" name="currency_rate" id="currency_rate" value="[% currency_rate %]" />
234
235
        [% FOREACH loop_currencie IN loop_currencies %]
236
            <input type="hidden" id="currency_rate_[% loop_currencie.currcode %]"  name="[% loop_currencie.currcode %]" value="[% loop_currencie.rate %]" />
237
        [% END %]
234
238
235
        <ol><li>
239
        <ol><li>
236
            [% IF ( biblionumber ) %]
240
            [% IF ( biblionumber ) %]
237
- 

Return to bug 9346