Commit 46450ae5 authored by Jérome Perrin's avatar Jérome Perrin

When calculating the remaining price, only consider payable / receivable

accounts that are used on this invoice (ie. if another account is used in a
related tansaction, ignore this amount).



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13604 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 76b60c57
...@@ -131,8 +131,8 @@ for related_transaction in context.getCausalityRelatedValueList(\n ...@@ -131,8 +131,8 @@ for related_transaction in context.getCausalityRelatedValueList(\n
# if we have a payment related to multiple invoices, we cannot say the\n # if we have a payment related to multiple invoices, we cannot say the\n
# remaining price on those invoices.\n # remaining price on those invoices.\n
for other_invoice in [ tr for tr in related_transaction.getCausalityValueList(\n for other_invoice in [ tr for tr in related_transaction.getCausalityValueList(\n
portal_type=context.getPortalAccountingTransactionTypeList())\n portal_type=context.getPortalAccountingTransactionTypeList())\n
if tr != context ]:\n if tr != context ]:\n
other_invoice_is_source = \\\n other_invoice_is_source = \\\n
other_invoice.AccountingTransaction_isSourceView()\n other_invoice.AccountingTransaction_isSourceView()\n
for other_line in other_invoice.getMovementList(\n for other_line in other_invoice.getMovementList(\n
...@@ -168,8 +168,9 @@ for related_transaction in context.getCausalityRelatedValueList(\n ...@@ -168,8 +168,9 @@ for related_transaction in context.getCausalityRelatedValueList(\n
\n \n
if node_value is not None and \\\n if node_value is not None and \\\n
node_value.getAccountTypeId() in (\'payable\', \'receivable\'):\n node_value.getAccountTypeId() in (\'payable\', \'receivable\'):\n
key = (node_value.getRelativeUrl(), mirror_section)\n if node_value in accounts_in_context:\n
total_payable_price_per_node_section[key] =\\\n key = (node_value.getRelativeUrl(), mirror_section)\n
total_payable_price_per_node_section[key] =\\\n
total_payable_price_per_node_section.get(key, 0) + amount\n total_payable_price_per_node_section.get(key, 0) + amount\n
\n \n
if detailed:\n if detailed:\n
......
224 225
\ 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