Commit deee779e authored by Jérome Perrin's avatar Jérome Perrin

Fixes in Trial Balance for transactions with from_date and precision.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13725 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c48d1f9e
...@@ -86,8 +86,8 @@ accounting_movement_type_list = [ t for t in\n ...@@ -86,8 +86,8 @@ accounting_movement_type_list = [ t for t in\n
\n \n
inventory_params = dict(section_uid=section_uid,\n inventory_params = dict(section_uid=section_uid,\n
simulation_state=simulation_state,\n simulation_state=simulation_state,\n
group_by_resource=0,\n precision=precision,\n
precision=precision)\n group_by_resource=0)\n
MARKER = Object()\n MARKER = Object()\n
\n \n
# a dictionary (node_relative_url, mirror_section_uid, payment_uid)\n # a dictionary (node_relative_url, mirror_section_uid, payment_uid)\n
...@@ -287,7 +287,7 @@ for node in LazyFilter(context.account_module.contentValues(), skip=\'\'):\n ...@@ -287,7 +287,7 @@ for node in LazyFilter(context.account_module.contentValues(), skip=\'\'):\n
dict(debit=0, credit=0))\n dict(debit=0, credit=0))\n
\n \n
\n \n
initial_balance_date = (from_date - 1).earliestTime()\n initial_balance_date = (from_date - 1).latestTime()\n
\n \n
line_list = []\n line_list = []\n
for (node_relative_url, mirror_section_uid, payment_uid), data in \\\n for (node_relative_url, mirror_section_uid, payment_uid), data in \\\n
...@@ -454,8 +454,10 @@ for (node_relative_url, mirror_section_uid, payment_uid), data in \\\n ...@@ -454,8 +454,10 @@ for (node_relative_url, mirror_section_uid, payment_uid), data in \\\n
total_initial_debit_balance += round(initial_debit_balance, precision)\n total_initial_debit_balance += round(initial_debit_balance, precision)\n
total_initial_credit_balance += round(initial_credit_balance, precision)\n total_initial_credit_balance += round(initial_credit_balance, precision)\n
\n \n
final_debit_balance = initial_debit_balance + data[\'debit\']\n final_debit_balance = round(initial_debit_balance + data[\'debit\'],\n
final_credit_balance = initial_credit_balance + data[\'credit\']\n precision)\n
final_credit_balance = round(initial_credit_balance + data[\'credit\'],\n
precision)\n
\n \n
closing_balance = final_debit_balance - final_credit_balance\n closing_balance = final_debit_balance - final_credit_balance\n
\n \n
......
...@@ -106,7 +106,6 @@ request.set(\'period_start_date\', period_start_date)\n ...@@ -106,7 +106,6 @@ request.set(\'period_start_date\', period_start_date)\n
\n \n
if not from_date:\n if not from_date:\n
from_date = period_start_date\n from_date = period_start_date\n
from_date = (from_date - 1).latestTime()\n
\n \n
# currency precision\n # currency precision\n
currency = portal.Base_getCurrencyForSection(request[\'section_category\'])\n currency = portal.Base_getCurrencyForSection(request[\'section_category\'])\n
...@@ -150,6 +149,12 @@ return [ ReportSection(\n ...@@ -150,6 +149,12 @@ return [ ReportSection(\n
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
......
227 228
\ 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