From 862a0a8ca711c7d7540fd9e60bdd4b9cb627c9ca Mon Sep 17 00:00:00 2001 From: "qdp-launchpad@tinyerp.com" <> Date: Mon, 8 Nov 2010 18:44:07 +0100 Subject: [PATCH] [FIX] l10n_be: rounding issues lp bug: https://launchpad.net/bugs/351100 fixed bzr revid: qdp-launchpad@tinyerp.com-20101108174407-3103vkduw1bd9jw9 --- addons/l10n_be/wizard/l10_be_partner_vat_listing.py | 4 ++-- addons/l10n_be/wizard/l10n_be_account_vat_declaration.py | 2 +- addons/l10n_be/wizard/l10n_be_vat_intra.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/l10n_be/wizard/l10_be_partner_vat_listing.py b/addons/l10n_be/wizard/l10_be_partner_vat_listing.py index 133d12511a3..bb9874cb387 100644 --- a/addons/l10n_be/wizard/l10_be_partner_vat_listing.py +++ b/addons/l10n_be/wizard/l10_be_partner_vat_listing.py @@ -206,9 +206,9 @@ class partner_vat_list(osv.osv_memory): seq += 1 sum_tax += line['amount'] sum_turnover += line['turnover'] - data_clientinfo += '\n\n\t\n\t\t'+line['vat'] +'\n\t\t' + line['country'] +'\n\t\n\t'+str(int(line['amount'] * 100)) +'\n\t'+str(int(line['turnover'] * 100)) +'\n' + data_clientinfo += '\n\n\t\n\t\t'+line['vat'] +'\n\t\t' + line['country'] +'\n\t\n\t'+str(int(round(line['amount'] * 100))) +'\n\t'+str(int(round(line['turnover'] * 100))) +'\n' - data_decl ='\n' + data_decl ='\n' data_file += data_decl + data_comp + str(data_period) + data_clientinfo + '\n' msg = 'Save the File with '".xml"' extension.' file_save = base64.encodestring(data_file.encode('utf8')) diff --git a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py index 2b869e56306..b915b3ed854 100644 --- a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py +++ b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py @@ -107,7 +107,7 @@ class l10n_be_vat_declaration(osv.osv_memory): if item['code'] == '71-72': item['code']='71' if item['code'] in list_of_tags: - data_of_file +='\n\t\t\t\t' + str(abs(int(item['sum_period']*100))) + '' + data_of_file +='\n\t\t\t\t' + str(abs(int(round(item['sum_period']*100)))) + '' data_of_file += '\n\t\t\t\n\t\t\n\t\n' model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','view_vat_save')], context=context) diff --git a/addons/l10n_be/wizard/l10n_be_vat_intra.py b/addons/l10n_be/wizard/l10n_be_vat_intra.py index d3f4e8781a7..a95e9dfbf81 100644 --- a/addons/l10n_be/wizard/l10n_be_vat_intra.py +++ b/addons/l10n_be/wizard/l10n_be_vat_intra.py @@ -138,7 +138,7 @@ class partner_vat_intra(osv.osv_memory): continue seq += 1 amt = row['amount'] or 0 - amt = int(amt * 100) + amt = int(round(amt * 100)) amount_sum += amt intra_code = row['intra_code'] == '88' and 'L' or (row['intra_code'] == '44b' and 'T' or (row['intra_code'] == '44a' and 'S' or '')) data_clientinfo +='\n\t\t\n\t\t\t\n\t\t\t\t'+row['vat'][2:] +'\n\t\t\t\t'+row['vat'][:2] +'\n\t\t\t\n\t\t\t'+str(amt) +'\n\t\t\t'+str(intra_code) +'\n\t\t' @@ -162,4 +162,4 @@ class partner_vat_intra(osv.osv_memory): partner_vat_intra() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: