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, {
17 { "aTargets": [ 0,1 ], "bSortable": false, "bSearchable": false },
19 { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
21 { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] },
22 { 'sType': "title-string", 'aTargets' : [ 'title-string'] }
27 $('#supplierid').change(function() {
28 $('#claims').submit();
31 // Checkboxes : Select All / None
32 $("span.checkall").html("<input type=\"checkbox\" name=\"CheckAll\"> "+_("Check All")+"</input>");
34 $("#CheckAll").click(function() {
35 $("#claimst tr:visible :checkbox").attr('checked', $("#CheckAll").is(':checked'));
38 // Generates a dynamic link for exporting the selection's data as CSV
39 $("#ExportSelected").click(function() {
40 // 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.
41 var selected = $("input[name=serialid]:checked");
43 if (selected.length == 0) {
44 alert(_("Please select at least one item to export."));
48 // Building the url from currently checked boxes
49 var url = '/cgi-bin/koha/serials/lateissues-export.pl?supplierid=&op=claims';
50 for (var i = 0; i < selected.length; i++) {
51 url += '&serialid=' + selected[i].value;
53 url += '&csv_profile=' + $("#csv_profile_for_export option:selected").val();
54 // And redirecting to the CSV page
59 $("#titlefilter").keyup( function () {
60 sTable.fnFilter( this.value, 3 ); // 3 is position of title column
63 $("#branchfilter").keyup(function() {
64 sTable.fnFilter( this.value, 2 ); // 2 is the position of the author column
68 // Checks if the form can be sent (at least one checkbox must be checked)
69 function checkForm() {
70 if ($("input:checked").length == 0) {
71 alert(_("Please select at least one item."));
77 function filterByStatus() {
78 selectedStatus = $("#statusfilter").val();
79 if (selectedStatus == "all") {
82 $("table#claimst tbody tr").hide();
83 $("table#claimst tbody tr").each( function() {
84 if ( $(this).find("span.status-" + selectedStatus).size() > 0 ) {
92 function filterByBranch() {
93 selectedBranch = $("#branchfilter").val();
94 if (selectedBranch == "all") {
97 $("table#claimst tbody tr").hide();
98 $("table#claimst tbody tr").each( function() {
99 if ( $(this).find("span.branch-" + selectedBranch).size() > 0 ) {
107 function filterByDate() {
108 var beginDate = Date_from_syspref($("#from").val()).getTime();
109 var endDate = Date_from_syspref($("#to").val()).getTime();
111 // Checks if the beginning date is valid
112 if (!parseInt(beginDate)) {
113 alert(_("The beginning date is missing or invalid."));
117 // Checks if the ending date is valid
118 if (!parseInt(endDate)) {
119 alert(_("The ending date is missing or invalid."));
123 // Checks if beginning date is before ending date
124 if (beginDate > endDate) {
125 // If not, we swap them
126 var tmpDate = endDate;
131 // We hide everything
132 $("table#claimst tbody tr").hide();
134 // For each date in the table
135 $(".planneddate").each(function() {
137 // We make a JS Date Object, according to the locale
138 var pdate = Date_from_syspref($(this).text()).getTime();
140 // And checks if the date is between the beginning and ending dates
141 if (pdate > beginDate &&
143 // If so, we can show the row
144 $(this).parent().show();
150 // Clears filters : shows everything
151 function clearFilters() {
152 $("table#claimst tbody tr").show();
155 function popup(supplierid,serialid){
156 window.open('claims.pl?supplierid='+ supplierid +'&serialid='+ serialid +'&op=preview' ,'popup', 'width=600,height=400,toolbar=no,scrollbars=yes');
162 <body id="ser_claims" class="ser">
163 [% INCLUDE 'header.inc' %]
164 [% UNLESS ( preview ) %]
165 [% INCLUDE 'serials-search.inc' %]
168 <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>
170 [% UNLESS ( preview ) %]
172 <div id="doc3" class="yui-t2">
180 [% IF ( letter ) %][% 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 %]
182 [% IF ( SHOWCONFIRMATION ) %]
183 <div class="dialog alert">Your notification has been sent.</div>
185 [% UNLESS ( letter ) %]<div class="dialog alert">No claims notice defined. <a href="/cgi-bin/koha/tools/letter.pl">Please define one</a>.</div>[% END %]
186 <form id="claims" name="claims" action="claims.pl" method="post">
188 <label for="supplierid">Vendor: </label>
189 <select id="supplierid" name="supplierid">
190 [% FOREACH suploo IN suploop %]
191 [% IF ( suploo.selected ) %]
192 <option value="[% suploo.id %]" selected="selected" >
194 <option value="[% suploo.id %]">
201 <input type="submit" value="OK" />
202 [% IF ( phone ) %]Phone: [% phone %][% END %]
203 [% IF ( booksellerfax ) %]Fax: [% booksellerfax %][% END %]
204 [% IF ( bookselleremail ) %]</p><p><a href="mailto:[% bookselleremail %]">[% bookselleremail %]</a>[% END %]
208 [% IF ( missingissues ) %]
209 <h3>Missing issues</h3>
210 <form action="claims.pl" onsubmit="return false;">
211 <fieldset class="rows">
212 <legend>Filters :</legend>
216 <label for="statusfilter">Status : </label>
217 <select id="statusfilter" onchange="filterByStatus();">
218 <option value="all" selected="selected">(All)</option>
219 <option value="expected">Expected</option>
220 <option value="late">Late</option>
221 <option value="missing">Missing</option>
222 <option value="missing_never_received">Missing (never received)</option>
223 <option value="missing_sold_out">Missing (sold out)</option>
224 <option value="missing_damaged">Missing (damaged)</option>
225 <option value="missing_lost">Missing (lost)</option>
226 <option value="claimed">Claimed</option>
231 <label for="titlefilter">Title : </label>
232 <input id="titlefilter" type="text" />
235 <label for="branchfilter">Library: </label>
236 <select id="branchfilter" onchange="filterByBranch();">
237 <option value="all" selected="selected">(All)</option>
238 [% FOREACH branchloo IN branchloop %]
239 <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
245 <label for="from">From:</label>
246 <input type="text" name="begindate" id="from" value="[% begindate %]" size="10" maxlength="10" class="datepickerfrom" />
247 <label for="to" style="float:none;">To:</label>
248 <input type="text" name="enddate" id="to" value="[% enddate %]" size="10" maxlength="10" class="datepickerto" />
249 <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
250 <input type="button" value="OK" onclick="filterByDate();" />
254 <input type="reset" value="Clear filters" onclick="clearFilters();" />
261 <form action="claims.pl" method="post" class="checkboxed" onsubmit="return checkForm()">
262 <input type="hidden" name="order" value="[% order %]" />
265 <th><input type="checkbox" id="CheckAll"></th>
268 <th class="anti-the">Title</th>
270 <th>Issue number</th>
272 <th class="title-string">Since</th>
273 <th class="title-string">Claim date</th>
275 <tbody>[% FOREACH missingissue IN missingissues %]
278 <input type="checkbox" name="serialid" value="[% missingissue.serialid %]" />
281 [% missingissue.name %]
284 <span class="branch-[% missingissue.branchcode %]">[% Branches.GetName( missingissue.branchcode ) %]</span>
287 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% missingissue.subscriptionid %]">[% missingissue.title |html %]</a>
290 [% missingissue.issn %]
293 [% missingissue.serialseq %]
296 [% IF ( missingissue.status1 ) %]<span class="status-expected">Expected</span>[% END %]
297 [% IF ( missingissue.status3 ) %]<span class="status-late">Late</span>[% END %]
298 [% IF ( missingissue.status4 ) %]<span class="status-missing">Missing</span>[% END %]
299 [% IF ( missingissue.status41 ) %]<span class="status-missing_never_received">Missing (never received)</span>[% END %]
300 [% IF ( missingissue.status42 ) %]<span class="status-missing_sold_out">Missing (sold out)</span>[% END %]
301 [% IF ( missingissue.status43 ) %]<span class="status-missing_damaged">Missing (damaged)</span>[% END %]
302 [% IF ( missingissue.status44 ) %]<span class="status-missing_lost">Missing (lost)</span>[% END %]
303 [% IF ( missingissue.status7 ) %]<span class="status-claimed">Claimed</span>[% END %]
305 <td class="planneddate">
306 [% IF ( missingissue.planneddate ) %]
307 <span title="[% missingissue.planneddateISO %]">[% missingissue.planneddate %]</span>
309 <span title="0000-00-00"></span>
313 [% IF ( missingissue.claimdate ) %]
314 <span title="[% missingissue.claimdateISO %]">[% missingissue.claimdate %]</span>
316 <span title="0000-00-00"></span>
323 [% IF csv_profiles %]
324 <fieldset class="action">
325 <label for="csv_code">Select CSV profile:</label>
326 <select id="csv_profile_for_export">
327 [% FOR csv IN csv_profiles %]
328 <option value="[% csv.export_format_id %]">[% csv.profile %]</option>
331 <span class="exportSelected"><a id="ExportSelected" href="/cgi-bin/koha/serials/claims.pl">Download selected claims</a></span>
335 <fieldset class="action"> <label for="letter_code">Select notice:</label>
336 <select name="letter_code" id="letter_code">
337 [% FOREACH letter IN letters %]
338 <option value="[% letter.code %]">[% letter.name %]</option>
341 <input type="hidden" name="op" value="send_alert" /><input type="submit" name="submit" class="button" value="Send notification" /></fieldset>
349 <div id="doc" class="yui-t7">
352 [% IF ( supplierloop ) %]
353 [% FOREACH supplierloo IN supplierloop %]
354 [% IF ( supplierloo.name ) %]
355 <p><b>[% supplierloo.name %]</b><br />
357 [% IF ( supplierloo.postal ) %]
358 [% supplierloo.postal %]<br />
360 [% IF ( supplierloo.contphone ) %]
361 Ph: [% supplierloo.contphone %]<br />
363 [% IF ( supplierloo.contfax ) %]
364 Fax: [% supplierloo.contfax %]<br />
366 [% IF ( supplierloo.contemail ) %]
367 Email: [% supplierloo.contemail %]<br />
369 [% IF ( supplierloo.accountnumber ) %]
370 A/C: [% supplierloo.accountnumber %]</p>
372 [% IF ( supplierloo.contact ) %]
373 <p>Dear [% supplierloo.contact %]</p>
375 <p>To whom it may concern</p>
377 <p>The following items have not been received from you and are now considered missing:</p>
380 [% IF ( missingissues ) %]
381 <h3>Missing issues</h3>
384 <td><b>Vendor<b></td>
385 <td><b>Title</b></td>
386 <td><b>Issue number</b></td>
387 <td><b>Missing since</b></td>
389 [% FOREACH missingissue IN missingissues %]
392 [% missingissue.name %]
395 [% missingissue.Title |html %]
398 [% missingissue.serialseq %]
401 [% missingissue.planneddate %]
408 <p class="noprint"><a href="#" onclick="window.print(); return false;">Print</a> <a href="#" class="close">Close</a></p>
414 [% UNLESS ( preview ) %]
416 [% INCLUDE 'serials-menu.inc' %]
420 [% INCLUDE 'intranet-bottom.inc' %]