From 15157e29018a47b5bcd602e89cefd27fd1502b9e Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Thu, 1 Aug 2013 20:33:09 +0200 Subject: [PATCH] [FIX] Don't print a zero amount on empty lines in the balance sheet Reformat the affected rml lines [FIX] Don't print a zero amount on empty lines in the P/L report Reformat the affected rml lines [FIX] Remove leftover parenthesis from previous commit --- .../report/account_balance_sheet_horizontal.rml | 13 +++++++++---- .../report/account_profit_horizontal.rml | 10 ++++++++-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/account_financial_report_horizontal/report/account_balance_sheet_horizontal.rml b/account_financial_report_horizontal/report/account_balance_sheet_horizontal.rml index 9397d256..23436217 100644 --- a/account_financial_report_horizontal/report/account_balance_sheet_horizontal.rml +++ b/account_financial_report_horizontal/report/account_balance_sheet_horizontal.rml @@ -203,7 +203,10 @@ [[ '. '*(a['level1']-1) ]][[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name1'] ]] - [[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]][[ formatLang(a['balance1']) ]] [[ company.currency_id.symbol ]] + + [[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]] + [[ a['code1'] and formatLang(a['balance1']) or removeParentNode('font') ]] [[ company.currency_id.symbol ]] + [[ repeatIn(get_lines(), 'a') ]] [[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['code'] ]][[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Bold_9'}) or removeParentNode('font') ]] @@ -212,9 +215,11 @@ [[ '. '*(a['level']-1) ]][[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]][[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Bold_9'}) or removeParentNode('font') ]] - [[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]] -[[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Right_9_Bold'}) or removeParentNode('font') ]] - [[(a['code'] and a['name']) and formatLang(a['balance']) or removeParentNode('font')]] [[ company.currency_id.symbol ]] + + [[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]] + [[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Right_9_Bold'}) or removeParentNode('font') ]] + [[ a['code'] and formatLang(a['balance']) or removeParentNode('font') ]] [[ company.currency_id.symbol ]] + diff --git a/account_financial_report_horizontal/report/account_profit_horizontal.rml b/account_financial_report_horizontal/report/account_profit_horizontal.rml index 33c553a5..c5846931 100644 --- a/account_financial_report_horizontal/report/account_profit_horizontal.rml +++ b/account_financial_report_horizontal/report/account_profit_horizontal.rml @@ -222,7 +222,10 @@ - [[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]][[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]] + + [[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]] + [[ a['code'] and formatLang(a['balance']) or removeParentNode('font') ]] [[ company.currency_id.symbol ]] + @@ -235,7 +238,10 @@ - [[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]][[(a['code1'] and a['name1']) and formatLang(a['balance1']) or removeParentNode('font') ]] [[ company.currency_id.symbol ]] + + [[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]] + [[ a['code1'] and formatLang(a['balance1']) or removeParentNode('font') ]] [[ company.currency_id.symbol ]] +