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' %]
32 [% INCLUDE 'mana/mana-comment-status.inc' %]
34 <h1>Subscription for [% bibliotitle | html %] [% IF closed %](closed)[% END %]</h1>
36 [% IF ( abouttoexpire ) %]
38 <div class="dialog message">Subscription will expire [% enddate | html %]. <a href="#" id="renewsub">Renew this subscription</a>.</div>
42 [% IF ( NEEDSCONFIRMATION ) %]
43 <div id="circ_needsconfirmation" class="dialog alert">
44 <h3>Please confirm subscription deletion</h3>
47 [% IF ( NOTEXPIRED ) %] <li>The subscription has not expired yet</li> [% END %]
48 [% IF ( LINKEDISSUES ) %] <li>The subscription has linked issues</li> [% END %]
49 [% IF ( LINKEDITEMS ) %] <li>The subscription has linked items<br /> Those items won't be deleted</li> [% END %]
52 <form method="post" action="/cgi-bin/koha/serials/subscription-detail.pl">
53 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
54 <input type="hidden" name="issueconfirmed" value="1" />
55 <input type="hidden" name="op" value="del" />
56 <button type="submit" class="approve" accesskey="y"><i class="fa fa-fw fa-check"></i> Yes, delete (Y)</button>
59 <form method="get" action="/cgi-bin/koha/serials/subscription-detail.pl">
60 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
61 <button type="submit" class="deny" accesskey="n"><i class="fa fa-fw fa-remove"></i> No, don't delete (N)</button>
64 [% END %] <!-- NEEDSCONFIRMATION -->
66 [% IF mana_code.defined %]
67 <div id="alert-community" class="dialog message">
69 [% mana_code | html %]
74 <div id="subscription_description" class="toptabs">
75 <ul class="ui-tabs-nav">
76 <li><a href="#subscription_info">Information</a></li>
77 <li><a href="#subscription_planning">Planning</a></li>
78 <li><a href="#subscription_issues">Issues</a></li>
79 <li><a href="#subscription_summary">Summary</a></li>
80 [% IF orders_grouped.size %]
82 <a href="#acquisition_details">Acquisition details</a>
87 <div id="subscription_info">
89 <div class="col-sm-6">
92 <li><span class="label">Subscription ID: </span>[% subscriptionid | html %]</li>
93 <li><span class="label">Librarian identity:</span> [% librarian | html %]</li>
94 <li><span class="label">Vendor:</span> <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% aqbooksellerid | uri %]">[% aqbooksellername | html %]</a></li>
95 <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>
96 [% IF ( OPACBaseURL ) %]
98 <span class="label">OPAC view:</span>
99 <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>
102 [% IF ( branchcode ) %]
103 <li><span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]</li>
105 [% IF ( serialsadditems ) %]
106 <li><span class="label">Items:</span> Serial receipt creates an item record.</li>
108 <li><span class="label">Items:</span> Serial receipt does not create an item record.</li>
111 <span class="label">Serial number:</span>
112 [% IF skip_serialseq %]
113 Serial number is skipped when an irregularity is found.
115 Serial number is kept when an irregularity is found.
118 <li><span class="label">Grace period:</span> [% graceperiod | html %]</li>
122 <div class="col-sm-6">
125 [% IF ( location ) %]<li><span class="label">Location:</span> [% location | html %]</li>[% END %]
126 [% IF ( callnumber ) %]<li><span class="label">Call number:</span> [% callnumber | html %]</li>[% END %]
127 [% IF ( staffdisplaycount ) %]<li><span class="label">Number of issues to display to staff:</span>[% staffdisplaycount | html %]</li>[% END %]
128 [% IF ( opacdisplaycount ) %]<li><span class="label">Number of issues to display in OPAC:</span>[% opacdisplaycount | html %]</li>[% END %]
131 <span class="label">Patron notification:</span> [% letter | html %]
132 (<a href="/cgi-bin/koha/serials/viewalerts.pl?subscriptionid=[% subscriptionid | uri %]">subscribers</a>)
135 [% IF ( hasRouting ) %]<li><span class="label">Routing:</span> yes</li>[% END %]
141 [% IF available_additional_fields %]
144 <div class="col-sm-6">
145 <h3>Additional fields:</h3>
148 [% INCLUDE 'additional-fields-display.inc' available=available_additional_fields values=additional_field_values %]
156 <div id="subscription_planning">
158 <div class="col-sm-12">
162 <span class="label">Beginning date:</span>
163 [% startdate | html %]
166 <span class="label">Frequency:</span>
167 [% frequency.description | html %]
170 <span class="label">Manual history: </span>
171 [% IF ( manualhistory ) %]
172 Enabled <a href="/cgi-bin/koha/serials/subscription-history.pl?subscriptionid=[% subscriptionid | uri %]">Edit history</a>
178 <span class="label">Number pattern:</span>
179 [% numberpattern.label | html %]
184 <td>Starting with:</td>
186 <td>[% lastvalue1 | html %]</td>
189 <td>[% lastvalue2 | html %]</td>
192 <td>[% lastvalue3 | html %]</td>
198 <td>[% numberpattern.whenmorethan1 | html %]</td>
201 <td>[% numberpattern.whenmorethan2 | html %]</td>
204 <td>[% numberpattern.whenmorethan3 | html %]</td>
209 [% IF ( irregular_issues ) %]
211 <span class="label">Irregularity:</span>
212 [% irregular_issues | html %] issues
216 <span class="label">First arrival:</span>
217 [% firstacquidate | html %]
219 [% IF ( numberlength ) %]<li>
220 <span class="label">Number of issues:</span>
221 [% numberlength | html %]</li>
223 [% IF ( weeklength ) %]<li>
224 <span class="label">Number of weeks:</span>
225 [% weeklength | html %]</li>
227 [% IF ( monthlength ) %]<li>
228 <span class="label">Number of months:</span>
229 [% monthlength | html %]</li>
237 <div id="subscription_numbering" style="display:none;">
238 <h3>Numbering calculation</h3>
239 <p><label>Numbering formula:</label> [% numberingmethod | html %]</p>
261 <td>[% every1 | html %]</td>
262 <td>[% every2 | html %]</td>
263 <td>[% every3 | html %]</td>
266 <td>When more than</td>
267 <td>[% whenmorethan1 | html %] [% IF ( innerloop1 ) %]<br />
268 <i>(is [% innerloop1 | html %])</i>[% END %]</td>
269 <td>[% whenmorethan2 | html %] [% IF ( innerloop2 ) %]<br />
270 <i>(is [% innerloop2 | html %])</i>[% END %]</td>
271 <td>[% whenmorethan3 | html %] [% IF ( innerloop3 ) %]<br />
272 <i>(is [% innerloop3 | html %])</i>[% END %]</td>
276 <td>[% setto1 | html %]</td>
277 <td>[% setto2 | html %]</td>
278 <td>[% setto3 | html %]</td>
284 <td>[% innerloop1 | html %]</td>
285 <td>[% innerloop2 | html %]</td>
286 <td>[% innerloop3 | html %]</td>
292 <td>[% lastvalue1 | html %]</td>
293 <td>[% lastvalue2 | html %]</td>
294 <td>[% lastvalue3 | html %]</td>
298 <div id="subscription_issues">
301 <th>Issue number</th>
302 <th>Planned date</th>
303 <th>Published date</th>
304 <th>Published date (text)</th>
307 [% FOREACH serialslis IN serialslist %]
310 [% serialslis.serialseq | html %]
313 [% IF serialslis.planneddate %]
314 [% serialslis.planneddate | html %]
320 [% IF serialslis.publisheddate %]
321 [% serialslis.publisheddate | html %]
327 [% serialslis.publisheddatetext | html %]
330 [% IF ( serialslis.status1 ) %]Expected[% END %]
331 [% IF ( serialslis.status2 ) %]Arrived[% END %]
332 [% IF ( serialslis.status3 ) %]Late[% END %]
333 [% IF ( serialslis.status4 ) %]Missing[% END %]
334 [% IF ( serialslis.status41 ) %]Missing (never received)[% END %]
335 [% IF ( serialslis.status42 ) %]Missing (sold out)[% END %]
336 [% IF ( serialslis.status43 ) %]Missing (damaged)[% END %]
337 [% IF ( serialslis.status44 ) %]Missing (lost)[% END %]
338 [% IF ( serialslis.status5 ) %]Not issued[% END %]
339 [% IF ( serialslis.status6 ) %]Delete[% END %]
340 [% IF ( serialslis.status7 ) %]
342 [% IF ( serialslis.claimdate ) %]
343 [% serialslis.claimdate | html %]
346 [% IF ( serialslis.status8 ) %]Stopped[% END %]
353 <div id="subscription_summary">
355 <div class="col-sm-12">
358 <li><span class="label">Start date:</span> [% startdate | html %] </li>
359 <li><span class="label">End date:</span> [% enddate | html %]</li>
360 <li><span class="label">History start date:</span> [% histstartdate | html %] </li>
361 <li><span class="label">History end date:</span> [% histenddate | html %]</li>
362 <li><span class="label">Received issues:</span>[% recievedlist | html | html_line_break %]</li>
363 <li><span class="label">Missing issues:</span>[% missinglist | html | html_line_break %]</li>
364 <li><span class="label">Nonpublic note:</span>[% internalnotes | html | html_line_break %]</li>
365 <li><span class="label">Public note:</span>[% notes | html | html_line_break %]</li>
366 <li><span class="label">History staff note:</span>[% librariannote | html | html_line_break %]</li>
367 <li><span class="label">History OPAC note:</span>[% opacnote | html | html_line_break %]</li>
374 [% IF orders_grouped.size %]
375 <div id="acquisition_details">
376 <h2>Acquisition details</h2>
379 <span class="actions">
380 <a href="#" id="hide_received_orders">Hide already received orders</a>
381 | <a href="#" id="show_all_orders">Show all orders</a>
382 | <a href="#" id="expand_all">Expand all</a>
383 | <a href="#" id="collapse_all">Collapse all</a>
390 <th>Order number</th>
391 <th class="title-string">Creation date</th>
392 <th class="title-string">Receive date</th>
393 <th class="title-string">Status</th>
394 <th>Internal note</th>
398 <th title="ecost tax exc. / ecost tax inc.">Ordered</th>
399 <th title="Actual cost tax exc. / Actual cost tax inc.">Spent</th>
403 [% FOR ordernumber IN orders_grouped.keys %]
404 [% SET parent_tree_id = loop.count %]
405 [% SET parent_order = orders_grouped.$ordernumber %]
406 <tr data-tt-id="[% parent_tree_id | html %]" class="highlighted-row">
407 <td></td> [%# invoice %]
409 [% IF CAN_user_acquisition_order_manage %]
410 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% order.basket.basketno | uri %]">[% parent_order.basket.basketname | html %] ([% parent_order.basket.basketno | html %])</a>
412 [% parent_order.basket.basketname | html %] ([% parent_order.basket.basketno | html %])
415 <td></td> [%# ordernumber %]
416 <td>[% parent_order.basket.creationdate | $KohaDates %]</td>
417 <td>[% parent_order.datereceived | $KohaDates %]</td>
419 [% SWITCH parent_order.orderstatus %]
420 [% CASE 'new' %]<span title="status_1">New</span>
421 [% CASE 'ordered' %]<span title="status_2">Ordered</span>
422 [% CASE 'partial' %]<span title="status_3">Partial</span>
423 [% CASE 'complete' %]<span title="status_4">Complete</span>
424 [% CASE 'cancelled' %]<span title="status_5">Cancelled</span>
427 <td></td> [%# internalnote %]
428 <td></td> [%# vendornote %]
429 <td></td> [%# fund %]
430 <td>[% parent_order.quantity | html %]</td>
431 <td>[% parent_order.ecost_tax_excluded | $Price %] / [% parent_order.ecost_tax_included | $Price %]</td>
432 <td>[% parent_order.unitprice_tax_excluded | $Price %] / [% parent_order.unitprice_tax_included | $Price %]</td>
434 [% FOR order IN parent_order.orders %]
435 <tr data-tt-id="0" data-tt-parent-id="[% parent_tree_id | html %]">
437 [% IF order.invoice %]
438 [% IF CAN_user_acquisition %]
439 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]" title="Invoice detail page">
440 [% order.invoice.invoicenumber | html %]</a>
442 [% order.invoice.invoicenumber | html %]
446 <td></td> [%# basket %]
447 <td>[% order.ordernumber | html %]</td>
448 <td><span title="[% order.basket.creationdate | uri %]">[% order.basket.creationdate | $KohaDates%]</span></td>
449 <td>[% IF order.datereceived %]<span title="[% order.datereceived | uri %]">[% order.datereceived | $KohaDates %]</span>[% END %]</td>
451 [% SWITCH order.orderstatus %]
452 [% CASE 'new' %]<span title="status_1">New</span>
453 [% CASE 'ordered' %]<span title="status_2">Ordered</span>
454 [% CASE 'partial' %]<span title="status_3">Partial</span>
455 [% CASE 'complete' %]<span title="status_4">Complete</span>
456 [% CASE 'cancelled' %]<span title="status_5">Cancelled</span>
459 <td>[% order.order_internalnote | html %]</td>
460 <td>[% order.order_vendornote | html %]</td>
461 <td>[% order.fund.budget_name | html %]</td>
462 <td>[% order.quantity | html %]</td>
464 [% UNLESS order.datereceived %]
465 [% order.ecost_tax_excluded * order.quantity | $Price %] / [% order.ecost_tax_included * order.quantity | $Price %]
469 [% IF order.datereceived %]
470 [%# FIXME What if unitprice has not been filled? %]
471 [% order.unitprice_tax_excluded * order.quantity | $Price %] / [% order.unitprice_tax_included * order.quantity | $Price %]
483 </div> <!-- /.col-sm-10.col-sm-push-2 -->
485 <div class="col-sm-2 col-sm-pull-10">
487 [% INCLUDE 'serials-menu.inc' %]
489 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
490 </div> <!-- /.row -->
492 [% MACRO jsinclude BLOCK %]
494 var subscriptionid = "[% subscriptionid | html %]";
495 var MSG_CLOSE_SUBSCRIPTION = _("Are you sure you want to close this subscription?");
496 var MSG_REOPEN_SUBSCRIPTION = _("Are you sure you want to reopen this subscription?");
497 var CONFIRM_DELETE_SUBSCRIPTION = _("Are you sure you want to delete this subscription?");
499 [% Asset.js("js/serials-toolbar.js") | $raw %]
500 [% Asset.js("js/mana.js") | $raw %]
501 [% INCLUDE 'datatables.inc' %]
502 [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
503 [% INCLUDE 'columns_settings.inc' %]
505 // the english words used in display purposes
506 var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose Hemisphere:"),_("Northern"),_("Southern",
507 "Autumn"),_("Winter"),_("Spring"),_("Summer"),_("Fall"),_("Season"),_("Year"));
508 $(document).ready(function() {
509 $("#subscription_description").tabs();
510 $("#renewsub").click(function(){
511 popup([% subscriptionid | html %]);
515 var columns_settings = [% ColumnsSettings.GetColumns( 'serials', 'subscription-detail', 'orders', 'json' ) | $raw %];
516 var table = KohaTable("orders", {
518 { "bVisible": false, "aTargets": [ 'NoVisible' ] },
519 { "bSortable": false, "aTargets": ["_all"] },
520 { "aTargets": "title-string", "sType": "title-string" }
526 }, columns_settings);
528 [% IF orders_grouped.size %]
531 initialState: 'expanded',
533 $(table).treetable('expandAll');
535 $("#expand_all").click(function(e){
537 $(table).treetable('expandAll');
539 $("#collapse_all").click(function(e){
541 $(table).treetable('collapseAll');
546 $("#hide_received_orders").click(function(e){
548 table.fnFilter( '^$', 4, true ); // Not empty "Receive date" columns
550 $("#show_all_orders").click(function(e){
552 table.fnFilter( '', 4 ); // Not filter, display all columns
554 $("#show_all_orders").click();
557 function mana_comment_close(){
558 $("#selected_id").val("");
559 $("#mana-resource-id").val("");
560 $("#mana-comment").val("");
561 $("#mana-comment-box").modal("hide");
566 [% INCLUDE 'intranet-bottom.inc' %]