Bug 13321: Rename variables
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / basket.tt
index 8a114fd..77ec72e 100644 (file)
 //<![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 %]
         }
     }
                         <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"><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-small" id="emailvendorbutton"><i class="fa fa-envelope"></i> E-mail order</button>
+                                </form>
+                            </div>
                         [% END %]
                 </div>
 <!-- Modal for confirm deletion box-->
             [% 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>
         [% IF ( basketno ) %]
             <div id="acqui_basket_summary" class="yui-g">
                     <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 | $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 ) %]
                 <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 %]