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 }
21 { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }
25 [% IF ( letter ) %]null,[% END %]null,null,{ "sType": "anti-the" },null,null,{ "sType": "title-string" },{ "sType": "title-string" }
30 $('#supplierid').change(function() {
31 $('#claims').submit();
34 // Checkboxes : Select All / None
35 $("span.checkall").html("<input type=\"checkbox\" name=\"CheckAll\"> "+_("Check All")+"</input>");
37 $("#CheckAll").click(function() {
38 $("#claimst tr:visible :checkbox").attr('checked', $("#CheckAll").is(':checked'));
41 // Generates a dynamic link for exporting the selection's data as CSV
42 $("#ExportSelected").click(function() {
43 // 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.
44 var selected = $("input[name=serialid]:checked");
46 if (selected.length == 0) {
47 alert(_("Please select at least one item to export."));
51 // Building the url from currently checked boxes
52 var url = '/cgi-bin/koha/serials/lateissues-export.pl?supplierid=&op=claims';
53 for (var i = 0; i < selected.length; i++) {
54 url += '&serialid=' + selected[i].value;
56 url += '&csv_profile=' + $("#csv_profile_for_export option:selected").val();
57 // And redirecting to the CSV page
62 $("#titlefilter").keyup( function () {
63 sTable.fnFilter( this.value, 3 ); // 3 is position of title column
66 $("#branchfilter").keyup(function() {
67 sTable.fnFilter( this.value, 2 ); // 2 is the position of the author column
71 // Checks if the form can be sent (at least one checkbox must be checked)
72 function checkForm() {
73 if ($("input:checked").length == 0) {
74 alert(_("Please select at least one item."));
80 function filterByStatus() {
81 selectedStatus = $("#statusfilter").val();
82 if (selectedStatus == "all") {
85 $("table#claimst tbody tr").hide();
86 $("table#claimst tbody tr").each( function() {
87 if ( $(this).find("span.status-" + selectedStatus).size() > 0 ) {
95 function filterByBranch() {
96 selectedBranch = $("#branchfilter").val();
97 if (selectedBranch == "all") {
100 $("table#claimst tbody tr").hide();
101 $("table#claimst tbody tr").each( function() {
102 if ( $(this).find("span.branch-" + selectedBranch).size() > 0 ) {
110 function filterByDate() {
111 var beginDate = Date_from_syspref($("#from").val()).getTime();
112 var endDate = Date_from_syspref($("#to").val()).getTime();
114 // Checks if the beginning date is valid
115 if (!parseInt(beginDate)) {
116 alert(_("The beginning date is missing or invalid."));
120 // Checks if the ending date is valid
121 if (!parseInt(endDate)) {
122 alert(_("The ending date is missing or invalid."));
126 // Checks if beginning date is before ending date
127 if (beginDate > endDate) {
128 // If not, we swap them
129 var tmpDate = endDate;
134 // We hide everything
135 $("table#claimst tbody tr").hide();
137 // For each date in the table
138 $(".planneddate").each(function() {
140 // We make a JS Date Object, according to the locale
141 var pdate = Date_from_syspref($(this).text()).getTime();
143 // And checks if the date is between the beginning and ending dates
144 if (pdate > beginDate &&
146 // If so, we can show the row
147 $(this).parent().show();
153 // Clears filters : shows everything
154 function clearFilters() {
155 $("table#claimst tbody tr").show();
158 function popup(supplierid,serialid){
159 window.open('claims.pl?supplierid='+ supplierid +'&serialid='+ serialid +'&op=preview' ,'popup', 'width=600,height=400,toolbar=no,scrollbars=yes');
165 <body id="ser_claims" class="ser">
166 [% INCLUDE 'header.inc' %]
167 [% UNLESS ( preview ) %]
168 [% INCLUDE 'serials-search.inc' %]
171 <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>
173 [% UNLESS ( preview ) %]
175 <div id="doc3" class="yui-t2">
183 [% 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 %]
185 [% IF ( SHOWCONFIRMATION ) %]
186 <div class="dialog alert">Your notification has been sent.</div>
188 [% UNLESS ( letter ) %]<div class="dialog alert">No claims notice defined. <a href="/cgi-bin/koha/tools/letter.pl">Please define one</a>.</div>[% END %]
189 <form id="claims" name="claims" action="claims.pl" method="post">
191 <label for="supplierid">Vendor: </label>
192 <select id="supplierid" name="supplierid">
193 [% FOREACH suploo IN suploop %]
194 [% IF ( suploo.selected ) %]
195 <option value="[% suploo.id %]" selected="selected" >
197 <option value="[% suploo.id %]">
204 <input type="submit" value="OK" />
205 [% IF ( phone ) %]Phone: [% phone %][% END %]
206 [% IF ( booksellerfax ) %]Fax: [% booksellerfax %][% END %]
207 [% IF ( bookselleremail ) %]</p><p><a href="mailto:[% bookselleremail %]">[% bookselleremail %]</a>[% END %]
211 [% IF ( missingissues ) %]
212 <h3>Missing issues</h3>
213 <form action="claims.pl" onsubmit="return false;">
214 <fieldset class="rows">
215 <legend>Filters :</legend>
219 <label for="statusfilter">Status : </label>
220 <select id="statusfilter" onchange="filterByStatus();">
221 <option value="all" selected="selected">(All)</option>
222 <option value="expected">Expected</option>
223 <option value="late">Late</option>
224 <option value="missing">Missing</option>
225 <option value="missing_never_received">Missing (never received)</option>
226 <option value="missing_sold_out">Missing (sold out)</option>
227 <option value="missing_damaged">Missing (damaged)</option>
228 <option value="missing_lost">Missing (lost)</option>
229 <option value="claimed">Claimed</option>
234 <label for="titlefilter">Title : </label>
235 <input id="titlefilter" type="text" />
238 <label for="branchfilter">Library: </label>
239 <select id="branchfilter" onchange="filterByBranch();">
240 <option value="all" selected="selected">(All)</option>
241 [% FOREACH branchloo IN branchloop %]
242 <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
248 <label for="from">From:</label>
249 <input type="text" name="begindate" id="from" value="[% begindate %]" size="10" maxlength="10" class="datepickerfrom" />
250 <label for="to" style="float:none;">To:</label>
251 <input type="text" name="enddate" id="to" value="[% enddate %]" size="10" maxlength="10" class="datepickerto" />
252 <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
253 <input type="button" value="OK" onclick="filterByDate();" />
257 <input type="reset" value="Clear filters" onclick="clearFilters();" />
264 <form action="claims.pl" method="post" class="checkboxed" onsubmit="return checkForm()">
265 <input type="hidden" name="order" value="[% order %]" />
268 <th><input type="checkbox" id="CheckAll"></th>
273 <th>Issue number</th>
278 <tbody>[% FOREACH missingissue IN missingissues %]
281 <input type="checkbox" name="serialid" value="[% missingissue.serialid %]" />
284 [% missingissue.name %]
287 <span class="branch-[% missingissue.branchcode %]">[% Branches.GetName( missingissue.branchcode ) %]</span>
290 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% missingissue.subscriptionid %]">[% missingissue.title |html %]</a>
293 [% missingissue.issn %]
296 [% missingissue.serialseq %]
299 [% IF ( missingissue.status1 ) %]<span class="status-expected">Expected</span>[% END %]
300 [% IF ( missingissue.status3 ) %]<span class="status-late">Late</span>[% END %]
301 [% IF ( missingissue.status4 ) %]<span class="status-missing">Missing</span>[% END %]
302 [% IF ( missingissue.status41 ) %]<span class="status-missing_never_received">Missing (never received)</span>[% END %]
303 [% IF ( missingissue.status42 ) %]<span class="status-missing_sold_out">Missing (sold out)</span>[% END %]
304 [% IF ( missingissue.status43 ) %]<span class="status-missing_damaged">Missing (damaged)</span>[% END %]
305 [% IF ( missingissue.status44 ) %]<span class="status-missing_lost">Missing (lost)</span>[% END %]
306 [% IF ( missingissue.status7 ) %]<span class="status-claimed">Claimed</span>[% END %]
308 <td class="planneddate">
309 [% IF ( missingissue.planneddate ) %]
310 <span title="[% missingissue.planneddateISO %]">[% missingissue.planneddate %]</span>
312 <span title="0000-00-00"></span>
316 [% IF ( missingissue.claimdate ) %]
317 <span title="[% missingissue.claimdateISO %]">[% missingissue.claimdate %]</span>
319 <span title="0000-00-00"></span>
326 [% IF csv_profiles %]
327 <fieldset class="action">
328 <label for="csv_code">Select CSV profile:</label>
329 <select id="csv_profile_for_export">
330 [% FOR csv IN csv_profiles %]
331 <option value="[% csv.export_format_id %]">[% csv.profile %]</option>
334 <span class="exportSelected"><a id="ExportSelected" href="/cgi-bin/koha/serials/claims.pl">Download selected claims</a></span>
338 <fieldset class="action"> <label for="letter_code">Select notice:</label>
339 <select name="letter_code" id="letter_code">
340 [% FOREACH letter IN letters %]
341 <option value="[% letter.code %]">[% letter.name %]</option>
344 <input type="hidden" name="op" value="send_alert" /><input type="submit" name="submit" class="button" value="Send notification" /></fieldset>
352 <div id="doc" class="yui-t7">
355 [% IF ( supplierloop ) %]
356 [% FOREACH supplierloo IN supplierloop %]
357 [% IF ( supplierloo.name ) %]
358 <p><b>[% supplierloo.name %]</b><br />
360 [% IF ( supplierloo.postal ) %]
361 [% supplierloo.postal %]<br />
363 [% IF ( supplierloo.contphone ) %]
364 Ph: [% supplierloo.contphone %]<br />
366 [% IF ( supplierloo.contfax ) %]
367 Fax: [% supplierloo.contfax %]<br />
369 [% IF ( supplierloo.contemail ) %]
370 Email: [% supplierloo.contemail %]<br />
372 [% IF ( supplierloo.accountnumber ) %]
373 A/C: [% supplierloo.accountnumber %]</p>
375 [% IF ( supplierloo.contact ) %]
376 <p>Dear [% supplierloo.contact %]</p>
378 <p>To whom it may concern</p>
380 <p>The following items have not been received from you and are now considered missing:</p>
383 [% IF ( missingissues ) %]
384 <h3>Missing issues</h3>
387 <td><b>Vendor<b></td>
388 <td><b>Title</b></td>
389 <td><b>Issue number</b></td>
390 <td><b>Missing since</b></td>
392 [% FOREACH missingissue IN missingissues %]
395 [% missingissue.name %]
398 [% missingissue.Title |html %]
401 [% missingissue.serialseq %]
404 [% missingissue.planneddate %]
411 <p class="noprint"><a href="#" onclick="window.print(); return false;">Print</a> <a href="#" class="close">Close</a></p>
417 [% UNLESS ( preview ) %]
419 [% INCLUDE 'serials-menu.inc' %]
423 [% INCLUDE 'intranet-bottom.inc' %]