6 [% USE AuthorisedValues %]
8 [% USE ColumnsSettings %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>Koha › Serials › Details for subscription #[% subscriptionid | html %]</title>
12 [% INCLUDE 'doc-head-close.inc' %]
13 [% Asset.css("lib/jquery/plugins/treetable/stylesheets/jquery.treetable.css") | $raw %]
16 <body id="ser_subscription-detail" class="ser">
17 [% INCLUDE 'header.inc' %]
18 [% INCLUDE 'serials-search.inc' %]
20 <div id="breadcrumbs">
21 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
22 › <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
23 [% UNLESS blocking_error %]› Details for subscription #[% subscriptionid | html %][% END %]
26 <div class="main container-fluid">
28 <div class="col-sm-10 col-sm-push-2">
31 [% INCLUDE 'serials-toolbar.inc' %]
33 <h1>Subscription for [% bibliotitle | html %] [% IF closed %](closed)[% END %]</h1>
34 [% IF ( abouttoexpire ) %]
36 <div class="dialog message">Subscription will expire [% enddate | html %]. <a href="#" id="renewsub">Renew this subscription</a>.</div>
39 [% IF ( NEEDSCONFIRMATION ) %]
40 <div id="circ_needsconfirmation" class="dialog alert">
41 <h3>Please confirm subscription deletion</h3>
44 [% IF ( NOTEXPIRED ) %] <li>The subscription has not expired yet</li> [% END %]
45 [% IF ( LINKEDISSUES ) %] <li>The subscription has linked issues</li> [% END %]
46 [% IF ( LINKEDITEMS ) %] <li>The subscription has linked items<br /> Those items won't be deleted</li> [% END %]
48 <form method="post" action="/cgi-bin/koha/serials/subscription-detail.pl">
49 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
50 <input type="hidden" name="issueconfirmed" value="1" />
51 <input type="hidden" name="op" value="del" />
52 <button type="submit" class="approve" accesskey="y"><i class="fa fa-fw fa-check"></i> Yes, delete (Y)</button>
54 <form method="get" action="/cgi-bin/koha/serials/subscription-detail.pl">
55 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
56 <button type="submit" class="deny" accesskey="n"><i class="fa fa-fw fa-remove"></i> No, don't delete (N)</button>
60 [% END %] <!-- NEEDSCONFIRMATION -->
61 [% IF mana_code.defined %]
62 <div id="alert-community" class="dialog message">
64 [% mana_code | html %]
69 <div id="subscription_description" class="toptabs">
70 <ul class="ui-tabs-nav">
71 <li><a href="#subscription_info">Information</a></li>
72 <li><a href="#subscription_planning">Planning</a></li>
73 <li><a href="#subscription_issues">Issues</a></li>
74 <li><a href="#subscription_summary">Summary</a></li>
75 [% IF orders_grouped.size %]
77 <a href="#acquisition_details">Acquisition details</a>
82 <div id="subscription_info">
84 <div class="col-sm-6">
87 <li><span class="label">Subscription ID: </span>[% subscriptionid | html %]</li>
88 <li><span class="label">Librarian identity:</span> [% librarian | html %]</li>
89 <li><span class="label">Vendor:</span> <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% aqbooksellerid | uri %]">[% aqbooksellername | html %]</a></li>
90 <li><span class="label">Biblio:</span> <a href="/cgi-bin/koha/catalogue/[% default_bib_view | uri %].pl?biblionumber=[% bibnum | uri %]">[% bibliotitle | html %]</a> <i>([% bibnum | html %])</i></li>
91 [% IF ( OPACBaseURL ) %]
93 <span class="label">OPAC view:</span>
94 <a id="view-subscription-in-opac" target="_blank" href="[% Koha.Preference('OPACBaseURL') | url %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber | uri %]">Open in new window.</a>
97 [% IF ( branchcode ) %]<li><span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]</li>[% END %]
98 [% IF ( serialsadditems ) %]
99 <li><span class="label">Items:</span> Serial receipt creates an item record.</li>
101 <li><span class="label">Items:</span> Serial receipt does not create an item record.</li>
104 <span class="label">Serial number:</span>
105 [% IF skip_serialseq %]
106 Serial number is skipped when an irregularity is found.
108 Serial number is kept when an irregularity is found.
111 <li><span class="label">Grace period:</span> [% graceperiod | html %]</li>
115 <div class="col-sm-6">
118 [% IF ( location ) %]<li><span class="label">Location:</span> [% location | html %]</li>[% END %]
119 [% IF ( callnumber ) %]<li><span class="label">Call number:</span> [% callnumber | html %]</li>[% END %]
120 [% IF ( staffdisplaycount ) %]<li><span class="label">Number of issues to display to staff:</span>[% staffdisplaycount | html %]</li>[% END %]
121 [% IF ( opacdisplaycount ) %]<li><span class="label">Number of issues to display in OPAC:</span>[% opacdisplaycount | html %]</li>[% END %]
124 <span class="label">Patron notification:</span> [% letter | html %]
125 (<a href="/cgi-bin/koha/serials/viewalerts.pl?subscriptionid=[% subscriptionid | uri %]">subscribers</a>)
128 [% IF ( hasRouting ) %]<li><span class="label">Routing:</span> yes</li>[% END %]
134 [% IF available_additional_fields %]
137 <div class="col-sm-6">
138 <h3>Additional fields:</h3>
141 [% INCLUDE 'additional-fields-display.inc' available=available_additional_fields values=additional_field_values %]
149 <div id="subscription_planning">
151 <div class="col-sm-12">
154 <li><span class="label">Beginning date:</span> [% startdate | html %]
156 <li><span class="label">Frequency:</span>
157 [% frequency.description | html %]
160 <span class="label">Manual history: </span>
161 [% IF ( manualhistory ) %]
162 Enabled <a href="/cgi-bin/koha/serials/subscription-history.pl?subscriptionid=[% subscriptionid | uri %]">Edit history</a>
167 <li><span class="label">Number pattern:</span>
168 [% numberpattern.label | html %]
172 <td>Starting with:</td>
174 <td align="center">[% lastvalue1 | html %]</td>
177 <td align="center">[% lastvalue2 | html %]</td>
180 <td align="center">[% lastvalue3 | html %]</td>
186 <td align="center">[% numberpattern.whenmorethan1 | html %]</td>
189 <td align="center">[% numberpattern.whenmorethan2 | html %]</td>
192 <td align="center">[% numberpattern.whenmorethan3 | html %]</td>
196 [% IF ( irregular_issues ) %]
197 <li><span class="label">Irregularity:</span> [% irregular_issues | html %] issues
200 <li><span class="label">First arrival:</span> [% firstacquidate | html %]
202 [% IF ( numberlength ) %]<li><span class="label">Number of issues:</span> [% numberlength | html %]</li>[% END %]
203 [% IF ( weeklength ) %]<li><span class="label">Number of weeks:</span> [% weeklength | html %]</li>[% END %]
204 [% IF ( monthlength ) %]<li><span class="label">Number of months:</span> [% monthlength | html %]</li>[% END %]
210 <div id="subscription_numbering" style="display:none;">
211 <h3>Numbering calculation</h3>
212 <p><label>Numbering formula:</label> [% numberingmethod | html %]</p>
234 <td>[% every1 | html %]</td>
235 <td>[% every2 | html %]</td>
236 <td>[% every3 | html %]</td>
239 <td>When more than</td>
240 <td>[% whenmorethan1 | html %] [% IF ( innerloop1 ) %]<br />
241 <i>(is [% innerloop1 | html %])</i>[% END %]</td>
242 <td>[% whenmorethan2 | html %] [% IF ( innerloop2 ) %]<br />
243 <i>(is [% innerloop2 | html %])</i>[% END %]</td>
244 <td>[% whenmorethan3 | html %] [% IF ( innerloop3 ) %]<br />
245 <i>(is [% innerloop3 | html %])</i>[% END %]</td>
249 <td>[% setto1 | html %]</td>
250 <td>[% setto2 | html %]</td>
251 <td>[% setto3 | html %]</td>
257 <td>[% innerloop1 | html %]</td>
258 <td>[% innerloop2 | html %]</td>
259 <td>[% innerloop3 | html %]</td>
265 <td>[% lastvalue1 | html %]</td>
266 <td>[% lastvalue2 | html %]</td>
267 <td>[% lastvalue3 | html %]</td>
271 <div id="subscription_issues">
274 <th>Issue number</th>
275 <th>Planned date</th>
276 <th>Published date</th>
277 <th>Published date (text)</th>
280 [% FOREACH serialslis IN serialslist %]
283 [% serialslis.serialseq | html %]
286 [% IF serialslis.planneddate %]
287 [% serialslis.planneddate | html %]
293 [% IF serialslis.publisheddate %]
294 [% serialslis.publisheddate | html %]
300 [% serialslis.publisheddatetext | html %]
303 [% IF ( serialslis.status1 ) %]Expected[% END %]
304 [% IF ( serialslis.status2 ) %]Arrived[% END %]
305 [% IF ( serialslis.status3 ) %]Late[% END %]
306 [% IF ( serialslis.status4 ) %]Missing[% END %]
307 [% IF ( serialslis.status41 ) %]Missing (never received)[% END %]
308 [% IF ( serialslis.status42 ) %]Missing (sold out)[% END %]
309 [% IF ( serialslis.status43 ) %]Missing (damaged)[% END %]
310 [% IF ( serialslis.status44 ) %]Missing (lost)[% END %]
311 [% IF ( serialslis.status5 ) %]Not issued[% END %]
312 [% IF ( serialslis.status6 ) %]Delete[% END %]
313 [% IF ( serialslis.status7 ) %]
315 [% IF ( serialslis.claimdate ) %]
316 [% serialslis.claimdate | html %]
319 [% IF ( serialslis.status8 ) %]Stopped[% END %]
325 <div id="subscription_summary">
327 <div class="col-sm-12">
330 <li><span class="label">Start date:</span> [% startdate | html %] </li>
331 <li><span class="label">End date:</span> [% enddate | html %]</li>
332 <li><span class="label">History start date:</span> [% histstartdate | html %] </li>
333 <li><span class="label">History end date:</span> [% histenddate | html %]</li>
334 <li><span class="label">Received issues:</span>[% recievedlist | html %]</li>
335 <li><span class="label">Missing issues:</span>[% missinglist | html %]</li>
336 <li><span class="label">Nonpublic note:</span>[% internalnotes | html | html_line_break %]</li>
337 <li><span class="label">Public note:</span>[% notes | html | html_line_break %]</li>
338 <li><span class="label">History staff note:</span>[% librariannote | html | html_line_break %]</li>
339 <li><span class="label">History OPAC note:</span>[% opacnote | html | html_line_break %]</li>
346 [% IF orders_grouped.size %]
347 <div id="acquisition_details">
348 <h2>Acquisition details</h2>
351 <span class="actions">
352 <a href="#" id="hide_received_orders">Hide already received orders</a>
353 | <a href="#" id="show_all_orders">Show all orders</a></span>
360 <th>Order number</th>
361 <th class="title-string">Creation date</th>
362 <th class="title-string">Receive date</th>
363 <th class="title-string">Status</th>
364 <th>Internal note</th>
368 <th title="ecost tax exc. / ecost tax inc.">Ordered</th>
369 <th title="Actual cost tax exc. / Actual cost tax inc.">Spent</th>
373 [% FOR ordernumber IN orders_grouped.keys %]
374 [% SET parent_tree_id = loop.count %]
375 [% SET parent_order = orders_grouped.$ordernumber %]
376 <tr data-tt-id="[% parent_tree_id | html %]" class="highlighted-row">
377 <td></td> [%# invoice %]
379 [% IF CAN_user_acquisition_order_manage %]
380 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% order.basket.basketno | uri %]">[% parent_order.basket.basketname | html %] ([% parent_order.basket.basketno | html %])</a>
382 [% parent_order.basket.basketname | html %] ([% parent_order.basket.basketno | html %])
385 <td></td> [%# ordernumber %]
386 <td>[% parent_order.basket.creationdate | $KohaDates %]</td>
387 <td>[% parent_order.datereceived | $KohaDates %]</td>
389 [% SWITCH parent_order.orderstatus %]
390 [% CASE 'new' %]<span title="status_1">New</span>
391 [% CASE 'ordered' %]<span title="status_2">Ordered</span>
392 [% CASE 'partial' %]<span title="status_3">Partial</span>
393 [% CASE 'complete' %]<span title="status_4">Complete</span>
394 [% CASE 'cancelled' %]<span title="status_5">Cancelled</span>
397 <td></td> [%# internalnote %]
398 <td></td> [%# vendornote %]
399 <td></td> [%# fund %]
400 <td>[% parent_order.quantity | html %]</td>
401 <td>[% parent_order.ecost_tax_excluded | $Price %] / [% parent_order.ecost_tax_included | $Price %]</td>
402 <td>[% parent_order.unitprice_tax_excluded | $Price %] / [% parent_order.unitprice_tax_included | $Price %]</td>
404 [% FOR order IN parent_order.orders %]
405 <tr data-tt-id="0" data-tt-parent-id="[% parent_tree_id | html %]">
407 [% IF order.invoice %]
408 [% IF CAN_user_acquisition %]
409 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]" title="Invoice detail page">
410 [% order.invoice.invoicenumber | html %]</a>
412 [% order.invoice.invoicenumber | html %]
416 <td></td> [%# basket %]
417 <td>[% order.ordernumber | html %]</td>
418 <td><span title="[% order.basket.creationdate | uri %]">[% order.basket.creationdate | $KohaDates%]</span></td>
419 <td>[% IF order.datereceived %]<span title="[% order.datereceived | uri %]">[% order.datereceived | $KohaDates %]</span>[% END %]</td>
421 [% SWITCH order.orderstatus %]
422 [% CASE 'new' %]<span title="status_1">New</span>
423 [% CASE 'ordered' %]<span title="status_2">Ordered</span>
424 [% CASE 'partial' %]<span title="status_3">Partial</span>
425 [% CASE 'complete' %]<span title="status_4">Complete</span>
426 [% CASE 'cancelled' %]<span title="status_5">Cancelled</span>
429 <td>[% order.order_internalnote | html %]</td>
430 <td>[% order.order_vendornote | html %]</td>
431 <td>[% order.fund.budget_name | html %]</td>
432 <td>[% order.quantity | html %]</td>
434 [% UNLESS order.datereceived %]
435 [% order.ecost_tax_excluded * order.quantity | $Price %] / [% order.ecost_tax_included * order.quantity | $Price %]
439 [% IF order.datereceived %]
440 [%# FIXME What if unitprice has not been filled? %]
441 [% order.unitprice_tax_excluded * order.quantity | $Price %] / [% order.unitprice_tax_included * order.quantity | $Price %]
453 </div> <!-- /.col-sm-10.col-sm-push-2 -->
455 <div class="col-sm-2 col-sm-pull-10">
457 [% INCLUDE 'serials-menu.inc' %]
459 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
460 </div> <!-- /.row -->
462 [% MACRO jsinclude BLOCK %]
464 var subscriptionid = "[% subscriptionid | html %]";
465 var MSG_CLOSE_SUBSCRIPTION = _("Are you sure you want to close this subscription?");
466 var MSG_REOPEN_SUBSCRIPTION = _("Are you sure you want to reopen this subscription?");
467 var CONFIRM_DELETE_SUBSCRIPTION = _("Are you sure you want to delete this subscription?");
469 [% INCLUDE 'mana.inc' %]
470 [% Asset.js("js/serials-toolbar.js") | $raw %]
471 [% INCLUDE 'datatables.inc' %]
472 [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
473 [% INCLUDE 'columns_settings.inc' %]
475 // the english words used in display purposes
476 var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose Hemisphere:"),_("Northern"),_("Southern",
477 "Autumn"),_("Winter"),_("Spring"),_("Summer"),_("Fall"),_("Season"),_("Year"));
478 $(document).ready(function() {
479 $("#subscription_description").tabs();
480 $("#renewsub").click(function(){
481 popup([% subscriptionid | html %]);
485 var columns_settings = [% ColumnsSettings.GetColumns( 'serials', 'subscription-detail', 'orders', 'json' ) | $raw %];
486 var table = KohaTable("orders", {
488 { "bVisible": false, "aTargets": [ 'NoVisible' ] },
489 { "bSortable": false, "aTargets": ["_all"] },
490 { "aTargets": "title-string", "sType": "title-string" }
496 }, columns_settings);
498 [% IF orders_grouped.size %]
502 $(table).treetable('expandAll');
505 $("#hide_received_orders").click(function(e){
507 table.fnFilter( '^$', 4, true ); // Not empty "Receive date" columns
509 $("#show_all_orders").click(function(e){
511 table.fnFilter( '', 4 ); // Not filter, display all columns
513 $("#show_all_orders").click();
520 [% INCLUDE 'intranet-bottom.inc' %]