Koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl
2007-11-07 08:13:57 -06:00

305 lines
No EOL
14 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Acquisitions &rsaquo; Shopping Basket <!-- TMPL_VAR NAME="basketno" --> &rsaquo; <!-- TMPL_IF name="ordnum" -->Modify order details (line #<!-- TMPL_VAR NAME="ordnum" -->)<!-- TMPL_ELSE -->New order<!-- /TMPL_IF --></title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<script type="text/javascript">
//<![CDATA[
function update(f){
//collect values
quantity=f.quantity.value
if (quantity ==0) {
alert("Quantity must be >0");
}
discount=f.discount.value
listinc=parseInt(f.listinc.value)
currency=f.currency.value
applygst=parseInt(f.applygst.value)
listprice=f.list_price.value
// rrp=f.rrp.value
// ecost=f.ecost.value //budgetted cost
// GST=f.GST.value
// total=f.total.value
//make useful constants out of the above
exchangerate=f.elements[currency].value //get exchange rate
gst_on=(!listinc && applygst);
//do real stuff
rrp=listprice*exchangerate;
ecost=rrp*(100-discount)/100
GST=0;
if (gst_on){
rrp=rrp*(1+<!-- TMPL_VAR NAME="gstrate" -->);
GST=ecost*(<!-- TMPL_VAR NAME="gstrate" -->);
}
total=(ecost+GST)*quantity
f.rrp.value=rrp;
f.ecost.value=ecost;
f.total.value=total;
<!-- TMPL_IF NAME="GST"-->
f.GST.value=GST;
<!-- /TMPL_IF -->
return true;
}
function messenger(X,Y,etc){
win=window.open("","mess","height="+X+",width="+Y+",screenX=150,screenY=0");
win.focus();
win.document.close();
win.document.write("<body link='#333333' bgcolor='#ffffff' text='#000000'><font size='2'><p><br />");
win.document.write(etc);
win.document.write("<center><form><input type=button onclick='self.close()' value='Close'></form></center>");
win.document.write("</font></body></html>");
}
function check(f) {
quantity=f.quantity.value
title=f.title.value
if (title == "") {
alert("Title can't be empty");
return false;
}
if (quantity ==0) {
alert("Quantity must be >0");
return false;
}
document.frusin.submit();
}
//]]>
</script>
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="acquisitions-search.inc" -->
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->">Shopping Basket <!-- TMPL_VAR NAME="basketno" --></a> &rsaquo; <!-- TMPL_IF name="ordnum" -->Modify order details (line #<!-- TMPL_VAR NAME="ordnum" -->)<!-- TMPL_ELSE -->New order<!-- /TMPL_IF --></div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<h1>
<!-- TMPL_IF name="ordnum" -->
Modify order details (line #<!-- TMPL_VAR NAME="ordnum" -->)
<!-- TMPL_ELSE -->
New order
<!-- /TMPL_IF -->
<!-- TMPL_IF name="suggestionid" -->(defined from suggestion #<!-- TMPL_VAR NAME="suggestionid" -->)<!-- /TMPL_IF -->
</h1>
<!-- TMPL_IF name="basketno" -->
<div id="basket-details">Basket Details
<ul> <li>Basket number: <!-- TMPL_VAR NAME="basketno" --></li>
<li>Managed by: <!-- TMPL_VAR NAME="authorisedbyname" --></li>
<li>Open on: <!-- TMPL_VAR NAME="creationdate" --></li>
<li>For supplier id: <!-- TMPL_VAR NAME="booksellerid" --></li>
<li>Invoice number: <!-- TMPL_VAR NAME="booksellerinvoicenumber" --></li>
<!-- TMPL_IF name="closedate" --><li>Closed on: <!-- TMPL_VAR name="closedate" --></li><!-- /TMPL_IF --></ul>
</div>
<!-- /TMPL_IF -->
<form action="/cgi-bin/koha/acqui/addorder.pl" method="post" name="frusin">
<fieldset class="rows">
<legend>Catalogue details</legend>
<!-- TMPL_UNLESS name="existing" -->
<input type="hidden" name="existing" value="no" />
<!-- /TMPL_UNLESS -->
<input type="hidden" name="ordnum" value="<!-- TMPL_VAR NAME="ordnum" -->" />
<input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
<input type="hidden" name="booksellerid" value="<!-- TMPL_VAR NAME="booksellerid" -->" />
<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
<input type="hidden" name="biblioitemnumber" value="<!-- TMPL_VAR NAME="biblioitemnumber" -->" />
<input type="hidden" name="oldtype" value="<!-- TMPL_VAR NAME="itemtype" -->" />
<input type="hidden" name="discount" value="<!-- TMPL_VAR NAME="discount" -->" />
<input type="hidden" name="listinc" value="<!-- TMPL_VAR NAME="listincgst" -->" />
<input type="hidden" name="currency" value="<!-- TMPL_VAR NAME="currency" -->" />
<input type="hidden" name="applygst" value="<!-- TMPL_VAR NAME="gstreg" -->" />
<input type="hidden" name="suggestionid" value="<!-- TMPL_VAR NAME="suggestionid" -->" />
<!-- TMPL_LOOP NAME="loop_currencies" -->
<input type="hidden" name="<!-- TMPL_VAR NAME="currency" -->" value="<!-- TMPL_VAR NAME="rate" -->" />
<!-- /TMPL_LOOP -->
<ol><li>
<!-- TMPL_IF name="biblio" -->
<span class="label">Title</span>
<input type="hidden" size="20" name="title" value="<!-- TMPL_VAR NAME="title" -->" /><!-- TMPL_VAR NAME="title" -->
<!-- TMPL_ELSE -->
<label for="entertitle" class="required">Title: </label>
<input type="text" id="entertitle" size="20" name="title" value="<!-- TMPL_VAR NAME="title" -->" />
<!-- /TMPL_IF -->
</li>
<li>
<!-- TMPL_IF name="biblio" -->
<span class="label">Author: </label>
<input type="hidden" size="20" name="author" id="author" value="<!-- TMPL_VAR NAME="author" -->" /><!-- TMPL_VAR NAME="author" -->
<!-- TMPL_ELSE -->
<label for="author">Author: </label>
<input type="text" size="20" name="author" id="author" value="<!-- TMPL_VAR NAME="author" -->" />
<!-- /TMPL_IF -->
</li>
<li>
<!-- TMPL_IF name="biblio" -->
<span class="label">Publisher: </label>
<input type="hidden" size="20" name="publishercode" id="publishercode" value="<!-- TMPL_VAR NAME="publishercode" -->" /><!-- TMPL_VAR NAME="publishercode" -->
<!-- TMPL_ELSE -->
<label for="publishercode"> Publisher: </label>
<input type="text" size="20" name="publishercode" id="publishercode" value="<!-- TMPL_VAR NAME="publishercode" -->" />
<!-- /TMPL_IF -->
</li>
<li>
<!-- TMPL_IF name="biblio" -->
<span class="label">Copyright date: </span>
<input type="hidden" size="20" name="copyrightdate" id="copyrightdate" value="<!-- TMPL_VAR NAME="copyrightdate" -->" /><!-- TMPL_VAR NAME="copyrightdate" -->
<!-- TMPL_ELSE -->
<label for="copyrightdate">Copyright date: </label>
<input type="text" size="20" name="copyrightdate" id="copyrightdate" value="<!-- TMPL_VAR NAME="copyrightdate" -->" />
<!-- /TMPL_IF -->
</li>
<li>
<label for="format">Format: </label>
<!-- TMPL_VAR NAME="CGIitemtype" -->
</li>
<li>
<!-- TMPL_IF name="biblio" -->
<span class="label">ISBN: </span>
<input type="hidden" size="20" name="ISBN" id="ISBN" value="<!-- TMPL_VAR NAME="isbn" -->" /><!-- TMPL_VAR NAME="isbn" -->
<!-- TMPL_ELSE -->
<label for="ISBN">ISBN: </label>
<input type="text" size="20" name="ISBN" id="ISBN" value="<!-- TMPL_VAR NAME="isbn" -->" />
<!-- /TMPL_IF -->
</li>
<li>
<!-- TMPL_IF name="biblio" -->
<span class="label">Series: </span>
<input type="hidden" size="20" name="series" id="series" value="<!-- TMPL_VAR NAME="seriestitle" -->" /><!-- TMPL_VAR NAME="seriestitle" -->
<!-- TMPL_ELSE -->
<label for="series">Series: </label>
<input type="text" size="20" name="series" id="series" value="<!-- TMPL_VAR NAME="seriestitle" -->" />
<!-- /TMPL_IF -->
</li>
<li>
<label for="branch">Branch: </label>
<select name="branch" id="branch">
<!-- TMPL_LOOP name="branchloop" -->
<!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</li>
</ol>
</fieldset>
<fieldset class="rows">
<legend>Accounting details</legend>
<ol>
<li>
<!-- TMPL_IF name="close" -->
<span class="label">Quantity: </span>
<input type="hidden" size="20" id="quantity" name="quantity" value="<!-- TMPL_VAR NAME="quantity" -->" /><!-- TMPL_VAR NAME="quantity" -->
<!-- TMPL_ELSE -->
<label for="quantity">Quantity: </label>
<input type="text" size="20" id="quantity" name="quantity" value="<!-- TMPL_VAR NAME="quantity" -->" onchange="update(this.form);" />
<!--/TMPL_IF-->
</li>
<li>
<!-- TMPL_IF name="close" -->
<span class="label">Bookfund: </span>
<input type="hidden" size="20" name="bookfund" id="bookfund" value="<!-- TMPL_VAR NAME="bookfundid" -->" /><!-- TMPL_VAR NAME="bookfundname" -->
<!-- TMPL_ELSE -->
<label for="bookfund">Bookfund: </label>
<!-- TMPL_VAR NAME="CGIbookfund" -->
<!--/TMPL_IF-->
</li>
<li>
<!-- TMPL_IF name="close" -->
<span class="label">Supplier price: </span>
<input type="hidden" size="20" name="list_price" id="list_price" value="<!-- TMPL_VAR NAME="listprice" -->" /><!-- TMPL_VAR NAME="listprice" -->
<!-- TMPL_ELSE -->
<label for="list_price">Supplier price: </label>
<input type="text" size="20" name="list_price" id="list_price" value="<!-- TMPL_VAR NAME="listprice" -->" onchange="update(this.form)" />
<!--/TMPL_IF-->
</li>
<li>
<!-- TMPL_IF name="close" -->
<span class="label">Replacement cost: </span>
<input type="hidden" size="20" name="rrp" id="rrp" value="<!-- TMPL_VAR NAME="rrp" -->" /><!-- TMPL_VAR NAME="rrp" -->
<!-- TMPL_ELSE -->
<label for="rrp">Replacement cost : </label>
<input type="text" size="20" name="rrp" id="rrp" value="<!-- TMPL_VAR NAME="rrp" -->" />
<!--/TMPL_IF-->
</li>
<li>
<!-- TMPL_IF name="close" -->
<label for="ecost">Budgeted cost: </label>
<input type="text" size="20" name="ecost" id="ecost" value="<!-- TMPL_VAR NAME="ecost" -->" readonly="readonly" />
<!-- TMPL_ELSE -->
<label for="ecost">Budgeted Cost: </label>
<input type="text" size="20" name="ecost" id="ecost" value="<!-- TMPL_VAR NAME="ecost" -->" />
<!--/TMPL_IF-->
</li>
<!-- TMPL_IF NAME="GST"-->
<li>
<!-- TMPL_IF name="close" -->
<label for="GST">Budgeted GST: </label>
<input type="text" id="" size="20" name="GST" value="" id="GST" readonly="readonly" />
<!-- TMPL_ELSE -->
<label for="GST">Budgeted GST: </label>
<input type="text" size="20" name="GST" id="GST" value="" />
<!--/TMPL_IF-->
</li>
<!-- /TMPL_IF -->
<li>
<!-- TMPL_IF name="close" -->
<label for="total">Total: </label>
<input type="text" id="total" size="20" name="total" value="<!-- TMPL_VAR name="total" -->" readonly="readonly" />
<!-- TMPL_ELSE -->
<label for="total">Total: </label>
<input type="text" id="total" size="20" name="total" value="<!-- TMPL_VAR name="total" -->" />
<!--/TMPL_IF-->
</li>
<li>
<!-- TMPL_IF name="close" -->
<label for="cost">Actual cost: </label>
<input type="text" id="cost" size="20" name="cost" value="<!-- TMPL_VAR name="ecost"-->" readonly="readonly" />
<!-- TMPL_ELSE -->
<label for="cost">Actual cost: </label>
<input type="text" id="cost" size="20" name="cost" value="<!-- TMPL_VAR name="ecost"-->" />
<!--/TMPL_IF-->
</li>
<li>
<label for="invoice">Invoice number: </label>
<input type="text" id="invoice" size="20" name="invoice" value="<!-- TMPL_VAR name="invoice" -->" /> (usually empty)
</li>
<li>
<label for="notes">Notes: </label>
<textarea id="notes" cols="30" rows="3" name="notes"><!-- TMPL_VAR NAME="notes" --></textarea>
</li>
<li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
<!-- TMPL_IF Name="CGIsort1" -->
<!-- TMPL_VAR Name="CGIsort1" -->
<!-- TMPL_ELSE -->
<label for="sort1">Sort field 1: </label>
<input type="text" id="sort1" size="20" name="sort1" value="<!-- TMPL_VAR NAME="sort1" -->" />
<!--/TMPL_IF -->
</li>
<li>
<!-- TMPL_IF Name="CGIsort2" -->
<!-- TMPL_VAR Name="CGIsort2" -->
<!-- TMPL_ELSE -->
<label for="sort2">Sort field 2: </label>
<input type="text" id="sort2" size="20" name="sort2" value="<!-- TMPL_VAR NAME="sort2" -->" />
<!--/TMPL_IF -->
</li></ol>
</fieldset>
<fieldset class="action">
<input type="button" value="Save" onclick="check(this.form)" /> <!-- TMPL_IF name="suggestionid" --><a class="cancel" href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&basketno=<!-- TMPL_VAR NAME="basketno" -->">Cancel</a><!-- TMPL_ELSE --><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->">Cancel</a><!-- /TMPL_IF -->
</fieldset>
</form>
</div>
</div>
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="acquisitions-menu.inc" -->
</div>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->