<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
[% INCLUDE 'additem.js.inc' %]
<script type="text/javascript" src="[% themelang %]/js/additem.js"></script>
+<script type="text/javascript" src="[% themelang %]/js/prevent_submit.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 = "";
//We apply the fonction only for modify option
[% IF ( quantityrec ) %]
+ [% IF ( acqcreate ) %]
$('#quantity').blur(function()
{
// if user decreases the quantity
}
});
[% END %]
+ [% END %]
//keep a copy of all budgets before removing the inactives
disabledBudgetsCopy = $('#budget_id').html();
<input type="hidden" name="basketno" value="[% basketno %]" />
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />
<input type="hidden" name="biblionumber" value="[% biblionumber %]" />
- <input type="hidden" name="biblioitemnumber" value="[% biblioitemnumber %]" />
<input type="hidden" name="listinc" id="listinc" value="[% listincgst %]" />
<input type="hidden" name="applygst" id="applygst" value="[% gstreg %]" />
<input type="hidden" name="invoiceincgst" id="invoiceincgst" value="[% invoiceincgst %]" />
<ol><li>
[% IF ( biblionumber ) %]
<span class="label">Title</span>
- <input type="hidden" size="50" name="title" value="[% title |html %]" /> <span class="title">[% title |html %]</span>
+ <input type="hidden" name="title" value="[% title |html %]" /> <span class="title">[% title |html %]</span>
[% ELSE %]
<label for="entertitle" class="required">Title: </label>
<input type="text" id="entertitle" size="50" name="title" value="[% title |html %]" />
<li>
[% IF ( biblionumber ) %]
<span class="label">Author: </span>
- <input type="hidden" size="50" name="author" id="author" value="[% author %]" />[% author %]
+ <input type="hidden" name="author" id="author" value="[% author %]" />[% author %]
[% ELSE %]
<label for="author">Author: </label>
<input type="text" size="50" name="author" id="author" value="[% author %]" />
<li>
[% IF ( biblionumber ) %]
<span class="label">Publisher: </span>
- <input type="hidden" size="50" name="publishercode" id="publishercode" value="[% publishercode %]" />[% publishercode %]
+ <input type="hidden" name="publishercode" id="publishercode" value="[% publishercode %]" />[% publishercode %]
[% ELSE %]
<label for="publishercode"> Publisher: </label>
<input type="text" size="50" name="publishercode" id="publishercode" value="[% publishercode %]" />
<li>
[% IF ( biblionumber ) %]
<span class="label">Edition: </span>
- <input type="hidden" size="20" name="editionstatement" id="editionstatement" value="[% editionstatement %]" />[% editionstatement %]
+ <input type="hidden" name="editionstatement" id="editionstatement" value="[% editionstatement %]" />[% editionstatement %]
[% ELSE %]
<label for="editionstatement">Edition: </label>
<li>
[% IF ( biblionumber ) %]
<span class="label">Publication year: </span>
- <input type="hidden" size="10" name="publicationyear" id="publicationyear" value="[% publicationyear %]" />[% publicationyear %]
+ <input type="hidden" name="publicationyear" id="publicationyear" value="[% publicationyear %]" />[% publicationyear %]
[% ELSE %]
<label for="publicationyear">Publication year: </label>
<input type="text" size="10" name="publicationyear" id="publicationyear" value="[% publicationyear %]" />
<li>
[% IF ( biblionumber ) %]
<span class="label">ISBN: </span>
- <input type="hidden" size="50" name="isbn" id="ISBN" value="[% isbn %]" />[% isbn %]
+ <input type="hidden" name="isbn" id="ISBN" value="[% isbn %]" />[% isbn %]
[% ELSE %]
<label for="ISBN">ISBN: </label>
<input type="text" size="50" name="isbn" id="ISBN" value="[% isbn %]" />
<li>
[% IF ( biblionumber ) %]
<span class="label">EAN: </span>
- <input type="hidden" size="20" name="ean" id="EAN" value="[% ean %]" />[% ean %]
+ <input type="hidden" name="ean" id="EAN" value="[% ean %]" />[% ean %]
[% ELSE %]
<label for="EAN">EAN: </label>
<input type="text" size="20" name="ean" id="EAN" value="[% ean %]" />
<li>
[% IF ( biblionumber ) %]
<span class="label">Series: </span>
- <input type="hidden" size="50" name="series" id="series" value="[% seriestitle %]" />[% seriestitle %]
+ <input type="hidden" name="series" id="series" value="[% seriestitle %]" />[% seriestitle %]
[% ELSE %]
<label for="series">Series: </label>
<input type="text" size="50" name="series" id="series" value="[% seriestitle %]" />
[% END %]
- </li>
</li>
[% UNLESS ( biblionumber ) %]
[% IF ( itemtypeloop ) %]
</fieldset>
[% END %]
- [% IF (AcqCreateItemOrdering) %]
-
- <div id="items_list" style="display:none">
- <p><b>Items list</b></p>
- <div style="width:100%;overflow:auto;">
- <table>
- <thead>
- <tr>
- <th> </th>
- <th> </th>
- <th>Barcode</th>
- <th>Home library</th>
- <th>Holding library</th>
- <th>Not for loan</th>
- <th>Restricted</th>
- <th>Location</th>
- <th>Call number</th>
- <th>Copy number</th>
- <th>Stock number</th>
- <th>Collection code</th>
- <th>Item type</th>
- <th>Materials</th>
- <th>Notes</th>
- </tr>
- </thead>
- <tbody>
- </tbody>
- </table>
- </div>
- </div>
-
- <fieldset class="rows" id="itemfieldset">
- <legend>Item</legend>
- [% IF ( NoACQframework ) %]
- <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
- [% END %]
-
- <div id="outeritemblock"></div>
-
- </fieldset>
+ [% UNLESS subscriptionid %][% # it is a suggestion, we have not items %]
+ [% IF (AcqCreateItemOrdering) %]
+
+ <div id="items_list" style="display:none">
+ <p><b>Items list</b></p>
+ <div style="width:100%;overflow:auto;">
+ <table>
+ <thead>
+ <tr>
+ <th> </th>
+ <th> </th>
+ <th>Barcode</th>
+ <th>Home library</th>
+ <th>Holding library</th>
+ <th>Not for loan</th>
+ <th>Restricted</th>
+ <th>Location</th>
+ <th>Call number</th>
+ <th>Copy number</th>
+ <th>Stock number</th>
+ <th>Collection code</th>
+ <th>Item type</th>
+ <th>Materials</th>
+ <th>Notes</th>
+ </tr>
+ </thead>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ </div>
+
+ <fieldset class="rows" id="itemfieldset">
+ <legend>Item</legend>
+ [% IF ( NoACQframework ) %]
+ <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
+ [% END %]
+
+ <div id="outeritemblock"></div>
+
+ </fieldset>
+ [% END %][%# UNLESS subscriptionid %]
[% END %][%# IF (AcqCreateItemOrdering) %]
<fieldset class="rows">
<legend>Accounting Details</legend>
<li>
[% IF ( close ) %]
<span class="label required">Quantity: </span>
- <input type="hidden" size="20" name="quantity" value="[% quantity %]" />[% quantity %]
+ <input type="hidden" name="quantity" value="[% quantity %]" />[% quantity %]
[% ELSE %]
<label class="required" for="quantity">Quantity: </label>
[% IF (AcqCreateItemOrdering) %]
- <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="0" />
+ [% IF subscriptionid %]
+ <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
+ [% ELSE %]
+ <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="0" />
+ [% END %]
[% ELSE %]
- <input type="text" size="20" id="quantity" name="quantity" value="[% quantityrec %]" onchange="updateCosts();" />
+ [% IF subscriptionid %]
+ <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
+ [% ELSE %]
+ <input type="text" size="20" id="quantity" name="quantity" value="[% quantityrec %]" onchange="updateCosts();" />
+ [% END %]
[% END %]
[% END %]
<!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->
<li>
[% IF ( close ) %]
<span class="label required">Fund: </span>
- <input type="hidden" size="20" name="budget_id" id="budget_id" value="[% budget_id %]" />[% Budget_name %]
+ <input type="hidden" name="budget_id" id="budget_id" value="[% budget_id %]" />[% Budget_name %]
[% ELSE %]
<label class="required" for="budget_id">Fund: </label>
<select id="budget_id" onchange="fetchSortDropbox(this.form)" size="1" name="budget_id">
<li>
[% IF ( close ) %]
<span class="label">Currency: </span>
- <input type="hidden" size="10" name="currency" id="currency" value="[% currency %]" />[% currency %]
+ <input type="hidden" name="currency" id="currency" value="[% currency %]" />[% currency %]
[% ELSE %]
<label for="currency">Currency:</label>
<select name="currency" id="currency" onchange="updateCosts();">
<li>
[% IF ( close ) %]
<span class="label">Vendor price: </span>
- <input type="hidden" size="20" name="listprice" id="listprice" value="[% listprice %]" />[% listprice %]
+ <input type="hidden" name="listprice" id="listprice" value="[% listprice %]" />[% listprice %]
[% ELSE %]
<label for="listprice">Vendor price: </label>
<input type="text" size="20" name="listprice" id="listprice" value="[% listprice %]" onchange="updateCosts()" />
<li>
[% IF ( close ) %]
<span class="label">Tax rate: </span>
- <input type="hidden" size="20" name="gstrate" id="gstrate" value="[% gstrate %]" />[% gstrate %]%
+ <input type="hidden" name="gstrate" id="gstrate" value="[% gstrate %]" />[% gstrate %]%
[% ELSE %]
- <label for="gst">Tax rate: </label>
+ <label for="gstrate">Tax rate: </label>
<select name="gstrate" id="gstrate" onchange="updateCosts();">
[% FOREACH gst IN gst_values %]
[% IF ( gst.option == gstrate ) %]
<li>
[% IF ( close ) %]
<span class="label">Replacement cost: </span>
- <input type="hidden" size="20" name="rrp" id="rrp" value="[% rrp %]" />[% rrp %]
+ <input type="hidden" name="rrp" id="rrp" value="[% rrp %]" />[% rrp %]
[% ELSE %]
<label for="rrp">Replacement cost: </label>
<input type="text" size="20" name="rrp" id="rrp" value="[% rrp %]" /> (adjusted for [% cur_active %])
</li>
<li>
<label for="notes">Notes: </label>
- <textarea id="notes" cols="30" rows="3" name="notes" >[% notes %]</textarea>
+ <textarea id="notes" cols="30" rows="3" name="notes" >[% IF ( notes ) %][% notes %][% END %]</textarea>
</li>
<li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
<label for="sort1">Statistic 1: </label>
[% END %]
</span>
</li>
-</ol>
+ </ol>
</fieldset>
<fieldset class="action">
+ <input type="hidden" name="subscriptionid" value="[% subscriptionid %]" />
<input type="submit" value="Save" />
[% IF (suggestionid) %]
<a class="cancel" href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]">Cancel</a>
[% ELSE %]
- <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Cancel</a>
+ [% IF subscriptionid %]
+ <a class="cancel" href="/cgi-bin/koha/acqui/newordersubscription.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]">Cancel</a>
+ [% ELSE %]
+ <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Cancel</a>
+ [% END %]
[% END %]
</fieldset>
</form>