Commit 96f1efa2 authored by Jérome Perrin's avatar Jérome Perrin

handle balance between period start date and from date correctly for payable / recievable accounts

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17434 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 39b2be5c
...@@ -356,13 +356,8 @@ for node in getInventoryList(\n ...@@ -356,13 +356,8 @@ for node in getInventoryList(\n
\n \n
\n \n
for node in getInventoryList(\n for node in getInventoryList(\n
node_category_strict_membership=[\n node_category_strict_membership=\n
\'account_type/asset\',\n account_type_to_group_by_node,\n
\'account_type/asset/cash\',\n
\'account_type/asset/receivable/refundable_vat\',\n
\'account_type/liability/payable/collected_vat\',\n
\'account_type/equity\',\n
\'account_type/liability\',],\n
group_by_node=1,\n group_by_node=1,\n
omit_output=1,\n omit_output=1,\n
from_date=period_start_date,\n from_date=period_start_date,\n
...@@ -377,13 +372,8 @@ for node in getInventoryList(\n ...@@ -377,13 +372,8 @@ for node in getInventoryList(\n
\'initial_debit_balance\', 0) + total_price\n \'initial_debit_balance\', 0) + total_price\n
\n \n
for node in getInventoryList(\n for node in getInventoryList(\n
node_category_strict_membership=[\n node_category_strict_membership=\n
\'account_type/asset\',\n account_type_to_group_by_node,\n
\'account_type/asset/cash\',\n
\'account_type/asset/receivable/refundable_vat\',\n
\'account_type/liability/payable/collected_vat\',\n
\'account_type/equity\',\n
\'account_type/liability\',],\n
group_by_node=1,\n group_by_node=1,\n
omit_input=1,\n omit_input=1,\n
from_date=period_start_date,\n from_date=period_start_date,\n
...@@ -489,11 +479,8 @@ for node in getInventoryList(\n ...@@ -489,11 +479,8 @@ for node in getInventoryList(\n
to_date=from_date,\n to_date=from_date,\n
portal_type=accounting_movement_type_list,\n portal_type=accounting_movement_type_list,\n
**inventory_params):\n **inventory_params):\n
mirror_section_key = MARKER\n
if expand_accounts:\n
mirror_section_key = node[\'mirror_section_uid\']\n
account_props = line_per_account.setdefault(\n account_props = line_per_account.setdefault(\n
(node[\'node_relative_url\'], mirror_section_key, MARKER),\n (node[\'node_relative_url\'], node[\'mirror_section_uid\'], MARKER),\n
dict(debit=0, credit=0))\n dict(debit=0, credit=0))\n
total_price = node[\'total_price\'] or 0\n total_price = node[\'total_price\'] or 0\n
account_props[\'initial_debit_balance\'] = account_props.get(\n account_props[\'initial_debit_balance\'] = account_props.get(\n
...@@ -509,11 +496,8 @@ for node in getInventoryList(\n ...@@ -509,11 +496,8 @@ for node in getInventoryList(\n
to_date=from_date,\n to_date=from_date,\n
portal_type=accounting_movement_type_list,\n portal_type=accounting_movement_type_list,\n
**inventory_params):\n **inventory_params):\n
mirror_section_key = MARKER\n
if expand_accounts:\n
mirror_section_key = node[\'mirror_section_uid\']\n
account_props = line_per_account.setdefault(\n account_props = line_per_account.setdefault(\n
(node[\'node_relative_url\'], mirror_section_key, MARKER),\n (node[\'node_relative_url\'], node[\'mirror_section_uid\'], MARKER),\n
dict(debit=0, credit=0))\n dict(debit=0, credit=0))\n
total_price = node[\'total_price\'] or 0\n total_price = node[\'total_price\'] or 0\n
account_props[\'initial_credit_balance\'] = account_props.get(\n account_props[\'initial_credit_balance\'] = account_props.get(\n
......
494 495
\ 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