[Add] account : Add the currency in third_party_ledger report
bzr revid: sbh@tinyerp.com-20100723102459-dq5sq8lw4z8gqqkb
This commit is contained in:
@@ -235,10 +235,11 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header):
|
||||
# full_account.append(r)
|
||||
if self.date_lst_string:
|
||||
self.cr.execute(
|
||||
"SELECT l.id,l.date,j.code, l.ref, l.name, l.debit, l.credit " \
|
||||
"SELECT l.id,l.date,j.code, l.ref, l.name, l.debit, l.credit,l.amount_currency,c.code AS currency_code " \
|
||||
"FROM account_move_line l " \
|
||||
"LEFT JOIN account_journal j " \
|
||||
"ON (l.journal_id = j.id) " \
|
||||
"LEFT JOIN res_currency c on (l.currency_id=c.id)" \
|
||||
"WHERE l.partner_id = %s " \
|
||||
"AND l.account_id IN %s"\
|
||||
"AND l.date IN (" + self.date_lst_string + ")"
|
||||
@@ -246,6 +247,7 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header):
|
||||
"ORDER BY l.id",
|
||||
(partner.id, tuple(self.account_ids),))
|
||||
res = self.cr.dictfetchall()
|
||||
print res
|
||||
sum = 0.0
|
||||
for r in res:
|
||||
sum = r['debit'] - r['credit']
|
||||
|
||||
@@ -74,6 +74,10 @@
|
||||
<blockAlignment value="LEFT"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="tbl_content">
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
@@ -131,7 +135,7 @@
|
||||
<blockTable colWidths="482.0" style="Table_title">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">Third Party Ledger</para>
|
||||
<para style="terp_header_Centre">111111111Third Party Ledger</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -184,7 +188,7 @@
|
||||
<para style="P3">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="58.0,26.0,40.0,156.0,68.0,67.0,66.0" style="Table_header_1">
|
||||
<blockTable colWidths="58.0,26.0,40.0,156.0,68.0,67.0,66.0" style="Table_header_1">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Date</para>
|
||||
@@ -212,7 +216,7 @@
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="280.0,68.0,67.0,66.0" style="Table1">
|
||||
<blockTable colWidths="280.0,68.0,67.0,66.0" style="Table1">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Balance Brought Forward</para>
|
||||
@@ -233,7 +237,7 @@
|
||||
</para>
|
||||
<section>
|
||||
<para style="P4">[[ repeatIn(objects, 'p') ]] [[ setLang(p.lang) ]]</para>
|
||||
<blockTable colWidths="280.0,68.0,67.0,66.0" style="Table2">
|
||||
<blockTable colWidths="280.0,68.0,67.0,66.0" style="Table2">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P2">[[ p.ref ]] - [[ p.name ]]</para>
|
||||
@@ -254,7 +258,7 @@
|
||||
</para>
|
||||
<section>
|
||||
<para style="P1">[[ repeatIn(lines(p,data), 'line') ]]</para>
|
||||
<blockTable colWidths="58.0,26.0,40.0,156.0,68.0,67.0,66.0" style="Table3">
|
||||
<blockTable colWidths="58.0,26.0,40.0,156.0,68.0,67.0,66.0" style="Table3">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P4">[[ formatLang(line['date'],date=True) ]]</para>
|
||||
@@ -287,8 +291,105 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<!-- with currency-->
|
||||
|
||||
<blockTable colWidths="58.0,26.0,40.0,156.0,68.0,67.0,66.0,60.0" style="Table_header_1">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">JNRL</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Ref.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Entry Label</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Debit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Credit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Balance</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Currency</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
<blockTable colWidths="280.0,68.0,67.0,66.0,60.0" style="Table1">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Balance Brought Forward</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit(data))) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_credit(data))) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit(data) - sum_credit(data))) ]]</para>
|
||||
</td>
|
||||
<td></td>
|
||||
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="P4">[[ repeatIn(objects, 'p') ]] [[ setLang(p.lang) ]]</para>
|
||||
<blockTable colWidths="280.0,68.0,67.0,66.0,60.0" style="Table2">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P2">[[ p.ref ]] - [[ p.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit_partner(p,data))) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_credit_partner(p,data))) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit_partner(p,data) - sum_credit_partner(p,data))) ]]</u></para>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="P1">[[ repeatIn(lines(p,data), 'line') ]]</para>
|
||||
<blockTable colWidths="58.0,26.0,40.0,156.0,68.0,67.0,66.0,60.0" style="tbl_content">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P4">[[ formatLang(line['date'],date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">[[ line['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">[[ line['ref'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">[[ line['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]]</para>
|
||||
</td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(line['amount_currency'] or '') ]] [[ line['currency_code'] or '']]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
</story>
|
||||
</document>
|
||||
Reference in New Issue
Block a user