[% INCLUDE 'additem.js.inc' %]
<script type="text/javascript" src="[% themelang %]/js/additem.js"></script>
<script type="text/javascript">
+var nav = window.Event ? true : false;
+if (nav) {
+ window.captureEvents(Event.KEYDOWN);
+ window.onkeydown = NetscapeEventHandler_KeyDown;
+} else {
+ document.onkeydown = IEEventHandler_KeyDown;
+}
+
+function NetscapeEventHandler_KeyDown(e) {
+ if (e.which == 13 && e.target.type != 'textarea' && e.target.type != 'submit') { return false; }
+ return true;
+}
+
+function IEEventHandler_KeyDown() {
+ if (event.keyCode == 13 && event.srcElement.type != 'textarea' && event.srcElement.type != 'submit')
+ return false;
+ return true;
+}
//<![CDATA[
actTotal = "";
[% IF (AcqCreateItemOrdering) %]
if(check_additem('[% UniqueItemFields %]') == false) {
- alert(_('Duplicate values detected. Please correct the errors and resubmit.') );
+ alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
if(tobedeleted) {
$(lastitemblock).appendTo('#outeritemblock');
}
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;
}
});
//]]>
</script>
</head>
-<body id="acq_neworderempty" class="acq" onload="updateCosts()">
+<body id="acq_neworderempty" class="acq">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'acquisitions-search.inc' %]
<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 ) %]
<th> </th>
<th> </th>
<th>Barcode</th>
- <th>Home branch</th>
- <th>Holding branch</th>
+ <th>Home library</th>
+ <th>Holding library</th>
<th>Not for loan</th>
<th>Restricted</th>
<th>Location</th>
[% END %]
</li>
[% END %]
- <li>
- [% IF ( close ) %]
- <span class="label">Tax rate: </span>
- <input type="hidden" size="20" name="gstrate" id="gstrate" value="[% gstrate %]" />[% gstrate %]%
- [% ELSE %]
- <label for="gst">Tax rate: </label>
- <select name="gstrate" id="gstrate" onchange="updateCosts();">
- [% FOREACH gst IN gst_values %]
- [% IF ( gst.option == gstrate ) %]
- <option value="[% gst.option %]" selected="selected">[% gst.option * 100 | format("%.1f") %]%</option>
- [% ELSE %]
- <option value="[% gst.option %]">[% gst.option * 100 | format("%.1f") %]%</option>
- [% END %]
+ [% IF ( gst_values ) %]
+ <li>
+ [% IF ( close ) %]
+ <span class="label">Tax rate: </span>
+ <input type="hidden" size="20" name="gstrate" id="gstrate" value="[% gstrate %]" />[% gstrate %]%
+ [% ELSE %]
+ <label for="gst">Tax rate: </label>
+ <select name="gstrate" id="gstrate" onchange="updateCosts();">
+ [% FOREACH gst IN gst_values %]
+ [% IF ( gst.option == gstrate ) %]
+ <option value="[% gst.option %]" selected="selected">[% gst.option * 100 | format("%.1f") %]%</option>
+ [% ELSE %]
+ <option value="[% gst.option %]">[% gst.option * 100 | format("%.1f") %]%</option>
+ [% END %]
+ [% END %]
+ </select>
[% END %]
- </select>
- [% END %]
- </li>
+ [% ELSE %]
+ <input type="hidden" name="gstrate" value="0" />
+ </li>
+ [% END %]
<li>
<label for="discount">Discount: </label>
[% IF ( close ) %]