(MT3174) acqui/neworderempty.pl: incrementing the quantity when adding an item
authorAlex Arnaud <alex.arnaud@biblibre.com>
Fri, 26 Mar 2010 10:25:35 +0000 (11:25 +0100)
committerGalen Charlton <gmcharlt@gmail.com>
Fri, 23 Apr 2010 10:57:51 +0000 (06:57 -0400)
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/js/additem.js
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl

index 352c30f..ac3e8bd 100644 (file)
@@ -35,8 +35,8 @@ function cloneItemBlock(index) {
     //}
     // insert this line on the page    
     original.parentNode.insertBefore(clone,original.nextSibling);
-    var quantityrec = document.getElementById('quantityrec');
-    quantityrec.setAttribute('value',parseFloat(quantityrec.getAttribute('value'))+1);
+    var quantity = document.getElementById('quantity');
+    quantity.setAttribute('value',parseFloat(quantity.getAttribute('value'))+1);
 }
 function check_additem() {
        var     barcodes = document.getElementsByName('barcode');
index f42e58e..f6f7902 100644 (file)
@@ -240,7 +240,7 @@ ff.submit();
                     <!-- TMPL_IF name="items" -->
                         <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" onchange="calcNeworderTotal();" />
                     <!-- TMPL_ELSE -->
-                        <input type="text" size="20" id="quantityrec" name="quantity" value="<!-- TMPL_VAR name="quantityrec" -->" onchange="calcNeworderTotal();" />
+                        <input type="text" size="20" id="quantity" name="quantity" value="<!-- TMPL_VAR name="quantityrec" -->" onchange="calcNeworderTotal();" />
                     <!-- /TMPL_IF -->
                 <!--/TMPL_IF-->
                 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->