Kyle M Hall
a8942c2884
Revert "DBRev to make notes of the XSS patches and the new important dependency." This reverts commite140603a59
. Revert "Bug 13618: Specific for branches.opac_info" This reverts commit06e4a50f00
. Revert "Bug 13618: (follow-up) Specific for other prefs" This reverts commitd6475a111f
. Revert "Bug 13618: Fix for debarredcomment and patron messages" This reverts commitdd98c9df92
. Revert "Bug 13618: Do not display html tags in patron's notices" This reverts commita065b243fe
. Revert "Bug 13618: Do not display and html tags in item fields content" This reverts commitbaeeaffbf8
. Revert "Bug 13618: Fix for system preference description" This reverts commita967a09261
. Revert "Bug 13618: Remove html filters for newly pushed code" This reverts commit0e98662b10
. Revert "Bug 13618: (follow-up) add missing lines for opac-shelves" This reverts commitfc2fb605e5
. Revert "Bug 13618: (follow-up) Specific for ColumnsSettings" This reverts commitbc308fdd9c
. Revert "Bug 13618: Fix for edit biblios and items" This reverts commit811c4e8402
. Revert "Bug 13618: followup to remove tabs" This reverts commitca8e8c397c
. Revert "Bug 13618: Fix last occurrences recently introduced to master" This reverts commitbb417b256b
. Revert "Bug 13618: Fix for news" This reverts commitae5b98020a
. Revert "Bug 13618: Fix escape on sending baskets or shelves by email" This reverts commita7731ffe25
. Revert "Bug 13618: Specific for XSLTBloc" This reverts commit11fa38dc29
. Revert "Bug 13618: Specific for Salutation on editing a patron" This reverts commit36c07ad6d3
. Revert "Bug 13618: Specific for other prefs" This reverts commite6ea281a3b
. Revert "Bug 13618 - memberentrygen.tt errors Not a GLOB reference" This reverts commit7824874557
. Revert "Bug 13618: Specific for ColumnsSettings" This reverts commit1834da3da3
. Revert "Bug 13618: Specific for IntranetUser* and OPACUser* prefs" This reverts commit21ae62b253
. Revert "Bug 13618: Fix error 'Not a GLOB reference'" This reverts commit602bdbab4c
. Revert "Bug 13618: Specific for the ISBD view" This reverts commitd254362435
. Revert "Bug 13618: Specific for pagination_bar" This reverts commit8837a8ae68
. Revert "Bug 13618: Specific places where we don't need to escape variables - intra" This reverts commit00eff140b3
. Revert "Bug 13618: Remove html filters at the intranet" This reverts commit7db851ff03
. Revert "Bug 13618: Specific places where we don't need to escape variables" This reverts commit49a3738b8d
. Revert "Bug 13618: Remove html filters at the OPAC" This reverts commitcedaa0e23e
. Revert "Bug 13618: Use Template::Stash::AutoEscaping to use the html filter" This reverts commit01b38d3b13
. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
360 lines
16 KiB
Text
360 lines
16 KiB
Text
[% USE KohaDates %]
|
||
[% INCLUDE 'doc-head-open.inc' %]
|
||
<title>Koha › Acquisitions › Receipt summary for : [% name %] [% IF ( invoice ) %]invoice, [% invoice %][% END %]</title>
|
||
[% INCLUDE 'doc-head-close.inc' %]
|
||
[% INCLUDE 'calendar.inc' %]
|
||
[% INCLUDE 'additem.js.inc' %]
|
||
<script type="text/javascript" src="[% themelang %]/js/additem.js"></script>
|
||
<script type="text/javascript" src="[% themelang %]/js/cataloging.js"></script>
|
||
<script type="text/javascript" src="[% themelang %]/js/prevent_submit.js"></script>
|
||
<script type="text/javascript">
|
||
//<![CDATA[
|
||
function Check(form) {
|
||
[% IF (AcqCreateItemReceiving) %]
|
||
var total_errors = CheckMandatorySubfields(form);
|
||
if (total_errors != 0) {
|
||
var alertString = _("Form not submitted because of the following problem(s)");
|
||
alertString += "\n------------------------------------------------------------------------------------\n";
|
||
alertString += "\n- " + _("%s mandatory fields empty (highlighted)").format(total_errors);
|
||
alert(alertString);
|
||
return false;
|
||
}
|
||
|
||
if(check_additem('[% UniqueItemFields %]') == false){
|
||
alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
|
||
return false;
|
||
};
|
||
|
||
// Remove last itemblock if it is not in items_list
|
||
var lastitemblock = $("#outeritemblock > div:last");
|
||
var tobedeleted = true;
|
||
var listitems = $("#items_list tr");
|
||
$(listitems).each(function(){
|
||
if($(this).attr('idblock') == $(lastitemblock).attr('id')){
|
||
tobedeleted = false;
|
||
}
|
||
});
|
||
if(tobedeleted){
|
||
$(lastitemblock).remove();
|
||
}
|
||
|
||
if(check_additem('[% UniqueItemFields %]') == false){
|
||
alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
|
||
if(tobedeleted) {
|
||
$(lastitemblock).appendTo("#outeritemblock");
|
||
}
|
||
return false;
|
||
};
|
||
[% END %]
|
||
|
||
return true;
|
||
}
|
||
|
||
[% IF (AcqCreateItem == 'ordering') %]
|
||
var items_columns = [null, null, 'barcode', 'homebranchname',
|
||
'holdingbranchname', 'notforloan', 'restricted', 'location',
|
||
'itemcallnumber', 'copynumber', 'stocknumber', 'collection',
|
||
'itemtype', 'materials', 'itemnotes'];
|
||
|
||
function PopupEditPage(biblionumber, itemnumber) {
|
||
var url = "/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber="
|
||
+ biblionumber + "&itemnumber=" + itemnumber + "&popup=1#edititem";
|
||
var w = window.open(url);
|
||
var watchClose = setInterval(function() {
|
||
if (w.closed) {
|
||
clearTimeout(watchClose);
|
||
$.getJSON('/cgi-bin/koha/catalogue/getitem-ajax.pl',
|
||
{
|
||
'itemnumber': itemnumber
|
||
},
|
||
function(item) {
|
||
var tds = $("#item_"+itemnumber+" td");
|
||
for(var i=2; i<tds.length; i++) {
|
||
var column = items_columns[i];
|
||
var text = item[column];
|
||
if ( text == null ) text = '';
|
||
$(tds[i]).text(text);
|
||
}
|
||
}
|
||
);
|
||
}
|
||
}, 500);
|
||
}
|
||
|
||
function CalcQtyToReceive() {
|
||
var qty = $("input[name='items_to_receive']:checked").length;
|
||
$("#quantity").val(qty);
|
||
}
|
||
|
||
function CheckNItems(n) {
|
||
$("input[name='items_to_receive']").each(function() {
|
||
$(this).attr('checked', false);
|
||
});
|
||
$("input[name='items_to_receive']:lt("+n+")").each(function () {
|
||
$(this).attr('checked', true);
|
||
});
|
||
}
|
||
[% END %]
|
||
|
||
$(document).ready(function() {
|
||
[% IF (AcqCreateItemReceiving) %]
|
||
cloneItemBlock(0, '[% UniqueItemFields %]');
|
||
[% ELSIF (AcqCreateItem == 'ordering') && not subscriptionid %]
|
||
$("input[name='items_to_receive']").change(function() {
|
||
CalcQtyToReceive();
|
||
});
|
||
CalcQtyToReceive();
|
||
$("#quantity").keyup(function() {
|
||
var qty = parseInt($("#quantity").val());
|
||
var qtyto = parseInt($("#quantity_to_receive").val());
|
||
if(qty > qtyto) {
|
||
$("#qtyrecerror").show();
|
||
} else {
|
||
$("#qtyrecerror").hide();
|
||
}
|
||
CheckNItems($(this).val());
|
||
});
|
||
[% END %]
|
||
});
|
||
//]]>
|
||
</script>
|
||
</head>
|
||
<body id="acq_orderreceive" class="acq">
|
||
[% INCLUDE 'header.inc' %]
|
||
[% INCLUDE 'acquisitions-search.inc' %]
|
||
|
||
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name %]</a> › Receive items from : [% name %] [% IF ( invoice ) %][[% invoice %]][% END %] (order #[% ordernumber %])</div>
|
||
|
||
<div id="doc3" class="yui-t2">
|
||
|
||
<div id="bd">
|
||
<div id="yui-main">
|
||
<div class="yui-b">
|
||
|
||
<h1>Receive items from : [% name %] [% IF ( invoice ) %][[% invoice %]] [% END %] (order #[% ordernumber %])</h1>
|
||
|
||
[% IF ( count ) %]
|
||
<form action="/cgi-bin/koha/acqui/finishreceive.pl" method="post" onsubmit="return Check(this);">
|
||
<div class="yui-g">
|
||
<div class="yui-u first">
|
||
<div class="error" style="display:none"></div>
|
||
|
||
<fieldset class="rows">
|
||
<legend>Catalog details</legend>
|
||
<ol><li><span class="label">Title: </span><span class="title">[% title |html %]</span></li>
|
||
<li> <span class="label">Author: </span>
|
||
[% author %]</li>
|
||
<li><span class="label">Copyright: </span>
|
||
[% copyrightdate %]</li>
|
||
<li> <span class="label">ISBN: </span>
|
||
[% isbn %]</li>
|
||
<li> <span class="label">Series: </span>
|
||
[% seriestitle %]</li>
|
||
</ol>
|
||
</fieldset>
|
||
|
||
[% IF ( suggestionid ) %]
|
||
<fieldset class="rows">
|
||
<legend>Suggestion</legend>
|
||
<ol>
|
||
<li>
|
||
<span class="label">Suggested by: </span>
|
||
[% surnamesuggestedby %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid %]&op=show">suggestion #[% suggestionid %]</a>)
|
||
</li>
|
||
</ol>
|
||
</fieldset>
|
||
[% END %]
|
||
|
||
[% IF (AcqCreateItemReceiving) %]
|
||
<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>Inventory number</th>
|
||
<th>Collection code</th>
|
||
<th>Item type</th>
|
||
<th>Materials</th>
|
||
<th>Notes</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
|
||
[% UNLESS subscriptionid %]
|
||
<fieldset class="rows" id="itemfieldset">
|
||
<legend>Item</legend>
|
||
[% IF ( NoACQframework ) %]
|
||
<p class="required">
|
||
No ACQ framework, using default. You should create a
|
||
framework with code ACQ, the items framework would be
|
||
used
|
||
</p>
|
||
[% END %]
|
||
<div id="outeritemblock"></div>
|
||
</fieldset>
|
||
[% END %]
|
||
[% ELSIF (AcqCreateItem == 'ordering') %]
|
||
[% IF (items.size) %]
|
||
<h5>Items</h5>
|
||
<div style="width:100%;overflow:auto">
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Receive?</th>
|
||
<th> </th>
|
||
<th>Barcode</th>
|
||
<th>Home branch</th>
|
||
<th>Holding branch</th>
|
||
<th>Not for loan</th>
|
||
<th>Restricted</th>
|
||
<th>Location</th>
|
||
<th>Call number</th>
|
||
<th>Copy number</th>
|
||
<th>Inventory number</th>
|
||
<th>Collection code</th>
|
||
<th>Item type</th>
|
||
<th>Materials</th>
|
||
<th>Notes</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
[% FOREACH item IN items %]
|
||
<tr id="item_[% item.itemnumber %]">
|
||
<td style="text-align:center"><input type="checkbox" name="items_to_receive" value="[% item.itemnumber %]" /></td>
|
||
<td><a style="cursor:pointer" onclick="PopupEditPage([% item.biblionumber %],[% item.itemnumber %]);">Edit</a></td>
|
||
<td>[% item.barcode %]</td>
|
||
<td>[% item.homebranchname %]</td>
|
||
<td>[% item.holdingbranchname %]</td>
|
||
<td>[% item.notforloan %]</td>
|
||
<td>[% item.restricted %]</td>
|
||
<td>[% item.location %]</td>
|
||
<td>[% item.itemcallnumber %]</td>
|
||
<td>[% item.copynumber %]</td>
|
||
<td>[% item.stocknumber %]</td>
|
||
<td>[% item.collection %]</td>
|
||
<td>[% item.itemtype %]</td>
|
||
<td>[% item.materials %]</td>
|
||
<td>[% item.itemnotes %]</td>
|
||
</tr>
|
||
[% END %]
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
[% END %]
|
||
[% END %]
|
||
<input type="hidden" name="biblionumber" value="[% biblionumber %]" />
|
||
<input type="hidden" name="invoiceid" value="[% invoiceid %]" />
|
||
<input type="hidden" name="ordernumber" value="[% ordernumber %]" />
|
||
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />
|
||
<input type="hidden" name="gstrate" value="[% gstrate %]" />
|
||
</div>
|
||
<div class="yui-u">
|
||
<fieldset class="rows">
|
||
<legend>Accounting details</legend>
|
||
<ol>
|
||
<li>
|
||
<label for="datereceived">Date received: </label>
|
||
<input type="text" size="10" id="datereceived" name="datereceived" value="[% datereceived | $KohaDates %]" class="datepicker" />
|
||
</li>
|
||
<li><label for="bookfund">Fund: </label><select id="bookfund" name="bookfund">
|
||
<option value="">Keep current ([% budget_period_description %] - [% bookfund %])</option>
|
||
[% FOREACH period IN budget_loop %]
|
||
<optgroup label="[% period.description %]">
|
||
[% FOREACH fund IN period.funds %]
|
||
[% IF ( fund.b_sel ) %]
|
||
<option value="[% fund.b_id %]" selected="selected">[% fund.b_txt %]</option>
|
||
[% ELSE %]
|
||
<option value="[% fund.b_id %]">[% fund.b_txt %]</option>
|
||
[% END %]
|
||
[% END %]
|
||
[% END %]
|
||
</select></li>
|
||
<li><label> </label><span>(Current: [% budget_period_description %] - [% bookfund %])</span></li>
|
||
<li><label for="creator">Created by: </label><span> [% IF ( memberfirstname and membersurname ) %][% IF ( memberfirstname ) %][% memberfirstname %][% END %] [% membersurname %][% ELSE %]No name[% END %]</span></li>
|
||
<li><label for="quantity_to_receive">Quantity to receive: </label><span class="label">
|
||
[% IF ( edit and not subscriptionid) %]
|
||
<input type="text" id="quantity_to_receive" name="quantity" value="[% quantity %]" />
|
||
[% ELSE%]
|
||
<input type="text" readonly="readonly" id="quantity_to_receive" name="quantity" value="[% quantity %]" />
|
||
[% END %]
|
||
</span></li>
|
||
<li><label for="quantity">Quantity received: </label>
|
||
[% IF (AcqCreateItemReceiving) %]
|
||
[% IF ( subscriptionid ) %]
|
||
<input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="1" />
|
||
[% ELSE %]
|
||
<input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="0" />
|
||
[% END %]
|
||
[% ELSE %]
|
||
[% IF ( quantityreceived ) %]
|
||
[% IF ( edit ) %]
|
||
<input type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceived %]" />
|
||
<input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% quantityreceived %]" />
|
||
[% ELSE %]
|
||
[% IF ( items ) %]
|
||
<input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceivedplus1 %]" />
|
||
[% ELSE %]
|
||
<input type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceivedplus1 %]" />
|
||
[% END %]
|
||
<input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% quantityreceived %]" />
|
||
[% END %]
|
||
[% ELSE %]
|
||
[% IF ( subscriptionid ) %]
|
||
<input type="text" readonly="readonly" id="quantity" size="20" name="quantityrec" value="1" />
|
||
[% ELSE %]
|
||
<input type="text" id="quantity" size="20" name="quantityrec" value="1" />
|
||
[% END %]
|
||
<input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="0" />
|
||
[% END %]
|
||
<div id="qtyrecerror" style="display:none">
|
||
<p class="error">Warning, you have entered more items than expected.
|
||
Items will not be created.</p>
|
||
</div>
|
||
[% END %][%# IF (AcqCreateItemReceiving) %]
|
||
</li>
|
||
<li><label for="rrp">Replacement cost: </label><input type="text" size="20" name="rrp" id="rrp" value="[% rrp %]" /></li>
|
||
<li><label for="ecost">Budgeted cost: </label><input type="text" size="20" name="ecost" id="ecost" value="[% ecost %]" /></li>
|
||
<li><label for="cost">Actual cost:</label>
|
||
[% IF ( unitprice ) %]
|
||
<input type="text" size="20" name="cost" id="cost" value="[% unitprice %]" />
|
||
[% ELSE %]
|
||
<input type="text" size="20" name="cost" id="cost" value="[% ecost %]" />
|
||
[% END %]</li>
|
||
<li><label for="order_internalnote">Internal note: </label><textarea name="order_internalnote" width="40" rows="8" >[% order_internalnote %]</textarea></li>
|
||
[% IF order_vendornote %]
|
||
<li><label for="order_vendornote">Vendor note: </label><span>[% order_vendornote %]</span></li>
|
||
[% END %]
|
||
</ol>
|
||
</fieldset>
|
||
|
||
</div>
|
||
</div><div class="yui-g"><fieldset class="action">
|
||
<input type="submit" value="Save" class="button" accesskey="w" />
|
||
<a class="cancel" href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]&sticky_filters=1">Cancel</a>
|
||
</fieldset></div> </form>
|
||
[% ELSE %]
|
||
This ordernumber does not exist.
|
||
[% END %]
|
||
|
||
</div>
|
||
</div>
|
||
<div class="yui-b">
|
||
[% INCLUDE 'acquisitions-menu.inc' %]
|
||
</div>
|
||
</div>
|
||
[% INCLUDE 'intranet-bottom.inc' %]
|