Commit 4b9f0fac authored by Jérome Perrin's avatar Jérome Perrin

accounting: fix edge case in aged balance report detailed mode

If a transaction has the same source section and destination section, there was a risk of showing the wrong side of the transaction. Test that both section and nodes are the same instead. There is still a risk, of showing something wrong if source and destination are also same, but such transaction would be non sense anyway.
parent 7ddb9c10
...@@ -122,7 +122,7 @@ for brain in portal.portal_simulation.getMovementHistoryList(\n ...@@ -122,7 +122,7 @@ for brain in portal.portal_simulation.getMovementHistoryList(\n
line[\'reference\'] = transaction.getReference()\n line[\'reference\'] = transaction.getReference()\n
line[\'portal_type\'] = transaction.getTranslatedPortalType()\n line[\'portal_type\'] = transaction.getTranslatedPortalType()\n
line[\'date\'] = brain.date\n line[\'date\'] = brain.date\n
if brain.mirror_section_uid == movement.getSourceSectionUid():\n if brain.mirror_section_uid == movement.getSourceSectionUid() and brain.mirror_node_uid == movement.getSourceUid():\n
line[\'specific_reference\'] = transaction.getDestinationReference()\n line[\'specific_reference\'] = transaction.getDestinationReference()\n
line[\'gap_id\'] = getAccountNumber(movement.getDestination())\n line[\'gap_id\'] = getAccountNumber(movement.getDestination())\n
else:\n else:\n
......
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