diff --git a/account_financial_report/report/balance_full_5_cols.rml b/account_financial_report/report/balance_full_5_cols.rml new file mode 100644 index 00000000..d8342d26 --- /dev/null +++ b/account_financial_report/report/balance_full_5_cols.rml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [[setLang(user.context_lang)]] + + + + + Code + + + + ACCOUNT + + + INIT. BAL. + + + DEBIT + + + CREDIT + + + YTD + + + END. BAL. + + + + + [[ repeatIn(lines(data['form']), 'a') ]] + [[ a['type']<>'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]] + [[a['label']==True and a['code'] or '' ]] + + + + + [[ ((a['total'] and not a['label']) and setTag('para','para',{'alignment':"RIGHT"}) or (a['type']<>'view' and setTag('para','para',{'fontName':"Courier"}))) or removeParentNode('font') ]] + [[ a['type']=='view' and a['name'].upper() or a['name'].title() ]] + + + + + [[ a['type']<>'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]] + [[ (a['total']==True) and formatLang(a['balanceinit'] and a['balanceinit'] * a.get('change_sign') or 0.0, digits=2, grouping=True) or '']] + + + + + [[ a['type']<>'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]] + [[ (a['total']==True) and formatLang(a['debit'], digits=2, grouping=True) or '']] + + + + + [[ a['type']<>'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]] + [[ (a['total']==True) and formatLang(a['credit'], digits=2, grouping=True) or '']] + + + + + [[ a['type']<>'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]] + [[ (a['total']==True) and formatLang(a['ytd'] and a['ytd'] * a.get('change_sign') or 0.0, digits=2, grouping=True) or '']] + + + + + [[ a['type']<>'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]] + [[ (a['total']==True) and formatLang(a['balance'] and a['balance'] * a.get('change_sign') or 0.0, digits=2, grouping=True) or '']] + + + + + + diff --git a/account_financial_report/report/parser.py b/account_financial_report/report/parser.py index 2a5c608d..005706e4 100644 --- a/account_financial_report/report/parser.py +++ b/account_financial_report/report/parser.py @@ -293,6 +293,7 @@ class account_balance(report_sxw.rml_parse): tot_bin = 0.0 tot_deb = 0.0 tot_crd = 0.0 + tot_ytd = 0.0 tot_eje = 0.0 elif form['columns'] == 'thirteen': tot_bal1 = 0.0 @@ -313,6 +314,7 @@ class account_balance(report_sxw.rml_parse): result_acc = [] tot = {} + print 'TIPO DE INFORME ',form['inf_type'] if form['columns'] == 'thirteen': period_ids = period_obj.search(self.cr, self.uid, [('fiscalyear_id','=',fiscalyear.id),('special','=',False)],order='date_start asc') @@ -348,6 +350,7 @@ class account_balance(report_sxw.rml_parse): 'balanceinit': self.exchange(i), 'debit': self.exchange(d), 'credit': self.exchange(c), + 'ytd': self.exchange(d-c), 'balance': self.exchange(b), }) @@ -469,6 +472,7 @@ class account_balance(report_sxw.rml_parse): tot_bin += res['balanceinit'] tot_deb += res['debit'] tot_crd += res['credit'] + tot_ytd += res['ytd'] tot_eje += res['balance'] if form['columns'] == 'thirteen': @@ -502,6 +506,7 @@ class account_balance(report_sxw.rml_parse): 'balanceinit': tot_bin, 'debit': tot_deb, 'credit': tot_crd, + 'ytd': tot_ytd, 'balance': tot_eje, }) if form['columns'] == 'thirteen': @@ -521,6 +526,7 @@ class account_balance(report_sxw.rml_parse): bal13 = tot_bal13,)) result_acc.append(res2) + print 100 * 'FIN ' return result_acc report_sxw.report_sxw('report.afr.1cols', @@ -540,6 +546,12 @@ report_sxw.report_sxw('report.afr.4cols', 'account_financial_report/report/balance_full_4_cols.rml', parser=account_balance, header=False) + +report_sxw.report_sxw('report.afr.5cols', + 'wizard.report', + 'account_financial_report/report/balance_full_5_cols.rml', + parser=account_balance, + header=False) report_sxw.report_sxw('report.afr.13cols', 'wizard.report', diff --git a/account_financial_report/view/report.xml b/account_financial_report/view/report.xml index 12dfd4e5..bd58220c 100644 --- a/account_financial_report/view/report.xml +++ b/account_financial_report/view/report.xml @@ -35,6 +35,17 @@ header="False" /> + +