[Koha-patches] [PATCH] Bugs: 3965, 3979, 3981 - GST changes in acquisitions

Nicole Engard nengard at gmail.com
Fri Dec 18 12:31:01 CET 2009


This patch fixes three bugs:

Bug 3965: gist sys pref not taken into account
 changed it so that GST does not show on basket if gist pref set to 0
 changed it so that GST fields don't appear on vendor record if gist pref=0

Bug 3979: gst options not lining up
 fixed layout on vendor add/edit form so GST radio buttons line up right

Bug 3981: GST confusing in en-US
 there is no GST in the US and so GST changed to 'Tax' in templates

Also, a small spacing fix was made to the path on the basket grouping
template.
---
 acqui/basket.pl                                    |    1 +
 acqui/supplier.pl                                  |    3 +
 .../prog/en/modules/acqui/basket.tmpl              |   18 ++++++--
 .../prog/en/modules/acqui/basketgroup.tmpl         |    2 +-
 .../prog/en/modules/acqui/supplier.tmpl            |   46 +++++++++++---------
 5 files changed, 44 insertions(+), 26 deletions(-)

diff --git a/acqui/basket.pl b/acqui/basket.pl
index 41402fd..492417a 100755
--- a/acqui/basket.pl
+++ b/acqui/basket.pl
@@ -306,4 +306,5 @@ if ( $op eq 'delete_confirm' ) {
         grouped              => $basket->{basketgroupid},
     );
 }
+
 output_html_with_http_headers $query, $cookie, $template->output;
diff --git a/acqui/supplier.pl b/acqui/supplier.pl
index 3934da3..b8afe0d 100755
--- a/acqui/supplier.pl
+++ b/acqui/supplier.pl
@@ -154,4 +154,7 @@ elsif ($op eq 'delete') {
 		enter                => 1,
 	);
 }
+
+
+
 output_html_with_http_headers $query, $cookie, $template->output;
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
index c305658..a174e5e 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
@@ -191,8 +191,9 @@
                     </tr>
                 </thead>
                 <tfoot>
+                <!-- TMPL_IF name="GST" -->
                 <tr>
-                    <th>Total GST Exc.</th>
+                    <th>Total Tax Exc.</th>
                     <th><!-- TMPL_VAR NAME="total_rrp_gste" --></th>
                     <th>&nbsp;</th>
                     <th><!-- TMPL_VAR name="qty_total" --></th>
@@ -206,19 +207,28 @@
                         <!-- /TMPL_IF -->
                 </tr>
                 <tr>
-                    <th>GST (<!-- TMPL_VAR NAME="gist_rate" -->)</th>
+                    <th>Tax (<!-- TMPL_VAR NAME="gist_rate" -->)</th>
                     <th><!-- TMPL_VAR NAME="gist_rrp" --></th>
                     <th>&nbsp;</th>
                     <th>&nbsp;</th>
                     <th><!-- TMPL_VAR NAME="gist_est" --></th>
                 </tr>
                 <tr>
-                    <th>Total GST Inc. (<!-- TMPL_VAR NAME="currency" -->)</th>
+                    <th>Total Tax Inc. (<!-- TMPL_VAR NAME="currency" -->)</th>
                     <th><!-- TMPL_VAR NAME="total_rrp_gsti" --></th>
                     <th>&nbsp;</th>
                     <th><!-- TMPL_VAR name="qty_total" --></th>
                     <th><!-- TMPL_VAR NAME="total_est_gsti" --></th>
                 </tr>
+                <!-- TMPL_ELSE -->
+                <tr>
+                    <th>Total (<!-- TMPL_VAR NAME="currency" -->)</th>
+                    <th><!-- TMPL_VAR NAME="total_rrp_gsti" --></th>
+                    <th>&nbsp;</th>
+                    <th><!-- TMPL_VAR name="qty_total" --></th>
+                    <th><!-- TMPL_VAR NAME="total_est_gsti" --></th>
+                </tr>
+                <!-- /TMPL_IF -->
                 </tfoot>
                 <tbody>
                 <!-- TMPL_LOOP NAME="books_loop" -->
@@ -256,7 +266,7 @@
                 <tr><td>Basket empty</td></tr>
             </table>
         <!-- /TMPL_IF -->
-        <!-- TMPL_IF NAME="listincgst" --><small class="highlight">** Vendor's listings already include GST.</small>
+        <!-- TMPL_IF NAME="listincgst" --><small class="highlight">** Vendor's listings already include tax.</small>
         <!-- /TMPL_IF -->
         </div>
         <br />
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tmpl
index 1a1e7eb..bb8a1dd 100755
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tmpl
@@ -120,7 +120,7 @@ fieldset.various li {
 <!-- TMPL_INCLUDE NAME="header.inc" -->
 <!-- TMPL_INCLUDE NAME="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?supplierid=<!-- TMPL_VAR NAME="booksellerid" -->"><!-- TMPL_VAR NAME="booksellername" --></a> &rsaquo; Basket grouping for vendor: <!-- TMPL_VAR NAME="booksellername" --></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?supplierid=<!-- TMPL_VAR NAME="booksellerid" -->"><!-- TMPL_VAR NAME="booksellername" --></a> &rsaquo; Basket grouping for vendor: <!-- TMPL_VAR NAME="booksellername" --></div>
 
 <div id="doc" class="yui-t7">
             
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tmpl
index 7b1778e..b6bb169 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tmpl
@@ -98,35 +98,39 @@ if (f.company.value == "") {
                         <!-- TMPL_VAR NAME="currency" -->
                     <!-- /TMPL_LOOP -->
                     </select></li>
-            <!-- TMPL_IF NAME="GST" --><li>GST Registered
+            </ol>
+            <ol class="radio">
+            <!-- TMPL_IF NAME="GST" --><li><label for="gstyes" class="radio">Tax Number Registered:</label>
                 <!-- TMPL_IF name="gstreg" -->
-                    <input type="radio" name="gst" id="gstyes" value="1" checked="checked" /><label for="gstyes">Yes</label>
-                    <input type="radio" name="gst" id="gstno" value="0" /><label for="gstno">No</label>
+                    <label for="gstyes">Yes</label> <input type="radio" name="gst" id="gstyes" value="1" checked="checked" />
+                    <label for="gstno">No</label> <input type="radio" name="gst" id="gstno" value="0" />
                 <!-- TMPL_ELSE -->
-                    <input type="radio" name="gst" id="gstyes" value="1" /><label for="gstyes">Yes</label>
-                    <input type="radio" name="gst" id="gstno" value="0" checked="checked" /><label for="gstno">No</label>
+                    <label for="gstyes">Yes</label> <input type="radio" name="gst" id="gstyes" value="1" />
+                    <label for="gstno">No</label> <input type="radio" name="gst" id="gstno" value="0" checked="checked" />
                 <!-- /TMPL_IF --></li><!-- /TMPL_IF -->
             
-            <!-- TMPL_IF NAME="GST" --><li>Ordering prices
+            <!-- TMPL_IF NAME="GST" --><li><label for="list_gstyes" class="radio">Ordering prices:</label>
                 <!-- TMPL_IF name="listincgst" -->
-                    <input type="radio" id="list_gstyes" name="list_gst" value="1" checked="checked" /><label for="list_gstyes">include GST</label>
-                    <input type="radio" id="list_gstno" name="list_gst" value="0" /><label for="list_gstno">don't include GST</label>
+                    <label for="list_gstyes">Include tax</label> <input type="radio" id="list_gstyes" name="list_gst" value="1" checked="checked" />
+                    <label for="list_gstno">Don't include tax</label> <input type="radio" id="list_gstno" name="list_gst" value="0" />
                 <!-- TMPL_ELSE -->
-                    <input type="radio" id="list_gstyes" name="list_gst" value="1" /><label for="list_gstyes">include GST</label>
-                    <input type="radio" id="list_gstno" name="list_gst" value="0" checked="checked" /><label for="list_gstno">don't include GST</label>
+                    <label for="list_gstyes">Include tax</label> <input type="radio" id="list_gstyes" name="list_gst" value="1" />
+                    <label for="list_gstno">Don't include tax</label> <input type="radio" id="list_gstno" name="list_gst" value="0" checked="checked" />
                 <!-- /TMPL_IF --></li><!-- /TMPL_IF -->
             
-            <!-- TMPL_IF NAME="GST" --><li>Invoice prices
+            <!-- TMPL_IF NAME="GST" --><li><label for="gstyes" class="radio">Invoice prices:</label>
                 <!-- TMPL_IF name= "invoiceincgst" -->
-                    <input type="radio" id="invoice_gstyes" name="invoice_gst" value="1" checked="checked" /><label for="invoice_gstyes">include GST</label>
-                    <input type="radio" id="invoice_gstno" name="invoice_gst" value="0" /><label for="invoice_gstno">don't include GST</label>
+                    <label for="invoice_gstyes">Include tax</label> <input type="radio" id="invoice_gstyes" name="invoice_gst" value="1" checked="checked" />
+                    <label for="invoice_gstno">Don't include tax</label> <input type="radio" id="invoice_gstno" name="invoice_gst" value="0" />
                     <!-- TMPL_ELSE -->
-                    <input type="radio" id="invoice_gstyes" name="invoice_gst" value="1"><label for="invoice_gstyes">include GST</label>
-                    <input type="radio" id="invoice_gstno" name="invoice_gst" value="0" checked="checked" /><label for="invoice_gstno">don't include GST</label>
+                    <label for="invoice_gstyes">Include tax</label> <input type="radio" id="invoice_gstyes" name="invoice_gst" value="1">
+                    <label for="invoice_gstno">Don't include tax</label> <input type="radio" id="invoice_gstno" name="invoice_gst" value="0" checked="checked" />
                 <!-- /TMPL_IF --></li><!-- /TMPL_IF -->
+            </ol>
+            <ol>
             <li><label for="discount">Discount</label>
                 <input type="text" size="3" id="discount" name="discount" value="<!-- TMPL_VAR NAME="discount" -->" /> %</li>
-            <li><label for="gstrate">GST rate</label><input type="text" name="gstrate" id="gstrate" size="5" value="<!-- TMPL_VAR name="gstrate" -->"/>%</li>
+            <!-- TMPL_IF NAME="GST" --><li><label for="gstrate">Tax rate</label><input type="text" name="gstrate" id="gstrate" size="5" value="<!-- TMPL_VAR name="gstrate" -->"/>%</li><!-- /TMPL_IF -->
             <li><label for="notes">Notes</label>
                 <textarea cols="40" rows="4" id="notes" name="notes" ><!-- TMPL_VAR NAME="notes" --></textarea></li></ol>			
             <!-- TMPL_UNLESS NAME="GST" -->
@@ -184,16 +188,16 @@ if (f.company.value == "") {
                     <!-- /TMPL_IF --></p>
             <p><strong>List Prices are: </strong><!--TMPL_VAR Name="listprice"--></p>
             <p><strong>Invoice Prices are: </strong><!--TMPL_VAR Name="invoiceprice"--></p>
-            <!-- TMPL_IF NAME="GST" --><p><strong>GST Registered: </strong>
+            <!-- TMPL_IF NAME="GST" --><p><strong>Tax Number Registered: </strong>
                     <!-- TMPL_IF name="gstreg" -->Yes<!--TMPL_ELSE-->No<!-- /TMPL_IF --></p>
-            <p><strong>List Item Price Includes GST: </strong>
+            <p><strong>List Item Price Includes Tax: </strong>
                     <!-- TMPL_IF name="listincgst" -->Yes<!--TMPL_ELSE-->No<!-- /TMPL_IF --></p>
-            <p><strong>Invoice Item Price Includes GST: </strong>
+            <p><strong>Invoice Item Price Includes Tax: </strong>
                     <!-- TMPL_IF name= "invoiceincgst" -->Yes<!--TMPL_ELSE-->No<!-- /TMPL_IF --></p><!-- /TMPL_IF -->
             <p><strong>Discount: </strong>
                 <!-- TMPL_VAR NAME="discount" --> %</p>
-            <p><strong>GST rate: </strong>
-                <!-- TMPL_VAR name="GST" -->%</p>
+            <!-- TMPL_IF NAME="GST" --<p><strong>Tax rate: </strong>
+                <!-- TMPL_VAR name="GST" -->%</p><!-- /TMPL_IF -->
             <!-- TMPL_IF NAME="notes" --><p><strong>Notes: </strong>
                 <!-- TMPL_VAR NAME="notes" --></p><!-- /TMPL_IF -->
         </div>
-- 
1.5.6.5




More information about the Koha-patches mailing list