doing some changes in account_balance report py and rml file in account module
bzr revid: vinusoft85@gmail.com-20081003095921-yd5tjxwerhxvwpyj
This commit is contained in:
@@ -71,7 +71,10 @@ class account_balance(report_sxw.rml_parse):
|
||||
self.cr.execute("select name from account_period where id in (%s)" % (period_ids))
|
||||
res=self.cr.fetchall()
|
||||
for r in res:
|
||||
result+=r[0]+", "
|
||||
if (r == res[res.__len__()-1]):
|
||||
result+=r[0]+". "
|
||||
else:
|
||||
result+=r[0]+", "
|
||||
return str(result and result[:-1]) or ''
|
||||
|
||||
def lines(self, form, ids={}, done=None, level=1):
|
||||
@@ -118,6 +121,7 @@ class account_balance(report_sxw.rml_parse):
|
||||
'credit': account.credit,
|
||||
'balance': account.balance,
|
||||
'leef': not bool(account.child_id),
|
||||
'bal_type':'',
|
||||
}
|
||||
self.sum_debit += account.debit
|
||||
self.sum_credit += account.credit
|
||||
@@ -177,6 +181,10 @@ class account_balance(report_sxw.rml_parse):
|
||||
r['credit']=''
|
||||
r['balance']=''
|
||||
r['leef']=''
|
||||
if sum > 0.0:
|
||||
r['bal_type']=" Dr."
|
||||
else:
|
||||
r['bal_type']=" Cr."
|
||||
return res or ''
|
||||
|
||||
def date_range(self,start,end):
|
||||
|
||||
@@ -61,15 +61,14 @@
|
||||
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="TrLevel4">
|
||||
<lineStyle kind="LINEBELOW" colorName="#777777" start="1,0" stop="1,0"/>
|
||||
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
|
||||
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="TrLevel3">
|
||||
<lineStyle kind="LINEBELOW" colorName="#777777" start="1,0" stop="-1,0"/>
|
||||
<blockLeftPadding length="0" start="0,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#777777" start="1,0" stop="1,0"/>
|
||||
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="TrLevel2">
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#777777" start="1,0" stop="-1,0"/>
|
||||
<blockLeftPadding length="0" start="0,0" stop="1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="TrLevel1">
|
||||
@@ -94,7 +93,7 @@
|
||||
fontSize="8.0" />
|
||||
<paraStyle
|
||||
name="Level3"
|
||||
fontName="Helvetica-Bold"
|
||||
fontName="Helvetica"
|
||||
fontSize="8.0" />
|
||||
<paraStyle name="Level2"
|
||||
fontSize="8.0"
|
||||
@@ -150,14 +149,16 @@
|
||||
<para style="P14">[[ setTag('para','para',{'style':('Level'+str(a['level']))}) ]]<font color="white">[[ (a['level']<6 and removeParentNode('font') or '... '*(a['level']-4)) ]]</font>[[ setTag('blockTable','blockTable',{'style':'TrLevel'+str(a['level'])}) ]][[ a['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ formatLang(a['debit']) and '%.2f'%a['debit'] or '']]</para>
|
||||
<para style="P3">[[ (a['level']<4) and setTag('para','para',{'style':'P3'}) ]]<u>[[ (a['leef'] and removeParentNode('para')) or formatLang(a['debit']) and '%.2f'%a['debit'] or '0.00' ]]</u></para>
|
||||
<para style="P3">[[ ((not a['leef']) and removeParentNode('para')) or formatLang(a['debit']) and '%.2f'%a['debit'] or '0.00' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ formatLang(a['credit']) and '%.2f'%a['credit'] or '']]</para>
|
||||
<para style="P3">[[ (a['level']<4) and setTag('para','para',{'style':'P3'}) ]]<u>[[ (a['leef'] and removeParentNode('para')) or formatLang(a['credit']) and '%.2f'%a['credit'] or '0.00' ]]</u></para>
|
||||
<para style="P3">[[ ((not a['leef']) and removeParentNode('para')) or formatLang(a['credit']) and '%.2f'%a['credit'] or '0.00' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ (a['level']<4) and setTag('para','para',{'style':'P3a'}) ]]<u>[[ (a['leef'] and removeParentNode('para')) or formatLang(a['balance']) and '%.2f'%a['balance'] or '' ]]</u></para>
|
||||
<para style="P3">[[ ((not a['leef']) and removeParentNode('para')) or formatLang(a['balance']) and formatLang(a['balance']) or '' ]]</para>
|
||||
<para style="P3">[[ (a['level']<4) and setTag('para','para',{'style':'P3a'}) ]]<u>[[ (a['leef'] and removeParentNode('para')) or formatLang(a['balance']) and '%.2f'%a['balance'] or '0.00' ]]</u></para>
|
||||
<para style="P3">[[ ((not a['leef']) and removeParentNode('para')) or formatLang(a['balance']) and formatLang(a['balance']) or '0.00' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -166,13 +167,13 @@
|
||||
<para style="P14"><font color="white">[[ '... '*(a['level']-3) ]]</font>[[ a['lname'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ formatLang(a['debit1']) and '%.2f'%a['debit1'] or '']]</para>
|
||||
<para style="P3">[[ formatLang(a['debit1']) and '%.2f'%a['debit1'] or '0.00']]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ formatLang(a['credit1']) and '%.2f'%a['credit1'] or '']]</para>
|
||||
<para style="P3">[[ formatLang(a['credit1']) and '%.2f'%a['credit1'] or '0.00']]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ formatLang(a['balance1']) and '%.2f'%a['balance1'] or '']]</para>
|
||||
<para style="P3">[[ formatLang(a['balance1']) and '%.2f'%a['balance1'] or '0.00' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
Reference in New Issue
Block a user