From b22bde526318c710f470d44c9df9bc363fe268a5 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Fri, 30 Oct 2009 01:52:44 +0100 Subject: [PATCH] Acquisition : Fixing neworderempty : problems with data updates booksellers.tmpl : TMPL_VAR not in comments list_price becomes listprice in neworderempty script as in acq.js --- acqui/neworderempty.pl | 2 +- koha-tmpl/intranet-tmpl/prog/en/js/acq.js | 6 +++--- .../intranet-tmpl/prog/en/modules/acqui/booksellers.tmpl | 2 +- .../prog/en/modules/acqui/neworderempty.tmpl | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 4c92e796b9..1bbb71f133 100755 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -351,7 +351,7 @@ $template->param( quantity => $data->{'quantity'}, quantityrec => $data->{'quantity'}, rrp => $data->{'rrp'}, - list_price => sprintf("%.2f", $data->{'listprice'}||$listprice), + listprice => sprintf("%.2f", $data->{'listprice'}||$listprice), total => sprintf("%.2f", $data->{'ecost'}*$data->{'quantity'} ), ecost => $data->{'ecost'}, notes => $data->{'notes'}, diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js index 61d841ee4e..8bbbdcff83 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js @@ -740,13 +740,13 @@ function calcNeworderTotal(){ var listinc = new Number (f.listinc.value); var currency = f.currency.value; var applygst = new Number (f.applygst.value); - var list_price = new Number(f.list_price.value); + var list_price = new Number(f.listprice.value); var invoiceingst = new Number (f.invoiceincgst.value); var exchangerate = new Number(f.elements[currency].value); //get exchange rate var gst_on=(!listinc && invoiceingst); //do real stuff - var rrp = new Number(list_price*exchangerate); + var rrp = new Number(listprice*exchangerate); var ecost = new Number(rrp * (100 - discount ) / 100); var GST = new Number(0); if (gst_on) { @@ -763,7 +763,7 @@ function calcNeworderTotal(){ f.ecost.value = ecost.toFixed(2); f.total.value = total.toFixed(2); - f.list_price.value = list_price.toFixed(2); + f.listprice.value = list_price.toFixed(2); // gst-stuff needs verifing, mason. if (f.GST) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tmpl index d7717f9aef..860b754e0d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tmpl @@ -75,7 +75,7 @@ - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl index 2a7734a511..cbd861f8c8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl @@ -24,7 +24,7 @@ function Check(ff) { _alertString += "\n- " + _("Quanity must be greater than '0'"); } - if (!(isNum(ff.list_price,0))){ + if (!(isNum(ff.listprice,0))){ ok=1; _alertString += "\n- " + _("Vendor price must be a number"); } @@ -258,10 +258,10 @@ ff.submit();
  • Vendor price: - " /> + " /> - - " onchange="calcNeworderTotal()" /> (entered as ) + + " onchange="calcNeworderTotal()" /> (entered as )
  • -- 2.39.5