1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Serials › Claims</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
5 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.uitablefilter.js"></script>
6 <script type="text/JavaScript" language="JavaScript">
8 $(document).ready(function() {
9 [% UNLESS ( preview ) %]$("#claimst").tablesorter({[% IF ( dateformat == 'metric' ) %]
10 dateFormat: 'uk',[% END %]
11 headers: { 0: { sorter: false },1:{sorter:false}}
13 $('#supplierid').change(function() {
14 $('#claims').submit();
17 // Case-insensitive version of jquery's contains function
20 icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0"
25 // Checkboxes : Select All / None
26 $("span.checkall").html("<input type=\"checkbox\" name=\"CheckAll\"> "+_("Check All")+"</input>");
27 $("span.exportSelected").html("<a id=\"ExportSelected\" href=\"/cgi-bin/koha/serials/claims.pl\"> "+_("Export selected items data") +"<\/a>");
29 $("#CheckAll").click(function() {
30 $("#claimst tr:visible :checkbox").attr('checked', $("#CheckAll").is(':checked'));
33 // Generates a dynamic link for exporting the selection's data as CSV
34 $("#ExportSelected").click(function() {
35 // We use input:checked because it's faster, but if there must new checkboxes
36 // used for other purpose on this page, please use [name=serialid]:checked instead
37 var selected = $("input: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-excel.pl?supplierid=&op=claims';
46 for (var i = 0; i < selected.length; i++) {
47 url += '&serialid=' + selected[i].value;
49 // And redirecting to the CSV page
54 $("#titlefilter").keyup(function() {
55 $.uiTableFilter($("#claimst"), $("#titlefilter").val())
58 $("#branchfilter").keyup(function() {
59 $.uiTableFilter($("#claimst"), $("#branchfilter").val())
63 // Checks if the form can be sent (at least one checkbox must be checked)
64 function checkForm() {
65 if ($("input:checked").length == 0) {
66 alert(_('Please select at least one item.'));
72 function filterByStatus() {
73 selectedStatus = $("#statusfilter").val();
74 if (selectedStatus == "all") {
77 $("table#claimst tbody tr").hide();
78 $("table#claimst tbody tr:contains(" + selectedStatus + ")").show();
83 function filterByBranch() {
84 selectedBranch = $("#branchfilter").val();
85 if (selectedBranch == "all") {
88 $("table#claimst tbody tr").hide();
89 $("table#claimst tbody tr:contains(" + selectedBranch + ")").show();
93 function filterByDate() {
94 var beginDate = Date_from_syspref($("#begindate").val()).getTime();
95 var endDate = Date_from_syspref($("#enddate").val()).getTime();
97 // Checks if the beginning date is valid
98 if (!parseInt(beginDate)) {
99 alert(_('The beginning date is missing or invalid.'));
103 // Checks if the ending date is valid
104 if (!parseInt(endDate)) {
105 alert(_('The ending date is missing or invalid.'));
109 // Checks if beginning date is before ending date
110 if (beginDate > endDate) {
111 // If not, we swap them
112 var tmpDate = endDate;
117 // We hide everything
118 $("table#claimst tbody tr").hide();
120 // For each date in the table
121 $(".planneddate").each(function() {
123 // We make a JS Date Object, according to the locale
124 var pdate = Date_from_syspref($(this).text()).getTime();
126 // And checks if the date is between the beginning and ending dates
127 if (pdate > beginDate &&
129 // If so, we can show the row
130 $(this).parent().show();
136 // Clears filters : shows everything
137 function clearFilters() {
138 $("table#claimst tbody tr").show();
141 function popup(supplierid,serialid){
142 window.open('claims.pl?supplierid='+ supplierid +'&serialid='+ serialid +'&op=preview' ,'popup', 'width=600,height=400,toolbar=no,scrollbars=yes');
147 [% INCLUDE 'calendar.inc' %]
149 <body id="ser_claims" class="ser">
150 [% INCLUDE 'header.inc' %]
151 [% UNLESS ( preview ) %]
152 [% INCLUDE 'serials-search.inc' %]
155 <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>
157 [% UNLESS ( preview ) %]
159 <div id="doc3" class="yui-t2">
167 [% 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 %]
169 [% IF ( SHOWCONFIRMATION ) %]
170 <div class="dialog alert">Your notification has been sent.</div>
172 [% UNLESS ( letter ) %]<div class="dialog alert">No claims notice defined. <a href="/cgi-bin/koha/tools/letter.pl">Please define one</a>.</div>[% END %]
173 <form id="claims" name="claims" action="claims.pl" method="post">
175 <label for="supplierid">Vendor: </label>
176 <select id="supplierid" name="supplierid">
177 [% FOREACH suploo IN suploop %]
178 [% IF ( suploo.selected ) %]
179 <option value="[% suploo.id %]" selected="selected" >
181 <option value="[% suploo.id %]">
188 <input type="submit" value="OK" />
189 [% IF ( phone ) %]Phone: [% phone %][% END %]
190 [% IF ( booksellerfax ) %]Fax: [% booksellerfax %][% END %]
191 [% IF ( bookselleremail ) %]</p><p><a href="mailto:[% bookselleremail %]">[% bookselleremail %]</a>[% END %]
195 [% IF ( missingissues ) %]
196 <h3>Missing Issues</h3>
197 <form action="claims.pl" onsubmit="return false;">
198 <fieldset class="rows">
199 <legend>Filters :</legend>
203 <label for="statusfilter">Status : </label>
204 <select id="statusfilter" onchange="filterByStatus();">
205 <option value="all" selected="selected">(All)</option>
206 <option>Expected</option>
207 <option>Arrived</option>
208 <option>Late</option>
209 <option>Missing</option>
210 <option>Claimed</option>
215 <label for="titlefilter">Title : </label>
216 <input id="titlefilter" type="text" />
217 <label for="branchfilter">Library: </label>
218 <select id="branchfilter" onchange="filterByBranch();">
219 [% FOREACH branchloo IN branchloop %]
220 [% IF ( branchloo.selected ) %]
221 <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
223 <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
230 <label for="begindate">From</label>
231 <img src="[% themelang %]/lib/calendar/cal.gif" id="begindatebutton" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />
232 <input type="text" name="begindate" id="begindate" value="[% begindate %]" size="10" maxlength="10" />
233 <script type="text/javascript">
236 inputField : "begindate",
237 button : "begindatebutton",
238 ifFormat : "[% DHTMLcalendar_dateformat %]"
243 <label for="enddate" style="float:none;">To</label>
244 <img src="[% themelang %]/lib/calendar/cal.gif" id="enddatebutton" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />
245 <input type="text" name="enddate" id="enddate" value="[% enddate %]" size="10" maxlength="10" />
246 <script type="text/javascript">
249 inputField : "enddate",
250 button : "enddatebutton",
251 ifFormat : "[% DHTMLcalendar_dateformat %]"
254 </script> <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
255 <input type="button" value="OK" onclick="filterByDate();" />
259 <input type="reset" value="Clear Filters" onclick="clearFilters();" />
266 <form action="claims.pl" method="post" class="checkboxed" onsubmit="return checkForm()">
267 <input type="hidden" name="order" value="[% order %]" />
271 <th><input type="checkbox" id="CheckAll"></th>
276 <th>Issue number</th>
282 <tbody>[% FOREACH missingissue IN missingissues %]
286 <input type="checkbox" name="serialid" value="[% missingissue.serialid %]" />
290 [% missingissue.name %]
293 [% missingissue.branchcode %]
296 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% missingissue.subscriptionid %]">[% missingissue.title |html %]</a>
299 [% missingissue.serialseq %]
302 [% IF ( missingissue.status1 ) %]Expected[% END %]
303 [% IF ( missingissue.status2 ) %]Arrived[% END %]
304 [% IF ( missingissue.status3 ) %]Late[% END %]
305 [% IF ( missingissue.status4 ) %]Missing[% END %]
306 [% IF ( missingissue.status7 ) %]Claimed[% END %]
308 <td class="planneddate">
309 [% missingissue.planneddate %]
312 [% missingissue.claimdate %]
315 <a href="/cgi-bin/koha/serials/lateissues-excel.pl?supplierid=[% missingissue.supplieri %]&serialid=[% missingissue.serialid %]&op=claims">Export item data</a>
320 <p><span class="exportSelected"></span></p>
323 <fieldset class="action"> <label for="letter_code">Select notice:</label>
324 <select name="letter_code" id="letter_code">
325 [% FOREACH letter IN letters %]
326 <option value="[% letter.code %]">[% letter.name %]</option>
329 <input type="hidden" name="op" value="send_alert" /><input type="submit" name="submit" class="button" value="Send notification" /></fieldset>
337 <div id="doc" class="yui-t7">
340 [% IF ( supplierloop ) %]
341 [% FOREACH supplierloo IN supplierloop %]
342 [% IF ( supplierloo.name ) %]
343 <p><b>[% supplierloo.name %]</b><br />
345 [% IF ( supplierloo.postal ) %]
346 [% supplierloo.postal %]<br />
348 [% IF ( supplierloo.contphone ) %]
349 Ph: [% supplierloo.contphone %]<br />
351 [% IF ( supplierloo.contfax ) %]
352 Fax: [% supplierloo.contfax %]<br />
354 [% IF ( supplierloo.contemail ) %]
355 Email: [% supplierloo.contemail %]<br />
357 [% IF ( supplierloo.accountnumber ) %]
358 A/C: [% supplierloo.accountnumber %]</p>
360 [% IF ( supplierloo.contact ) %]
361 <p>Dear [% supplierloo.contact %]</p>
363 <p>To whom it may concern</p>
365 <p>The following items have not been received from you and are now considered missing:</p>
368 [% IF ( missingissues ) %]
369 <h3>Missing Issues</h3>
372 <td><b>Vendor<b></td>
373 <td><b>Title</b></td>
374 <td><b>Issue number</b></td>
375 <td><b>Missing since</b></td>
377 [% FOREACH missingissue IN missingissues %]
380 [% missingissue.name %]
383 [% missingissue.Title |html %]
386 [% missingissue.serialseq %]
389 [% missingissue.planneddate %]
396 <p class="noprint"><a href="#" onclick="window.print(); return false;">Print</a> <a href="#" class="close">Close</a></p>
402 [% UNLESS ( preview ) %]
404 [% INCLUDE 'serials-menu.inc' %]
408 [% INCLUDE 'intranet-bottom.inc' %]