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 [% INCLUDE 'header.inc' %]
18 [% INCLUDE 'serials-search.inc' %]
20 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
23 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
26 [% IF blocking_error %]
28 <a href="#" aria-current="page">
34 <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
37 <a href="#" aria-current="page">
38 Details for subscription #[% subscriptionid | html %]
45 <div class="main container-fluid">
47 <div class="col-sm-10 col-sm-push-2">
50 [% INCLUDE 'serials-toolbar.inc' %]
51 [% INCLUDE 'mana/mana-comment-status.inc' %]
53 <h1>Subscription for [% bibliotitle | html %] [% IF closed %](closed)[% END %]</h1>
55 [% IF ( abouttoexpire ) %]
57 <div class="dialog message">Subscription will expire [% enddate | html %]. <a href="#" id="renewsub">Renew this subscription</a>.</div>
61 [% IF ( NEEDSCONFIRMATION ) %]
62 <div id="circ_needsconfirmation" class="dialog alert">
63 <h3>Please confirm subscription deletion</h3>
66 [% IF ( NOTEXPIRED ) %] <li>The subscription has not expired yet</li> [% END %]
67 [% IF ( LINKEDISSUES ) %] <li>The subscription has linked issues</li> [% END %]
68 [% IF ( LINKEDITEMS ) %] <li>The subscription has linked items<br /> Those items won't be deleted</li> [% END %]
71 <form method="post" action="/cgi-bin/koha/serials/subscription-detail.pl">
72 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
73 <input type="hidden" name="issueconfirmed" value="1" />
74 <input type="hidden" name="op" value="del" />
75 <button type="submit" class="approve" accesskey="y"><i class="fa fa-fw fa-check"></i> Yes, delete (Y)</button>
78 <form method="get" action="/cgi-bin/koha/serials/subscription-detail.pl">
79 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
80 <button type="submit" class="deny" accesskey="n"><i class="fa fa-fw fa-remove"></i> No, don't delete (N)</button>
83 [% END # /IF NEEDSCONFIRMATION %]
85 [% IF mana_code.defined %]
86 <div id="alert-community" class="dialog message">
88 [% mana_code | html %]
93 <div id="subscription_description" class="toptabs">
94 <ul class="ui-tabs-nav">
95 <li><a href="#subscription_info">Information</a></li>
96 <li><a href="#subscription_planning">Planning</a></li>
97 <li><a href="#subscription_issues">Issues</a></li>
98 <li><a href="#subscription_summary">Summary</a></li>
99 [% IF orders_grouped.size %]
101 <a href="#acquisition_details">Acquisition details</a>
106 <div id="subscription_info">
108 <div class="col-sm-6">
111 <li><span class="label">Subscription ID: </span>[% subscriptionid | html %]</li>
112 <li><span class="label">Librarian identity:</span> [% librarian | html %]</li>
113 <li><span class="label">Vendor:</span> <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% aqbooksellerid | uri %]">[% aqbooksellername | html %]</a></li>
114 <li><span class="label">Biblio:</span> <a href="/cgi-bin/koha/catalogue/[% default_bib_view | uri %].pl?biblionumber=[% bibnum | uri %]">[% bibliotitle | html %]</a> <em>([% bibnum | html %])</em></li>
115 [% IF ( OPACBaseURL ) %]
117 <span class="label">OPAC view:</span>
118 <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>
121 [% IF ( branchcode ) %]
122 <li><span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]</li>
124 [% IF ( serialsadditems ) %]
125 <li><span class="label">Items:</span> Serial receipt creates an item record.</li>
127 <li><span class="label">Items:</span> Serial receipt does not create an item record.</li>
130 <span class="label">Serial number:</span>
131 [% IF skip_serialseq %]
132 Serial number is skipped when an irregularity is found.
134 Serial number is kept when an irregularity is found.
137 <li><span class="label">Grace period:</span> [% graceperiod | html %]</li>
139 </div> <!-- /.rows -->
140 </div> <!-- /.col-sm-6 -->
141 <div class="col-sm-6">
144 [% IF ( location ) %]<li><span class="label">Location:</span> [% location | html %]</li>[% END %]
145 [% IF ( callnumber ) %]<li><span class="label">Call number:</span> [% callnumber | html %]</li>[% END %]
146 [% IF ( staffdisplaycount ) %]<li><span class="label">Number of issues to display to staff:</span>[% staffdisplaycount | html %]</li>[% END %]
147 [% IF ( opacdisplaycount ) %]<li><span class="label">Number of issues to display in OPAC:</span>[% opacdisplaycount | html %]</li>[% END %]
150 <span class="label">Patron notification:</span> [% letter | html %]
151 (<a href="/cgi-bin/koha/serials/viewalerts.pl?subscriptionid=[% subscriptionid | uri %]">subscribers</a>)
154 [% IF ( hasRouting ) %]<li><span class="label">Routing:</span> yes</li>[% END %]
156 </div> <!-- /.rows -->
157 </div> <!-- /.col-sm-6 -->
158 </div> <!-- /.row -->
160 [% IF available_additional_fields %]
163 <div class="col-sm-6">
164 <h3>Additional fields:</h3>
167 [% INCLUDE 'additional-fields-display.inc' available=available_additional_fields values=additional_field_values %]
169 </div> <!-- /.rows -->
170 </div> <!-- /.col-sm-6 -->
171 </div> <!-- /.row -->
173 </div> <!-- /#subscription_info -->
175 <div id="subscription_planning">
177 <div class="col-sm-12">
181 <span class="label">Beginning date:</span>
182 [% startdate | html %]
185 <span class="label">Frequency:</span>
186 [% frequency.description | html %]
189 <span class="label">Manual history: </span>
190 [% IF ( manualhistory ) %]
191 Enabled <a href="/cgi-bin/koha/serials/subscription-history.pl?subscriptionid=[% subscriptionid | uri %]">Edit history</a>
197 <span class="label">Number pattern:</span>
198 [% numberpattern.label | html %]
203 <td>Starting with:</td>
205 <td>[% lastvalue1 | html %]</td>
208 <td>[% lastvalue2 | html %]</td>
211 <td>[% lastvalue3 | html %]</td>
217 <td>[% numberpattern.whenmorethan1 | html %]</td>
220 <td>[% numberpattern.whenmorethan2 | html %]</td>
223 <td>[% numberpattern.whenmorethan3 | html %]</td>
228 [% IF ( irregular_issues ) %]
230 <span class="label">Irregularity:</span>
231 [% irregular_issues | html %] issues
235 <span class="label">First arrival:</span>
236 [% firstacquidate | html %]
238 [% IF ( numberlength ) %]<li>
239 <span class="label">Number of issues:</span>
240 [% numberlength | html %]</li>
242 [% IF ( weeklength ) %]<li>
243 <span class="label">Number of weeks:</span>
244 [% weeklength | html %]</li>
246 [% IF ( monthlength ) %]<li>
247 <span class="label">Number of months:</span>
248 [% monthlength | html %]</li>
251 </div> <!-- /.rows -->
252 </div> <!-- /.col-sd-12 -->
253 </div> <!-- /.row -->
254 </div> <!-- /#subscription_planning -->
256 <div id="subscription_numbering" style="display:none;">
257 <h3>Numbering calculation</h3>
258 <p><label>Numbering formula:</label> [% numberingmethod | html %]</p>
280 <td>[% every1 | html %]</td>
281 <td>[% every2 | html %]</td>
282 <td>[% every3 | html %]</td>
285 <td>When more than</td>
286 <td>[% whenmorethan1 | html %] [% IF ( innerloop1 ) %]<br />
287 <em>(is [% innerloop1 | html %])</em>[% END %]</td>
288 <td>[% whenmorethan2 | html %] [% IF ( innerloop2 ) %]<br />
289 <em>(is [% innerloop2 | html %])</em>[% END %]</td>
290 <td>[% whenmorethan3 | html %] [% IF ( innerloop3 ) %]<br />
291 <em>(is [% innerloop3 | html %])</em>[% END %]</td>
295 <td>[% setto1 | html %]</td>
296 <td>[% setto2 | html %]</td>
297 <td>[% setto3 | html %]</td>
303 <td>[% innerloop1 | html %]</td>
304 <td>[% innerloop2 | html %]</td>
305 <td>[% innerloop3 | html %]</td>
311 <td>[% lastvalue1 | html %]</td>
312 <td>[% lastvalue2 | html %]</td>
313 <td>[% lastvalue3 | html %]</td>
316 </div> <!-- /#subscription_numbering -->
318 <div id="subscription_issues">
321 <th>Issue number</th>
322 <th>Planned date</th>
323 <th>Published date</th>
324 <th>Published date (text)</th>
327 [% FOREACH serialslis IN serialslist %]
330 [% serialslis.serialseq | html %]
333 [% IF serialslis.planneddate %]
334 [% serialslis.planneddate | html %]
340 [% IF serialslis.publisheddate %]
341 [% serialslis.publisheddate | html %]
347 [% serialslis.publisheddatetext | html %]
350 [% IF ( serialslis.status1 ) %]Expected[% END %]
351 [% IF ( serialslis.status2 ) %]Arrived[% END %]
352 [% IF ( serialslis.status3 ) %]Late[% END %]
353 [% IF ( serialslis.status4 ) %]Missing[% END %]
354 [% IF ( serialslis.status41 ) %]Missing (never received)[% END %]
355 [% IF ( serialslis.status42 ) %]Missing (sold out)[% END %]
356 [% IF ( serialslis.status43 ) %]Missing (damaged)[% END %]
357 [% IF ( serialslis.status44 ) %]Missing (lost)[% END %]
358 [% IF ( serialslis.status5 ) %]Not issued[% END %]
359 [% IF ( serialslis.status6 ) %]Delete[% END %]
360 [% IF ( serialslis.status7 ) %]
362 [% IF ( serialslis.claimdate ) %]
363 [% serialslis.claimdate | html %]
366 [% IF ( serialslis.status8 ) %]Stopped[% END %]
369 [% END # /FOREACH serialslist %]
371 </div> <!-- /#subscription_issues -->
373 <div id="subscription_summary">
375 <div class="col-sm-12">
378 <li><span class="label">Start date:</span> [% startdate | html %] </li>
379 <li><span class="label">End date:</span> [% enddate | html %]</li>
380 <li><span class="label">History start date:</span> [% histstartdate | html %] </li>
381 <li><span class="label">History end date:</span> [% histenddate | html %]</li>
382 <li><span class="label">Received issues:</span>[% recievedlist | html | html_line_break %]</li>
383 <li><span class="label">Missing issues:</span>[% missinglist | html | html_line_break %]</li>
384 <li><span class="label">Nonpublic note:</span>[% internalnotes | html | html_line_break %]</li>
385 <li><span class="label">Public note:</span>[% notes | html | html_line_break %]</li>
386 <li><span class="label">History staff note:</span>[% librariannote | html | html_line_break %]</li>
387 <li><span class="label">History OPAC note:</span>[% opacnote | html | html_line_break %]</li>
389 </div> <!-- /.rows -->
390 </div> <!-- /.col-sm-12 -->
391 </div> <!-- /.row -->
392 </div> <!-- /#subscription_summary -->
394 [% IF orders_grouped.size %]
395 <div id="acquisition_details">
396 <h2>Acquisition details</h2>
399 <span class="actions">
400 <a href="#" id="hide_received_orders">Hide already received orders</a>
401 | <a href="#" id="show_all_orders">Show all orders</a>
402 | <a href="#" id="expand_all">Expand all</a>
403 | <a href="#" id="collapse_all">Collapse all</a>
410 <th>Order number</th>
411 <th>Creation date</th>
412 <th>Receive date</th>
414 <th>Internal note</th>
418 <th title="ecost tax exc. / ecost tax inc.">Ordered</th>
419 <th title="Actual cost tax exc. / Actual cost tax inc.">Spent</th>
423 [% FOR ordernumber IN orders_grouped.keys %]
424 [% SET parent_tree_id = loop.count %]
425 [% SET parent_order = orders_grouped.$ordernumber %]
426 <tr data-tt-id="[% parent_tree_id | html %]" class="highlighted-row">
427 <td></td> [%# invoice %]
429 [% IF CAN_user_acquisition_order_manage %]
430 <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>
432 [% parent_order.basket.basketname | html %] ([% parent_order.basket.basketno | html %])
435 <td></td> [%# ordernumber %]
436 <td>[% parent_order.basket.creationdate | $KohaDates %]</td>
437 <td>[% parent_order.datereceived | $KohaDates %]</td>
439 [% SWITCH parent_order.orderstatus %]
440 [% CASE 'new' %]<span title="status_1">New</span>
441 [% CASE 'ordered' %]<span title="status_2">Ordered</span>
442 [% CASE 'partial' %]<span title="status_3">Partial</span>
443 [% CASE 'complete' %]<span title="status_4">Complete</span>
444 [% CASE 'cancelled' %]<span title="status_5">Cancelled</span>
447 <td></td> [%# internalnote %]
448 <td></td> [%# vendornote %]
449 <td></td> [%# fund %]
450 <td>[% parent_order.quantity | html %]</td>
451 <td>[% parent_order.ecost_tax_excluded | $Price %] / [% parent_order.ecost_tax_included | $Price %]</td>
452 <td>[% parent_order.unitprice_tax_excluded | $Price %] / [% parent_order.unitprice_tax_included | $Price %]</td>
454 [% FOR order IN parent_order.orders %]
455 <tr data-tt-id="0" data-tt-parent-id="[% parent_tree_id | html %]">
457 [% IF order.invoice %]
458 [% IF CAN_user_acquisition %]
459 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]" title="Invoice detail page">
460 [% order.invoice.invoicenumber | html %]</a>
462 [% order.invoice.invoicenumber | html %]
466 <td></td> [%# basket %]
467 <td>[% order.ordernumber | html %]</td>
468 <td data-order="[% order.basket.creationdate | uri %]">[% order.basket.creationdate | $KohaDates%]</td>
469 <td data-order="[% order.datereceived | uri %]">[% order.datereceived | $KohaDates %]</td>
470 [% SWITCH order.orderstatus %]
471 [% CASE 'new' %]<td data-order="status_1">New
472 [% CASE 'ordered' %]<td data-order="status_2">Ordered
473 [% CASE 'partial' %]<td data-order="status_3">Partial
474 [% CASE 'complete' %]<td data-order="status_4">Complete
475 [% CASE 'cancelled' %]<td data-order="status_5">Cancelled
478 <td>[% order.order_internalnote | html %]</td>
479 <td>[% order.order_vendornote | html %]</td>
480 <td>[% order.fund.budget_name | html %]</td>
481 <td>[% order.quantity | html %]</td>
483 [% UNLESS order.datereceived %]
484 [% order.ecost_tax_excluded * order.quantity | $Price %] / [% order.ecost_tax_included * order.quantity | $Price %]
488 [% IF order.datereceived %]
489 [%# FIXME What if unitprice has not been filled? %]
490 [% order.unitprice_tax_excluded * order.quantity | $Price %] / [% order.unitprice_tax_included * order.quantity | $Price %]
494 [% END # /FOR order %]
495 [% END # /FOR ordernumber %]
497 </table> <!-- /#orders -->
498 </div> <!-- /#acquisition_details -->
499 [% END # IF orders_grouped.size %]
500 </div> <!-- /#subscription_description -->
502 </div> <!-- /.col-sm-10.col-sm-push-2 -->
504 <div class="col-sm-2 col-sm-pull-10">
506 [% INCLUDE 'serials-menu.inc' %]
508 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
509 </div> <!-- /.row -->
511 [% MACRO jsinclude BLOCK %]
513 var subscriptionid = "[% subscriptionid | html %]";
515 [% Asset.js("js/serials-toolbar.js") | $raw %]
516 [% Asset.js("js/mana.js") | $raw %]
517 [% INCLUDE 'datatables.inc' %]
518 [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
519 [% INCLUDE 'columns_settings.inc' %]
521 // the english words used in display purposes
522 var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose Hemisphere:"),_("Northern"),_("Southern",
523 "Autumn"),_("Winter"),_("Spring"),_("Summer"),_("Fall"),_("Season"),_("Year"));
524 $(document).ready(function() {
525 $("#subscription_description").tabs();
526 $("#renewsub").click(function(){
527 popup([% subscriptionid | html %]);
531 var columns_settings = [% TablesSettings.GetColumns( 'serials', 'subscription-detail', 'orders', 'json' ) | $raw %];
532 var table = KohaTable("orders", {
534 { "bVisible": false, "aTargets": [ 'NoVisible' ] },
535 { "bSortable": false, "aTargets": ["_all"] },
541 }, columns_settings);
543 [% IF orders_grouped.size %]
546 initialState: 'expanded',
548 $(table).treetable('expandAll');
550 $("#expand_all").click(function(e){
552 $(table).treetable('expandAll');
554 $("#collapse_all").click(function(e){
556 $(table).treetable('collapseAll');
561 $("#hide_received_orders").click(function(e){
563 table.fnFilter( '^$', 4, true ); // Not empty "Receive date" columns
565 $("#show_all_orders").click(function(e){
567 table.fnFilter( '', 4 ); // Not filter, display all columns
569 $("#show_all_orders").click();
572 function mana_comment_close(){
573 $("#selected_id").val("");
574 $("#mana-resource-id").val("");
575 $("#mana-comment").val("");
576 $("#mana-comment-box").modal("hide");
581 [% INCLUDE 'intranet-bottom.inc' %]