[% USE KohaDates %]
+[% USE Price %]
+[% USE AuthorisedValues %]
+
[% INCLUDE 'doc-head-open.inc' %]
-<title>Koha › Acquisitions › [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</title>
+<title>Koha › Acquisitions › [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</title>
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'datatables.inc' %]
[% UNLESS ( closedate ) %]
<script type="text/javascript">
//<![CDATA[
- function confirm_close() {
- var is_confirmed = confirm(_("Are you sure you want to close this basket?"));
- if (is_confirmed) {
- window.location = "[% script_name %]?op=close&basketno=[% basketno %]";
- }
- }
function delete_basket(basketno,booksellerid,delbiblio) {
window.location = "[% script_name %]?op=delete_confirm&delbiblio="+delbiblio+"&basketno="+basketno+"&booksellerid="+booksellerid;
});
});
- function basketUserSearchPopup(f) {
+ function UserSearchPopup(f) {
window.open(
- "/cgi-bin/koha/acqui/aqbasketuser_search.pl",
- 'BasketUserSearchPopup',
- 'width=740,height=450,toolbar=no,'
+ "/cgi-bin/koha/acqui/add_user_search.pl",
+ 'UserSearchPopup',
+ 'width=740, height=450, scrollbars=yes, toolbar=no,'
);
}
- function add_basket_user(borrowernumber, borrowername) {
- var ids = $("#basketusers_ids").val();
+ function add_user(borrowernumber, borrowername) {
+ var ids = $("#users_ids").val();
if(ids.length > 0) {
ids = ids.split(':');
} else {
}
if (ids.indexOf(borrowernumber) < 0) {
ids.push(borrowernumber);
- $("#basketusers_ids").val(ids.join(':'));
+ $("#users_ids").val(ids.join(':'));
var li = '<li id="user_'+borrowernumber+'">'+borrowername
- + ' [<a style="cursor:pointer" onclick="del_basket_user('+borrowernumber+');">'
+ + ' [<a style="cursor:pointer" onclick="del_user('+borrowernumber+');">'
+ _("Delete user") + '</a>]</li>';
- $("#basketusers_names").append(li);
+ $("#users_names").append(li);
return 0;
}
return -1;
}
- function del_basket_user(borrowernumber) {
+ function del_user(borrowernumber) {
$("#user_"+borrowernumber).remove();
- var ids = $("#basketusers_ids").val().split(':');
+ var ids = $("#users_ids").val().split(':');
ids.splice(ids.indexOf(borrowernumber.toString()), 1);
- $("#basketusers_ids").val(ids.join(':'));
+ $("#users_ids").val(ids.join(':'));
}
//]]>
</script>
[% 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|html %]</a> › [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</div>
+<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|html %]</a> › [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</div>
<div id="doc3" class="yui-t2">
[% UNLESS ( selectbasketg ) %]
[% UNLESS ( closedate ) %]
<div id="toolbar" class="btn-toolbar">
- <div class="btn-group"><a href="#addtoBasket" role="button" class="btn btn-small" data-toggle="modal"><i class="icon-plus"></i> Add to basket</a></div>
- <div class="btn-group"><a href="basketheader.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]&op=add_form" class="btn btn-small" id="basketheadbutton"><i class="icon-pencil"></i> Edit basket</a></div>
- <div class="btn-group"><a href="#deleteBasketModal" role="button" class="btn btn-small" data-toggle="modal" id="delbasketbutton"><i class="icon-remove"></i> Delete this basket</a></div>
+ [% IF active %]
+ <div class="btn-group"><a href="#addtoBasket" role="button" class="btn btn-small" data-toggle="modal"><i class="fa fa-plus"></i> Add to basket</a></div>
+ [% END %]
+ <div class="btn-group"><a href="basketheader.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]&op=add_form" class="btn btn-small" id="basketheadbutton"><i class="fa fa-pencil"></i> Edit basket</a></div>
+ [%# FIXME This action should not be available for everyone %]
+ <div class="btn-group"><a href="#deleteBasketModal" role="button" class="btn btn-small" data-toggle="modal" id="delbasketbutton"><i class="fa fa-remove"></i> Delete this basket</a></div>
[% IF ( unclosable ) %]
[% ELSIF ( uncertainprices ) %]
<div class="btn-group"><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&owner=1" class="btn btn-small" id="uncertpricesbutton">Uncertain prices</a></div>
[% ELSE %]
<div class="btn-group">
- <a href="[% script_name %]?op=close&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="btn btn-small" id="closebutton"><i class="icon-remove-sign"></i> Close this basket</a>
+ <a href="[% script_name %]?op=close&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="btn btn-small" id="closebutton"><i class="fa fa-remove-sign"></i> Close this basket</a>
</div>
[% END %]
- <div class="btn-group"><a href="[% script_name %]?op=export&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="icon-download"></i> Export this basket as CSV</a></div>
+ <div class="btn-group"><a href="[% script_name %]?op=export&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="fa fa-download"></i> Export this basket as CSV</a></div>
</div>
<!-- Modal for confirm deletion box-->
<div class="modal hide" id="deleteBasketModal" tabindex="-1" role="dialog" aria-labelledby="delbasketModalLabel" aria-hidden="true">
[% ELSE %]
[% UNLESS ( grouped ) %]
<div id="toolbar" class="btn-toolbar">
- <div class="btn-group"><a href="#" class="btn btn-small" id="reopenbutton"><i class="icon-refresh"></i> Reopen this basket</a></div>
- <div class="btn-group"><a href="[% script_name %]?op=export&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="icon-download"></i> Export this basket as CSV</a></div>
+ <div class="btn-group"><a href="#" class="btn btn-small" id="reopenbutton"><i class="fa fa-refresh"></i> Reopen this basket</a></div>
+ <div class="btn-group"><a href="[% script_name %]?op=export&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="fa fa-download"></i> Export this basket as CSV</a></div>
</div>
[% END %]
[% END %]
<META HTTP-EQUIV=Refresh CONTENT="0; url=booksellers.pl">
[% END %]
[% ELSE %]
- <h1>[% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for <a href="supplier.pl?booksellerid=[% booksellerid %]">[% name|html %]</a></h1>
- [% IF ( delete_confirm ) %]
- <h2>
- <span class="yui-button yui-link-button">
- <em class="first-child">
- <a href="[% script_name %]?op=delete_confirm&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="yui-link-button">Yes, delete this basket!</a>
- </em>
- </span>
- <span class="yui-button yui-link-button">
- <em class="first-child">
- <a href="[% script_name %]?basketno=[% basketno %]" class="yui-link-button">Cancel</a>
- </em>
- </span>
- </h2>
- [% END %]
+ <h1>[% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno %]) for <a href="supplier.pl?booksellerid=[% booksellerid %]">[% name|html %]</a></h1>
[% IF ( basketno ) %]
<div id="acqui_basket_summary" class="yui-g">
<div class="rows">
<form action="" method="post">
<span class="label">Managed by:</span>
<div style="float:left">
- <ul id="basketusers_names" style="padding-left:0">
- [% FOREACH user IN basketusers %]
+ <ul id="users_names" style="padding-left:0">
+ [% FOREACH user IN users %]
<li id="user_[% user.borrowernumber %]">
[% user.firstname %] [% user.surname %]
- [<a onclick="del_basket_user([% user.borrowernumber %]);" style="cursor:pointer">Delete user</a>]
+ [<a onclick="del_user([% user.borrowernumber %]);" style="cursor:pointer">Delete user</a>]
</li>
[% END %]
</ul>
<input type="hidden" id="basketno" name="basketno" value="[% basketno %]" />
- <input type="hidden" id="basketusers_ids" name="basketusers_ids" value="[% basketusers_ids %]" />
+ <input type="hidden" id="users_ids" name="users_ids" value="[% users_ids %]" />
<input type="hidden" id="op" name="op" value="mod_users" />
- <input type="button" id="add_user" onclick="basketUserSearchPopup();" value="Add user" />
+ <input type="button" id="add_user" onclick="UserSearchPopup();" value="Add user" />
<input type="submit" value="Save changes" />
</div>
</form>
</li>
<li id="branch">
- <span class="label">Branch:</span>
+ <span class="label">Library:</span>
[% IF basketbranchname %]
[% basketbranchname %]
[% ELSE %]
- No branch
+ No library
[% END %]
[% IF branches_loop.size %]
<form action="" method="post">
<select id="branch" name="branch">
- <option value="">(no branch)</option>
+ <option value="">(no library)</option>
[% FOREACH branch IN branches_loop %]
[% IF (branch.selected) %]
<option selected="selected" value="[% branch.branchcode %]"> [% branch.branchname %]</option>
</div>
</div>
[% END %]
+ [% IF ( duplinbatch ) %]<div class="dialog alert">
+ <h4>Duplicate warning</h4>
+ <p>Some records have not been automatically added because they match an existing record in your catalog:<a href="/cgi-bin/koha/acqui/addorderiso2709.pl?import_batch_id=[% duplinbatch %]&basketno=[% basketno %]&booksellerid=[% booksellerid %]" title="Open in new window" target="_blank" class="popup" style="margin-left:10px">Display them</a></p>
+ </div>[% END %]
- [% UNLESS ( delete_confirm ) %]
<div id="acqui_basket_content" class="yui-g">
[% IF ( books_loop ) %]
<h2>Orders</h2>
[% FOREACH foot_loo IN book_foot_loop %]
<tr>
<th></th>
- <th>Total (GST [% foot_loo.gstgsti %])</th>
+ <th>Total (GST [% foot_loo.gstrate * 100 | $Price %])</th>
<th class="gste"> </th>
<th class="gste"> </th>
<th class="gsti"> </th>
<th class="gsti"> </th>
<th>[% foot_loo.quantity %]</th>
- <th class="gste">[% foot_loo.totalgste %]</th>
- <th class="gsti">[% foot_loo.totalgsti %]</th>
+ <th class="gste">[% foot_loo.totalgste | $Price%]</th>
+ <th class="gsti">[% foot_loo.totalgsti | $Price %]</th>
<th> </th>
- <th>[% foot_loo.gstvalue %]</th>
+ <th>[% foot_loo.gstvalue | $Price %]</th>
<th> </th>
[% IF ( active ) %]
[% UNLESS ( closedate ) %]
<th class="gsti"> </th>
<th class="gsti"> </th>
<th>[% total_quantity %]</th>
- <th class="gste">[% total_gste %]</th>
- <th class="gsti">[% total_gsti %]</th>
+ <th class="gste">[% total_gste | $Price %]</th>
+ <th class="gsti">[% total_gsti | $Price %]</th>
<th> </th>
- <th>[% total_gstvalue %]</th>
+ <th>[% total_gstvalue | $Price %]</th>
<th> </th>
[% IF ( active ) %]
[% UNLESS ( closedate ) %]
<td>
<p>
[% IF ( books_loo.order_received ) %] (rcvd)[% END %]
- <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% books_loo.biblionumber %]">[% books_loo.title |html %]</a> by [% books_loo.author %]
+ [% IF books_loo.title %]
+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% books_loo.biblionumber %]">[% books_loo.title |html %]</a>[% IF books_loo.author %] by [% books_loo.author %][% END %]
+ [% ELSE %]
+ <em>Deleted bibliographic record, can't find title</em><br />
+ [% END %]
<br />
[% IF ( books_loo.isbn ) %] - [% books_loo.isbn %][% END %]
[% IF ( books_loo.issn ) %] - [% books_loo.issn %][% END %]
</td>
[% SET zero_regex = "^0{1,}\.?0{1,}[^1-9]" %] [%# 0 or 0.0 or 0.00 or 00 or 00.0 or 00.00 or 0.000 ... %]
[%# FIXME: use of a regexp is not ideal; bugs 9410 and 10929 suggest better way of handling this %]
- <td class="number gste [% IF books_loo.rrpgste.search(zero_regex) %]error[% END %]">[% books_loo.rrpgste %]</td>
- <td class="number gste [% IF books_loo.ecostgste.search(zero_regex) %]error[% END %]">[% books_loo.ecostgste %]</td>
- <td class="number gsti [% IF books_loo.rrpgsti.search(zero_regex) %]error[% END %]">[% books_loo.rrpgsti %]</td>
- <td class="number gsti [% IF books_loo.ecostgsti.search(zero_regex) %]error[% END %]">[% books_loo.ecostgsti %]</td>
+ <td class="number gste [% IF books_loo.rrpgste.search(zero_regex) %]error[% END %]">[% books_loo.rrpgste | $Price %]</td>
+ <td class="number gste [% IF books_loo.ecostgste.search(zero_regex) %]error[% END %]">[% books_loo.ecostgste | $Price%]</td>
+ <td class="number gsti [% IF books_loo.rrpgsti.search(zero_regex) %]error[% END %]">[% books_loo.rrpgsti | $Price %]</td>
+ <td class="number gsti [% IF books_loo.ecostgsti.search(zero_regex) %]error[% END %]">[% books_loo.ecostgsti | $Price %]</td>
<td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">[% books_loo.quantity %]</td>
- <td class="number gste [% IF books_loo.totalgste.search(zero_regex) %]error[% END %]">[% books_loo.totalgste %]</td>
- <td class="number gsti [% IF books_loo.totalgsti.search(zero_regex) %]error[% END %]">[% books_loo.totalgsti %]</td>
- <td class="number [% IF books_loo.gstgsti.search(zero_regex) %]error[% END %]">[% books_loo.gstgsti %]</td>
- <td class="number [% IF books_loo.gstvalue.search(zero_regex) %]error[% END %]">[% books_loo.gstvalue %]</td>
+ <td class="number gste [% IF books_loo.totalgste.search(zero_regex) %]error[% END %]">[% books_loo.totalgste | $Price %]</td>
+ <td class="number gsti [% IF books_loo.totalgsti.search(zero_regex) %]error[% END %]">[% books_loo.totalgsti | $Price %]</td>
+ <td class="number">[% books_loo.gstrate * 100 | $Price %]</td>
+ <td class="number [% IF books_loo.gstvalue.search(zero_regex) %]error[% END %]">[% books_loo.gstvalue | $Price %]</td>
<td>[% books_loo.budget_name %]</td>
[% IF ( active ) %]
[% UNLESS ( closedate ) %]
<p>
[% IF ( order.order_received ) %] (rcvd)[% END %]
[% IF (order.title) %]
- [% order.title |html %] by [% order.author %]<br />
+ [% order.title |html %][% IF order.author %] by [% order.author %][% END %]
[% ELSE %]
- <em>Deleted bibliographic record, can't find title</em><br />
+ <em>Deleted bibliographic record, can't find title</em>
[% END %]
+ <br />
[% IF ( order.order_internalnote ) %] [% order.order_internalnote %][% END %]
[% IF ( order.isbn ) %] - [% order.isbn %][% END %]
[% IF ( order.issn ) %] - [% order.issn %][% END %]
[% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
[% IF ( order.cancellationreason ) %]
<br />
- Cancellation reason: [% order.cancellationreason %]
+ Cancellation reason: [% AuthorisedValues.GetByCode( 'ORDER_CANCELLATION_REASON', order.cancellationreason ) %]
[% END %]
</p>
[% IF order.transferred_to %]
</p>
[% END %]
</td>
- <td class="number gste">[% order.rrpgste %]</td>
- <td class="number gste">[% order.ecostgste %]</td>
- <td class="number gsti">[% order.rrpgsti %]</td>
- <td class="number gsti">[% order.ecostgsti %]</td>
+ <td class="number gste">[% order.rrpgste | $Price %]</td>
+ <td class="number gste">[% order.ecostgste | $Price %]</td>
+ <td class="number gsti">[% order.rrpgsti | $Price %]</td>
+ <td class="number gsti">[% order.ecostgsti | $Price %]</td>
<td class="number">[% order.quantity %]</td>
- <td class="number gste">[% order.totalgste %]</td>
- <td class="number gsti">[% order.totalgsti %]</td>
- <td class="number">[% order.gstgsti %]</td>
- <td class="number">[% order.gstvalue %]</td>
+ <td class="number gste">[% order.totalgste | $Price %]</td>
+ <td class="number gsti">[% order.totalgsti | $Price %]</td>
+ <td class="number">[% order.gstrate * 100 | $Price %]</td>
+ <td class="number">[% order.gstvalue | $Price %]</td>
<td>[% order.budget_name %]
</tr>
[% END %]
</div>
</div>
+ [% IF active %]
[% INCLUDE 'acquisitions-add-to-basket.inc' %]
- [% END %]
+ [% END %]
+
[% END %]
[% END %]
[% END %] [% ELSE %] <!-- if we want just to select a basketgroup for a closed basket -->