Bug 15685: Allow creation of items (AcqCreateItem) to be customizable per-basket
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / basket.tt
index 8a114fd..aa081ba 100644 (file)
@@ -1,10 +1,24 @@
+[% BLOCK csv_export %]
+    <div class="btn-group">
+        <a id="exportbutton" class="btn btn-default btn-sm" href="[% script_name %]?op=export&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]"><i class="fa fa-download"></i> Export as CSV</a>
+      <a class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>
+      <ul class="dropdown-menu" id="export-csv-menu">
+          <li><a href="#">Default</a></li>
+          [% IF csv_profiles %]
+              [% FOR csv IN csv_profiles %]
+                <li><a href="#" data-value="[% csv.export_format_id %]">[% csv.profile %]</a></li>
+              [% END %]
+          [% END %]
+       </ul>
+    </div>
+[% END %]
 [% USE KohaDates %]
 [% USE Branches %]
 [% USE Price %]
 [% USE AuthorisedValues %]
 
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Acquisitions &rsaquo; [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</title>
+<title>Koha &rsaquo; Acquisitions &rsaquo; [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno |html %]) for [% booksellername|html %]</title>
 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
 [% INCLUDE 'doc-head-close.inc' %]
 [% INCLUDE 'datatables.inc' %]
 //<![CDATA[
     function updateColumnsVisibility(visible) {
         if ( visible ) {
-            $("table .gste, .gsti").show();
+            $("table .tax_excluded, .tax_included").show();
         } else {
             [% IF ( listincgst ) %]
-                $("table .gste").hide();
+                $("table .tax_excluded").hide();
             [% ELSE %]
-                $("table .gsti").hide();
+                $("table .tax_included").hide();
             [% END %]
         }
     }
@@ -68,7 +82,7 @@
             function confirm_ediorder() {
                 var is_confirmed = confirm(_("Are you sure you want to close this basket and generate an EDIFACT order?"));
                 if (is_confirmed) {
-                    window.location = "/cgi-bin/koha/acqui/basket.pl?op=edi_confirm&basketno=[% basketno %]";
+                    window.location = "/cgi-bin/koha/acqui/basket.pl?op=edi_confirm&basketno=[% basketno |html %]";
                 }
             }
 
                 var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
                 var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
                 if (is_confirmed) {
-                    window.location = "/cgi-bin/koha/acqui/basket.pl?op=reopen&basketno=[% basketno %]";
+                    window.location = "/cgi-bin/koha/acqui/basket.pl?op=reopen&basketno=[% basketno |html %]";
                 }
             }
 //]]>
             e.preventDefault();
             confirm_reopen();
         });
+        // Generates a dynamic link for exporting the selections data as CSV
+        $("#exportbutton, #export-csv-menu a").click(function() {
+            // Building the url from currently checked boxes
+            var url = '/cgi-bin/koha/acqui/basket.pl';
+            url += $('#exportbutton').attr('href');
+            if($(this).attr("data-value")) {
+                url += '&amp;csv_profile=' + $(this).attr("data-value");
+            }
+            // And redirecting to the CSV page
+            location.href = url;
+            return false;
+        });
     });
 
     function UserSearchPopup(f) {
 [% INCLUDE 'acquisitions-search.inc' %]
 
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name|html %]</a> &rsaquo; [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</div>
+<div id="breadcrumbs">
+    <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
+    <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo;
+    <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername|html %]</a> &rsaquo;
+    [% UNLESS ( basketno ) %][% IF ( delete_confirmed ) %]Deleted [% ELSE %]New [% END %][% END %]Basket [% basketname|html %] [% IF ( basketno ) %]([% basketno |html %])[% END %] for [% booksellername|html %]
+</div>
 
 <div id="doc3" class="yui-t2">
 
         [% IF !confirm_close && !edi_confirm %]
         [% UNLESS ( selectbasketg ) %]
             [% UNLESS ( closedate ) %]
+            [% UNLESS ( delete_confirmed ) %]
                 <div id="toolbar" class="btn-toolbar">
                     [% IF active %]
-                        <div class="btn-group"><a href="#addtoBasket" role="button" class="btn btn-small" data-toggle="modal"><i class="fa fa-plus"></i> Add to basket</a></div>
+                        <div class="btn-group"><a href="#addtoBasket" role="button" class="btn btn-default btn-sm" data-toggle="modal"><i class="fa fa-plus"></i> Add to basket</a></div>
                     [% END %]
-                    <div class="btn-group"><a href="basketheader.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]&amp;op=add_form" class="btn btn-small" id="basketheadbutton"><i class="fa fa-pencil"></i> Edit basket</a></div>
+                    <div class="btn-group"><a href="basketheader.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]&amp;op=add_form" class="btn btn-default btn-sm" id="basketheadbutton"><i class="fa fa-pencil"></i> Edit basket</a></div>
                     [%# FIXME This action should not be available for everyone %]
-                    <div class="btn-group"><a href="#deleteBasketModal" role="button" class="btn btn-small" data-toggle="modal" id="delbasketbutton"><i class="fa fa-trash"></i> Delete this basket</a></div>
+                    <div class="btn-group"><a href="#deleteBasketModal" role="button" class="btn btn-default btn-sm" data-toggle="modal" id="delbasketbutton"><i class="fa fa-trash"></i> Delete this basket</a></div>
                    [% IF ( unclosable ) %]
                     [% ELSIF ( uncertainprices ) %]
-                        <div class="btn-group"><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&amp;owner=1" class="btn btn-small" id="uncertpricesbutton">Uncertain prices</a></div>
+                        <div class="btn-group"><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&amp;owner=1" class="btn btn-default btn-sm" id="uncertpricesbutton"><i class="fa fa-usd"></i> Uncertain prices</a></div>
                     [% ELSE %]
                         <div class="btn-group">
-                            <a href="/cgi-bin/koha/acqui/basket.pl?op=close&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-small" id="closebutton"><i class="fa fa-times-circle"></i> Close this basket</a>
+                            <a href="/cgi-bin/koha/acqui/basket.pl?op=close&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-default btn-sm" id="closebutton"><i class="fa fa-times-circle"></i> Close this basket</a>
                         </div>
                     [% END %]
-                        <div class="btn-group"><a href="/cgi-bin/koha/acqui/basket.pl?op=export&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="fa fa-download"></i> Export this basket as CSV</a></div>
+
+                    [% PROCESS csv_export %]
+
                         [% IF ediaccount %]
-                        <div class="btn-group"><a href="/cgi-bin/koha/acqui/edi_ean.pl?op=ediorder&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-small" id="ediorderbutton"><i class="fa fa-download"></i> Create EDIFACT order</a></div>
+                        <div class="btn-group"><a href="/cgi-bin/koha/acqui/edi_ean.pl?op=ediorder&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-default btn-sm" id="ediorderbutton"><i class="fa fa-download"></i> Create EDIFACT order</a></div>
                         [% END %]
+
                         [% IF ( active && books_loop ) %]
-                        <div class="btn-group"><a href="[% script_name %]?op=email&amp;basketno=[% basketno %]" class="btn btn-small" id="emailvendorbutton"><i class="fa fa-envelope"></i> E-mail order</a></div>
+                            <div class="btn-group">
+                                <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
+                                    <input type="hidden" name="op" value="email" />
+                                    <input type="hidden" name="basketno" value="[% basketno %]" />
+                                    <button type="submit" class="btn btn-default btn-sm" id="emailvendorbutton"><i class="fa fa-envelope"></i> E-mail order</button>
+                                </form>
+                            </div>
                         [% END %]
                 </div>
-<!-- Modal for confirm deletion box-->
-                <div class="modal hide" id="deleteBasketModal" tabindex="-1" role="dialog" aria-labelledby="delbasketModalLabel" aria-hidden="true">
+            [% END %]
+
+            <!-- Modal for confirm deletion box-->
+                <div class="modal" id="deleteBasketModal" tabindex="-1" role="dialog" aria-labelledby="delbasketModalLabel" aria-hidden="true">
+                    <div class="modal-dialog">
+                    <div class="modal-content">
                     <div class="modal-header">
                         <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
                         <h3>Confirm deletion</h3>
                                 <input type="hidden" name="basketno" value="[% basketno %]" />
                                 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
                                 <input type="hidden" name="delbiblio" value="0" />
-                                <button type="submit" class="btn btn-default">Delete basket</button>
+                                <button type="submit" class="btn btn-default btn-default">Delete basket</button>
                             </form>
                         </div>
                     [% ELSE %]
                                 <input type="hidden" name="basketno" value="[% basketno %]" />
                                 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
                                 <input type="hidden" name="delbiblio" value="0" />
-                                <button type="submit" class="btn btn-default">Delete basket and orders</button>
+                                <button type="submit" class="btn btn-default btn-default">Delete basket and orders</button>
                             </form>
 
                             <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
                                 <input type="hidden" name="basketno" value="[% basketno %]" />
                                 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
                                 <input type="hidden" name="delbiblio" value="1" />
-                                <button type="submit" class="btn btn-default">Delete basket, orders, and records</button>
+                                <button type="submit" class="btn btn-default btn-default">Delete basket, orders, and records</button>
                             </form>
 
                         </div>
                     [% END %]
+                    </div>
+                    </div>
                 </div>
 <!-- End of Modal-->
             [% ELSE %]
                 [% UNLESS ( grouped ) %]
                 <div id="toolbar" class="btn-toolbar">
-                    <div class="btn-group"><a href="#" class="btn btn-small" id="reopenbutton"><i class="fa fa-refresh"></i> Reopen this basket</a></div>
-                    <div class="btn-group"><a href="/cgi-bin/koha/acqui/basket.pl?op=export&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="fa fa-download"></i> Export this basket as CSV</a></div>
+
+                    <div class="btn-group"><a href="#" class="btn btn-default btn-sm" id="reopenbutton"><i class="fa fa-refresh"></i> Reopen this basket</a></div>
+
+                    [% PROCESS csv_export %]
+
                 </div>
                 [% END %]
             [% END %]
                 </div>
                 <a href="booksellers.pl">Click here to go back to booksellers page</a>
             [% ELSE %]
-            <META HTTP-EQUIV=Refresh CONTENT="0; url=booksellers.pl">
+                <a href="/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid %]" class="btn btn-default btn-sm">Show baskets for vendor [% booksellername | html %]</a> <a href="/cgi-bin/koha/acqui/booksellers.pl" class="btn btn-default btn-sm">Show all active baskets</a>
             [% END %]
         [% ELSE %]
 
-        [% IF email_error %]
-            <div class="dialog alert">
-            [% IF ( email_error == "no_email" ) %]
-                This vendor has no contact selected for sending orders to or is missing an e-mail address.
-            [% ELSIF ( email_error == "no_basketno" ) %]
-                No basket given.
-            [% ELSIF ( email_error == "no_letter" ) %]
-                There is no notice template with code ACQORDER defined.
-            [% ELSE %]
-                ERROR! - [% email_error %]
-            [% END %]
+        [% FOR m IN messages %]
+            <div class="dialog [% m.type %]">
+                [% SWITCH m.code %]
+                [% CASE 'no_email' %]
+                    This vendor has no contact selected for sending orders to or is missing an e-mail address.
+                [% CASE 'no_basketno' %]
+                    No basket given.
+                [% CASE 'no_letter' %]
+                    There is no notice template with code ACQORDER defined.
+                [% CASE 'email_sent' %]
+                    Order e-mail was sent to the vendor.
+                [% CASE %]
+                    ERROR! - [% m.code %]
+                [% END %]
             </div>
         [% END %]
-        [% IF ( email_ok ) %]
-            <div class="dialog message">Order e-mail was sent to the vendor.</div>
-        [% END %]
-        <h1>[% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno %]) for <a href="supplier.pl?booksellerid=[% booksellerid %]">[% name|html %]</a></h1>
+        <h1>[% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno |html %]) for <a href="supplier.pl?booksellerid=[% booksellerid %]">[% booksellername|html %]</a></h1>
         [% IF ( basketno ) %]
             <div id="acqui_basket_summary" class="yui-g">
                 <div class="rows">
                 <div class="yui-u first">
                 <ol>
-                [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote %]</li>[% END %]
-                [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote %]</li>[% END %]
+                [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote |html %]</li>[% END %]
+                [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote |html %]</li>[% END %]
                 [% IF ( basketcontractno ) %]
                     <li><span class="label">Contract name:</span> <a href="../admin/aqcontract.pl?op=add_form&amp;contractnumber=[% basketcontractno %]&amp;booksellerid=[% booksellerid %]">[% basketcontractname %]</a></li>
                 [% END %]
                 [% IF ( creationdate ) %]<li><span class="label">Opened on:</span>  [% creationdate | $KohaDates %]</li>[% END %]
                 [% IF ( closedate ) %]<li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>[% END %]
                 [% IF ( estimateddeliverydate ) %]<li><span class="label">Estimated delivery date:</span> [% estimateddeliverydate | $KohaDates  %]</li>[% END %]
-                [% IF ( estimateddeliverydate ) %]<li><span class="label">Estimated delivery date:</span> [% estimateddeliverydate | $KohaDates  %]</li>[% END %]
                 <li><span class="label">Orders are standing:</span> [% IF is_standing %]Yes[% ELSE %]No[% END %]</li>
 
+                [% IF basket.create_items %]
+                    <li>
+                        <span class="label">Create items when:</span>
+                        [% SWITCH basket.create_items %]
+                            [% CASE 'receiving' %]Receiving items
+                            [% CASE 'cataloguing' %]Cataloguing items
+                            [% CASE %]Placing orders
+                        [% END %]
+                    </li>
+                [% END %]
 
                 </ol>
                 </div>
                     <tr>
                         <th>No.</th>
                         <th class="anti-the">Order</th>
-                        <th class="gste">RRP tax exc.</th>
-                        <th class="gste">Ecost tax exc.</th>
-                        <th class="gsti">RRP tax inc.</th>
-                        <th class="gsti">ecost tax inc.</th>
+                        <th class="tax_excluded">RRP tax exc.</th>
+                        <th class="tax_excluded">ecost tax exc.</th>
+                        <th class="tax_included">RRP tax inc.</th>
+                        <th class="tax_included">ecost tax inc.</th>
                         <th>Qty.</th>
-                        <th class="gste">Total tax exc. ([% currency %])</th>
-                        <th class="gsti">Total tax inc. ([% currency %])</th>
+                        <th class="tax_excluded">Total tax exc. ([% currency %])</th>
+                        <th class="tax_included">Total tax inc. ([% currency %])</th>
                         <th>GST %</th>
                         <th>GST</th>
                         <th>Fund</th>
                 [% FOREACH foot_loo IN book_foot_loop %]
                     <tr>
                         <th></th>
-                        <th>Total (GST [% foot_loo.gstrate * 100 | $Price %])</th>
-                        <th class="gste">&nbsp;</th>
-                        <th class="gste">&nbsp;</th>
-                        <th class="gsti">&nbsp;</th>
-                        <th class="gsti">&nbsp;</th>
+                        <th>Total (GST [% foot_loo.tax_rate * 100 %])</th>
+                        <th class="tax_excluded">&nbsp;</th>
+                        <th class="tax_excluded">&nbsp;</th>
+                        <th class="tax_included">&nbsp;</th>
+                        <th class="tax_included">&nbsp;</th>
                         <th>[% foot_loo.quantity %]</th>
-                        <th class="gste">[% foot_loo.totalgste | $Price%]</th>
-                        <th class="gsti">[% foot_loo.totalgsti | $Price %]</th>
+                        <th class="tax_excluded">[% foot_loo.total_tax_excluded | $Price%]</th>
+                        <th class="tax_included">[% foot_loo.total_tax_included | $Price %]</th>
                         <th>&nbsp;</th>
-                        <th>[% foot_loo.gstvalue | $Price %]</th>
+                        <th>[% foot_loo.tax_value | $Price %]</th>
                         <th>&nbsp;</th>
                         <th>&nbsp;</th>
                         [% IF ( active ) %]
                 <tr>
                     <th></th>
                     <th>Total ([% currency %])</th>
-                    <th class="gste">&nbsp;</th>
-                    <th class="gste">&nbsp;</th>
-                    <th class="gsti">&nbsp;</th>
-                    <th class="gsti">&nbsp;</th>
+                    <th class="tax_excluded">&nbsp;</th>
+                    <th class="tax_excluded">&nbsp;</th>
+                    <th class="tax_included">&nbsp;</th>
+                    <th class="tax_included">&nbsp;</th>
                     <th>[% total_quantity %]</th>
-                    <th class="gste">[% total_gste | $Price %]</th>
-                    <th class="gsti">[% total_gsti | $Price %]</th>
+                    <th class="tax_excluded">[% total_tax_excluded | $Price %]</th>
+                    <th class="tax_included">[% total_tax_included | $Price %]</th>
                     <th>&nbsp;</th>
-                    <th>[% total_gstvalue | $Price %]</th>
+                    <th>[% total_tax_value | $Price %]</th>
                     <th>&nbsp;</th>
                     <th>&nbsp;</th>
                     [% IF ( active ) %]
                                 [% IF ( books_loo.isbn ) %] - [% books_loo.isbn %][% END %]
                                 [% IF ( books_loo.issn ) %] - [% books_loo.issn %][% END %]
                                 [% IF ( books_loo.publishercode ) %], [% books_loo.publishercode %][% END %]
-                                [% IF ( books_loo.publicationyear ) %], [% books_loo.publicationyear %][% END %]
+                                [% IF ( books_loo.publicationyear ) %], [% books_loo.publicationyear %]
+                                [% ELSIF ( books_loo.copyrightdate ) %] [% books_loo.copyrightdate %][% END %]
                                 [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
                                 [% IF ( books_loo.suggestionid ) %]
                                     <br/>
                         </td>
                         [% SET zero_regex = "^0{1,}\.?0{1,}[^1-9]" %] [%# 0 or 0.0 or 0.00 or 00 or 00.0 or 00.00 or 0.000 ... %]
                         [%# FIXME: use of a regexp is not ideal; bugs 9410 and 10929 suggest better way of handling this %]
-                        <td class="number gste [% IF books_loo.rrpgste.search(zero_regex) %]error[% END %]">[% books_loo.rrpgste | $Price %]</td>
-                        <td class="number gste [% IF books_loo.ecostgste.search(zero_regex) %]error[% END %]">[% books_loo.ecostgste | $Price%]</td>
-                        <td class="number gsti [% IF books_loo.rrpgsti.search(zero_regex) %]error[% END %]">[% books_loo.rrpgsti | $Price %]</td>
-                        <td class="number gsti [% IF books_loo.ecostgsti.search(zero_regex) %]error[% END %]">[% books_loo.ecostgsti | $Price %]</td>
+                        <td class="number tax_excluded [% IF books_loo.rrp_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_excluded | $Price %]</td>
+                        <td class="number tax_excluded [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_excluded | $Price%]</td>
+                        <td class="number tax_included [% IF books_loo.rrp_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_included | $Price %]</td>
+                        <td class="number tax_included [% IF books_loo.ecost_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_included | $Price %]</td>
                         <td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">[% books_loo.quantity %]</td>
-                        <td class="number gste [% IF books_loo.totalgste.search(zero_regex) %]error[% END %]">[% books_loo.totalgste | $Price %]</td>
-                        <td class="number gsti [% IF books_loo.totalgsti.search(zero_regex) %]error[% END %]">[% books_loo.totalgsti | $Price %]</td>
-                        <td class="number">[% books_loo.gstrate * 100 | $Price %]</td>
-                        <td class="number [% IF books_loo.gstvalue.search(zero_regex) %]error[% END %]">[% books_loo.gstvalue | $Price %]</td>
+                        <td class="number tax_excluded [% IF books_loo.total_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_excluded | $Price %]</td>
+                        <td class="number tax_included [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_included | $Price %]</td>
+                        <td class="number">[% books_loo.tax_rate * 100 %]</td>
+                        <td class="number [% IF books_loo.tax_value.search(zero_regex) %]error[% END %]">[% books_loo.tax_value | $Price %]</td>
                         <td>[% books_loo.budget_name %]</td>
                         <td>[% books_loo.suppliers_report %]</td>
                         [% IF ( active ) %]
                             [% IF ( books_loo.left_holds_on_order ) %]
                             <span class="button" title="Can't cancel order, ([% books_loo.holds_on_order %]) holds are linked with this order cancel holds first">Can't cancel order</span><br>
                             [% ELSE %]
-                            <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber %]&biblionumber=[% books_loo.biblionumber %]&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno %]" class="button">Cancel order</a><br>
+                            <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber %]&biblionumber=[% books_loo.biblionumber %]&basketno=[% basketno %]&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno %]" class="button">Cancel order</a><br>
                             [% END %]
                             [% IF ( books_loo.can_del_bib ) %]
-                            <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber %]&biblionumber=[% books_loo.biblionumber %]&del_biblio=1&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno %]" class="button">Cancel order and delete catalog record</a><br>
+                            <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber %]&biblionumber=[% books_loo.biblionumber %]&basketno=[% basketno %]&del_biblio=1&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno %]" class="button">Cancel order and delete catalog record</a><br>
                             [% ELSE %]
                             <span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br>
                             [% END %]
                 <tr>
                   <th>No.</th>
                   <th>Order</th>
-                  <th class="gste">RRP tax exc.</th>
-                  <th class="gste">ecost tax exc.</th>
-                  <th class="gsti">RRP tax inc.</th>
-                  <th class="gsti">ecost tax inc.</th>
+                  <th class="tax_excluded">RRP tax exc.</th>
+                  <th class="tax_excluded">ecost tax exc.</th>
+                  <th class="tax_included">RRP tax inc.</th>
+                  <th class="tax_included">ecost tax inc.</th>
                   <th>Qty.</th>
-                  <th class="gste">Total tax exc. ([% currency %])</th>
-                  <th class="gsti">Total tax inc. ([% currency %])</th>
+                  <th class="tax_excluded">Total tax exc. ([% currency %])</th>
+                  <th class="tax_included">Total tax inc. ([% currency %])</th>
                   <th>GST %</th>
                   <th>GST</th>
                   <th>Fund</th>
                         [% IF ( order.isbn ) %] - [% order.isbn %][% END %]
                         [% IF ( order.issn ) %] - [% order.issn %][% END %]
                         [% IF ( order.publishercode ) %], [% order.publishercode %][% END %]
-                        [% IF ( order.publicationyear ) %], [% order.publicationyear %][% END %]
+                        [% IF ( order.publicationyear ) %], [% order.publicationyear %]
+                        [% ELSIF ( order.copyrightdate ) %] [% order.copyrightdate %][% END %]
                         [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
                         [% IF ( order.cancellationreason ) %]
                           <br />
                         </p>
                       [% END %]
                     </td>
-                    <td class="number gste">[% order.rrpgste | $Price %]</td>
-                    <td class="number gste">[% order.ecostgste | $Price %]</td>
-                    <td class="number gsti">[% order.rrpgsti | $Price %]</td>
-                    <td class="number gsti">[% order.ecostgsti | $Price %]</td>
+                    <td class="number tax_excluded">[% order.rrp_tax_excluded | $Price %]</td>
+                    <td class="number tax_excluded">[% order.ecost_tax_excluded | $Price %]</td>
+                    <td class="number tax_included">[% order.rrp_tax_included | $Price %]</td>
+                    <td class="number tax_included">[% order.ecost_tax_included | $Price %]</td>
                     <td class="number">[% order.quantity %]</td>
-                    <td class="number gste">[% order.totalgste | $Price %]</td>
-                    <td class="number gsti">[% order.totalgsti | $Price %]</td>
-                    <td class="number">[% order.gstrate * 100 | $Price %]</td>
-                    <td class="number">[% order.gstvalue | $Price %]</td>
+                    <td class="number tax_excluded">[% order.total_tax_excluded | $Price %]</td>
+                    <td class="number tax_included">[% order.total_tax_included | $Price %]</td>
+                    <td class="number">[% order.tax_rate * 100 %]</td>
+                    <td class="number">[% order.tax_value | $Price %]</td>
                     <td>[% order.budget_name %]
                   </tr>
                 [% END %]
         [% UNLESS ( closedate ) %]
 
     <!-- Modal -->
-    <div id="addtoBasket" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="addtoBasketLabel" aria-hidden="true">
+    <div id="addtoBasket" class="modal" tabindex="-1" role="dialog" aria-labelledby="addtoBasketLabel" aria-hidden="true">
+        <div class="modal-dialog">
+        <div class="modal-content">
         <div class="modal-body">
         [% IF active %]
             [% INCLUDE 'acquisitions-add-to-basket.inc' %]
         <div class="modal-footer">
             <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
         </div>
+        </div>
+        </div>
     </div>
 
         [% END %]