Acquisition : Fixing
authorHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Fri, 30 Oct 2009 00:52:44 +0000 (01:52 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Fri, 30 Oct 2009 00:56:20 +0000 (01:56 +0100)
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
koha-tmpl/intranet-tmpl/prog/en/js/acq.js
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl

index 4c92e79..1bbb71f 100755 (executable)
@@ -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'},
index 61d841e..8bbbdcf 100644 (file)
@@ -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) {
index d7717f9..860b754 100644 (file)
@@ -75,7 +75,7 @@
                             <!--/TMPL_IF-->
                                     <td><!-- TMPL_VAR NAME="basketno" --></td>
                                     <td><!-- TMPL_VAR NAME="basketname" --></td>
-                                    <td><TMPL_VAR NAME="total"></td>
+                                    <td><!--TMPL_VAR NAME="total"--></td>
                                     <td>                                               <!-- TMPL_VAR name="firstname" -->
                                             <!-- TMPL_VAR name="surname" -->
                                     </td>
index 2a7734a..cbd861f 100644 (file)
@@ -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();
             <li>
                 <!-- TMPL_IF name="close" -->
             <span class="label">Vendor price: </span>
-                    <input type="hidden" size="20" name="list_price" id="list_price" value="<!-- TMPL_VAR NAME="list_price" -->" /><!-- TMPL_VAR NAME="list_price" -->
+                    <input type="hidden" size="20" name="listprice" id="listprice" value="<!-- TMPL_VAR NAME="listprice" -->" /><!-- TMPL_VAR NAME="listprice" -->
                 <!-- TMPL_ELSE -->
-                <label for="list_price">Vendor price: </label>
-                    <input type="text" size="20" name="list_price" id="list_price" value="<!-- TMPL_VAR NAME="list_price" -->" onchange="calcNeworderTotal()" /> (entered as <!-- TMPL_VAR NAME="currency" -->)
+                <label for="listprice">Vendor price: </label>
+                    <input type="text" size="20" name="listprice" id="listprice" value="<!-- TMPL_VAR NAME="listprice" -->" onchange="calcNeworderTotal()" /> (entered as <!-- TMPL_VAR NAME="currency" -->)
 
                 <!--/TMPL_IF-->
             </li>