Bug 9062 Fix format for discount rate for vendors

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>
This commit is contained in:
Hugh Davenport 2013-01-17 10:07:59 +13:00 committed by Jared Camins-Esakov
parent 5167c32060
commit 55cf86e230

View 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 %]