6 [% USE AuthorisedValues %]
8 [% USE TablesSettings %]
10 [%- PROCESS 'html_helpers.inc' -%]
11 [% INCLUDE 'doc-head-open.inc' %]
12 <title>Details for subscription #[% subscriptionid | html %] › Serials › Koha</title>
13 [% INCLUDE 'doc-head-close.inc' %]
14 [% Asset.css("lib/jquery/plugins/treetable/stylesheets/jquery.treetable.css") | $raw %]
17 <body id="ser_subscription-detail" class="ser">
18 [% WRAPPER 'header.inc' %]
19 [% INCLUDE 'serials-search.inc' %]
22 [% WRAPPER 'sub-header.inc' %]
23 [% WRAPPER breadcrumbs %]
24 [% WRAPPER breadcrumb_item %]
25 <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
27 [% UNLESS ( blocking_error ) %]
28 [% WRAPPER breadcrumb_item %]
29 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscriptionid | uri %]"><em>[% bibliotitle | html %]</em></a>
31 [% WRAPPER breadcrumb_item bc_active= 1 %]
32 <span>Subscription details</span>
35 [% END #/ WRAPPER breadcrumbs %]
36 [% END #/ WRAPPER sub-header.inc %]
38 <div class="main container-fluid">
40 <div class="col-sm-10 col-sm-push-2">
43 [% INCLUDE 'serials-toolbar.inc' %]
44 [% INCLUDE 'mana/mana-comment-status.inc' %]
46 <h1>Subscription for [% INCLUDE 'biblio-title.inc' biblio=subscription.biblio link = 0 %] [% IF closed %](closed)[% END %]</h1>
48 [% IF ( abouttoexpire ) %]
50 <div class="dialog message">Subscription will expire [% enddate | html %]. <a href="#" id="renewsub">Renew this subscription</a>.</div>
54 [% IF ( NEEDSCONFIRMATION ) %]
55 <div id="circ_needsconfirmation" class="dialog alert">
56 <h3>Please confirm subscription deletion</h3>
59 [% IF ( NOTEXPIRED ) %] <li>The subscription has not expired yet</li> [% END %]
60 [% IF ( LINKEDISSUES ) %] <li>The subscription has linked issues</li> [% END %]
61 [% IF ( LINKEDITEMS ) %] <li>The subscription has linked items<br /> Those items won't be deleted</li> [% END %]
64 <form method="post" action="/cgi-bin/koha/serials/subscription-detail.pl">
65 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
66 <input type="hidden" name="issueconfirmed" value="1" />
67 <input type="hidden" name="op" value="del" />
68 <button type="submit" class="approve" accesskey="y"><i class="fa fa-fw fa-check"></i> Yes, delete (Y)</button>
71 <form method="get" action="/cgi-bin/koha/serials/subscription-detail.pl">
72 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
73 <button type="submit" class="deny" accesskey="n"><i class="fa fa-fw fa-times"></i> No, don't delete (N)</button>
76 [% END # /IF NEEDSCONFIRMATION %]
78 [% IF mana_code.defined %]
79 <div id="alert-community" class="dialog message">
81 [% mana_code | html %]
86 [% WRAPPER tabs id= "subscription_description" %]
87 [% WRAPPER tabs_nav %]
88 [% WRAPPER tab_item tabname= "subscription_info" bt_active= 1 %] <span>Information</span> [% END %]
89 [% WRAPPER tab_item tabname= "subscription_planning" %] <span>Planning</span> [% END %]
90 [% WRAPPER tab_item tabname= "subscription_issues" %] <span>Issues</span> [% END %]
91 [% WRAPPER tab_item tabname= "subscription_summary" %] <span>Summary</span> [% END %]
92 [% IF orders_grouped.size %]
93 [% WRAPPER tab_item tabname= "acquisition_details" %] <span>Acquisition details</span> [% END %]
95 [% END # /WRAPPER tabs_nav %]
97 [% WRAPPER tab_panels %]
98 [% WRAPPER tab_panel tabname="subscription_info" bt_active= 1 %]
100 <div class="col-sm-6">
103 <li><span class="label">Subscription ID: </span>[% subscriptionid | html %]</li>
104 <li><span class="label">Librarian identity:</span> [% librarian | html %]</li>
105 <li><span class="label">Vendor:</span> <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% aqbooksellerid | uri %]">[% aqbooksellername | html %]</a></li>
107 <span class="label">Bibliographic record:</span>
108 [%- INCLUDE 'biblio-title.inc' biblio=subscription.biblio link = 1 -%] <em>([% subscription.biblionumber | html %])</em>
110 [% IF ( OPACBaseURL ) %]
112 <span class="label">OPAC view:</span>
113 <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>
116 [% IF ( branchcode ) %]
117 <li><span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]</li>
119 [% IF ( serialsadditems ) %]
120 <li><span class="label">Items:</span> Serial receipt creates an item record.</li>
122 <li><span class="label">Items:</span> Serial receipt does not create an item record.</li>
125 <span class="label">Serial number:</span>
126 [% IF skip_serialseq %]
127 Serial number is skipped when an irregularity is found.
129 Serial number is kept when an irregularity is found.
132 <li><span class="label">Grace period:</span> [% graceperiod | html %]</li>
134 </div> <!-- /.rows -->
135 </div> <!-- /.col-sm-6 -->
136 <div class="col-sm-6">
139 [% IF ( location ) %]<li><span class="label">Location:</span> [% location | html %]</li>[% END %]
140 [% IF ( callnumber ) %]<li><span class="label">Call number:</span> [% callnumber | html %]</li>[% END %]
141 [% IF ( ccode ) %]<li><span class="label">Collection:</span> [% ccode | html %]</li>[% END %]
142 [% IF ( staffdisplaycount ) %]<li><span class="label">Number of issues to display to staff:</span>[% staffdisplaycount | html %]</li>[% END %]
143 [% IF ( opacdisplaycount ) %]<li><span class="label">Number of issues to display in OPAC:</span>[% opacdisplaycount | html %]</li>[% END %]
146 <span class="label">Patron notification:</span> [% letter | html %]
147 (<a href="/cgi-bin/koha/serials/viewalerts.pl?subscriptionid=[% subscriptionid | uri %]">subscribers</a>)
150 [% IF ( hasRouting ) %]<li><span class="label">Routing:</span> yes</li>[% END %]
152 </div> <!-- /.rows -->
153 </div> <!-- /.col-sm-6 -->
154 </div> <!-- /.row -->
156 [% IF available_additional_fields.count %]
159 <div class="col-sm-6">
160 <h3>Additional fields:</h3>
163 [% INCLUDE 'additional-fields-display.inc' available=available_additional_fields values=additional_field_values %]
165 </div> <!-- /.rows -->
166 </div> <!-- /.col-sm-6 -->
167 </div> <!-- /.row -->
169 [% END # /WRAPPER#subscription_info %]
171 [% WRAPPER tab_panel tabname="subscription_planning" %]
173 <div class="col-sm-12">
177 <span class="label">Beginning date:</span>
178 [% startdate | html %]
181 <span class="label">Frequency:</span>
182 [% frequency.description | html %]
185 <span class="label">Manual history: </span>
186 [% IF ( manualhistory ) %]
187 Enabled <a href="/cgi-bin/koha/serials/subscription-history.pl?subscriptionid=[% subscriptionid | uri %]">Edit history</a>
193 <span class="label">Number pattern:</span>
194 [% numberpattern.label | html %]
199 <td>Starting with:</td>
201 <td>[% lastvalue1 | html %]</td>
204 <td>[% lastvalue2 | html %]</td>
207 <td>[% lastvalue3 | html %]</td>
213 <td>[% numberpattern.whenmorethan1 | html %]</td>
216 <td>[% numberpattern.whenmorethan2 | html %]</td>
219 <td>[% numberpattern.whenmorethan3 | html %]</td>
224 [% IF ( irregular_issues ) %]
226 <span class="label">Irregularity:</span>
227 [% irregular_issues | html %] issues
231 <span class="label">First arrival:</span>
232 [% firstacquidate | html %]
234 [% IF ( numberlength ) %]<li>
235 <span class="label">Number of issues:</span>
236 [% numberlength | html %]</li>
238 [% IF ( weeklength ) %]<li>
239 <span class="label">Number of weeks:</span>
240 [% weeklength | html %]</li>
242 [% IF ( monthlength ) %]<li>
243 <span class="label">Number of months:</span>
244 [% monthlength | html %]</li>
247 </div> <!-- /.rows -->
248 </div> <!-- /.col-sd-12 -->
249 </div> <!-- /.row -->
250 [% END # /WRAPPER#subscription_planning %]
252 [% WRAPPER tab_panel tabname="subscription_issues" %]
255 <th>Issue number</th>
256 <th>Planned date</th>
257 <th>Published date</th>
258 <th>Published date (text)</th>
261 [% FOREACH serialslis IN serialslist %]
264 [% serialslis.serialseq | html %]
267 [% IF serialslis.planneddate %]
268 [% serialslis.planneddate | $KohaDates %]
274 [% IF serialslis.publisheddate %]
275 [% serialslis.publisheddate | $KohaDates %]
281 [% serialslis.publisheddatetext | html %]
284 [% INCLUDE 'serial-status.inc' serial = serialslis %]
287 [% END # /FOREACH serialslist %]
289 [% END # /WRAPPER#subscription_issues %]
291 [% WRAPPER tab_panel tabname="subscription_summary" %]
293 <div class="col-sm-12">
296 <li><span class="label">Start date:</span> [% startdate | html %] </li>
297 <li><span class="label">End date:</span> [% enddate | html %]</li>
298 <li><span class="label">History start date:</span> [% histstartdate | html %] </li>
299 <li><span class="label">History end date:</span> [% histenddate | html %]</li>
300 <li><span class="label">Received issues:</span>[% recievedlist | html | html_line_break %]</li>
301 <li><span class="label">Missing issues:</span>[% missinglist | html | html_line_break %]</li>
302 <li><span class="label">Nonpublic note:</span>[% internalnotes | html | html_line_break %]</li>
303 <li><span class="label">Public note:</span>[% notes | html | html_line_break %]</li>
304 <li><span class="label">History staff note:</span>[% librariannote | html | html_line_break %]</li>
305 <li><span class="label">History OPAC note:</span>[% opacnote | html | html_line_break %]</li>
307 </div> <!-- /.rows -->
308 </div> <!-- /.col-sm-12 -->
309 </div> <!-- /.row -->
310 [% END # /WRAPPER#subscription_summary %]
312 [% IF orders_grouped.size %]
313 [% WRAPPER tab_panel tabname="acquisition_details" %]
314 <h2>Acquisition details</h2>
317 <span class="actions">
318 <a href="#" id="hide_received_orders">Hide already received orders</a>
319 | <a href="#" id="show_all_orders">Show all orders</a>
320 | <a href="#" id="expand_all">Expand all</a>
321 | <a href="#" id="collapse_all">Collapse all</a>
328 <th>Order number</th>
329 <th>Creation date</th>
330 <th>Receive date</th>
332 <th>Internal note</th>
336 <th title="ecost tax exc. / ecost tax inc.">Ordered</th>
337 <th title="Actual cost tax exc. / Actual cost tax inc.">Spent</th>
341 [% FOR ordernumber IN orders_grouped.keys %]
342 [% SET parent_tree_id = loop.count %]
343 [% SET parent_order = orders_grouped.$ordernumber %]
344 <tr data-tt-id="[% parent_tree_id | html %]" class="highlighted-row">
345 <td></td> [%# invoice %]
347 [% IF CAN_user_acquisition_order_manage %]
348 <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>
350 [% parent_order.basket.basketname | html %] ([% parent_order.basket.basketno | html %])
353 <td></td> [%# ordernumber %]
354 <td>[% parent_order.basket.creationdate | $KohaDates %]</td>
355 <td>[% parent_order.datereceived | $KohaDates %]</td>
357 [% SWITCH parent_order.orderstatus %]
358 [% CASE 'new' %]<span title="status_1">New</span>
359 [% CASE 'ordered' %]<span title="status_2">Ordered</span>
360 [% CASE 'partial' %]<span title="status_3">Partial</span>
361 [% CASE 'complete' %]<span title="status_4">Complete</span>
362 [% CASE 'cancelled' %]<span title="status_5">Cancelled</span>
365 <td></td> [%# internalnote %]
366 <td></td> [%# vendornote %]
367 <td></td> [%# fund %]
368 <td>[% parent_order.quantity | html %]</td>
369 <td>[% parent_order.ecost_tax_excluded | $Price %] / [% parent_order.ecost_tax_included | $Price %]</td>
370 <td>[% parent_order.unitprice_tax_excluded | $Price %] / [% parent_order.unitprice_tax_included | $Price %]</td>
372 [% FOR order IN parent_order.orders %]
373 <tr data-tt-id="0" data-tt-parent-id="[% parent_tree_id | html %]">
375 [% IF order.invoice %]
376 [% IF CAN_user_acquisition %]
377 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]" title="Invoice detail page">
378 [% order.invoice.invoicenumber | html %]</a>
380 [% order.invoice.invoicenumber | html %]
384 <td></td> [%# basket %]
385 <td>[% order.ordernumber | html %]</td>
386 <td data-order="[% order.basket.creationdate | uri %]">[% order.basket.creationdate | $KohaDates%]</td>
387 <td data-order="[% order.datereceived | uri %]">[% order.datereceived | $KohaDates %]</td>
388 [% SWITCH order.orderstatus %]
389 [% CASE 'new' %]<td data-order="status_1"><span>New</span>
390 [% CASE 'ordered' %]<td data-order="status_2"><span>Ordered</span>
391 [% CASE 'partial' %]<td data-order="status_3"><span>Partial</span>
392 [% CASE 'complete' %]<td data-order="status_4"><span>Complete</span>
393 [% CASE 'cancelled' %]<td data-order="status_5"><span>Cancelled</span>
396 <td>[% order.order_internalnote | html %]</td>
397 <td>[% order.order_vendornote | html %]</td>
398 <td>[% order.fund.budget_name | html %]</td>
399 <td>[% order.quantity | html %]</td>
401 [% UNLESS order.datereceived %]
402 [% order.ecost_tax_excluded * order.quantity | $Price %] / [% order.ecost_tax_included * order.quantity | $Price %]
406 [% IF order.datereceived %]
407 [%# FIXME What if unitprice has not been filled? %]
408 [% order.unitprice_tax_excluded * order.quantity | $Price %] / [% order.unitprice_tax_included * order.quantity | $Price %]
412 [% END # /FOR order %]
413 [% END # /FOR ordernumber %]
415 </table> <!-- /#orders -->
416 [% END # /WRAPPER tab_panel#acquisition_details %]
417 [% END # IF orders_grouped.size %]
418 [% END # /WRAPPER tab_panels %]
419 [% END # /WRAPPER tabs#subscription_description %]
421 </div> <!-- /.col-sm-10.col-sm-push-2 -->
423 <div class="col-sm-2 col-sm-pull-10">
425 [% INCLUDE 'serials-menu.inc' %]
427 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
428 </div> <!-- /.row -->
430 [% MACRO jsinclude BLOCK %]
432 var subscriptionid = "[% subscriptionid | html %]";
434 [% Asset.js("js/serials-toolbar.js") | $raw %]
435 [% Asset.js("js/mana.js") | $raw %]
436 [% INCLUDE 'datatables.inc' %]
437 [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
438 [% INCLUDE 'columns_settings.inc' %]
440 // the english words used in display purposes
441 var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose hemisphere:"),_("Northern"),_("Southern",
442 "Autumn"),_("Winter"),_("Spring"),_("Summer"),_("Fall"),_("Season"),_("Year"));
443 $(document).ready(function() {
445 $("#renewsub").click(function(){
446 popup([% subscriptionid | html %]);
450 var table_settings = [% TablesSettings.GetTableSettings( 'serials', 'subscription-detail', 'orders', 'json' ) | $raw %];
451 var table = KohaTable("orders", {
453 { "bVisible": false, "aTargets": [ 'NoVisible' ] },
454 { "bSortable": false, "aTargets": ["_all"] },
462 [% IF orders_grouped.size %]
465 initialState: 'expanded',
467 $(table).treetable('expandAll');
469 $("#expand_all").click(function(e){
471 $(table).treetable('expandAll');
473 $("#collapse_all").click(function(e){
475 $(table).treetable('collapseAll');
480 $("#hide_received_orders").click(function(e){
482 table.fnFilter( '^$', 4, true ); // Not empty "Receive date" columns
484 $("#show_all_orders").click(function(e){
486 table.fnFilter( '', 4 ); // Not filter, display all columns
488 $("#show_all_orders").click();
491 function mana_comment_close(){
492 $("#selected_id").val("");
493 $("#mana-resource-id").val("");
494 $("#mana-comment").val("");
495 $("#mana-comment-box").modal("hide");
500 [% INCLUDE 'intranet-bottom.inc' %]