From 673c1e64118584bd7e6b291e80ee15f3aba14ac3 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Wed, 15 Sep 2010 14:27:12 +0530 Subject: [PATCH] Accounting/Reporting/Generic Reporting/Partner Accounts/ Print Aged Partner Balance * The currency code and symbol is missing on the value (from the company) * remove one Not to due. because of it's twice. * table header is not with right table style like other report. bzr revid: apa@tinyerp.com-20100915085712-kqzg18jzpup3x31q --- .../account/report/account_aged_partner_balance.py | 17 ++-- .../report/account_aged_partner_balance.rml | 87 ++++++++++---------- 2 files changed, 53 insertions(+), 51 deletions(-) diff --git a/addons/account/report/account_aged_partner_balance.py b/addons/account/report/account_aged_partner_balance.py index 119c1ed..2b60de5 100644 --- a/addons/account/report/account_aged_partner_balance.py +++ b/addons/account/report/account_aged_partner_balance.py @@ -176,7 +176,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header): after = [ future_past[partner['id']] ] self.total_account[6] = self.total_account[6] + (after and after[0] or 0.0) - values['direction'] = after and after[0] or "" + values['direction'] = after and after[0] or 0.0 for i in range(5): during = False @@ -184,8 +184,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header): during = [ history[i][partner['id']] ] # Ajout du compteur self.total_account[(i)] = self.total_account[(i)] + (during and during[0] or 0) - values[str(i)] = during and during[0] or "" - + values[str(i)] = during and during[0] or 0.0 total = False if totals.has_key( partner['id'] ): total = [ totals[partner['id']] ] @@ -271,7 +270,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header): for i in t: d['No Partner Defined'] = i[0] history.append(d) - + values = {} if self.direction_selection == 'future': before = False @@ -281,11 +280,11 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header): values['direction'] = before and before[0] or 0.0 elif self.direction_selection == 'past': after = False - if future_past.has_key('No Partner Defined'): + if future_past.has_key('No Partner Defined'): after = [ future_past['No Partner Defined'] ] self.total_account[6] = self.total_account[6] + (after and after[0] or 0.0) values['direction'] = after and after[0] or "" - + for i in range(5): during = False if history[i].has_key('No Partner Defined'): @@ -315,15 +314,15 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header): def _get_total(self,pos): period = self.total_account[int(pos)] - return period + return period or 0.0 def _get_direction(self,pos): period = self.total_account[int(pos)] - return period + return period or 0.0 def _get_for_period(self,pos): period = self.total_account[int(pos)] - return period + return period or 0.0 def _get_partners(self,data): if data['form']['result_selection'] == 'customer': diff --git a/addons/account/report/account_aged_partner_balance.rml b/addons/account/report/account_aged_partner_balance.rml index 2c5387f..122e902 100644 --- a/addons/account/report/account_aged_partner_balance.rml +++ b/addons/account/report/account_aged_partner_balance.rml @@ -82,9 +82,22 @@ + + + - - + + + + + + + + + + + + @@ -146,36 +159,34 @@ - - - + - Partners + Partners - [[ data['form']['direction_selection'] == 'future' and 'Due' or 'Not due' ]] + [[ data['form']['direction_selection'] == 'future' and 'Due' or 'Not due' ]]([[ company.currency_id.code ]]) - [[ data['form']['4']['name'] ]] + [[ data['form']['4']['name'] ]]([[ company.currency_id.code ]]) - [[ data['form']['3']['name'] ]] + [[ data['form']['3']['name'] ]]([[ company.currency_id.code ]]) - [[ data['form']['2']['name'] ]] + [[ data['form']['2']['name'] ]]([[ company.currency_id.code ]]) - [[ data['form']['1']['name'] ]] + [[ data['form']['1']['name'] ]]([[ company.currency_id.code ]]) - [[ data['form']['0']['name'] ]] + [[ data['form']['0']['name'] ]]([[ company.currency_id.code ]]) - Total + Total([[ company.currency_id.code ]]) @@ -184,36 +195,28 @@ [[ (get_lines(data['form']), 'partner') == False or removeParentNode('para') ]] [[ (get_lines_with_out_partner(data['form']), 'not_partner') == False or removeParentNode('para') ]] - Account Total - - [[ formatLang(get_direction('6') or 0.00) ]] + [[ formatLang(get_direction('6')) ]] [[ company.currency_id.symbol ]] - - [[ formatLang(get_for_period('4') or 0.00) ]] + [[ formatLang(get_for_period('4')) ]] [[ company.currency_id.symbol ]] - - [[ formatLang(get_for_period('3') or 0.00) ]] + [[ formatLang(get_for_period('3')) ]] [[ company.currency_id.symbol ]] - - [[ formatLang(get_for_period('2') or 0.00) ]] + [[ formatLang(get_for_period('2')) ]] [[ company.currency_id.symbol ]] - - [[ formatLang(get_for_period('1') or 0.00) ]] + [[ formatLang(get_for_period('1')) ]] [[ company.currency_id.symbol ]] - - [[ formatLang(get_for_period('0') or 0.00) ]] + [[ formatLang(get_for_period('0')) ]] [[ company.currency_id.symbol ]] - - [[ formatLang(get_total('5') or 0.00) ]] + [[ formatLang(get_total('5')) ]] [[ company.currency_id.symbol ]] @@ -223,25 +226,25 @@ [[ partner['name'] ]] - [[ formatLang(partner['direction'] or 0.00) ]] + [[ formatLang(partner['direction']) ]] [[ company.currency_id.symbol ]] - [[ formatLang(partner['4'] or 0.00)]] + [[ formatLang(partner['4'])]] [[ company.currency_id.symbol ]] - [[ formatLang(partner['3'] or 0.00)]] + [[ formatLang(partner['3'])]] [[ company.currency_id.symbol ]] - [[ formatLang(partner['2'] or 0.00) ]] + [[ formatLang(partner['2']) ]] [[ company.currency_id.symbol ]] - [[ formatLang(partner['1'] or 0.00) ]] + [[ formatLang(partner['1']) ]] [[ company.currency_id.symbol ]] - [[ formatLang(partner['0'] or 0.00) ]] + [[ formatLang(partner['0']) ]] [[ company.currency_id.symbol ]] - [[ formatLang(partner['total'] or 0.00 ) ]] + [[ formatLang(partner['total']) ]] [[ company.currency_id.symbol ]] @@ -250,25 +253,25 @@ [[ not_partner['name'] ]] - [[ formatLang(not_partner['direction'] or 0.00) ]] + [[ formatLang(not_partner['direction']) ]] [[ company.currency_id.symbol ]] - [[ formatLang(not_partner['4'] or 0.00)]] + [[ formatLang(not_partner['4'])]] [[ company.currency_id.symbol ]] - [[ formatLang(not_partner['3'] or 0.00)]] + [[ formatLang(not_partner['3'])]] [[ company.currency_id.symbol ]] - [[ formatLang(not_partner['2'] or 0.00) ]] + [[ formatLang(not_partner['2']) ]] [[ company.currency_id.symbol ]] - [[ formatLang(not_partner['1'] or 0.00) ]] + [[ formatLang(not_partner['1']) ]] [[ company.currency_id.symbol ]] - [[ formatLang(not_partner['0'] or 0.00) ]] + [[ formatLang(not_partner['0']) ]] [[ company.currency_id.symbol ]] - [[ formatLang(not_partner['total'] or 0.00 ) ]] + [[ formatLang(not_partner['total']) ]] [[ company.currency_id.symbol ]] -- 1.7.10.4