Commit 60a7722d authored by Jérome Perrin's avatar Jérome Perrin

Other Parties Report: check that *rounded* balance == 0 to hide balanced accounts

parent 50d50e73
...@@ -65,9 +65,12 @@ simulation_state = request[\'simulation_state\']\n ...@@ -65,9 +65,12 @@ simulation_state = request[\'simulation_state\']\n
role_filter_list = request.get(\'mirror_section_category_list\', None)\n role_filter_list = request.get(\'mirror_section_category_list\', None)\n
omit_balanced_accounts = request[\'omit_balanced_accounts\']\n omit_balanced_accounts = request[\'omit_balanced_accounts\']\n
from_date = request.get(\'from_date\', None)\n from_date = request.get(\'from_date\', None)\n
gap_root = request.get(\'gap_root\', None)\n
project = request.get(\'project\', None)\n project = request.get(\'project\', None)\n
\n \n
currency = portal.Base_getCurrencyForSection(request[\'section_category\'])\n
precision = portal.account_module.getQuantityPrecisionFromResource(currency)\n
request.set(\'precision\', precision)\n
\n
request.other[\'is_accounting_report\'] = True\n request.other[\'is_accounting_report\'] = True\n
\n \n
# role_filter_list == None means no filter on the role\n # role_filter_list == None means no filter on the role\n
...@@ -140,11 +143,12 @@ for party in context.Account_zDistinctSectionList(\n ...@@ -140,11 +143,12 @@ for party in context.Account_zDistinctSectionList(\n
if omit_balanced_accounts and (\n if omit_balanced_accounts and (\n
round(simulation_tool.getInventoryAssetPrice(\n round(simulation_tool.getInventoryAssetPrice(\n
mirror_section_uid=party.uid,\n mirror_section_uid=party.uid,\n
precision=precision,\n
node_category_strict_membership=(\n node_category_strict_membership=(\n
\'account_type/asset/receivable\',\n \'account_type/asset/receivable\',\n
\'account_type/liability/payable\'),\n \'account_type/liability/payable\'),\n
**params\n **params\n
), 3) == 0.):\n ), precision) == 0.):\n
pass\n pass\n
else:\n else:\n
title = o.getTitle()\n title = o.getTitle()\n
......
1544 1545
\ 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