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 [% WRAPPER breadcrumbs %]
23 [% WRAPPER breadcrumb_item %]
24 <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
26 [% UNLESS ( blocking_error ) %]
27 [% WRAPPER breadcrumb_item %]
28 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscriptionid | uri %]"><em>[% bibliotitle | html %]</em></a>
30 [% WRAPPER breadcrumb_item bc_active= 1 %]
31 <span>Subscription details</span>
34 [% END #/ WRAPPER breadcrumbs %]
35 [% END #/ WRAPPER sub-header.inc %]
37 <div class="main container-fluid">
39 <div class="col-sm-10 col-sm-push-2">
42 [% INCLUDE 'serials-toolbar.inc' %]
43 [% INCLUDE 'mana/mana-comment-status.inc' %]
45 <h1>Subscription for [% bibliotitle | html %] [% bibliosubtitle | html %] [% IF closed %](closed)[% END %]</h1>
47 [% IF ( abouttoexpire ) %]
49 <div class="dialog message">Subscription will expire [% enddate | html %]. <a href="#" id="renewsub">Renew this subscription</a>.</div>
53 [% IF ( NEEDSCONFIRMATION ) %]
54 <div id="circ_needsconfirmation" class="dialog alert">
55 <h3>Please confirm subscription deletion</h3>
58 [% IF ( NOTEXPIRED ) %] <li>The subscription has not expired yet</li> [% END %]
59 [% IF ( LINKEDISSUES ) %] <li>The subscription has linked issues</li> [% END %]
60 [% IF ( LINKEDITEMS ) %] <li>The subscription has linked items<br /> Those items won't be deleted</li> [% END %]
63 <form method="post" action="/cgi-bin/koha/serials/subscription-detail.pl">
64 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
65 <input type="hidden" name="issueconfirmed" value="1" />
66 <input type="hidden" name="op" value="del" />
67 <button type="submit" class="approve" accesskey="y"><i class="fa fa-fw fa-check"></i> Yes, delete (Y)</button>
70 <form method="get" action="/cgi-bin/koha/serials/subscription-detail.pl">
71 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
72 <button type="submit" class="deny" accesskey="n"><i class="fa fa-fw fa-times"></i> No, don't delete (N)</button>
75 [% END # /IF NEEDSCONFIRMATION %]
77 [% IF mana_code.defined %]
78 <div id="alert-community" class="dialog message">
80 [% mana_code | html %]
85 [% WRAPPER tabs id= "subscription_description" %]
86 [% WRAPPER tabs_nav %]
87 [% WRAPPER tab_item tabname= "subscription_info" bt_active= 1 %] <span>Information</span> [% END %]
88 [% WRAPPER tab_item tabname= "subscription_planning" %] <span>Planning</span> [% END %]
89 [% WRAPPER tab_item tabname= "subscription_issues" %] <span>Issues</span> [% END %]
90 [% WRAPPER tab_item tabname= "subscription_summary" %] <span>Summary</span> [% END %]
91 [% IF orders_grouped.size %]
92 [% WRAPPER tab_item tabname= "acquisition_details" %] <span>Acquisition details</span> [% END %]
94 [% END # /WRAPPER tabs_nav %]
96 [% WRAPPER tab_panels %]
97 [% WRAPPER tab_panel tabname="subscription_info" bt_active= 1 %]
99 <div class="col-sm-6">
102 <li><span class="label">Subscription ID: </span>[% subscriptionid | html %]</li>
103 <li><span class="label">Librarian identity:</span> [% librarian | html %]</li>
104 <li><span class="label">Vendor:</span> <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% aqbooksellerid | uri %]">[% aqbooksellername | html %]</a></li>
105 <li><span class="label">Biblio:</span> <a href="[% PROCESS biblio_a_href biblionumber => bibnum %]">[% bibliotitle | html %] [% bibliosubtitle | html %]</a> <em>([% bibnum | html %])</em></li>
106 [% IF ( OPACBaseURL ) %]
108 <span class="label">OPAC view:</span>
109 <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>
112 [% IF ( branchcode ) %]
113 <li><span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]</li>
115 [% IF ( serialsadditems ) %]
116 <li><span class="label">Items:</span> Serial receipt creates an item record.</li>
118 <li><span class="label">Items:</span> Serial receipt does not create an item record.</li>
121 <span class="label">Serial number:</span>
122 [% IF skip_serialseq %]
123 Serial number is skipped when an irregularity is found.
125 Serial number is kept when an irregularity is found.
128 <li><span class="label">Grace period:</span> [% graceperiod | html %]</li>
130 </div> <!-- /.rows -->
131 </div> <!-- /.col-sm-6 -->
132 <div class="col-sm-6">
135 [% IF ( location ) %]<li><span class="label">Location:</span> [% location | html %]</li>[% END %]
136 [% IF ( callnumber ) %]<li><span class="label">Call number:</span> [% callnumber | html %]</li>[% END %]
137 [% IF ( ccode ) %]<li><span class="label">Collection:</span> [% ccode | html %]</li>[% END %]
138 [% IF ( staffdisplaycount ) %]<li><span class="label">Number of issues to display to staff:</span>[% staffdisplaycount | html %]</li>[% END %]
139 [% IF ( opacdisplaycount ) %]<li><span class="label">Number of issues to display in OPAC:</span>[% opacdisplaycount | html %]</li>[% END %]
142 <span class="label">Patron notification:</span> [% letter | html %]
143 (<a href="/cgi-bin/koha/serials/viewalerts.pl?subscriptionid=[% subscriptionid | uri %]">subscribers</a>)
146 [% IF ( hasRouting ) %]<li><span class="label">Routing:</span> yes</li>[% END %]
148 </div> <!-- /.rows -->
149 </div> <!-- /.col-sm-6 -->
150 </div> <!-- /.row -->
152 [% IF available_additional_fields.count %]
155 <div class="col-sm-6">
156 <h3>Additional fields:</h3>
159 [% INCLUDE 'additional-fields-display.inc' available=available_additional_fields values=additional_field_values %]
161 </div> <!-- /.rows -->
162 </div> <!-- /.col-sm-6 -->
163 </div> <!-- /.row -->
165 [% END # /WRAPPER#subscription_info %]
167 [% WRAPPER tab_panel tabname="subscription_planning" %]
169 <div class="col-sm-12">
173 <span class="label">Beginning date:</span>
174 [% startdate | html %]
177 <span class="label">Frequency:</span>
178 [% frequency.description | html %]
181 <span class="label">Manual history: </span>
182 [% IF ( manualhistory ) %]
183 Enabled <a href="/cgi-bin/koha/serials/subscription-history.pl?subscriptionid=[% subscriptionid | uri %]">Edit history</a>
189 <span class="label">Number pattern:</span>
190 [% numberpattern.label | html %]
195 <td>Starting with:</td>
197 <td>[% lastvalue1 | html %]</td>
200 <td>[% lastvalue2 | html %]</td>
203 <td>[% lastvalue3 | html %]</td>
209 <td>[% numberpattern.whenmorethan1 | html %]</td>
212 <td>[% numberpattern.whenmorethan2 | html %]</td>
215 <td>[% numberpattern.whenmorethan3 | html %]</td>
220 [% IF ( irregular_issues ) %]
222 <span class="label">Irregularity:</span>
223 [% irregular_issues | html %] issues
227 <span class="label">First arrival:</span>
228 [% firstacquidate | html %]
230 [% IF ( numberlength ) %]<li>
231 <span class="label">Number of issues:</span>
232 [% numberlength | html %]</li>
234 [% IF ( weeklength ) %]<li>
235 <span class="label">Number of weeks:</span>
236 [% weeklength | html %]</li>
238 [% IF ( monthlength ) %]<li>
239 <span class="label">Number of months:</span>
240 [% monthlength | html %]</li>
243 </div> <!-- /.rows -->
244 </div> <!-- /.col-sd-12 -->
245 </div> <!-- /.row -->
246 [% END # /WRAPPER#subscription_planning %]
248 [% WRAPPER tab_panel tabname="subscription_issues" %]
251 <th>Issue number</th>
252 <th>Planned date</th>
253 <th>Published date</th>
254 <th>Published date (text)</th>
257 [% FOREACH serialslis IN serialslist %]
260 [% serialslis.serialseq | html %]
263 [% IF serialslis.planneddate %]
264 [% serialslis.planneddate | $KohaDates %]
270 [% IF serialslis.publisheddate %]
271 [% serialslis.publisheddate | $KohaDates %]
277 [% serialslis.publisheddatetext | html %]
280 [% INCLUDE 'serial-status.inc' serial = serialslis %]
283 [% END # /FOREACH serialslist %]
285 [% END # /WRAPPER#subscription_issues %]
287 [% WRAPPER tab_panel tabname="subscription_summary" %]
289 <div class="col-sm-12">
292 <li><span class="label">Start date:</span> [% startdate | html %] </li>
293 <li><span class="label">End date:</span> [% enddate | html %]</li>
294 <li><span class="label">History start date:</span> [% histstartdate | html %] </li>
295 <li><span class="label">History end date:</span> [% histenddate | html %]</li>
296 <li><span class="label">Received issues:</span>[% recievedlist | html | html_line_break %]</li>
297 <li><span class="label">Missing issues:</span>[% missinglist | html | html_line_break %]</li>
298 <li><span class="label">Nonpublic note:</span>[% internalnotes | html | html_line_break %]</li>
299 <li><span class="label">Public note:</span>[% notes | html | html_line_break %]</li>
300 <li><span class="label">History staff note:</span>[% librariannote | html | html_line_break %]</li>
301 <li><span class="label">History OPAC note:</span>[% opacnote | html | html_line_break %]</li>
303 </div> <!-- /.rows -->
304 </div> <!-- /.col-sm-12 -->
305 </div> <!-- /.row -->
306 [% END # /WRAPPER#subscription_summary %]
308 [% IF orders_grouped.size %]
309 [% WRAPPER tab_panel tabname="acquisition_details" %]
310 <h2>Acquisition details</h2>
313 <span class="actions">
314 <a href="#" id="hide_received_orders">Hide already received orders</a>
315 | <a href="#" id="show_all_orders">Show all orders</a>
316 | <a href="#" id="expand_all">Expand all</a>
317 | <a href="#" id="collapse_all">Collapse all</a>
324 <th>Order number</th>
325 <th>Creation date</th>
326 <th>Receive date</th>
328 <th>Internal note</th>
332 <th title="ecost tax exc. / ecost tax inc.">Ordered</th>
333 <th title="Actual cost tax exc. / Actual cost tax inc.">Spent</th>
337 [% FOR ordernumber IN orders_grouped.keys %]
338 [% SET parent_tree_id = loop.count %]
339 [% SET parent_order = orders_grouped.$ordernumber %]
340 <tr data-tt-id="[% parent_tree_id | html %]" class="highlighted-row">
341 <td></td> [%# invoice %]
343 [% IF CAN_user_acquisition_order_manage %]
344 <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>
346 [% parent_order.basket.basketname | html %] ([% parent_order.basket.basketno | html %])
349 <td></td> [%# ordernumber %]
350 <td>[% parent_order.basket.creationdate | $KohaDates %]</td>
351 <td>[% parent_order.datereceived | $KohaDates %]</td>
353 [% SWITCH parent_order.orderstatus %]
354 [% CASE 'new' %]<span title="status_1">New</span>
355 [% CASE 'ordered' %]<span title="status_2">Ordered</span>
356 [% CASE 'partial' %]<span title="status_3">Partial</span>
357 [% CASE 'complete' %]<span title="status_4">Complete</span>
358 [% CASE 'cancelled' %]<span title="status_5">Cancelled</span>
361 <td></td> [%# internalnote %]
362 <td></td> [%# vendornote %]
363 <td></td> [%# fund %]
364 <td>[% parent_order.quantity | html %]</td>
365 <td>[% parent_order.ecost_tax_excluded | $Price %] / [% parent_order.ecost_tax_included | $Price %]</td>
366 <td>[% parent_order.unitprice_tax_excluded | $Price %] / [% parent_order.unitprice_tax_included | $Price %]</td>
368 [% FOR order IN parent_order.orders %]
369 <tr data-tt-id="0" data-tt-parent-id="[% parent_tree_id | html %]">
371 [% IF order.invoice %]
372 [% IF CAN_user_acquisition %]
373 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]" title="Invoice detail page">
374 [% order.invoice.invoicenumber | html %]</a>
376 [% order.invoice.invoicenumber | html %]
380 <td></td> [%# basket %]
381 <td>[% order.ordernumber | html %]</td>
382 <td data-order="[% order.basket.creationdate | uri %]">[% order.basket.creationdate | $KohaDates%]</td>
383 <td data-order="[% order.datereceived | uri %]">[% order.datereceived | $KohaDates %]</td>
384 [% SWITCH order.orderstatus %]
385 [% CASE 'new' %]<td data-order="status_1"><span>New</span>
386 [% CASE 'ordered' %]<td data-order="status_2"><span>Ordered</span>
387 [% CASE 'partial' %]<td data-order="status_3"><span>Partial</span>
388 [% CASE 'complete' %]<td data-order="status_4"><span>Complete</span>
389 [% CASE 'cancelled' %]<td data-order="status_5"><span>Cancelled</span>
392 <td>[% order.order_internalnote | html %]</td>
393 <td>[% order.order_vendornote | html %]</td>
394 <td>[% order.fund.budget_name | html %]</td>
395 <td>[% order.quantity | html %]</td>
397 [% UNLESS order.datereceived %]
398 [% order.ecost_tax_excluded * order.quantity | $Price %] / [% order.ecost_tax_included * order.quantity | $Price %]
402 [% IF order.datereceived %]
403 [%# FIXME What if unitprice has not been filled? %]
404 [% order.unitprice_tax_excluded * order.quantity | $Price %] / [% order.unitprice_tax_included * order.quantity | $Price %]
408 [% END # /FOR order %]
409 [% END # /FOR ordernumber %]
411 </table> <!-- /#orders -->
412 [% END # /WRAPPER tab_panel#acquisition_details %]
413 [% END # IF orders_grouped.size %]
414 [% END # /WRAPPER tab_panels %]
415 [% END # /WRAPPER tabs#subscription_description %]
417 </div> <!-- /.col-sm-10.col-sm-push-2 -->
419 <div class="col-sm-2 col-sm-pull-10">
421 [% INCLUDE 'serials-menu.inc' %]
423 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
424 </div> <!-- /.row -->
426 [% MACRO jsinclude BLOCK %]
428 var subscriptionid = "[% subscriptionid | html %]";
430 [% Asset.js("js/serials-toolbar.js") | $raw %]
431 [% Asset.js("js/mana.js") | $raw %]
432 [% INCLUDE 'datatables.inc' %]
433 [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
434 [% INCLUDE 'columns_settings.inc' %]
436 // the english words used in display purposes
437 var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose hemisphere:"),_("Northern"),_("Southern",
438 "Autumn"),_("Winter"),_("Spring"),_("Summer"),_("Fall"),_("Season"),_("Year"));
439 $(document).ready(function() {
441 $("#renewsub").click(function(){
442 popup([% subscriptionid | html %]);
446 var table_settings = [% TablesSettings.GetTableSettings( 'serials', 'subscription-detail', 'orders', 'json' ) | $raw %];
447 var table = KohaTable("orders", {
449 { "bVisible": false, "aTargets": [ 'NoVisible' ] },
450 { "bSortable": false, "aTargets": ["_all"] },
458 [% IF orders_grouped.size %]
461 initialState: 'expanded',
463 $(table).treetable('expandAll');
465 $("#expand_all").click(function(e){
467 $(table).treetable('expandAll');
469 $("#collapse_all").click(function(e){
471 $(table).treetable('collapseAll');
476 $("#hide_received_orders").click(function(e){
478 table.fnFilter( '^$', 4, true ); // Not empty "Receive date" columns
480 $("#show_all_orders").click(function(e){
482 table.fnFilter( '', 4 ); // Not filter, display all columns
484 $("#show_all_orders").click();
487 function mana_comment_close(){
488 $("#selected_id").val("");
489 $("#mana-resource-id").val("");
490 $("#mana-comment").val("");
491 $("#mana-comment-box").modal("hide");
496 [% INCLUDE 'intranet-bottom.inc' %]