3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Serials › Claims</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'calendar.inc' %]
7 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
8 [% INCLUDE 'datatables.inc' %]
9 <script type="text/javascript">
11 $(document).ready(function() {
12 [% UNLESS ( preview ) %]
13 var sTable = $("#claimst").dataTable($.extend(true, {}, dataTablesDefaults, {
16 { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
17 { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] },
18 { 'sType': "title-string", 'aTargets' : [ 'title-string'] }
23 $('#supplierid').change(function() {
24 $('#claims').submit();
27 // Checkboxes : Select All / None
28 $("span.checkall").html("<input type=\"checkbox\" name=\"CheckAll\"> "+_("Check All")+"</input>");
30 $("#CheckAll").click(function() {
31 $("#claimst tr:visible :checkbox").attr('checked', $("#CheckAll").is(':checked'));
34 // Generates a dynamic link for exporting the selections data as CSV
35 $("#ExportSelected").click(function() {
36 // 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.
37 var selected = $("input[name=serialid]:checked");
39 if (selected.length == 0) {
40 alert(_("Please select at least one item to export."));
44 // Building the url from currently checked boxes
45 var url = '/cgi-bin/koha/serials/lateissues-export.pl?supplierid=&op=claims';
46 for (var i = 0; i < selected.length; i++) {
47 url += '&serialid=' + selected[i].value;
49 url += '&csv_profile=' + $("#csv_profile_for_export option:selected").val();
50 // And redirecting to the CSV page
55 $("#titlefilter").keyup( function () {
56 sTable.fnFilter( this.value, 3 ); // 3 is position of title column
59 $("#branchfilter").keyup(function() {
60 sTable.fnFilter( this.value, 2 ); // 2 is the position of the author column
64 // Checks if the form can be sent (at least one checkbox must be checked)
65 function checkForm() {
66 if ($("input:checked").length == 0) {
67 alert(_("Please select at least one issue."));
73 function filterByStatus() {
74 selectedStatus = $("#statusfilter").val();
75 if (selectedStatus == "all") {
78 $("table#claimst tbody tr").hide();
79 $("table#claimst tbody tr").each( function() {
80 if ( $(this).find("span.status-" + selectedStatus).size() > 0 ) {
88 function filterByBranch() {
89 selectedBranch = $("#branchfilter").val();
90 if (selectedBranch == "all") {
93 $("table#claimst tbody tr").hide();
94 $("table#claimst tbody tr").each( function() {
95 if ( $(this).find("span.branch-" + selectedBranch).size() > 0 ) {
103 function filterByDate() {
104 var beginDate = Date_from_syspref($("#from").val()).getTime();
105 var endDate = Date_from_syspref($("#to").val()).getTime();
107 // Checks if the beginning date is valid
108 if (!parseInt(beginDate)) {
109 alert(_("The beginning date is missing or invalid."));
113 // Checks if the ending date is valid
114 if (!parseInt(endDate)) {
115 alert(_("The ending date is missing or invalid."));
119 // Checks if beginning date is before ending date
120 if (beginDate > endDate) {
121 // If not, we swap them
122 var tmpDate = endDate;
127 // We hide everything
128 $("table#claimst tbody tr").hide();
130 // For each date in the table
131 $(".planneddate").each(function() {
133 // We make a JS Date Object, according to the locale
134 var pdate = Date_from_syspref($(this).text()).getTime();
136 // And checks if the date is between the beginning and ending dates
137 if (pdate > beginDate &&
139 // If so, we can show the row
140 $(this).parent().show();
146 // Clears filters : shows everything
147 function clearFilters() {
148 $("table#claimst tbody tr").show();
151 function popup(supplierid,serialid){
152 window.open('claims.pl?supplierid='+ supplierid +'&serialid='+ serialid +'&op=preview' ,'popup', 'width=600,height=400,toolbar=no,scrollbars=yes');
158 <body id="ser_claims" class="ser">
159 [% INCLUDE 'header.inc' %]
160 [% UNLESS ( preview ) %]
161 [% INCLUDE 'serials-search.inc' %]
164 <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>
166 [% UNLESS ( preview ) %]
168 <div id="doc3" class="yui-t2">
177 [% IF error_claim == 'no_vendor_email' %]
178 <div class="error">This vendor has no email defined for late issues.</div>
179 [% ELSIF error_claim == 'no_loggedin_user_email' %]
180 <div class="error">No email is configured for your user.</div>
182 <div class="error">[% error_claim %]</div>
186 <div class="dialog message">Email has been sent.</div>
189 [% 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 %]
191 [% IF ( SHOWCONFIRMATION ) %]
192 <div class="dialog alert">Your notification has been sent.</div>
194 [% UNLESS letters %]<div class="dialog alert">No claims notice defined. <a href="/cgi-bin/koha/tools/letter.pl">Please define one</a>.</div>[% END %]
195 <form id="claims" name="claims" action="claims.pl" method="post">
197 <label for="supplierid">Vendor: </label>
198 <select id="supplierid" name="supplierid">
199 [% FOREACH suploo IN suploop %]
200 [% IF ( suploo.selected ) %]
201 <option value="[% suploo.id %]" selected="selected" >
203 <option value="[% suploo.id %]">
210 <input type="submit" value="OK" />
211 [% IF ( phone ) %]Phone: [% phone %][% END %]
212 [% IF ( booksellerfax ) %]Fax: [% booksellerfax %][% END %]
213 [% IF ( bookselleremail ) %]</p><p><a href="mailto:[% bookselleremail %]">[% bookselleremail %]</a>[% END %]
217 [% IF ( missingissues ) %]
218 <h3>Missing issues</h3>
219 <form action="claims.pl" onsubmit="return false;">
220 <fieldset class="rows">
221 <legend>Filters :</legend>
225 <label for="statusfilter">Status : </label>
226 <select id="statusfilter" onchange="filterByStatus();">
227 <option value="all" selected="selected">(All)</option>
228 <option value="expected">Expected</option>
229 <option value="late">Late</option>
230 <option value="missing">Missing</option>
231 <option value="missing_never_received">Missing (never received)</option>
232 <option value="missing_sold_out">Missing (sold out)</option>
233 <option value="missing_damaged">Missing (damaged)</option>
234 <option value="missing_lost">Missing (lost)</option>
235 <option value="claimed">Claimed</option>
240 <label for="titlefilter">Title : </label>
241 <input id="titlefilter" type="text" />
244 <label for="branchfilter">Library: </label>
245 <select id="branchfilter" onchange="filterByBranch();">
246 <option value="all" selected="selected">(All)</option>
247 [% FOREACH branchloo IN branchloop %]
248 <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
254 <label for="from">From:</label>
255 <input type="text" name="begindate" id="from" value="[% begindate %]" size="10" maxlength="10" class="datepickerfrom" />
256 <label for="to" style="float:none;">To:</label>
257 <input type="text" name="enddate" id="to" value="[% enddate %]" size="10" maxlength="10" class="datepickerto" />
258 <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
259 <input type="button" value="OK" onclick="filterByDate();" />
263 <input type="reset" value="Clear filters" onclick="clearFilters();" />
270 <form action="claims.pl" method="post" class="checkboxed" onsubmit="return checkForm()">
274 <th><input type="checkbox" id="CheckAll"></th>
277 <th class="anti-the">Title</th>
279 <th>Issue number</th>
281 <th class="title-string">Since</th>
282 <th>Claims count</th>
283 <th class="title-string">Claim date</th>
286 <tbody>[% FOREACH missingissue IN missingissues %]
289 <input type="checkbox" name="serialid" value="[% missingissue.serialid %]" />
291 <td>[% missingissue.name %]</td>
293 <span class="branch-[% missingissue.branchcode %]">[% Branches.GetName( missingissue.branchcode ) %]</span>
296 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% missingissue.subscriptionid %]">[% missingissue.title |html %]</a>
298 <td>[% missingissue.issn %]</td>
299 <td>[% missingissue.serialseq %]</td>
301 [% IF ( missingissue.status1 ) %]<span class="status-expected">Expected</span>[% END %]
302 [% IF ( missingissue.status3 ) %]<span class="status-late">Late</span>[% END %]
303 [% IF ( missingissue.status4 ) %]<span class="status-missing">Missing</span>[% END %]
304 [% IF ( missingissue.status41 ) %]<span class="status-missing_never_received">Missing (never received)</span>[% END %]
305 [% IF ( missingissue.status42 ) %]<span class="status-missing_sold_out">Missing (sold out)</span>[% END %]
306 [% IF ( missingissue.status43 ) %]<span class="status-missing_damaged">Missing (damaged)</span>[% END %]
307 [% IF ( missingissue.status44 ) %]<span class="status-missing_lost">Missing (lost)</span>[% END %]
308 [% IF ( missingissue.status7 ) %]<span class="status-claimed">Claimed</span>[% END %]
310 <td class="planneddate">
311 [% IF ( missingissue.planneddate ) %]
312 <span title="[% missingissue.planneddateISO %]">[% missingissue.planneddate %]</span>
314 <span title="0000-00-00"></span>
317 <td>[% missingissue.claims_count %]</td>
319 [% IF ( missingissue.claimdate ) %]
320 <span title="[% missingissue.claimdateISO %]">[% missingissue.claimdate %]</span>
322 <span title="0000-00-00"></span>
329 [% IF csv_profiles %]
330 <fieldset class="action">
331 <label for="csv_code">Select CSV profile:</label>
332 <select id="csv_profile_for_export">
333 [% FOR csv IN csv_profiles %]
334 <option value="[% csv.export_format_id %]">[% csv.profile %]</option>
337 <span class="exportSelected"><a id="ExportSelected" href="/cgi-bin/koha/serials/claims.pl">Download selected claims</a></span>
341 <fieldset class="action">
342 <label for="letter_code">Select notice:</label>
343 <select name="letter_code" id="letter_code">
344 [% FOREACH letter IN letters %]
345 <option value="[% letter.code %]">[% letter.name %]</option>
348 <input type="hidden" name="op" value="send_alert" />
349 <input type="hidden" name="supplierid" value="[% supplierid %]" />
350 <input type="submit" name="submit" class="button" value="Send notification" />
359 <div id="doc" class="yui-t7">
362 [% IF ( supplierloop ) %]
363 [% FOREACH supplierloo IN supplierloop %]
364 [% IF ( supplierloo.name ) %]
365 <p><b>[% supplierloo.name %]</b><br />
367 [% IF ( supplierloo.postal ) %]
368 [% supplierloo.postal %]<br />
370 [% IF ( supplierloo.contphone ) %]
371 Ph: [% supplierloo.contphone %]<br />
373 [% IF ( supplierloo.contfax ) %]
374 Fax: [% supplierloo.contfax %]<br />
376 [% IF ( supplierloo.contemail ) %]
377 Email: [% supplierloo.contemail %]<br />
379 [% IF ( supplierloo.accountnumber ) %]
380 A/C: [% supplierloo.accountnumber %]</p>
382 [% IF ( supplierloo.contact ) %]
383 <p>Dear [% supplierloo.contact %]</p>
385 <p>To whom it may concern</p>
387 <p>The following items have not been received from you and are now considered missing:</p>
390 [% IF ( missingissues ) %]
391 <h3>Missing issues</h3>
394 <td><b>Vendor<b></td>
395 <td><b>Title</b></td>
396 <td><b>Issue number</b></td>
397 <td><b>Missing since</b></td>
399 [% FOREACH missingissue IN missingissues %]
402 [% missingissue.name %]
405 [% missingissue.Title |html %]
408 [% missingissue.serialseq %]
411 [% missingissue.planneddate %]
418 <p class="noprint"><a href="#" onclick="window.print(); return false;">Print</a> <a href="#" class="close">Close</a></p>
424 [% UNLESS ( preview ) %]
426 [% INCLUDE 'serials-menu.inc' %]
430 [% INCLUDE 'intranet-bottom.inc' %]