@@ -119,7 +119,6 @@ class account_balance(report_sxw.rml_parse):
|
||||
self.date_lst.sort()
|
||||
|
||||
def lines(self, form, ids={}, done=None, level=1):
|
||||
print "DS LINES", ids
|
||||
if not ids:
|
||||
ids = self.ids
|
||||
if not ids:
|
||||
@@ -163,6 +162,7 @@ class account_balance(report_sxw.rml_parse):
|
||||
'credit1':'',
|
||||
'balance1' :'',
|
||||
'id' : account.id,
|
||||
'type' : account.type,
|
||||
'code': account.code,
|
||||
'name': account.name,
|
||||
'level': level,
|
||||
@@ -195,7 +195,6 @@ class account_balance(report_sxw.rml_parse):
|
||||
else:
|
||||
result_acc.append(res)
|
||||
res1 = self.moveline(form, account.id,res['level'])
|
||||
print "NNN",res1, res
|
||||
if res1:
|
||||
for r in res1:
|
||||
result_acc.append(r)
|
||||
@@ -226,6 +225,7 @@ class account_balance(report_sxw.rml_parse):
|
||||
for r in res:
|
||||
sum = r['debit1'] - r['credit1']
|
||||
r['balance1'] = sum
|
||||
r['type']= ''
|
||||
r['id'] =''
|
||||
r['code']= ''
|
||||
r['name']=''
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="700"/>
|
||||
<frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="9"/>
|
||||
|
||||
@@ -19,239 +19,157 @@
|
||||
<lineMode width="0.7"/>
|
||||
<lines>1cm 27.7cm 20cm 27.7cm</lines>
|
||||
<setFont name="Helvetica" size="8"/>
|
||||
|
||||
|
||||
</pageGraphics>
|
||||
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<blockLeftPadding length="0" start="0,0" stop="1,0"/>
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,-1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,-1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,1" stop="0,-1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,1" stop="1,-1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,1" stop="2,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#000000" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#000000" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#000000" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockAlignment value="RIGHT" start="2,1" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#FFFFFF" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#FFFFFF" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#FFFFFF" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#FFFFFF" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#FFFFFF" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#FFFFFF" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#FFFFFF" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#FFFFFF" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#FFFFFF" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#FFFFFF" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#FFFFFF" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#FFFFFF" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#FFFFFF" start="3,-1" stop="3,-1"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P2" fontName="Helvetica" fontSize="2.0" leading="0" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3a" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica" fontSize="9.0" leading="14" spaceBefore="0.0" spaceAfter="6.0" alignment="RIGHT"/>
|
||||
<paraStyle name="P9" fontName="Helvetica-Bold" alignment="CENTER" fontSize="12" leftIndent="-5.0"/>
|
||||
<paraStyle name="P9b" fontName="Helvetica" fontSize="9" leftIndent="0.0" alignment="LEFT"/>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="20.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica" fontSize="8.0" leading="14" spaceBefore="0.0" spaceAfter="6.0" alignment="RIGHT"/>
|
||||
<paraStyle name="P9" fontName="Helvetica-Bold" alignment="CENTER" fontSize="14.5" leftIndent="-5.0"/>
|
||||
<paraStyle name="P9a" fontName="Helvetica-Bold" fontSize="9" leftIndent="0.0" alignment="LEFT"/>
|
||||
<paraStyle name="P12" fontName="Helvetica" fontSize="9.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12a" fontName="Helvetica" fontSize="9.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" fontName="Helvetica" fontSize="8.0" leading="12" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
|
||||
<blockTableStyle id="TrLevel8">
|
||||
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="TrLevel7">
|
||||
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
<paraStyle name="P9b" fontName="Helvetica" fontSize="9" leftIndent="0.0" alignment="LEFT"/>
|
||||
<paraStyle name="P9b" fontName="Helvetica" fontSize="8" leftIndent="-5.0" alignment="LEFT"/>
|
||||
<paraStyle name="P12" fontName="Helvetica" fontSize="8.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12a" fontName="Helvetica" fontSize="8.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" rightIndent="17.0" leftIndent="-0.0" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
|
||||
|
||||
<blockTableStyle id="TrLevel6">
|
||||
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="TrLevel5">
|
||||
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="TrLevel4">
|
||||
<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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="TrLevel2">
|
||||
<lineStyle kind="LINEBELOW" colorName="#777777" start="1,0" stop="-1,0"/>
|
||||
<blockLeftPadding length="0" start="0,0" stop="1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="TrLevel1">
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<blockLeftPadding length="0" start="0,0" stop="1,0"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="TrLevel_Name8">
|
||||
<blockLeftPadding length="100" start="1,0" stop="1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="TrLevel_Name7">
|
||||
<blockLeftPadding length="80" start="1,0" stop="1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="TrLevel_Name6">
|
||||
<blockLeftPadding length="60" start="1,0" stop="1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="TrLevel_Name5">
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="TrLevel5">
|
||||
<blockLeftPadding length="40" start="1,0" stop="1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="TrLevel_Name4">
|
||||
<blockLeftPadding length="20" start="1,0" stop="1,0"/>
|
||||
<blockTableStyle id="TrLevel4">
|
||||
<blockLeftPadding length="20" start="1,0" stop="1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="TrLevel_Name3">
|
||||
<blockTableStyle id="TrLevel3">
|
||||
<blockLeftPadding length="0" start="1,0" stop="1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="TrLevel_Name2">
|
||||
<blockTableStyle id="TrLevel2">
|
||||
<blockLeftPadding length="0" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#777777" start="1,0" stop="1,0"/>
|
||||
<blockTopPadding length="13" start="0,0" stop="-1,0"/>
|
||||
<blockBottomPadding length="2" start="0,0" stop="-1,0"/>
|
||||
<blockFont name="Times-Bold" start="0,0" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="TrLevel_Name1">
|
||||
<blockTableStyle id="TrLevel1">
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<blockLeftPadding length="0" start="1,0" stop="1,0"/>
|
||||
<blockTopPadding length="26" start="0,0" stop="-1,0"/>
|
||||
<blockBottomPadding length="2" start="0,0" stop="-1,0"/>
|
||||
<blockFont name="Times-Bold" start="0,0" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<paraStyle
|
||||
name="Level8"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="8.0" />
|
||||
<paraStyle
|
||||
name="Level7"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="8.0" />
|
||||
<paraStyle
|
||||
name="Level6"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="8.0" />
|
||||
|
||||
<paraStyle
|
||||
name="Level5"
|
||||
fontName="Helvetica-Bold"
|
||||
fontName="Helvetica"
|
||||
fontSize="8.0" />
|
||||
<paraStyle
|
||||
name="Level4"
|
||||
fontName="Helvetica-Bold"
|
||||
fontName="Helvetica"
|
||||
fontSize="8.0" />
|
||||
<paraStyle
|
||||
name="Level3"
|
||||
fontName="Helvetica"
|
||||
fontSize="8.0" />
|
||||
<paraStyle
|
||||
name="Level2"
|
||||
firstLineIndent="-0.03cm"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="8.0" />
|
||||
<paraStyle name="Level2"
|
||||
<paraStyle name="Level1"
|
||||
fontSize="8.0"
|
||||
fontName="Helvetica-Bold"
|
||||
/>
|
||||
<paraStyle name="Level1"
|
||||
fontSize="8.0"
|
||||
fontName="Helvetica-Bold"
|
||||
/>
|
||||
|
||||
<paraStyle
|
||||
name="Amt_Level8"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle
|
||||
name="Amt_Level7"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle
|
||||
name="Amt_Level6"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle
|
||||
name="Amt_Level5"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle
|
||||
name="Amt_Level4"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle
|
||||
name="Amt_Level3"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Amt_Level2"
|
||||
fontSize="8.0"
|
||||
fontName="Helvetica-Bold" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"
|
||||
/>
|
||||
<paraStyle name="Amt_Level1"
|
||||
fontSize="8.0"
|
||||
fontName="Helvetica-Bold" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"
|
||||
/>
|
||||
|
||||
<paraStyle
|
||||
name="Det_Level8"
|
||||
fontName="Times-Italic"
|
||||
fontSize="8.0" leading="7"/>
|
||||
<paraStyle
|
||||
name="Det_Level7"
|
||||
fontName="Times-Italic"
|
||||
fontSize="8.0" leading="7"/>
|
||||
<paraStyle
|
||||
name="Det_Level6"
|
||||
fontName="Times-Italic"
|
||||
fontSize="8.0" leading="7"/>
|
||||
<paraStyle
|
||||
name="Det_Level5"
|
||||
fontName="Times-Italic"
|
||||
fontSize="8.0" leading="7"/>
|
||||
<paraStyle
|
||||
name="Det_Level4"
|
||||
fontName="Times-Italic"
|
||||
fontSize="8.0" leading="7"/>
|
||||
<paraStyle
|
||||
name="Det_Level3"
|
||||
fontName="Times-Italic"
|
||||
fontSize="8.0" leading="7"/>
|
||||
<paraStyle name="Det_Level2"
|
||||
fontSize="8.0" leading="7"
|
||||
fontName="Times-Italic"
|
||||
/>
|
||||
<paraStyle name="Det_Level1"
|
||||
fontSize="8.0" leading="7"
|
||||
fontName="Times-Italic"
|
||||
/>
|
||||
|
||||
<paraStyle
|
||||
name="Det_Amt_Level8"
|
||||
fontName="Times-Italic"
|
||||
fontSize="8.0" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle
|
||||
name="Det_Amt_Level7"
|
||||
fontName="Times-Italic"
|
||||
fontSize="8.0" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle
|
||||
name="Det_Amt_Level6"
|
||||
fontName="Times-Italic"
|
||||
fontSize="8.0" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle
|
||||
name="Det_Amt_Level5"
|
||||
fontName="Times-Italic"
|
||||
fontSize="8.0" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle
|
||||
name="Det_Amt_Level4"
|
||||
fontName="Times-Italic"
|
||||
fontSize="8.0" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle
|
||||
name="Det_Amt_Level3"
|
||||
fontName="Times-Italic"
|
||||
fontSize="8.0" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Det_Amt_Level2"
|
||||
fontSize="8.0"
|
||||
fontName="Times-Italic" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"
|
||||
/>
|
||||
<paraStyle name="Det_Amt_Level1"
|
||||
fontSize="8.0"
|
||||
fontName="Times-Italic" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"
|
||||
/>
|
||||
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<blockTable colWidths="527.00" style="Table4" repeatRows="1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P9a">[[ get_fiscalyear(data['form']) or removeParentNode('tr') ]]:</para>
|
||||
<para style="P9b"><i> [[ get_periods(data['form']) or removeParentNode('tr') ]]</i></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="50.0,248.0,73.0,72.0,87.0" style="Table1" repeatRows="1">
|
||||
<para style="P2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="527.00" style="Table4" repeatRows="1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P9a">[[ get_fiscalyear(data['form']) or removeParentNode('para') ]]:</para>
|
||||
<para style="P9b"><i> [[ get_periods(data['form']) or removeParentNode('para') ]]</i></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
<para style="P2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="46,278.0,73.0,72.0,82.0" style="Table2" repeatRows="1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P12a">Code</para>
|
||||
@@ -269,36 +187,27 @@
|
||||
<para style="P10">Balance</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="50.0,248.0,73.0,72.0,82.0" style="Table3">
|
||||
<para style="P2">[[ repeatIn(lines(data['form']), 'a') ]]</para>
|
||||
<tr>
|
||||
<td><para style="P14">[[ setTag('para','para',{'style':('Level'+str(a['level']))}) ]]<i>[[ a['code'] or removeParentNode('tr') ]]</i></para></td>
|
||||
<td><para style="P14">[[ setTag('para','para',{'style':('Level'+str(a['level']))}) ]][[ setTag('blockTable','blockTable',{'style':'TrLevel'+str(a['level'])}) ]][[ a['name'] ]]</para></td>
|
||||
<td>
|
||||
<para style="P3"><font><u>[[ a['level']>3 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['debit']) or '0.00' ]]</u></font>
|
||||
<font>[[ a['level']<4 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['debit']) or '0.00' ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3"><font><u>[[ a['level']>3 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['credit']) or '0.00' ]]</u></font>
|
||||
<font>[[ a['level']<4 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['credit']) or '0.00' ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3"><font><u>[[ a['level']>3 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['balance']) or '0.00' ]]</u></font>
|
||||
<font>[[ a['level']<4 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['balance']) or '0.00' ]]</font></para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P14">[[ setTag('para','para',{'style':('Det_Level'+str(a['level']))}) ]][[ a['jname'] or removeParentNode('tr') ]]</para></td>
|
||||
<td><para style="P14">[[ setTag('para','para',{'style':('Det_Level'+str(a['level']))}) ]] [[ setTag('tr','tr',{'style':('TrLevel_Name'+str(a['level']))}) ]]<font>[ref: [[ a['ref'] or removeParentNode('font') ]] ]</font> [[ a['lname'] ]]</para></td>
|
||||
<td><para style="P3">[[ setTag('para','para',{'style':('Det_Amt_Level'+str(a['level']))}) ]][[ formatLang(a['debit1']) or '0.00']]</para></td>
|
||||
<td><para style="P3">[[ setTag('para','para',{'style':('Det_Amt_Level'+str(a['level']))}) ]][[ formatLang(a['credit1']) or '0.00']]</para></td>
|
||||
<td><para style="P3">[[ setTag('para','para',{'style':('Det_Amt_Level'+str(a['level']))}) ]][[ formatLang(a['balance1']) or '0.00' ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
<tr>
|
||||
<td><para style="P14">[[ repeatIn(lines(data['form']), 'a') ]]<i>[[ a['code'] or removeParentNode('tr') ]]</i></para></td>
|
||||
<td>
|
||||
|
||||
<para style="P14">[[ setTag('tr','tr',{'style':'TrLevel'+str(a['level']), 'paraStyle':('Level'+str(a['level']))}) ]]<font></font>
|
||||
[[ a['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3"><font>[[ a['type']=='view' and removeParentNode('font') ]][[ a['debit'] and formatLang(a['debit']) or '0.00' ]]</font>
|
||||
<font><u>[[ a['type']<>'view' and removeParentNode('font') ]] [[a['debit'] and formatLang(a['debit']) or '0.00' ]]</u></font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3"><font>[[ a['type']=='view' and removeParentNode('font') ]][[ a['credit'] and formatLang(a['credit']) or '0.00' ]]</font>
|
||||
<font><u>[[ a['type']<>'view' and removeParentNode('font') ]] [[a['credit'] and formatLang(a['credit']) or '0.00' ]]</u></font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3"><font>[[ a['type']=='view' and removeParentNode('font') ]][[ a['balance'] and formatLang(a['balance']) or '0.00' ]]</font>
|
||||
<font><u>[[ a['type']<>'view' and removeParentNode('font') ]] [[a['balance'] and formatLang(a['balance']) or '0.00' ]]</u></font></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
</document>
|
||||
|
||||
|
||||
@@ -208,12 +208,16 @@ class partner_balance(report_sxw.rml_parse):
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
full_account = []
|
||||
result_tmp = 0.0
|
||||
|
||||
if data['form']['result_selection']=='all':
|
||||
a1=('receivable','payable')
|
||||
elif data['form']['result_selection']=='customer':
|
||||
a1=('receivable','')
|
||||
elif data['form']['result_selection']=='supplier':
|
||||
a1=('payable','')
|
||||
#
|
||||
#
|
||||
#
|
||||
if data['form']['soldeinit'] :
|
||||
|
||||
self.cr.execute(
|
||||
"SELECT p.ref, p.name,l.account_id,ac.name as account_name,ac.code as code , sum(debit) as debit, sum(credit) as credit, " \
|
||||
"CASE WHEN sum(debit) > sum(credit) " \
|
||||
@@ -233,11 +237,11 @@ class partner_balance(report_sxw.rml_parse):
|
||||
"FROM account_move_line l LEFT JOIN res_partner p ON (l.partner_id=p.id) " \
|
||||
"JOIN account_account ac ON (l.account_id = ac.id)" \
|
||||
"WHERE " \
|
||||
# " account_id IN (" + self.account_ids + ") " \
|
||||
"l.date < %s AND l.reconcile_id IS NULL " \
|
||||
"ac.type IN %s " \
|
||||
"AND l.date < %s AND l.reconcile_id IS NULL " \
|
||||
"GROUP BY p.id, p.ref, p.name,l.account_id,ac.name,ac.code " \
|
||||
"ORDER BY l.account_id,p.name",
|
||||
(self.date_lst[0],self.date_lst[0]))
|
||||
(self.date_lst[0],a1,self.date_lst[0]))
|
||||
res = self.cr.dictfetchall()
|
||||
|
||||
for r in res:
|
||||
@@ -265,10 +269,10 @@ class partner_balance(report_sxw.rml_parse):
|
||||
"FROM account_move_line l LEFT JOIN res_partner p ON (l.partner_id=p.id) " \
|
||||
"JOIN account_account ac ON (l.account_id = ac.id)" \
|
||||
"WHERE " \
|
||||
# " account_id IN (" + self.account_ids + ") " \
|
||||
" l.date IN (" + self.date_lst_string + ") " \
|
||||
" ac.type IN %s " \
|
||||
"AND l.date IN (" + self.date_lst_string + ") " \
|
||||
"GROUP BY p.id, p.ref, p.name,l.account_id,ac.name,ac.code " \
|
||||
"ORDER BY l.account_id,p.name")
|
||||
"ORDER BY l.account_id,p.name",(a1,))
|
||||
res = self.cr.dictfetchall()
|
||||
|
||||
for r in res:
|
||||
@@ -285,7 +289,10 @@ class partner_balance(report_sxw.rml_parse):
|
||||
tot_scredit = 0.0
|
||||
tot_sdebit = 0.0
|
||||
tot_enlitige = 0.0
|
||||
tot_d=0.0
|
||||
print "WWW",cleanarray
|
||||
for r in cleanarray:
|
||||
print "r",r
|
||||
# For the first element we always add the line
|
||||
# type = 1 is the line is the first of the account
|
||||
# type = 2 is an other line of the account
|
||||
@@ -305,10 +312,12 @@ class partner_balance(report_sxw.rml_parse):
|
||||
new_header['balance'] = float(tot_sdebit) - float(tot_scredit)
|
||||
new_header['type'] = 3
|
||||
##
|
||||
print "33", new_header
|
||||
completearray.append(new_header)
|
||||
#
|
||||
r['type'] = 1
|
||||
r['balance'] = float(r['sdebit']) - float(r['scredit'])
|
||||
print "LEVEL1", r
|
||||
|
||||
completearray.append(r)
|
||||
#
|
||||
@@ -361,6 +370,7 @@ class partner_balance(report_sxw.rml_parse):
|
||||
new_header['enlitige'] = tot_enlitige
|
||||
new_header['balance'] = float(tot_sdebit) - float(tot_scredit)
|
||||
new_header['type'] = 3
|
||||
print "NEW GEA", new_header
|
||||
##
|
||||
##
|
||||
completearray.append(new_header)
|
||||
@@ -369,6 +379,7 @@ class partner_balance(report_sxw.rml_parse):
|
||||
r['type'] = 1
|
||||
#
|
||||
r['balance'] = float(r['sdebit']) - float(r['scredit'])
|
||||
print "RR LEVEEL1",r
|
||||
#
|
||||
completearray.append(r)
|
||||
|
||||
@@ -384,46 +395,67 @@ class partner_balance(report_sxw.rml_parse):
|
||||
r['type'] = 2
|
||||
#
|
||||
r['balance'] = float(r['sdebit']) - float(r['scredit'])
|
||||
print "LEVELE2",i,r
|
||||
#
|
||||
|
||||
completearray.append(r)
|
||||
|
||||
print "fin",i
|
||||
i = i + 1
|
||||
|
||||
return completearray
|
||||
|
||||
|
||||
def _sum_debit(self,data):
|
||||
print "daa",data
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
result_tmp = 0.0
|
||||
#
|
||||
#
|
||||
|
||||
if data['form']['result_selection']=='all':
|
||||
a1=('receivable','payable')
|
||||
elif data['form']['result_selection']=='customer':
|
||||
a1=('receivable','')
|
||||
elif data['form']['result_selection']=='supplier':
|
||||
a1=('payable','')
|
||||
|
||||
if data['form']['soldeinit'] :
|
||||
self.cr.execute(
|
||||
'SELECT sum(debit) ' \
|
||||
'FROM account_move_line AS l ' \
|
||||
'FROM account_move_line AS l left join account_account ac ON (l.account_id = ac.id)' \
|
||||
'WHERE ' \
|
||||
# ' account_id IN (' + self.account_ids + ') ' \
|
||||
' l.reconcile_id IS NULL ' \
|
||||
' ac.type IN %s ' \
|
||||
'AND l.reconcile_id IS NULL ' \
|
||||
'AND date < %s ',
|
||||
(self.date_lst[0],))
|
||||
result_tmp = float(self.cr.fetchone()[0] or 0.0)
|
||||
(a1,self.date_lst[0],))
|
||||
|
||||
v_res = self.cr.fetchone()
|
||||
if v_res and v_res != None:
|
||||
result_tmp = float(v_res[0] or 0.0)
|
||||
else:
|
||||
result_tmp = 0.0
|
||||
#
|
||||
#
|
||||
self.cr.execute(
|
||||
'SELECT sum(debit) ' \
|
||||
'FROM account_move_line AS l ' \
|
||||
'FROM account_move_line AS l left join account_account ac ON (l.account_id = ac.id)' \
|
||||
'WHERE ' \
|
||||
# ' account_id IN (' + self.account_ids + ') ' \
|
||||
' l.date IN (' + self.date_lst_string + ') ' )
|
||||
' ac.type IN %s ' \
|
||||
'AND l.date IN (' + self.date_lst_string + ') ',(a1,) )
|
||||
result_tmp = result_tmp + float(self.cr.fetchone()[0] or 0.0)
|
||||
|
||||
return result_tmp
|
||||
|
||||
def _sum_credit(self,data):
|
||||
if data['form']['result_selection']=='all':
|
||||
a1=('receivable','payable')
|
||||
elif data['form']['result_selection']=='customer':
|
||||
a1=('receivable','')
|
||||
elif data['form']['result_selection']=='supplier':
|
||||
a1=('payable','')
|
||||
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
@@ -434,27 +466,34 @@ class partner_balance(report_sxw.rml_parse):
|
||||
if data['form']['soldeinit'] :
|
||||
self.cr.execute(
|
||||
'SELECT sum(credit) ' \
|
||||
'FROM account_move_line AS l ' \
|
||||
'FROM account_move_line AS l left join account_account ac ON (l.account_id = ac.id)' \
|
||||
'WHERE ' \
|
||||
# ' account_id IN (' + self.account_ids + ') ' \
|
||||
' l.reconcile_id IS NULL ' \
|
||||
' ac.type IN %s ' \
|
||||
'AND l.reconcile_id IS NULL ' \
|
||||
'AND date < %s ' ,
|
||||
(self.date_lst[0],))
|
||||
(a1,self.date_lst[0],))
|
||||
result_tmp = float(self.cr.fetchone()[0] or 0.0)
|
||||
#
|
||||
#
|
||||
self.cr.execute(
|
||||
'SELECT sum(credit) ' \
|
||||
'FROM account_move_line AS l ' \
|
||||
'FROM account_move_line AS l left join account_account ac ON (l.account_id = ac.id)' \
|
||||
'WHERE ' \
|
||||
# ' account_id IN (' + self.account_ids + ') ' \
|
||||
' l.date IN (' + self.date_lst_string + ') ' )
|
||||
' ac.type IN %s ' \
|
||||
'AND l.date IN (' + self.date_lst_string + ') ',(a1,) )
|
||||
|
||||
result_tmp = result_tmp + float(self.cr.fetchone()[0] or 0.0)
|
||||
|
||||
return result_tmp
|
||||
|
||||
def _sum_litige(self,data):
|
||||
if data['form']['result_selection']=='all':
|
||||
a1=('receivable','payable')
|
||||
elif data['form']['result_selection']=='customer':
|
||||
a1=('receivable','')
|
||||
elif data['form']['result_selection']=='supplier':
|
||||
a1=('payable','')
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
@@ -465,28 +504,35 @@ class partner_balance(report_sxw.rml_parse):
|
||||
if data['form']['soldeinit'] :
|
||||
self.cr.execute(
|
||||
'SELECT sum(debit-credit) ' \
|
||||
'FROM account_move_line AS l ' \
|
||||
'FROM account_move_line AS l left join account_account ac ON (l.account_id = ac.id)' \
|
||||
'WHERE ' \
|
||||
# ' account_id IN (' + self.account_ids + ') ' \
|
||||
' l.reconcile_id IS NULL ' \
|
||||
'AND ac.type IN %s ' \
|
||||
'AND date < %s ' \
|
||||
'AND blocked=TRUE ' ,
|
||||
(self.date_lst[0],))
|
||||
(a1,self.date_lst[0],))
|
||||
result_tmp = float(self.cr.fetchone()[0] or 0.0)
|
||||
#
|
||||
#
|
||||
self.cr.execute(
|
||||
'SELECT sum(debit-credit) ' \
|
||||
'FROM account_move_line AS l ' \
|
||||
'FROM account_move_line AS l left join account_account ac ON (l.account_id = ac.id)' \
|
||||
'WHERE ' \
|
||||
# ' account_id IN (' + self.account_ids + ') ' \
|
||||
' l.date IN (' + self.date_lst_string + ') ' \
|
||||
'AND blocked=TRUE ' )
|
||||
'ac.type IN %s ' \
|
||||
'AND l.date IN (' + self.date_lst_string + ') ' \
|
||||
'AND blocked=TRUE ',(a1,) )
|
||||
result_tmp = result_tmp + float(self.cr.fetchone()[0] or 0.0)
|
||||
|
||||
return result_tmp
|
||||
|
||||
def _sum_sdebit(self,data):
|
||||
if data['form']['result_selection']=='all':
|
||||
a1=('receivable','payable')
|
||||
elif data['form']['result_selection']=='customer':
|
||||
a1=('receivable','')
|
||||
elif data['form']['result_selection']=='supplier':
|
||||
a1=('payable','')
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
@@ -500,16 +546,17 @@ class partner_balance(report_sxw.rml_parse):
|
||||
'THEN sum(debit) - sum(credit) ' \
|
||||
'ELSE 0 ' \
|
||||
'END ' \
|
||||
'FROM account_move_line AS l ' \
|
||||
'FROM account_move_line AS l left join account_account ac ON (l.account_id = ac.id)' \
|
||||
'WHERE ' \
|
||||
# ' account_id IN (' + self.account_ids + ') ' \
|
||||
' date < %s ' \
|
||||
'ac.type IN %s ' \
|
||||
'AND date < %s ' \
|
||||
'AND reconcile_id IS NULL ' \
|
||||
'GROUP BY partner_id',
|
||||
(self.date_lst[0],))
|
||||
(a1,self.date_lst[0],))
|
||||
|
||||
if self.cr.fetchone() != None:
|
||||
result_tmp = float(self.cr.fetchone()[0])
|
||||
v_res = self.cr.fetchone()
|
||||
if v_res != None :
|
||||
result_tmp = float(v_res[0]) or 0.0
|
||||
else:
|
||||
result_tmp = 0.0
|
||||
#
|
||||
@@ -519,15 +566,14 @@ class partner_balance(report_sxw.rml_parse):
|
||||
'THEN sum(debit) - sum(credit) ' \
|
||||
'ELSE 0 ' \
|
||||
'END ' \
|
||||
'FROM account_move_line AS l ' \
|
||||
'FROM account_move_line AS l left join account_account ac ON (l.account_id = ac.id)' \
|
||||
'WHERE ' \
|
||||
# ' account_id IN (' + self.account_ids + ') ' \
|
||||
'l.date IN (' + self.date_lst_string + ') ' \
|
||||
'GROUP BY partner_id')
|
||||
a = self.cr.fetchone()[0]
|
||||
|
||||
if self.cr.fetchone() != None:
|
||||
result_tmp = result_tmp + (a or 0.0)
|
||||
' ac.type IN %s ' \
|
||||
'AND l.date IN (' + self.date_lst_string + ') ' \
|
||||
'GROUP BY partner_id',(a1,))
|
||||
v_res = self.cr.fetchone()
|
||||
if v_res != None:
|
||||
result_tmp = result_tmp + ( v_res[0] or 0.0)
|
||||
else:
|
||||
result_tmp = 0.0
|
||||
|
||||
@@ -535,6 +581,12 @@ class partner_balance(report_sxw.rml_parse):
|
||||
|
||||
def _sum_scredit(self,data):
|
||||
|
||||
if data['form']['result_selection']=='all':
|
||||
a1=('receivable','payable')
|
||||
elif data['form']['result_selection']=='customer':
|
||||
a1=('receivable','')
|
||||
elif data['form']['result_selection']=='supplier':
|
||||
a1=('payable','')
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
@@ -548,16 +600,17 @@ class partner_balance(report_sxw.rml_parse):
|
||||
'THEN sum(credit) - sum(debit) ' \
|
||||
'ELSE 0 ' \
|
||||
'END ' \
|
||||
'FROM account_move_line AS l ' \
|
||||
'FROM account_move_line AS l left join account_account ac ON (l.account_id = ac.id)' \
|
||||
'WHERE ' \
|
||||
# ' account_id IN (' + self.account_ids + ') ' \
|
||||
' date <= %s ' \
|
||||
' ac.type IN %s ' \
|
||||
'AND date <= %s ' \
|
||||
'AND l.reconcile_id IS NULL ' \
|
||||
'GROUP BY partner_id',
|
||||
(self.date_lst[0],))
|
||||
(a1,self.date_lst[0],))
|
||||
|
||||
if self.cr.fetchone() != None:
|
||||
result_tmp = float(self.cr.fetchone()[0]) or 0.0
|
||||
v_res = self.cr.fetchone()
|
||||
if v_res != None:
|
||||
result_tmp = float(v_res[0]) or 0.0
|
||||
else:
|
||||
result_tmp = 0.0
|
||||
#
|
||||
@@ -567,14 +620,14 @@ class partner_balance(report_sxw.rml_parse):
|
||||
'THEN sum(credit) - sum(debit) ' \
|
||||
'ELSE 0 ' \
|
||||
'END ' \
|
||||
'FROM account_move_line AS l ' \
|
||||
'FROM account_move_line AS l left join account_account ac ON (l.account_id = ac.id)' \
|
||||
'WHERE ' \
|
||||
# ' account_id IN (' + self.account_ids + ') ' \
|
||||
'l.date IN (' + self.date_lst_string + ') ' \
|
||||
'GROUP BY partner_id')
|
||||
a = self.cr.fetchone()[0]
|
||||
if self.cr.fetchone() != None:
|
||||
result_tmp = result_tmp + (a or 0.0)
|
||||
' ac.type IN %s ' \
|
||||
' AND l.date IN (' + self.date_lst_string + ') ' \
|
||||
'GROUP BY partner_id',(a1,))
|
||||
a = self.cr.fetchone()
|
||||
if a != None :
|
||||
result_tmp = result_tmp + (a[0] or 0.0)
|
||||
|
||||
else:
|
||||
result_tmp = 0.0
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<!--COL 1-->
|
||||
<drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>
|
||||
<drawRightString x="20cm" y="28.1cm">Partnar Balance [[ data['form']['result_selection'] == 'customer' and '/ Débiteur' ]] [[ data['form']['result_selection'] == 'supplier' and '/ Créancier' ]] [[ data['form']['result_selection'] == 'all' and '/ Créancier et Débiteur' ]] [[ company.currency_id.name ]]</drawRightString>
|
||||
<drawRightString x="20cm" y="28.1cm">Partner Balance [[ data['form']['result_selection'] == 'customer' and '/ Débiteur' ]] [[ data['form']['result_selection'] == 'supplier' and '/ Créancier' ]] [[ data['form']['result_selection'] == 'all' and '/ Créancier et Débiteur' ]] [[ company.currency_id.name ]]</drawRightString>
|
||||
|
||||
|
||||
<!-- Header -->
|
||||
@@ -381,4 +381,4 @@
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
</document>
|
||||
</document>
|
||||
|
||||
@@ -75,6 +75,8 @@ class profile_manufacturing_config_install_modules_wizard(osv.osv_memory):
|
||||
help="This module allows you to manage a Portal system."),
|
||||
'mrp_subproduct': fields.boolean('Mrp Sub Product',
|
||||
help="This module allows you to add sub poducts in mrp bom."),
|
||||
'warning': fields.boolean('Warning',
|
||||
help="Able you to set warnings on products and partners."),
|
||||
'board_document':fields.boolean('Document Management',
|
||||
help= "The Document Management System of Open ERP allows you to store, browse, automatically index, search and preview all kind of documents (internal documents, printed reports, calendar system). It opens an FTP access for the users to easily browse association's document."),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user