Bug 9062 Fix format for discount rate for vendors
authorHugh Davenport <hugh@davenport.net.nz>
Wed, 16 Jan 2013 21:07:59 +0000 (10:07 +1300)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Thu, 17 Jan 2013 23:18:14 +0000 (18:18 -0500)
On the vendor display and edit screens, the tax rate information was
formatted to 1 decimal point, while the discount rate was not.

This patch adds a format string to the discount information so that
it is formatted in the same way.

Signed-off-by: Hugh Davenport <hugh@davenport.net.nz>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Makes display on vendor detail page more consistent and
passes all tests.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt

index 201c080..bf5d367 100644 (file)
@@ -176,7 +176,7 @@ if (f.company.value == "") {
             [% END %]
             <ol>
             <li><label for="discount">Discount</label>
-                <input type="text" size="6" id="discount" name="discount" value="[% discount %]" />%</li>
+                <input type="text" size="6" id="discount" name="discount" value="[% discount | format ("%.1f") %]" />%</li>
             <li>
                 <label for="deliverytime">Delivery time</label>
                 <input type="text" size="2" id="deliverytime" name="deliverytime" value="[% deliverytime %]" /> days
@@ -238,7 +238,7 @@ if (f.company.value == "") {
             <p><strong>Invoice item price includes tax: </strong>
                     [% IF ( invoiceincgst ) %]Yes[% ELSE %]No[% END %]</p>[% END %]
             <p><strong>Discount: </strong>
-                [% discount %] %</p>
+                [% discount | format("%.1f") %] %</p>
             <p><strong>Tax rate: </strong>
                 [% 0 + gstrate * 100 | format("%.1f") %]%</p>
             [% IF deliverytime.defined %]