3 [% INCLUDE 'doc-head-open.inc' %]
4 [% USE AuthorisedValues %]
5 <title>Koha › Serials › Claims</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 [% INCLUDE 'calendar.inc' %]
8 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
9 [% INCLUDE 'datatables.inc' %]
10 <script type="text/javascript">
13 $(document).ready(function() {
14 sTable = $("#claimst").dataTable($.extend(true, {}, dataTablesDefaults, {
17 { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
18 { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] },
19 { 'sType': "title-string", 'aTargets' : [ 'title-string'] }
23 sTable.fnAddFilters("filter", "200");
24 $('#supplierid').change(function() {
25 $('#claims').submit();
28 // Checkboxes : Select All / None
29 $("span.checkall").html("<input type=\"checkbox\" name=\"CheckAll\"> "+_("Check All")+"</input>");
31 $("#CheckAll").click(function() {
32 $("#claimst tr:visible :checkbox").attr('checked', $("#CheckAll").is(':checked'));
35 // Generates a dynamic link for exporting the selections data as CSV
36 $("#ExportSelected").click(function() {
37 // We need to use "input[name=serialid]:checked" instead of "input:checked". Otherwise, the "check all" box will pass the value of "on" as a serialid, which produces a SQL error.
38 var selected = $("input[name=serialid]:checked");
40 if (selected.length == 0) {
41 alert(_("Please select at least one item to export."));
45 // Building the url from currently checked boxes
46 var url = '/cgi-bin/koha/serials/lateissues-export.pl?supplierid=&op=claims';
47 for (var i = 0; i < selected.length; i++) {
48 url += '&serialid=' + selected[i].value;
50 url += '&csv_profile=' + $("#csv_profile_for_export option:selected").val();
51 // And redirecting to the CSV page
58 // Checks if the form can be sent (at least one checkbox must be checked)
59 function checkForm() {
60 if ($("input:checked").length == 0) {
61 alert(_("Please select at least one issue."));
67 function filterByDate() {
68 var beginDate = Date_from_syspref($("#from").val()).getTime();
69 var endDate = Date_from_syspref($("#to").val()).getTime();
71 // Checks if the beginning date is valid
72 if (!parseInt(beginDate)) {
73 alert(_("The beginning date is missing or invalid."));
77 // Checks if the ending date is valid
78 if (!parseInt(endDate)) {
79 alert(_("The ending date is missing or invalid."));
83 // Checks if beginning date is before ending date
84 if (beginDate > endDate) {
85 // If not, we swap them
86 var tmpDate = endDate;
92 $("table#claimst tbody tr").hide();
94 // For each date in the table
95 $(".planneddate").each(function() {
97 // We make a JS Date Object, according to the locale
98 var pdate = Date_from_syspref($(this).text()).getTime();
100 // And checks if the date is between the beginning and ending dates
101 if (pdate > beginDate &&
103 // If so, we can show the row
104 $(this).parent().show();
110 // Clears filters : shows everything
111 function clearFilters() {
112 $("table#claimst tbody tr").show();
119 <body id="ser_claims" class="ser">
120 [% INCLUDE 'header.inc' %]
121 [% INCLUDE 'serials-search.inc' %]
123 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> › Claims</div>
125 <div id="doc3" class="yui-t2">
134 [% IF error_claim == 'no_vendor_email' %]
135 <div class="error">This vendor has no email defined for late issues.</div>
136 [% ELSIF error_claim == 'no_loggedin_user_email' %]
137 <div class="error">No email is configured for your user.</div>
139 <div class="error">[% error_claim %]</div>
143 <div class="dialog message">Email has been sent.</div>
146 [% IF letters %][% UNLESS ( missingissues ) %][% IF ( supplierid ) %] <div class="dialog alert">No missing issues found.</div>[% ELSE %]<div class="dialog message">Please choose a vendor.</div>[% END %][% END %][% END %]
148 [% IF ( SHOWCONFIRMATION ) %]
149 <div class="dialog alert">Your notification has been sent.</div>
151 [% UNLESS letters %]<div class="dialog alert">No claims notice defined. <a href="/cgi-bin/koha/tools/letter.pl">Please define one</a>.</div>[% END %]
152 <form id="claims" name="claims" action="claims.pl" method="post">
154 <label for="supplierid">Vendor: </label>
155 <select id="supplierid" name="supplierid">
156 [% FOREACH suploo IN suploop %]
157 [% IF ( suploo.selected ) %]
158 <option value="[% suploo.id %]" selected="selected" >
160 <option value="[% suploo.id %]">
167 <input type="submit" value="OK" />
171 [% IF ( missingissues ) %]
172 <h3>Missing issues</h3>
173 <form action="claims.pl" onsubmit="return false;">
174 <fieldset class="rows">
175 <legend>Filters :</legend>
179 <label for="from">From:</label>
180 <input type="text" name="begindate" id="from" value="[% begindate %]" size="10" maxlength="10" class="datepickerfrom" />
181 <label for="to" style="float:none;">To:</label>
182 <input type="text" name="enddate" id="to" value="[% enddate %]" size="10" maxlength="10" class="datepickerto" />
183 <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
184 <input type="button" value="OK" onclick="filterByDate();" />
188 <input type="reset" value="Clear filters" onclick="clearFilters();" />
195 <form action="claims.pl" method="post" class="checkboxed" onsubmit="return checkForm()">
199 <th><input type="checkbox" id="CheckAll"></th>
202 <th class="anti-the">Title</th>
204 <th>Issue number</th>
206 <th class="title-string">Since</th>
207 <th>Claims count</th>
208 <th class="title-string">Claim date</th>
209 [% FOR field IN additional_fields_for_subscription %]
210 <th>[% field.name %]</th>
217 <td><input type="text" class="filter" data-column_num="1" placeholder="Search vendor" /></td>
218 <td><input type="text" class="filter" data-column_num="2" placeholder="Search library" /></td>
219 <td><input type="text" class="filter" data-column_num="3" placeholder="Search title" /></td>
220 <td><input type="text" class="filter" data-column_num="4" placeholder="Search ISSN" /></td>
221 <td><input type="text" class="filter" data-column_num="5" placeholder="Search issue number" /></td>
222 <td><input type="text" class="filter" data-column_num="6" placeholder="Search status" /></td>
223 <td><input type="text" class="filter" data-column_num="7" placeholder="Search since" /></td>
224 <td><input type="text" class="filter" data-column_num="8" placeholder="Search claim count" /></td>
225 <td><input type="text" class="filter" data-column_num="9" placeholder="Search claim date" /></td>
226 [% FOR field IN additional_fields_for_subscription %]
227 <td><input type="text" class="filter" data-column_num="[% loop.count + 9 %]" placeholder="Search [% field.name %]" /></td>
231 <tbody>[% FOREACH missingissue IN missingissues %]
234 [% UNLESS missingissue.cannot_claim %]
235 <input type="checkbox" name="serialid" value="[% missingissue.serialid %]" />
238 <td>[% missingissue.name %]</td>
240 <span class="branch-[% missingissue.branchcode %]">[% Branches.GetName( missingissue.branchcode ) %]</span>
243 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% missingissue.subscriptionid %]">[% missingissue.title |html %]</a>
245 <td>[% missingissue.issn %]</td>
246 <td>[% missingissue.serialseq %]</td>
248 [% IF ( missingissue.status1 ) %]<span class="status-expected">Expected</span>[% END %]
249 [% IF ( missingissue.status3 ) %]<span class="status-late">Late</span>[% END %]
250 [% IF ( missingissue.status4 ) %]<span class="status-missing">Missing</span>[% END %]
251 [% IF ( missingissue.status41 ) %]<span class="status-missing_never_received">Missing (never received)</span>[% END %]
252 [% IF ( missingissue.status42 ) %]<span class="status-missing_sold_out">Missing (sold out)</span>[% END %]
253 [% IF ( missingissue.status43 ) %]<span class="status-missing_damaged">Missing (damaged)</span>[% END %]
254 [% IF ( missingissue.status44 ) %]<span class="status-missing_lost">Missing (lost)</span>[% END %]
255 [% IF ( missingissue.status7 ) %]<span class="status-claimed">Claimed</span>[% END %]
257 <td class="planneddate">
258 [% IF ( missingissue.planneddate ) %]
259 <span title="[% missingissue.planneddateISO %]">[% missingissue.planneddate %]</span>
261 <span title="0000-00-00"></span>
264 <td>[% missingissue.claims_count %]</td>
266 [% IF ( missingissue.claimdate ) %]
267 <span title="[% missingissue.claimdateISO %]">[% missingissue.claimdate %]</span>
269 <span title="0000-00-00"></span>
272 [% FOR field IN additional_fields_for_subscription %]
273 [% IF field.authorised_value_category %]
274 <td>[% AuthorisedValues.GetByCode( field.authorised_value_category, missingissue.additional_fields.${field.name} ) %]</td>
276 <td>[% missingissue.additional_fields.${field.name} %]</td>
283 [% IF csv_profiles %]
284 <fieldset class="action">
285 <label for="csv_code">Select CSV profile:</label>
286 <select id="csv_profile_for_export">
287 [% FOR csv IN csv_profiles %]
288 <option value="[% csv.export_format_id %]">[% csv.profile %]</option>
291 <span class="exportSelected"><a id="ExportSelected" href="/cgi-bin/koha/serials/claims.pl">Download selected claims</a></span>
295 <fieldset class="action">
296 <label for="letter_code">Select notice:</label>
297 <select name="letter_code" id="letter_code">
298 [% FOREACH letter IN letters %]
299 <option value="[% letter.code %]">[% letter.name %]</option>
302 <input type="hidden" name="op" value="send_alert" />
303 <input type="hidden" name="supplierid" value="[% supplierid %]" />
304 <input type="submit" name="submit" class="button" value="Send notification" />
315 [% INCLUDE 'serials-menu.inc' %]
318 [% INCLUDE 'intranet-bottom.inc' %]