Commit 208f9bca authored by Jérome Perrin's avatar Jérome Perrin

fix AccountingTransaction_getTotalCredit

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26618 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 127ae583
...@@ -54,15 +54,15 @@ ...@@ -54,15 +54,15 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>is_source = context.AccountingTransaction_isSourceView()\n <value> <string>is_source = context.AccountingTransaction_isSourceView()\n
total_debit = 0\n total_credit = 0\n
for line in context.getMovementList(\n for line in context.getMovementList(\n
portal_type=context.getPortalAccountingMovementTypeList()):\n portal_type=context.getPortalAccountingMovementTypeList()):\n
if is_source:\n if is_source:\n
total_debit += line.getDestinationInventoriatedTotalAssetDebit()\n total_credit += line.getSourceInventoriatedTotalAssetCredit()\n
else:\n else:\n
total_debit += line.getSourceInventoriatedTotalAssetDebit()\n total_credit += line.getDestinationInventoriatedTotalAssetCredit()\n
\n \n
return total_debit\n return total_credit\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -103,7 +103,7 @@ return total_debit\n ...@@ -103,7 +103,7 @@ return total_debit\n
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>is_source</string> <string>is_source</string>
<string>total_debit</string> <string>total_credit</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>line</string> <string>line</string>
<string>_inplacevar_</string> <string>_inplacevar_</string>
......
902 903
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment