6 [% USE AuthorisedValues %]
8 [% USE TablesSettings %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>Details for subscription #[% subscriptionid | html %] › Serials › Koha</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 [% WRAPPER 'header.inc' %]
18 [% INCLUDE 'serials-search.inc' %]
21 [% WRAPPER 'sub-header.inc' %]
22 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
25 <a href="/cgi-bin/koha/mainpage.pl"><i class="fa fa-home"></i></a>
28 [% IF blocking_error %]
30 <a href="#" aria-current="page">
36 <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
39 <a href="#" aria-current="page">
40 Details for subscription #[% subscriptionid | html %]
48 <div class="main container-fluid">
50 <div class="col-sm-10 col-sm-push-2">
53 [% INCLUDE 'serials-toolbar.inc' %]
54 [% INCLUDE 'mana/mana-comment-status.inc' %]
56 <h1>Subscription for [% bibliotitle | html %] [% bibliosubtitle | html %] [% IF closed %](closed)[% END %]</h1>
58 [% IF ( abouttoexpire ) %]
60 <div class="dialog message">Subscription will expire [% enddate | html %]. <a href="#" id="renewsub">Renew this subscription</a>.</div>
64 [% IF ( NEEDSCONFIRMATION ) %]
65 <div id="circ_needsconfirmation" class="dialog alert">
66 <h3>Please confirm subscription deletion</h3>
69 [% IF ( NOTEXPIRED ) %] <li>The subscription has not expired yet</li> [% END %]
70 [% IF ( LINKEDISSUES ) %] <li>The subscription has linked issues</li> [% END %]
71 [% IF ( LINKEDITEMS ) %] <li>The subscription has linked items<br /> Those items won't be deleted</li> [% END %]
74 <form method="post" action="/cgi-bin/koha/serials/subscription-detail.pl">
75 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
76 <input type="hidden" name="issueconfirmed" value="1" />
77 <input type="hidden" name="op" value="del" />
78 <button type="submit" class="approve" accesskey="y"><i class="fa fa-fw fa-check"></i> Yes, delete (Y)</button>
81 <form method="get" action="/cgi-bin/koha/serials/subscription-detail.pl">
82 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
83 <button type="submit" class="deny" accesskey="n"><i class="fa fa-fw fa-remove"></i> No, don't delete (N)</button>
86 [% END # /IF NEEDSCONFIRMATION %]
88 [% IF mana_code.defined %]
89 <div id="alert-community" class="dialog message">
91 [% mana_code | html %]
96 <div id="subscription_description" class="toptabs">
97 <ul class="nav nav-tabs" role="tablist">
98 <li role="presentation" class="active">
99 <a href="#subscription_info" aria-controls="subscription_info" role="tab" data-toggle="tab">Information</a>
101 <li role="presentation">
102 <a href="#subscription_planning" aria-controls="subscription_planning" role="tab" data-toggle="tab">Planning</a>
104 <li role="presentation">
105 <a href="#subscription_issues" aria-controls="subscription_issues" role="tab" data-toggle="tab">Issues</a>
107 <li role="presentation">
108 <a href="#subscription_summary" aria-controls="subscription_summary" role="tab" data-toggle="tab">Summary</a>
110 [% IF orders_grouped.size %]
111 <li role="presentation">
112 <a href="#acquisition_details" aria-controls=" aria-controls="profile" role="tab" data-toggle="tab"" role="tab" data-toggle="tab">Acquisition details</a>
116 <div class="tab-content">
117 <div id="subscription_info" role="tabpanel" class="tab-pane active">
119 <div class="col-sm-6">
122 <li><span class="label">Subscription ID: </span>[% subscriptionid | html %]</li>
123 <li><span class="label">Librarian identity:</span> [% librarian | html %]</li>
124 <li><span class="label">Vendor:</span> <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% aqbooksellerid | uri %]">[% aqbooksellername | html %]</a></li>
125 <li><span class="label">Biblio:</span> <a href="[% PROCESS biblio_a_href biblionumber => bibnum %]">[% bibliotitle | html %] [% bibliosubtitle | html %]</a> <em>([% bibnum | html %])</em></li>
126 [% IF ( OPACBaseURL ) %]
128 <span class="label">OPAC view:</span>
129 <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>
132 [% IF ( branchcode ) %]
133 <li><span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]</li>
135 [% IF ( serialsadditems ) %]
136 <li><span class="label">Items:</span> Serial receipt creates an item record.</li>
138 <li><span class="label">Items:</span> Serial receipt does not create an item record.</li>
141 <span class="label">Serial number:</span>
142 [% IF skip_serialseq %]
143 Serial number is skipped when an irregularity is found.
145 Serial number is kept when an irregularity is found.
148 <li><span class="label">Grace period:</span> [% graceperiod | html %]</li>
150 </div> <!-- /.rows -->
151 </div> <!-- /.col-sm-6 -->
152 <div class="col-sm-6">
155 [% IF ( location ) %]<li><span class="label">Location:</span> [% location | html %]</li>[% END %]
156 [% IF ( callnumber ) %]<li><span class="label">Call number:</span> [% callnumber | html %]</li>[% END %]
157 [% IF ( ccode ) %]<li><span class="label">Collection:</span> [% ccode | html %]</li>[% END %]
158 [% IF ( staffdisplaycount ) %]<li><span class="label">Number of issues to display to staff:</span>[% staffdisplaycount | html %]</li>[% END %]
159 [% IF ( opacdisplaycount ) %]<li><span class="label">Number of issues to display in OPAC:</span>[% opacdisplaycount | html %]</li>[% END %]
162 <span class="label">Patron notification:</span> [% letter | html %]
163 (<a href="/cgi-bin/koha/serials/viewalerts.pl?subscriptionid=[% subscriptionid | uri %]">subscribers</a>)
166 [% IF ( hasRouting ) %]<li><span class="label">Routing:</span> yes</li>[% END %]
168 </div> <!-- /.rows -->
169 </div> <!-- /.col-sm-6 -->
170 </div> <!-- /.row -->
172 [% IF available_additional_fields.count %]
175 <div class="col-sm-6">
176 <h3>Additional fields:</h3>
179 [% INCLUDE 'additional-fields-display.inc' available=available_additional_fields values=additional_field_values %]
181 </div> <!-- /.rows -->
182 </div> <!-- /.col-sm-6 -->
183 </div> <!-- /.row -->
185 </div> <!-- /#subscription_info -->
187 <div id="subscription_planning" role="tabpanel" class="tab-pane">
189 <div class="col-sm-12">
193 <span class="label">Beginning date:</span>
194 [% startdate | html %]
197 <span class="label">Frequency:</span>
198 [% frequency.description | html %]
201 <span class="label">Manual history: </span>
202 [% IF ( manualhistory ) %]
203 Enabled <a href="/cgi-bin/koha/serials/subscription-history.pl?subscriptionid=[% subscriptionid | uri %]">Edit history</a>
209 <span class="label">Number pattern:</span>
210 [% numberpattern.label | html %]
215 <td>Starting with:</td>
217 <td>[% lastvalue1 | html %]</td>
220 <td>[% lastvalue2 | html %]</td>
223 <td>[% lastvalue3 | html %]</td>
229 <td>[% numberpattern.whenmorethan1 | html %]</td>
232 <td>[% numberpattern.whenmorethan2 | html %]</td>
235 <td>[% numberpattern.whenmorethan3 | html %]</td>
240 [% IF ( irregular_issues ) %]
242 <span class="label">Irregularity:</span>
243 [% irregular_issues | html %] issues
247 <span class="label">First arrival:</span>
248 [% firstacquidate | html %]
250 [% IF ( numberlength ) %]<li>
251 <span class="label">Number of issues:</span>
252 [% numberlength | html %]</li>
254 [% IF ( weeklength ) %]<li>
255 <span class="label">Number of weeks:</span>
256 [% weeklength | html %]</li>
258 [% IF ( monthlength ) %]<li>
259 <span class="label">Number of months:</span>
260 [% monthlength | html %]</li>
263 </div> <!-- /.rows -->
264 </div> <!-- /.col-sd-12 -->
265 </div> <!-- /.row -->
266 </div> <!-- /#subscription_planning -->
268 <div id="subscription_numbering" role="tabpanel" class="tab-pane" style="display:none">
269 <h3>Numbering calculation</h3>
270 <p><label>Numbering formula:</label> [% numberingmethod | html %]</p>
292 <td>[% every1 | html %]</td>
293 <td>[% every2 | html %]</td>
294 <td>[% every3 | html %]</td>
297 <td>When more than</td>
298 <td>[% whenmorethan1 | html %] [% IF ( innerloop1 ) %]<br />
299 <em>(is [% innerloop1 | html %])</em>[% END %]</td>
300 <td>[% whenmorethan2 | html %] [% IF ( innerloop2 ) %]<br />
301 <em>(is [% innerloop2 | html %])</em>[% END %]</td>
302 <td>[% whenmorethan3 | html %] [% IF ( innerloop3 ) %]<br />
303 <em>(is [% innerloop3 | html %])</em>[% END %]</td>
307 <td>[% setto1 | html %]</td>
308 <td>[% setto2 | html %]</td>
309 <td>[% setto3 | html %]</td>
315 <td>[% innerloop1 | html %]</td>
316 <td>[% innerloop2 | html %]</td>
317 <td>[% innerloop3 | html %]</td>
323 <td>[% lastvalue1 | html %]</td>
324 <td>[% lastvalue2 | html %]</td>
325 <td>[% lastvalue3 | html %]</td>
328 </div> <!-- /#subscription_numbering -->
330 <div id="subscription_issues" role="tabpanel" class="tab-pane">
333 <th>Issue number</th>
334 <th>Planned date</th>
335 <th>Published date</th>
336 <th>Published date (text)</th>
339 [% FOREACH serialslis IN serialslist %]
342 [% serialslis.serialseq | html %]
345 [% IF serialslis.planneddate %]
346 [% serialslis.planneddate | html %]
352 [% IF serialslis.publisheddate %]
353 [% serialslis.publisheddate | html %]
359 [% serialslis.publisheddatetext | html %]
362 [% IF ( serialslis.status1 ) %]<span>Expected</span>[% END %]
363 [% IF ( serialslis.status2 ) %]<span>Arrived</span>[% END %]
364 [% IF ( serialslis.status3 ) %]<span>Late</span>[% END %]
365 [% IF ( serialslis.status4 ) %]<span>Missing</span>[% END %]
366 [% IF ( serialslis.status41 ) %]<span>Missing (never received)</span>[% END %]
367 [% IF ( serialslis.status42 ) %]<span>Missing (sold out)</span>[% END %]
368 [% IF ( serialslis.status43 ) %]<span>Missing (damaged)</span>[% END %]
369 [% IF ( serialslis.status44 ) %]<span>Missing (lost)</span>[% END %]
370 [% IF ( serialslis.status5 ) %]<span>Not issued</span>[% END %]
371 [% IF ( serialslis.status6 ) %]<span>Delete</span>[% END %]
372 [% IF ( serialslis.status7 ) %]
374 [% IF ( serialslis.claimdate ) %]
375 [% serialslis.claimdate | html %]
378 [% IF ( serialslis.status8 ) %]<span>Stopped</span>[% END %]
381 [% END # /FOREACH serialslist %]
383 </div> <!-- /#subscription_issues -->
385 <div id="subscription_summary" role="tabpanel" class="tab-pane">
387 <div class="col-sm-12">
390 <li><span class="label">Start date:</span> [% startdate | html %] </li>
391 <li><span class="label">End date:</span> [% enddate | html %]</li>
392 <li><span class="label">History start date:</span> [% histstartdate | html %] </li>
393 <li><span class="label">History end date:</span> [% histenddate | html %]</li>
394 <li><span class="label">Received issues:</span>[% recievedlist | html | html_line_break %]</li>
395 <li><span class="label">Missing issues:</span>[% missinglist | html | html_line_break %]</li>
396 <li><span class="label">Nonpublic note:</span>[% internalnotes | html | html_line_break %]</li>
397 <li><span class="label">Public note:</span>[% notes | html | html_line_break %]</li>
398 <li><span class="label">History staff note:</span>[% librariannote | html | html_line_break %]</li>
399 <li><span class="label">History OPAC note:</span>[% opacnote | html | html_line_break %]</li>
401 </div> <!-- /.rows -->
402 </div> <!-- /.col-sm-12 -->
403 </div> <!-- /.row -->
404 </div> <!-- /#subscription_summary -->
406 [% IF orders_grouped.size %]
407 <div id="acquisition_details" role="tabpanel" class="tab-pane">
408 <h2>Acquisition details</h2>
411 <span class="actions">
412 <a href="#" id="hide_received_orders">Hide already received orders</a>
413 | <a href="#" id="show_all_orders">Show all orders</a>
414 | <a href="#" id="expand_all">Expand all</a>
415 | <a href="#" id="collapse_all">Collapse all</a>
422 <th>Order number</th>
423 <th>Creation date</th>
424 <th>Receive date</th>
426 <th>Internal note</th>
430 <th title="ecost tax exc. / ecost tax inc.">Ordered</th>
431 <th title="Actual cost tax exc. / Actual cost tax inc.">Spent</th>
435 [% FOR ordernumber IN orders_grouped.keys %]
436 [% SET parent_tree_id = loop.count %]
437 [% SET parent_order = orders_grouped.$ordernumber %]
438 <tr data-tt-id="[% parent_tree_id | html %]" class="highlighted-row">
439 <td></td> [%# invoice %]
441 [% IF CAN_user_acquisition_order_manage %]
442 <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>
444 [% parent_order.basket.basketname | html %] ([% parent_order.basket.basketno | html %])
447 <td></td> [%# ordernumber %]
448 <td>[% parent_order.basket.creationdate | $KohaDates %]</td>
449 <td>[% parent_order.datereceived | $KohaDates %]</td>
451 [% SWITCH parent_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></td> [%# internalnote %]
460 <td></td> [%# vendornote %]
461 <td></td> [%# fund %]
462 <td>[% parent_order.quantity | html %]</td>
463 <td>[% parent_order.ecost_tax_excluded | $Price %] / [% parent_order.ecost_tax_included | $Price %]</td>
464 <td>[% parent_order.unitprice_tax_excluded | $Price %] / [% parent_order.unitprice_tax_included | $Price %]</td>
466 [% FOR order IN parent_order.orders %]
467 <tr data-tt-id="0" data-tt-parent-id="[% parent_tree_id | html %]">
469 [% IF order.invoice %]
470 [% IF CAN_user_acquisition %]
471 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]" title="Invoice detail page">
472 [% order.invoice.invoicenumber | html %]</a>
474 [% order.invoice.invoicenumber | html %]
478 <td></td> [%# basket %]
479 <td>[% order.ordernumber | html %]</td>
480 <td data-order="[% order.basket.creationdate | uri %]">[% order.basket.creationdate | $KohaDates%]</td>
481 <td data-order="[% order.datereceived | uri %]">[% order.datereceived | $KohaDates %]</td>
482 [% SWITCH order.orderstatus %]
483 [% CASE 'new' %]<td data-order="status_1"><span>New</span>
484 [% CASE 'ordered' %]<td data-order="status_2"><span>Ordered</span>
485 [% CASE 'partial' %]<td data-order="status_3"><span>Partial</span>
486 [% CASE 'complete' %]<td data-order="status_4"><span>Complete</span>
487 [% CASE 'cancelled' %]<td data-order="status_5"><span>Cancelled</span>
490 <td>[% order.order_internalnote | html %]</td>
491 <td>[% order.order_vendornote | html %]</td>
492 <td>[% order.fund.budget_name | html %]</td>
493 <td>[% order.quantity | html %]</td>
495 [% UNLESS order.datereceived %]
496 [% order.ecost_tax_excluded * order.quantity | $Price %] / [% order.ecost_tax_included * order.quantity | $Price %]
500 [% IF order.datereceived %]
501 [%# FIXME What if unitprice has not been filled? %]
502 [% order.unitprice_tax_excluded * order.quantity | $Price %] / [% order.unitprice_tax_included * order.quantity | $Price %]
506 [% END # /FOR order %]
507 [% END # /FOR ordernumber %]
509 </table> <!-- /#orders -->
510 </div> <!-- /#acquisition_details -->
511 [% END # IF orders_grouped.size %]
512 </div> <!-- /.tab-content -->
513 </div> <!-- /#subscription_description -->
515 </div> <!-- /.col-sm-10.col-sm-push-2 -->
517 <div class="col-sm-2 col-sm-pull-10">
519 [% INCLUDE 'serials-menu.inc' %]
521 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
522 </div> <!-- /.row -->
524 [% MACRO jsinclude BLOCK %]
526 var subscriptionid = "[% subscriptionid | html %]";
528 [% Asset.js("js/serials-toolbar.js") | $raw %]
529 [% Asset.js("js/mana.js") | $raw %]
530 [% INCLUDE 'datatables.inc' %]
531 [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
532 [% INCLUDE 'columns_settings.inc' %]
534 // the english words used in display purposes
535 var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose hemisphere:"),_("Northern"),_("Southern",
536 "Autumn"),_("Winter"),_("Spring"),_("Summer"),_("Fall"),_("Season"),_("Year"));
537 $(document).ready(function() {
539 $("#renewsub").click(function(){
540 popup([% subscriptionid | html %]);
544 var table_settings = [% TablesSettings.GetTableSettings( 'serials', 'subscription-detail', 'orders', 'json' ) | $raw %];
545 var table = KohaTable("orders", {
547 { "bVisible": false, "aTargets": [ 'NoVisible' ] },
548 { "bSortable": false, "aTargets": ["_all"] },
556 [% IF orders_grouped.size %]
559 initialState: 'expanded',
561 $(table).treetable('expandAll');
563 $("#expand_all").click(function(e){
565 $(table).treetable('expandAll');
567 $("#collapse_all").click(function(e){
569 $(table).treetable('collapseAll');
574 $("#hide_received_orders").click(function(e){
576 table.fnFilter( '^$', 4, true ); // Not empty "Receive date" columns
578 $("#show_all_orders").click(function(e){
580 table.fnFilter( '', 4 ); // Not filter, display all columns
582 $("#show_all_orders").click();
585 function mana_comment_close(){
586 $("#selected_id").val("");
587 $("#mana-resource-id").val("");
588 $("#mana-comment").val("");
589 $("#mana-comment-box").modal("hide");
594 [% INCLUDE 'intranet-bottom.inc' %]