[IMP] account: 'Profit And Loss' & 'Balance Sheet' Reports.
bzr revid: vra@tinyerp.com-20100811100947-9gqhubg8hl7hlnjn
This commit is contained in:
parent
0e56e37029
commit
e7dc8c2d55
|
@ -38,7 +38,6 @@ class report_balancesheet_horizontal(rml_parse.rml_parse, common_report_header):
|
|||
self.result_temp = []
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'get_abs' : self.get_abs,
|
||||
'get_lines' : self.get_lines,
|
||||
'get_lines_another' : self.get_lines_another,
|
||||
'get_company': self._get_company,
|
||||
|
@ -61,9 +60,6 @@ class report_balancesheet_horizontal(rml_parse.rml_parse, common_report_header):
|
|||
})
|
||||
self.context = context
|
||||
|
||||
def get_abs(self,amount):
|
||||
return abs(amount)
|
||||
|
||||
def sum_dr(self):
|
||||
if self.res_bl['type'] == 'Net Profit':
|
||||
self.result_sum_dr += self.res_bl['balance']
|
||||
|
|
|
@ -245,7 +245,7 @@
|
|||
<para style="terp_default_9"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] or '' ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(abs(a['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -255,7 +255,7 @@
|
|||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(sum_dr()) or 0.0 ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_dr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -283,7 +283,7 @@
|
|||
<para style="terp_default_9">[[ a['code'] ]]<font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(a['balance']) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(abs(a['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -293,7 +293,7 @@
|
|||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(sum_cr()) or 0.0 ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_cr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
|
|
@ -272,7 +272,7 @@
|
|||
<para style="terp_default_9"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(get_abs(a['balance'])) or '' ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(abs(a['balance'])) or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]]</font><font>[[ a['code1'] ]]</font></para>
|
||||
|
@ -281,7 +281,7 @@
|
|||
<para style="terp_default_9"><font color="white">[[ '. '*(a['level1']-1) ]]</font><font>[[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name1'] ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance1'] and formatLang(get_abs(a['balance1'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance1'] and formatLang(abs(a['balance1'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -291,13 +291,13 @@
|
|||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(get_abs(sum_dr())) or 0.0 ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_dr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(get_abs(sum_cr())) or 0.0 ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_cr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
|
|
@ -282,7 +282,7 @@
|
|||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(get_abs(a['balance'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(abs(a['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
|
@ -295,7 +295,7 @@
|
|||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance1'] and formatLang(get_abs(a['balance1'])) or '' ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance1'] and formatLang(abs(a['balance1'])) or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -308,7 +308,7 @@
|
|||
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Profit C.F.B.L.' and final_result()['type'] or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Profit C.F.B.L.' and formatLang(get_abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Profit C.F.B.L.' and formatLang(abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9"></para>
|
||||
|
@ -317,7 +317,7 @@
|
|||
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Loss C.F.B.L.' and final_result()['type'] or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(get_abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -328,13 +328,13 @@
|
|||
<para style="terp_default_Bold_9">Total:([[ get_currency(data['form']) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(get_abs(sum_dr())) or 0.0 ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(abs(sum_dr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Total:([[ get_currency(data['form']) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(get_abs(sum_cr())) or 0.0 ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(abs(sum_cr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
|
|
@ -36,7 +36,6 @@ class report_pl_account_horizontal(rml_parse.rml_parse, common_report_header):
|
|||
self.result_temp = []
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
'get_abs' : self.get_abs,
|
||||
'get_lines' : self.get_lines,
|
||||
'get_lines_another' : self.get_lines_another,
|
||||
'get_currency': self._get_currency,
|
||||
|
@ -57,8 +56,6 @@ class report_pl_account_horizontal(rml_parse.rml_parse, common_report_header):
|
|||
})
|
||||
self.context = context
|
||||
|
||||
def get_abs(self,amount):
|
||||
return abs(amount)
|
||||
|
||||
def final_result(self):
|
||||
return self.res_pl
|
||||
|
|
|
@ -274,7 +274,7 @@
|
|||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a.balance and formatLang(get_abs(a.balance)) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a.balance and formatLang(abs(a.balance)) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -287,7 +287,7 @@
|
|||
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Profit C.F.B.L.' and final_result()['type'] or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Profit C.F.B.L.' and formatLang(get_abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Profit C.F.B.L.' and formatLang(abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -297,7 +297,7 @@
|
|||
<para style="terp_default_Bold_9">Total:([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(get_abs(sum_dr())) or 0.0 ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(abs(sum_dr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -329,7 +329,7 @@
|
|||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a.balance and formatLang(get_abs(a.balance)) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a.balance and formatLang(abs(a.balance)) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -342,7 +342,7 @@
|
|||
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Loss C.F.B.L.' and final_result()['type'] or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(get_abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -352,7 +352,7 @@
|
|||
<para style="terp_default_Bold_9">Total:([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(get_abs(sum_cr())) or 0.0 ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(abs(sum_cr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
|
Loading…
Reference in New Issue