Bug 13321: Rename variables
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / basket.tt
index 6fe023d..77ec72e 100644 (file)
@@ -1,38 +1,56 @@
 [% 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>
-<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
 [% INCLUDE 'doc-head-close.inc' %]
 [% INCLUDE 'datatables.inc' %]
+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
 <script type="text/javascript">
 //<![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 %]
         }
     }
 
     $(document).ready(function() {
+        $('#toolbar').fixFloat();
         $("#show_all_details").click(function(){
             updateColumnsVisibility($(this).is(":checked"));
         });
 
-        $("#show_all_details").attr('checked', false);
+        $("#show_all_details").prop('checked', false);
         updateColumnsVisibility(false);
         [% UNLESS ( closedate ) %]
             $('#addtoBasket').on('show', function () {
                $(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML);
             });
         [% END %]
+
+        $("body").on("click", ".del_user", function(e){
+            e.preventDefault();
+            del_user( $(this).data("borrowernumber") );
+        });
+
+        $("#add_user").on("click",function(e){
+            e.preventDefault();
+            UserSearchPopup();
+        });
+
+        $(".transfer_order").on("click",function(e){
+            e.preventDefault();
+            transfer_order_popup( $(this).data("ordernumber"));
+        });
     });
 //]]>
 </script>
 <script type="text/javascript">
 //<![CDATA[
 
-            function delete_basket(basketno,booksellerid,delbiblio) {
-                window.location = "[% script_name %]?op=delete_confirm&delbiblio="+delbiblio+"&basketno="+basketno+"&booksellerid="+booksellerid;
-            }
-
             function transfer_order_popup(ordernumber) {
                 var url = "/cgi-bin/koha/acqui/transferorder.pl?"
                     + "ordernumber=" + ordernumber
@@ -52,9 +66,9 @@
             }
 
             function confirm_ediorder() {
-                var is_confirmed = confirm(_("Are you sure you want to close this basket and generate an Edifact order?"));
+                var is_confirmed = confirm(_("Are you sure you want to close this basket and generate an EDIFACT order?"));
                 if (is_confirmed) {
-                    window.location = "[% script_name %]?op=edi_confirm&basketno=[% basketno %]";
+                    window.location = "/cgi-bin/koha/acqui/basket.pl?op=edi_confirm&basketno=[% basketno %]";
                 }
             }
 
@@ -79,7 +93,7 @@
                 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 = "[% script_name %]?op=reopen&basketno=[% basketno %]";
+                    window.location = "/cgi-bin/koha/acqui/basket.pl?op=reopen&basketno=[% basketno %]";
                 }
             }
 //]]>
         var orderst = $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, {
             "sPaginationType": "four_button",
             [% IF ( active ) %]
-              [% UNLESS ( closedate ) %]
                 "aoColumnDefs": [
-                    { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
+                    [% UNLESS ( closedate ) %]
+                        { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
+                    [% END %]
+                    { "sType": "anti-the", "aTargets": [ "anti-the" ] }
                 ],
-              [% END %]
             [% END %]
         } ) );
         var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, {
         window.open(
             "/cgi-bin/koha/acqui/add_user_search.pl",
             'UserSearchPopup',
-            'width=740, height=450, scrollbars=yes, toolbar=no,'
+            'width=840, height=500, scrollbars=yes, toolbar=no,'
          );
     }
 
             ids.push(borrowernumber);
             $("#users_ids").val(ids.join(':'));
             var li = '<li id="user_'+borrowernumber+'">'+borrowername
-                + ' [<a style="cursor:pointer" onclick="del_user('+borrowernumber+');">'
-                + _("Delete user") + '</a>]</li>';
+            + ' <a href="#" data-borrowernumber="'+borrowernumber+'" class="del_user"><i class="fa fa-trash"></i> '
+                + _("Delete user") + '</a></li>';
             $("#users_names").append(li);
             return 0;
         }
                     [% 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>
                     [%# 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-remove"></i> Delete this basket</a></div>
+                    <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>
                    [% 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>
                     [% ELSE %]
                         <div class="btn-group">
-                            <a href="[% script_name %]?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-small" id="closebutton"><i class="fa fa-times-circle"></i> Close this basket</a>
                         </div>
                     [% END %]
-                        <div class="btn-group"><a href="[% script_name %]?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="/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>
                         [% 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-small" id="ediorderbutton"><i class="fa fa-download"></i> Create EDIFACT order</a></div>
+                        [% END %]
+                        [% IF ( active && books_loop ) %]
+                            <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-small" id="emailvendorbutton"><i class="fa fa-envelope"></i> E-mail order</button>
+                                </form>
+                            </div>
                         [% END %]
                 </div>
 <!-- Modal for confirm deletion box-->
                         </div>
                         <div class="modal-footer">
                             <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
-                            <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],0); return false;" >Delete basket</button>
+                            <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
+                                <input type="hidden" name="op" value="delete_confirm" />
+                                <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>
+                            </form>
                         </div>
                     [% ELSE %]
                         <div class="modal-body">
                         </div>
                         <div class="modal-footer">
                             <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
-                            <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],0); return false;">Delete basket and orders</button>
-                            <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],1); return false;">Delete basket, orders and bibs</button>
+                            <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
+                                <input type="hidden" name="op" value="delete_confirm" />
+                                <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>
+                            </form>
+
+                            <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
+                                <input type="hidden" name="op" value="delete_confirm" />
+                                <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>
+                            </form>
+
                         </div>
                     [% END %]
                 </div>
                 [% 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="[% script_name %]?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="/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>
                 [% END %]
             [% END %]
     <h2>Vendor not found</h2>
     [% ELSE %]
         [% IF ( delete_confirmed ) %]
-            <h3>Basket deleted</h3>
+            <div class="dialog message">
+                <h3>Basket deleted</h3>
+            </div>
             [% IF (cannotdelbiblios) %]
                 <div class="dialog alert">
                     <p><strong>Warning:</strong></p>
             <META HTTP-EQUIV=Refresh CONTENT="0; url=booksellers.pl">
             [% END %]
         [% ELSE %]
+
+        [% 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 %]
         <h1>[% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno %]) for <a href="supplier.pl?booksellerid=[% booksellerid %]">[% name|html %]</a></h1>
         [% IF ( basketno ) %]
             <div id="acqui_basket_summary" class="yui-g">
                 [% 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 ( deliveryplace ) %]<li><span class="label">Delivery place:</span> [% deliveryplace %]</li>[% END %]
-                [% IF ( billingplace ) %]<li><span class="label">Billing place:</span> [% billingplace %]</li>[% END %]
+                [% IF deliveryplace %]<li><span class="label">Delivery place:</span> [% Branches.GetName( deliveryplace ) %]</li>[% END %]
+                [% IF billingplace %]<li><span class="label">Billing place:</span> [% Branches.GetName( billingplace ) %]</li>[% END %]
                 [% IF ( authorisedbyname ) %]<li><span class="label">Created by:</span>  [% authorisedbyname %]</li>[% END %]
                 <li id="managedby">
                     <form action="" method="post">
                               [% FOREACH user IN users %]
                                 <li id="user_[% user.borrowernumber %]">
                                     [% user.firstname %] [% user.surname %]
-                                    [<a onclick="del_user([% user.borrowernumber %]);" style="cursor:pointer">Delete user</a>]
+                                    <a href="#" data-borrowernumber="[% user.borrowernumber %]" class="del_user"><i class="fa fa-trash"></i> Delete user</a>
                                 </li>
                               [% END %]
                             </ul>
                             <input type="hidden" id="basketno" name="basketno" value="[% basketno %]" />
                             <input type="hidden" id="users_ids" name="users_ids" value="[% users_ids %]" />
                             <input type="hidden" id="op" name="op" value="mod_users" />
-                            <input type="button" id="add_user" onclick="UserSearchPopup();" value="Add user" />
+                            <input type="button" id="add_user" value="Add user" />
                             <input type="submit" value="Save changes" />
                         </div>
                     </form>
                 </li>
                 <li id="branch">
                     <span class="label">Library:</span>
-                    [% IF basketbranchname %]
-                        [% basketbranchname %]
+                    [% IF basketbranchcode %]
+                        [% Branches.GetName( basketbranchcode ) %]
                     [% ELSE %]
                         No library
                     [% 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>
+
 
                 </ol>
                 </div>
                             <input type="submit" value="Change basket group" />
                           [% END %]
                         </li>
-                    [% IF ( basketgroup.deliveryplacename ) %]<li><span class="label">Basket group delivery placename:</span> [% basketgroup.deliveryplacename %]</li>[% END %]
-                    [% IF ( basketgroup.billingplacename ) %]<li><span class="label">Basket group billing place:</span> [% basketgroup.billingplacename %]</li>[% END %]
+                    [% IF basketgroup.deliveryplace %]<li><span class="label">Basket group delivery placename:</span> [% Branches.GetName( basketgroup.deliveryplace ) %]</li>[% END %]
+                    [% IF basketgroup.billingplace %]<li><span class="label">Basket group billing place:</span> [% Branches.GetName( basketgroup.billingplace ) %]</li>[% END %]
                         </ol>
                     [% IF ( CAN_user_acquisition_group_manage ) %]
                     </form>
                 <thead>
                     <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="anti-the">Order</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 ( active ) %]
                             [% UNLESS ( closedate ) %]
                                 <th>Modify</th>
-                                <th>Delete</th>
+                                <th>Cancel order</th>
                             [% END %]
                         [% END %]
                     </tr>
                 [% 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 | $Price %])</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 ) %]
                         </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 | $Price %]</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 ) %]
                                 <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber %]&amp;booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Modify</a>
                                 [% UNLESS (books_loo.order_received) %]
                                     <br />
-                                    <a href="#" onclick="transfer_order_popup([% books_loo.ordernumber %]); return false;">Transfer</a>
+                                    <a href="#" class="transfer_order" data-ordernumber="[% books_loo.ordernumber %]">Transfer</a>
                                 [% END %]
                             </td>
                             <td>
                             [% IF ( books_loo.left_holds_on_order ) %]
-                            <span class="button" title="Can't delete order, ([% books_loo.holds_on_order %]) holds are linked with this order cancel holds first">Can't delete order</span><br>
+                            <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">Delete order</a><br>
+                            <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>
                             [% 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">Delete order and catalog record</a><br>
+                            <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>
                             [% ELSE %]
-                            <span class="button" title="Can't delete catalog record, see constraints below">Can't delete order and catalog record</span><br>
+                            <span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br>
                             [% END %]
                             [% IF ( books_loo.left_item ) %]
                             <b title="Can't delete catalog record, because of [% books_loo.items %] existing hold(s)" >[% books_loo.items %] item(s) left</b><br>
                 <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>
                         </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 | $Price %]</td>
+                    <td class="number">[% order.tax_value | $Price %]</td>
                     <td>[% order.budget_name %]
                   </tr>
                 [% END %]
 
     <!-- Modal -->
     <div id="addtoBasket" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="addtoBasketLabel" aria-hidden="true">
-        <div class="modal-body"></div>
+        <div class="modal-body">
+        [% IF active %]
+            [% INCLUDE 'acquisitions-add-to-basket.inc' %]
+        [% END %]
+        </div>
         <div class="modal-footer">
             <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
         </div>
     </div>
 
-    [% IF active %]
-        [% INCLUDE 'acquisitions-add-to-basket.inc' %]
-    [% END %]
-
         [% END %]
+
 [% END %]
 [% END %]    [% ELSE %] <!-- if we want just to select a basketgroup for a closed basket -->
     [% END %]
 [% IF edi_confirm %]
         <div id="closebasket_needsconfirmation" class="dialog alert">
 
-        <form action="/cgi-bin/koha/acqui/basket.pl" class="confirm">
-            <h1>Are you sure you want to generate an edifact order and close basket [% basketname|html %]?</h1>
+        <form action="/cgi-bin/koha/acqui/basket.pl">
+            <h1>Are you sure you want to generate an EDIFACT order and close basket [% basketname|html %]?</h1>
             [% IF CAN_user_acquisition_group_manage %]
             <p>
             <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
             <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
             <input type="hidden" name="confirm" value="1" />
             <input type="hidden" name="basketgroupname" value="[% basketgroupname %]" />
-            <input type="submit" class="approve" value="Yes, close (Y)" accesskey="y" />
-            <input type="submit" class="deny" value="No, don't close (N)" accesskey="n" onclick="javascript:window.location='/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]';return false;" />
+            <button type="submit" class="approve" accesskey="Y"><i class="fa fa-fw fa-check"></i> Yes, close (Y)</button>
+        </form>
+        <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
+            <input type="hidden" name="basketno" value="[% basketno %]" />
+            <button type="submit" class="deny" accesskey="N"><i class="fa fa-fw fa-remove"></i> No, don't close (N)</button>
         </form>
         </div>
     [% END %]