From f977c2ed4ca7e19bbcb262044eecb1b0f88456fc Mon Sep 17 00:00:00 2001 From: Olivier Laurent Date: Mon, 20 Jul 2009 11:32:28 +0200 Subject: [PATCH] [FIX] tools.amount_to_text_en: now displays cents bzr revid: olt@tinyerp.com-20090720093228-qqdqetrt2kg08coe --- bin/tools/amount_to_text_en.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/tools/amount_to_text_en.py b/bin/tools/amount_to_text_en.py index 3fcf5b20b4c..45168bb2d9f 100644 --- a/bin/tools/amount_to_text_en.py +++ b/bin/tools/amount_to_text_en.py @@ -98,7 +98,9 @@ def amount_to_text(number, currency): cents_number = int(number * 100) % 100 cents_name = (cents_number > 1) and 'cents' or 'cent' cents = _100_to_text(cents_number) - cents = cents_number and '%s %s' % (cents, cents_name) or '' + cents = cents_number and '%s %s' % (cents.lower(), cents_name) or '' + if cents: + lacs += ' and %s' % (cents, ) return lacs