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 # /IF 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>
120 </div> <!-- /.rows -->
121 </div> <!-- /.col-sm-6 -->
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 %]
137 </div> <!-- /.rows -->
138 </div> <!-- /.col-sm-6 -->
139 </div> <!-- /.row -->
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 %]
150 </div> <!-- /.rows -->
151 </div> <!-- /.col-sm-6 -->
152 </div> <!-- /.row -->
154 </div> <!-- /#subscription_info -->
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>
232 </div> <!-- /.rows -->
233 </div> <!-- /.col-sd-12 -->
234 </div> <!-- /.row -->
235 </div> <!-- /#subscription_planning -->
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>
297 </div> <!-- /#subscription_numbering -->
299 <div id="subscription_issues">
302 <th>Issue number</th>
303 <th>Planned date</th>
304 <th>Published date</th>
305 <th>Published date (text)</th>
308 [% FOREACH serialslis IN serialslist %]
311 [% serialslis.serialseq | html %]
314 [% IF serialslis.planneddate %]
315 [% serialslis.planneddate | html %]
321 [% IF serialslis.publisheddate %]
322 [% serialslis.publisheddate | html %]
328 [% serialslis.publisheddatetext | html %]
331 [% IF ( serialslis.status1 ) %]Expected[% END %]
332 [% IF ( serialslis.status2 ) %]Arrived[% END %]
333 [% IF ( serialslis.status3 ) %]Late[% END %]
334 [% IF ( serialslis.status4 ) %]Missing[% END %]
335 [% IF ( serialslis.status41 ) %]Missing (never received)[% END %]
336 [% IF ( serialslis.status42 ) %]Missing (sold out)[% END %]
337 [% IF ( serialslis.status43 ) %]Missing (damaged)[% END %]
338 [% IF ( serialslis.status44 ) %]Missing (lost)[% END %]
339 [% IF ( serialslis.status5 ) %]Not issued[% END %]
340 [% IF ( serialslis.status6 ) %]Delete[% END %]
341 [% IF ( serialslis.status7 ) %]
343 [% IF ( serialslis.claimdate ) %]
344 [% serialslis.claimdate | html %]
347 [% IF ( serialslis.status8 ) %]Stopped[% END %]
350 [% END # /FOREACH serialslist %]
352 </div> <!-- /#subscription_issues -->
354 <div id="subscription_summary">
356 <div class="col-sm-12">
359 <li><span class="label">Start date:</span> [% startdate | html %] </li>
360 <li><span class="label">End date:</span> [% enddate | html %]</li>
361 <li><span class="label">History start date:</span> [% histstartdate | html %] </li>
362 <li><span class="label">History end date:</span> [% histenddate | html %]</li>
363 <li><span class="label">Received issues:</span>[% recievedlist | html | html_line_break %]</li>
364 <li><span class="label">Missing issues:</span>[% missinglist | html | html_line_break %]</li>
365 <li><span class="label">Nonpublic note:</span>[% internalnotes | html | html_line_break %]</li>
366 <li><span class="label">Public note:</span>[% notes | html | html_line_break %]</li>
367 <li><span class="label">History staff note:</span>[% librariannote | html | html_line_break %]</li>
368 <li><span class="label">History OPAC note:</span>[% opacnote | html | html_line_break %]</li>
370 </div> <!-- /.rows -->
371 </div> <!-- /.col-sm-12 -->
372 </div> <!-- /.row -->
373 </div> <!-- /#subscription_summary -->
375 [% IF orders_grouped.size %]
376 <div id="acquisition_details">
377 <h2>Acquisition details</h2>
380 <span class="actions">
381 <a href="#" id="hide_received_orders">Hide already received orders</a>
382 | <a href="#" id="show_all_orders">Show all orders</a>
383 | <a href="#" id="expand_all">Expand all</a>
384 | <a href="#" id="collapse_all">Collapse all</a>
391 <th>Order number</th>
392 <th class="title-string">Creation date</th>
393 <th class="title-string">Receive date</th>
394 <th class="title-string">Status</th>
395 <th>Internal note</th>
399 <th title="ecost tax exc. / ecost tax inc.">Ordered</th>
400 <th title="Actual cost tax exc. / Actual cost tax inc.">Spent</th>
404 [% FOR ordernumber IN orders_grouped.keys %]
405 [% SET parent_tree_id = loop.count %]
406 [% SET parent_order = orders_grouped.$ordernumber %]
407 <tr data-tt-id="[% parent_tree_id | html %]" class="highlighted-row">
408 <td></td> [%# invoice %]
410 [% IF CAN_user_acquisition_order_manage %]
411 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% parent_order.basket.basketno | uri %]">[% parent_order.basket.basketname | html %] ([% parent_order.basket.basketno | html %])</a>
413 [% parent_order.basket.basketname | html %] ([% parent_order.basket.basketno | html %])
416 <td></td> [%# ordernumber %]
417 <td>[% parent_order.basket.creationdate | $KohaDates %]</td>
418 <td>[% parent_order.datereceived | $KohaDates %]</td>
420 [% SWITCH parent_order.orderstatus %]
421 [% CASE 'new' %]<span title="status_1">New</span>
422 [% CASE 'ordered' %]<span title="status_2">Ordered</span>
423 [% CASE 'partial' %]<span title="status_3">Partial</span>
424 [% CASE 'complete' %]<span title="status_4">Complete</span>
425 [% CASE 'cancelled' %]<span title="status_5">Cancelled</span>
428 <td></td> [%# internalnote %]
429 <td></td> [%# vendornote %]
430 <td></td> [%# fund %]
431 <td>[% parent_order.quantity | html %]</td>
432 <td>[% parent_order.ecost_tax_excluded | $Price %] / [% parent_order.ecost_tax_included | $Price %]</td>
433 <td>[% parent_order.unitprice_tax_excluded | $Price %] / [% parent_order.unitprice_tax_included | $Price %]</td>
435 [% FOR order IN parent_order.orders %]
436 <tr data-tt-id="0" data-tt-parent-id="[% parent_tree_id | html %]">
438 [% IF order.invoice %]
439 [% IF CAN_user_acquisition %]
440 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]" title="Invoice detail page">
441 [% order.invoice.invoicenumber | html %]</a>
443 [% order.invoice.invoicenumber | html %]
447 <td></td> [%# basket %]
448 <td>[% order.ordernumber | html %]</td>
449 <td><span title="[% order.basket.creationdate | uri %]">[% order.basket.creationdate | $KohaDates%]</span></td>
450 <td>[% IF order.datereceived %]<span title="[% order.datereceived | uri %]">[% order.datereceived | $KohaDates %]</span>[% END %]</td>
452 [% SWITCH order.orderstatus %]
453 [% CASE 'new' %]<span title="status_1">New</span>
454 [% CASE 'ordered' %]<span title="status_2">Ordered</span>
455 [% CASE 'partial' %]<span title="status_3">Partial</span>
456 [% CASE 'complete' %]<span title="status_4">Complete</span>
457 [% CASE 'cancelled' %]<span title="status_5">Cancelled</span>
460 <td>[% order.order_internalnote | html %]</td>
461 <td>[% order.order_vendornote | html %]</td>
462 <td>[% order.fund.budget_name | html %]</td>
463 <td>[% order.quantity | html %]</td>
465 [% UNLESS order.datereceived %]
466 [% order.ecost_tax_excluded * order.quantity | $Price %] / [% order.ecost_tax_included * order.quantity | $Price %]
470 [% IF order.datereceived %]
471 [%# FIXME What if unitprice has not been filled? %]
472 [% order.unitprice_tax_excluded * order.quantity | $Price %] / [% order.unitprice_tax_included * order.quantity | $Price %]
476 [% END # /FOR order %]
477 [% END # /FOR ordernumber %]
479 </table> <!-- /#orders -->
480 </div> <!-- /#acquisition_details -->
481 [% END # IF orders_grouped.size %]
482 </div> <!-- /#subscription_description -->
484 </div> <!-- /.col-sm-10.col-sm-push-2 -->
486 <div class="col-sm-2 col-sm-pull-10">
488 [% INCLUDE 'serials-menu.inc' %]
490 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
491 </div> <!-- /.row -->
493 [% MACRO jsinclude BLOCK %]
495 var subscriptionid = "[% subscriptionid | html %]";
496 var MSG_CLOSE_SUBSCRIPTION = _("Are you sure you want to close this subscription?");
497 var MSG_REOPEN_SUBSCRIPTION = _("Are you sure you want to reopen this subscription?");
498 var CONFIRM_DELETE_SUBSCRIPTION = _("Are you sure you want to delete this subscription?");
500 [% Asset.js("js/serials-toolbar.js") | $raw %]
501 [% Asset.js("js/mana.js") | $raw %]
502 [% INCLUDE 'datatables.inc' %]
503 [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
504 [% INCLUDE 'columns_settings.inc' %]
506 // the english words used in display purposes
507 var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose Hemisphere:"),_("Northern"),_("Southern",
508 "Autumn"),_("Winter"),_("Spring"),_("Summer"),_("Fall"),_("Season"),_("Year"));
509 $(document).ready(function() {
510 $("#subscription_description").tabs();
511 $("#renewsub").click(function(){
512 popup([% subscriptionid | html %]);
516 var columns_settings = [% ColumnsSettings.GetColumns( 'serials', 'subscription-detail', 'orders', 'json' ) | $raw %];
517 var table = KohaTable("orders", {
519 { "bVisible": false, "aTargets": [ 'NoVisible' ] },
520 { "bSortable": false, "aTargets": ["_all"] },
521 { "aTargets": "title-string", "sType": "title-string" }
527 }, columns_settings);
529 [% IF orders_grouped.size %]
532 initialState: 'expanded',
534 $(table).treetable('expandAll');
536 $("#expand_all").click(function(e){
538 $(table).treetable('expandAll');
540 $("#collapse_all").click(function(e){
542 $(table).treetable('collapseAll');
547 $("#hide_received_orders").click(function(e){
549 table.fnFilter( '^$', 4, true ); // Not empty "Receive date" columns
551 $("#show_all_orders").click(function(e){
553 table.fnFilter( '', 4 ); // Not filter, display all columns
555 $("#show_all_orders").click();
558 function mana_comment_close(){
559 $("#selected_id").val("");
560 $("#mana-resource-id").val("");
561 $("#mana-comment").val("");
562 $("#mana-comment-box").modal("hide");
567 [% INCLUDE 'intranet-bottom.inc' %]