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">Home</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 [% WRAPPER tabs id= "subscription_description" %]
97 [% WRAPPER tabs_nav %]
98 [% WRAPPER tab_item tabname= "subscription_info" bt_active= 1 %] Information [% END %]
99 [% WRAPPER tab_item tabname= "subscription_planning" %] Planning [% END %]
100 [% WRAPPER tab_item tabname= "subscription_issues" %] Issues [% END %]
101 [% WRAPPER tab_item tabname= "subscription_summary" %] Summary [% END %]
102 [% IF orders_grouped.size %]
103 [% WRAPPER tab_item tabname= "acquisition_details" %] Acquisition details [% END %]
105 [% END # /WRAPPER tabs_nav %]
107 [% WRAPPER tab_panels %]
108 [% WRAPPER tab_panel tabname="subscription_info" bt_active= 1 %]
110 <div class="col-sm-6">
113 <li><span class="label">Subscription ID: </span>[% subscriptionid | html %]</li>
114 <li><span class="label">Librarian identity:</span> [% librarian | html %]</li>
115 <li><span class="label">Vendor:</span> <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% aqbooksellerid | uri %]">[% aqbooksellername | html %]</a></li>
116 <li><span class="label">Biblio:</span> <a href="[% PROCESS biblio_a_href biblionumber => bibnum %]">[% bibliotitle | html %] [% bibliosubtitle | html %]</a> <em>([% bibnum | html %])</em></li>
117 [% IF ( OPACBaseURL ) %]
119 <span class="label">OPAC view:</span>
120 <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>
123 [% IF ( branchcode ) %]
124 <li><span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]</li>
126 [% IF ( serialsadditems ) %]
127 <li><span class="label">Items:</span> Serial receipt creates an item record.</li>
129 <li><span class="label">Items:</span> Serial receipt does not create an item record.</li>
132 <span class="label">Serial number:</span>
133 [% IF skip_serialseq %]
134 Serial number is skipped when an irregularity is found.
136 Serial number is kept when an irregularity is found.
139 <li><span class="label">Grace period:</span> [% graceperiod | html %]</li>
141 </div> <!-- /.rows -->
142 </div> <!-- /.col-sm-6 -->
143 <div class="col-sm-6">
146 [% IF ( location ) %]<li><span class="label">Location:</span> [% location | html %]</li>[% END %]
147 [% IF ( callnumber ) %]<li><span class="label">Call number:</span> [% callnumber | html %]</li>[% END %]
148 [% IF ( ccode ) %]<li><span class="label">Collection:</span> [% ccode | html %]</li>[% END %]
149 [% IF ( staffdisplaycount ) %]<li><span class="label">Number of issues to display to staff:</span>[% staffdisplaycount | html %]</li>[% END %]
150 [% IF ( opacdisplaycount ) %]<li><span class="label">Number of issues to display in OPAC:</span>[% opacdisplaycount | html %]</li>[% END %]
153 <span class="label">Patron notification:</span> [% letter | html %]
154 (<a href="/cgi-bin/koha/serials/viewalerts.pl?subscriptionid=[% subscriptionid | uri %]">subscribers</a>)
157 [% IF ( hasRouting ) %]<li><span class="label">Routing:</span> yes</li>[% END %]
159 </div> <!-- /.rows -->
160 </div> <!-- /.col-sm-6 -->
161 </div> <!-- /.row -->
163 [% IF available_additional_fields.count %]
166 <div class="col-sm-6">
167 <h3>Additional fields:</h3>
170 [% INCLUDE 'additional-fields-display.inc' available=available_additional_fields values=additional_field_values %]
172 </div> <!-- /.rows -->
173 </div> <!-- /.col-sm-6 -->
174 </div> <!-- /.row -->
176 [% END # /WRAPPER#subscription_info %]
178 [% WRAPPER tab_panel tabname="subscription_planning" %]
180 <div class="col-sm-12">
184 <span class="label">Beginning date:</span>
185 [% startdate | html %]
188 <span class="label">Frequency:</span>
189 [% frequency.description | html %]
192 <span class="label">Manual history: </span>
193 [% IF ( manualhistory ) %]
194 Enabled <a href="/cgi-bin/koha/serials/subscription-history.pl?subscriptionid=[% subscriptionid | uri %]">Edit history</a>
200 <span class="label">Number pattern:</span>
201 [% numberpattern.label | html %]
206 <td>Starting with:</td>
208 <td>[% lastvalue1 | html %]</td>
211 <td>[% lastvalue2 | html %]</td>
214 <td>[% lastvalue3 | html %]</td>
220 <td>[% numberpattern.whenmorethan1 | html %]</td>
223 <td>[% numberpattern.whenmorethan2 | html %]</td>
226 <td>[% numberpattern.whenmorethan3 | html %]</td>
231 [% IF ( irregular_issues ) %]
233 <span class="label">Irregularity:</span>
234 [% irregular_issues | html %] issues
238 <span class="label">First arrival:</span>
239 [% firstacquidate | html %]
241 [% IF ( numberlength ) %]<li>
242 <span class="label">Number of issues:</span>
243 [% numberlength | html %]</li>
245 [% IF ( weeklength ) %]<li>
246 <span class="label">Number of weeks:</span>
247 [% weeklength | html %]</li>
249 [% IF ( monthlength ) %]<li>
250 <span class="label">Number of months:</span>
251 [% monthlength | html %]</li>
254 </div> <!-- /.rows -->
255 </div> <!-- /.col-sd-12 -->
256 </div> <!-- /.row -->
257 [% END # /WRAPPER#subscription_planning %]
259 [% WRAPPER tab_panel tabname="subscription_issues" %]
262 <th>Issue number</th>
263 <th>Planned date</th>
264 <th>Published date</th>
265 <th>Published date (text)</th>
268 [% FOREACH serialslis IN serialslist %]
271 [% serialslis.serialseq | html %]
274 [% IF serialslis.planneddate %]
275 [% serialslis.planneddate | html %]
281 [% IF serialslis.publisheddate %]
282 [% serialslis.publisheddate | html %]
288 [% serialslis.publisheddatetext | html %]
291 [% IF ( serialslis.status1 ) %]<span>Expected</span>[% END %]
292 [% IF ( serialslis.status2 ) %]<span>Arrived</span>[% END %]
293 [% IF ( serialslis.status3 ) %]<span>Late</span>[% END %]
294 [% IF ( serialslis.status4 ) %]<span>Missing</span>[% END %]
295 [% IF ( serialslis.status41 ) %]<span>Missing (never received)</span>[% END %]
296 [% IF ( serialslis.status42 ) %]<span>Missing (sold out)</span>[% END %]
297 [% IF ( serialslis.status43 ) %]<span>Missing (damaged)</span>[% END %]
298 [% IF ( serialslis.status44 ) %]<span>Missing (lost)</span>[% END %]
299 [% IF ( serialslis.status5 ) %]<span>Not issued</span>[% END %]
300 [% IF ( serialslis.status6 ) %]<span>Delete</span>[% END %]
301 [% IF ( serialslis.status7 ) %]
303 [% IF ( serialslis.claimdate ) %]
304 [% serialslis.claimdate | html %]
307 [% IF ( serialslis.status8 ) %]<span>Stopped</span>[% END %]
310 [% END # /FOREACH serialslist %]
312 [% END # /WRAPPER#subscription_issues %]
314 [% WRAPPER tab_panel tabname="subscription_summary" %]
316 <div class="col-sm-12">
319 <li><span class="label">Start date:</span> [% startdate | html %] </li>
320 <li><span class="label">End date:</span> [% enddate | html %]</li>
321 <li><span class="label">History start date:</span> [% histstartdate | html %] </li>
322 <li><span class="label">History end date:</span> [% histenddate | html %]</li>
323 <li><span class="label">Received issues:</span>[% recievedlist | html | html_line_break %]</li>
324 <li><span class="label">Missing issues:</span>[% missinglist | html | html_line_break %]</li>
325 <li><span class="label">Nonpublic note:</span>[% internalnotes | html | html_line_break %]</li>
326 <li><span class="label">Public note:</span>[% notes | html | html_line_break %]</li>
327 <li><span class="label">History staff note:</span>[% librariannote | html | html_line_break %]</li>
328 <li><span class="label">History OPAC note:</span>[% opacnote | html | html_line_break %]</li>
330 </div> <!-- /.rows -->
331 </div> <!-- /.col-sm-12 -->
332 </div> <!-- /.row -->
333 [% END # /WRAPPER#subscription_summary %]
335 [% IF orders_grouped.size %]
336 [% WRAPPER tab_panel tabname="acquisition_details" %]
337 <h2>Acquisition details</h2>
340 <span class="actions">
341 <a href="#" id="hide_received_orders">Hide already received orders</a>
342 | <a href="#" id="show_all_orders">Show all orders</a>
343 | <a href="#" id="expand_all">Expand all</a>
344 | <a href="#" id="collapse_all">Collapse all</a>
351 <th>Order number</th>
352 <th>Creation date</th>
353 <th>Receive date</th>
355 <th>Internal note</th>
359 <th title="ecost tax exc. / ecost tax inc.">Ordered</th>
360 <th title="Actual cost tax exc. / Actual cost tax inc.">Spent</th>
364 [% FOR ordernumber IN orders_grouped.keys %]
365 [% SET parent_tree_id = loop.count %]
366 [% SET parent_order = orders_grouped.$ordernumber %]
367 <tr data-tt-id="[% parent_tree_id | html %]" class="highlighted-row">
368 <td></td> [%# invoice %]
370 [% IF CAN_user_acquisition_order_manage %]
371 <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>
373 [% parent_order.basket.basketname | html %] ([% parent_order.basket.basketno | html %])
376 <td></td> [%# ordernumber %]
377 <td>[% parent_order.basket.creationdate | $KohaDates %]</td>
378 <td>[% parent_order.datereceived | $KohaDates %]</td>
380 [% SWITCH parent_order.orderstatus %]
381 [% CASE 'new' %]<span title="status_1">New</span>
382 [% CASE 'ordered' %]<span title="status_2">Ordered</span>
383 [% CASE 'partial' %]<span title="status_3">Partial</span>
384 [% CASE 'complete' %]<span title="status_4">Complete</span>
385 [% CASE 'cancelled' %]<span title="status_5">Cancelled</span>
388 <td></td> [%# internalnote %]
389 <td></td> [%# vendornote %]
390 <td></td> [%# fund %]
391 <td>[% parent_order.quantity | html %]</td>
392 <td>[% parent_order.ecost_tax_excluded | $Price %] / [% parent_order.ecost_tax_included | $Price %]</td>
393 <td>[% parent_order.unitprice_tax_excluded | $Price %] / [% parent_order.unitprice_tax_included | $Price %]</td>
395 [% FOR order IN parent_order.orders %]
396 <tr data-tt-id="0" data-tt-parent-id="[% parent_tree_id | html %]">
398 [% IF order.invoice %]
399 [% IF CAN_user_acquisition %]
400 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]" title="Invoice detail page">
401 [% order.invoice.invoicenumber | html %]</a>
403 [% order.invoice.invoicenumber | html %]
407 <td></td> [%# basket %]
408 <td>[% order.ordernumber | html %]</td>
409 <td data-order="[% order.basket.creationdate | uri %]">[% order.basket.creationdate | $KohaDates%]</td>
410 <td data-order="[% order.datereceived | uri %]">[% order.datereceived | $KohaDates %]</td>
411 [% SWITCH order.orderstatus %]
412 [% CASE 'new' %]<td data-order="status_1"><span>New</span>
413 [% CASE 'ordered' %]<td data-order="status_2"><span>Ordered</span>
414 [% CASE 'partial' %]<td data-order="status_3"><span>Partial</span>
415 [% CASE 'complete' %]<td data-order="status_4"><span>Complete</span>
416 [% CASE 'cancelled' %]<td data-order="status_5"><span>Cancelled</span>
419 <td>[% order.order_internalnote | html %]</td>
420 <td>[% order.order_vendornote | html %]</td>
421 <td>[% order.fund.budget_name | html %]</td>
422 <td>[% order.quantity | html %]</td>
424 [% UNLESS order.datereceived %]
425 [% order.ecost_tax_excluded * order.quantity | $Price %] / [% order.ecost_tax_included * order.quantity | $Price %]
429 [% IF order.datereceived %]
430 [%# FIXME What if unitprice has not been filled? %]
431 [% order.unitprice_tax_excluded * order.quantity | $Price %] / [% order.unitprice_tax_included * order.quantity | $Price %]
435 [% END # /FOR order %]
436 [% END # /FOR ordernumber %]
438 </table> <!-- /#orders -->
439 [% END # /WRAPPER tab_panel#acquisition_details %]
440 [% END # IF orders_grouped.size %]
441 [% END # /WRAPPER tab_panels %]
442 [% END # /WRAPPER tabs#subscription_description %]
444 </div> <!-- /.col-sm-10.col-sm-push-2 -->
446 <div class="col-sm-2 col-sm-pull-10">
448 [% INCLUDE 'serials-menu.inc' %]
450 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
451 </div> <!-- /.row -->
453 [% MACRO jsinclude BLOCK %]
455 var subscriptionid = "[% subscriptionid | html %]";
457 [% Asset.js("js/serials-toolbar.js") | $raw %]
458 [% Asset.js("js/mana.js") | $raw %]
459 [% INCLUDE 'datatables.inc' %]
460 [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
461 [% INCLUDE 'columns_settings.inc' %]
463 // the english words used in display purposes
464 var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose hemisphere:"),_("Northern"),_("Southern",
465 "Autumn"),_("Winter"),_("Spring"),_("Summer"),_("Fall"),_("Season"),_("Year"));
466 $(document).ready(function() {
468 $("#renewsub").click(function(){
469 popup([% subscriptionid | html %]);
473 var table_settings = [% TablesSettings.GetTableSettings( 'serials', 'subscription-detail', 'orders', 'json' ) | $raw %];
474 var table = KohaTable("orders", {
476 { "bVisible": false, "aTargets": [ 'NoVisible' ] },
477 { "bSortable": false, "aTargets": ["_all"] },
485 [% IF orders_grouped.size %]
488 initialState: 'expanded',
490 $(table).treetable('expandAll');
492 $("#expand_all").click(function(e){
494 $(table).treetable('expandAll');
496 $("#collapse_all").click(function(e){
498 $(table).treetable('collapseAll');
503 $("#hide_received_orders").click(function(e){
505 table.fnFilter( '^$', 4, true ); // Not empty "Receive date" columns
507 $("#show_all_orders").click(function(e){
509 table.fnFilter( '', 4 ); // Not filter, display all columns
511 $("#show_all_orders").click();
514 function mana_comment_close(){
515 $("#selected_id").val("");
516 $("#mana-resource-id").val("");
517 $("#mana-comment").val("");
518 $("#mana-comment-box").modal("hide");
523 [% INCLUDE 'intranet-bottom.inc' %]