Commit 9e7a6244 authored by Jérome Perrin's avatar Jérome Perrin

improved trial balance


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4730 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7a152191
...@@ -75,16 +75,19 @@ from Products.ERP5Form.Report import ReportSection\n ...@@ -75,16 +75,19 @@ from Products.ERP5Form.Report import ReportSection\n
\n \n
request = context.REQUEST\n request = context.REQUEST\n
\n \n
at_date = request[\'at_date\']\n at_date = request[\'at_date\']\n
transaction_section_category = request[\'transaction_section_category\']\n transaction_section_category = request[\'transaction_section_category\']\n
transaction_simulation_state = request[\'transaction_simulation_state\']\n transaction_simulation_state = request[\'transaction_simulation_state\']\n
gap_root = request[\'gap_root\']\n gap_root = request[\'gap_root\']\n
from_date = request.get(\'from_date\', None)\n from_date = request.get(\'from_date\', None)\n
expand_accounts = request.get(\'expand_accounts\', 0)\n
\n
\n \n
# flat_mode is a boolean that indicate wether we should use a report tree \n # flat_mode is a boolean that indicate wether we should use a report tree \n
# or a flat list of all accounts. \n # or a flat list of all accounts. \n
tree_mode = request.get(\'tree_mode\', 0)\n tree_mode = request.get(\'tree_mode\', 0)\n
\n if tree_mode :\n
raise \'tree mode no longer supported, sorry\'\n
\n \n
result = []\n result = []\n
params = {\n params = {\n
...@@ -96,6 +99,7 @@ params = {\n ...@@ -96,6 +99,7 @@ params = {\n
\'is_report_opened\' : 1,\n \'is_report_opened\' : 1,\n
\'report_depth\' : 5,\n \'report_depth\' : 5,\n
\'gap_root\' : gap_root,\n \'gap_root\' : gap_root,\n
\'expand_accounts\' : expand_accounts ,\n
}\n }\n
\n \n
preferences = {\n preferences = {\n
...@@ -121,19 +125,18 @@ else :\n ...@@ -121,19 +125,18 @@ else :\n
balance_columns = (\n balance_columns = (\n
gap_id_line,\n gap_id_line,\n
(\'title\', \'Account\'),\n (\'title\', \'Account\'),\n
# TODO\n (\'opening_balance\', \'Opening Balance\'),\n
# (\'AccountModule_getAccountingTransactionCount\', \'Transaction Count\'),\n (\'debit_movement\', \'Debit Movements\'),\n
(\'debit\', \'Debit\'),\n (\'credit_movement\', \'Credit Movements\'),\n
(\'credit\', \'Credit\'),\n (\'closing_balance\', \'Closing Balance\'),\n
(\'debit_balance\', \'Debit Balance\'),\n
(\'credit_balance\', \'Credit Balance\')\n
)\n )\n
\n \n
\n \n
if not tree_mode :\n if not tree_mode :\n
result.append(\n result.append(\n
ReportSection(path=portal.account_module.getPhysicalPath(),\n ReportSection( path=portal.account_module.getPhysicalPath(),\n
title=\'Trial Balance\',\n # FIXME translate later\n
title=portal.translation_service.translate(\'ui\', \'Trial Balance\').encode(\'utf8\'),\n
level=1,\n level=1,\n
form_id=\'AccountModule_viewAccountListForTrialBalance\',\n form_id=\'AccountModule_viewAccountListForTrialBalance\',\n
selection_name=\'accounting_selection\',\n selection_name=\'accounting_selection\',\n
...@@ -151,7 +154,7 @@ else :\n ...@@ -151,7 +154,7 @@ else :\n
\n \n
result.append(\n result.append(\n
ReportSection(path=portal.account_module.getPhysicalPath(),\n ReportSection(path=portal.account_module.getPhysicalPath(),\n
title=portal.translation_service.translate(\'ui\', \'Trial Balance\').encode(\'utf8\'),\n title=\'Trial Balance\',\n
level=1,\n level=1,\n
form_id=\'AccountModule_viewAccountList\',\n form_id=\'AccountModule_viewAccountList\',\n
selection_name=\'account_selection\',\n selection_name=\'account_selection\',\n
...@@ -170,64 +173,67 @@ return result\n ...@@ -170,64 +173,67 @@ return result\n
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAAAAABYAAAApAAAAQwAA <value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAAAAABcAAAAsAAAAQwAA
AHP8AgAAZAEAawAAbAEAfQEAAXQCAHQDAGQCAIMCAH0EAHQFAHwEAGQDAIMCAH0GAHQF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8BGAEYBRgBBwEKAgYBBwEJAQkBCQEJARsDCQEIAwcBCQIJAgkBCAMHARABFAIbAgcBEAIMAgAB
AQAAAHMAAAAA</string> </value> AwEJAQkBCQEJAQ8ECwEJASoCOQQMAgYBDgQKASEBEAETAgkBOQUMAgYBBgEGAQoEKAEAAABzLgAA
AEFjY291bnRNb2R1bGVfZ2V0VHJpYWxCYWxhbmNlUmVwb3J0U2VjdGlvbkxpc3QoAQAAAHMuAAAA
QWNjb3VudE1vZHVsZV9nZXRUcmlhbEJhbGFuY2VSZXBvcnRTZWN0aW9uTGlzdCgAAAAAKAAAAABz
DwAAAFNjcmlwdCAoUHl0aG9uKXMIAAAAPG1vZHVsZT4BAAAAcwAAAAA=</string> </value>
</item> </item>
<item> <item>
<key> <string>_dav_writelocks</string> </key> <key> <string>_dav_writelocks</string> </key>
...@@ -237,7 +243,7 @@ AQAAAHMAAAAA</string> </value> ...@@ -237,7 +243,7 @@ AQAAAHMAAAAA</string> </value>
</item> </item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/nexedi/erp5_accounting/AccountModule_getTrialBalanceReportSectionList</string> </value> <value> <string>Script (Python):/nexedi/portal_skins/erp5_accounting/AccountModule_getTrialBalanceReportSectionList</string> </value>
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
...@@ -279,6 +285,7 @@ AQAAAHMAAAAA</string> </value> ...@@ -279,6 +285,7 @@ AQAAAHMAAAAA</string> </value>
<string>gap_root</string> <string>gap_root</string>
<string>None</string> <string>None</string>
<string>from_date</string> <string>from_date</string>
<string>expand_accounts</string>
<string>tree_mode</string> <string>tree_mode</string>
<string>result</string> <string>result</string>
<string>params</string> <string>params</string>
......
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
<key> <string>Default</string> </key> <key> <string>Default</string> </key>
<value> <value>
<list> <list>
<string>from_date</string>
<string>at_date</string> <string>at_date</string>
<string>transaction_section_category</string> <string>transaction_section_category</string>
<string>transaction_simulation_state</string> <string>transaction_simulation_state</string>
......
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
<string>my_transaction_section_category</string> <string>my_transaction_section_category</string>
<string>my_from_date</string> <string>my_from_date</string>
<string>my_at_date</string> <string>my_at_date</string>
<string>my_expand_accounts</string>
<string>my_portal_skin</string> <string>my_portal_skin</string>
</list> </list>
</value> </value>
......
...@@ -70,15 +70,15 @@ ...@@ -70,15 +70,15 @@
if kw.has_key(\'where_expression\'):\n if kw.has_key(\'where_expression\'):\n
params[\'where_expression\'] = kw[\'where_expression\']\n params[\'where_expression\'] = kw[\'where_expression\']\n
if kw.get(\'resource\'):\n if kw.get(\'resource\'):\n
try: params[\'resource_uid\'] = context.restritedTraverse(selection_params[\'resource\'])\n try: params[\'resource_uid\'] = context.restritedTraverse(selection_params[\'resource\']).getUid()\n
except KeyError: pass\n except (KeyError, AttributeError): pass\n
\n \n
# read settings from user preference\n # read settings from user preference\n
preference = context.getPortalObject().portal_preferences\n preference = context.getPortalObject().portal_preferences\n
from_date = preference.getPreferredAccountingTransactionFromDate()\n from_date = kw.get(\'from_date\', preference.getPreferredAccountingTransactionFromDate())\n
if from_date :\n if from_date :\n
params[\'from_date\'] = from_date\n params[\'from_date\'] = from_date\n
at_date = preference.getPreferredAccountingTransactionAtDate()\n at_date = kw.get(\'at_date\', preference.getPreferredAccountingTransactionAtDate())\n
if at_date :\n if at_date :\n
params[\'at_date\'] = at_date\n params[\'at_date\'] = at_date\n
simulation_state = preference.getPreferredAccountingTransactionSimulationStateList()\n simulation_state = preference.getPreferredAccountingTransactionSimulationStateList()\n
...@@ -93,48 +93,84 @@ if kw.get(\'omit_input\') :\n ...@@ -93,48 +93,84 @@ if kw.get(\'omit_input\') :\n
if kw.get(\'omit_output\') :\n if kw.get(\'omit_output\') :\n
params[\'omit_output\'] = 1\n params[\'omit_output\'] = 1\n
\n \n
result = context.Account_zGetTotalQuantity(node_uid=context.getUid(), **params)\n MARKER = []\n
kw = selection.getParams()\n
source_payment_uid = kw.get(\'source_payment_uid\', MARKER)\n
if source_payment_uid is not MARKER:\n
params[\'source_payment_uid\'] = source_payment_uid\n
no_source_payment = kw.get(\'no_source_payment_uid\', MARKER)\n
if no_source_payment is not MARKER:\n
params[\'no_source_payment_uid\'] = 1\n
\n
destination_section_uid = kw.get(\'destination_section_uid\', MARKER)\n
if destination_section_uid is not MARKER:\n
params[\'destination_section_uid\'] = destination_section_uid\n
no_destination_section = kw.get(\'no_destination_section\', MARKER)\n
if no_destination_section is not MARKER:\n
params[\'no_destination_section\'] = 1\n
\n
params[\'node_uid\'] = kw.get(\'node_uid\', context.getUid())\n
\n
if kw.get(\'from_date_summary\', 0) :\n
if params.has_key(\'from_date\'):\n
del params[\'from_date\']\n
\n
#context.log("SQL with %s \\n" % params, context.Account_zGetTotalQuantity(src__=1, **params))\n
result = context.Account_zGetTotalQuantity(**params)\n
row = result[0]\n row = result[0]\n
return float(\'%.02f\' % (row.quantity or 0.0) )\n return float(\'%.02f\' % (row.quantity or 0.0) )\n
\n
# vim: syntax=python\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAQAAABIAAAAgAAAASwAA <value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAQAAABgAAAAzAAAASwAA
AHMTAgAAaAAAfQIAdAEAfAEAZAEAgwIAZAIAgwEAbx0AAXQDAHwBAGQCAIMCAHQEAHwCAIMBAGQC AHOlAwAAaAAAfQIAdAEAfAEAZAEAgwIAZAIAgwEAbx0AAXQDAHwBAGQCAIMCAHQEAHwCAIMBAGQC
ADxuAQABdAEAfAEAZAMAgwIAZAQAgwEAb0YAAXksAHQBAHQFAGQFAIMCAHQDAHQGAGQEAIMCAIMB ADxuAQAB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AGRlc3RpbmF0aW9uX3NlY3Rpb25fdWlkcxYAAABub19kZXN0aW5h
dGlvbl9zZWN0aW9ucwcAAABfYXBwbHlfcwYAAAByZXN1bHRzAwAAAHJvd3MFAAAAZmxvYXQoAAAA
ACgAAAAAcw8AAABTY3JpcHQgKFB5dGhvbilzGQAAAEFjY291bnRfc3RhdFNvdXJjZUJhbGFuY2UB
AAAAc1YAAAAJARMBIAETATsBHQMbASQBBwEUASQBBwEUARIBBwEUARIBBwEXAhMBFwETARQCBgES
ARgBDQEUARgBDQEUAhgBDQEUARgBDQEUAjECGQEWARIDGAEPASgBAAAAcxkAAABBY2NvdW50X3N0
YXRTb3VyY2VCYWxhbmNlKAEAAABzGQAAAEFjY291bnRfc3RhdFNvdXJjZUJhbGFuY2UoAAAAACgA
AAAAcw8AAABTY3JpcHQgKFB5dGhvbilzCAAAADxtb2R1bGU+AQAAAHMAAAAA</string> </value>
</item> </item>
<item> <item>
<key> <string>_dav_writelocks</string> </key> <key> <string>_dav_writelocks</string> </key>
...@@ -191,11 +227,17 @@ ACgAAAAAcw8AAABTY3JpcHQgKFB5dGhvbilzCAAAADxtb2R1bGU+AQAAAHMAAAAA</string> </valu ...@@ -191,11 +227,17 @@ ACgAAAAAcw8AAABTY3JpcHQgKFB5dGhvbilzCAAAADxtb2R1bGU+AQAAAHMAAAAA</string> </valu
<string>context</string> <string>context</string>
<string>selection_params</string> <string>selection_params</string>
<string>KeyError</string> <string>KeyError</string>
<string>AttributeError</string>
<string>preference</string> <string>preference</string>
<string>from_date</string> <string>from_date</string>
<string>at_date</string> <string>at_date</string>
<string>simulation_state</string> <string>simulation_state</string>
<string>section_category</string> <string>section_category</string>
<string>MARKER</string>
<string>source_payment_uid</string>
<string>no_source_payment</string>
<string>destination_section_uid</string>
<string>no_destination_section</string>
<string>_apply_</string> <string>_apply_</string>
<string>result</string> <string>result</string>
<string>row</string> <string>row</string>
......
...@@ -39,13 +39,41 @@ ...@@ -39,13 +39,41 @@
<item> <item>
<key> <string>_data</string> </key> <key> <string>_data</string> </key>
<value> <value>
<dictionary/> <dictionary>
<item>
<key> <string>at_date</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>node_uid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>simulation_state</string> </key>
<value>
<dictionary>
<item>
<key> <string>type</string> </key>
<value> <string>list</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</value> </value>
</item> </item>
<item> <item>
<key> <string>_keys</string> </key> <key> <string>_keys</string> </key>
<value> <value>
<list/> <list>
<string>node_uid</string>
<string>at_date</string>
<string>simulation_state</string>
</list>
</value> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -104,7 +132,9 @@ ...@@ -104,7 +132,9 @@
</item> </item>
<item> <item>
<key> <string>arguments_src</string> </key> <key> <string>arguments_src</string> </key>
<value> <string></string> </value> <value> <string>node_uid\r\n
at_date\r\n
simulation_state:list</string> </value>
</item> </item>
<item> <item>
<key> <string>cache_time_</string> </key> <key> <string>cache_time_</string> </key>
...@@ -140,16 +170,34 @@ ...@@ -140,16 +170,34 @@
</item> </item>
<item> <item>
<key> <string>src</string> </key> <key> <string>src</string> </key>
<value> <string>SELECT DISTINCT\n <value> <string encoding="cdata"><![CDATA[
SELECT DISTINCT\n
catalog.uid,\n catalog.uid,\n
catalog.path\n catalog.path,\n
catalog.relative_url,\n
catalog.title, \n
catalog.portal_type\n
FROM\n FROM\n
catalog,\n catalog,\n
stock\n stock\n
WHERE\n WHERE\n
stock.mirror_section_uid = catalog.uid\n stock.mirror_section_uid = catalog.uid\n
<dtml-if node_uid>\n
AND stock.node_uid = <dtml-sqlvar node_uid type="string">\n
</dtml-if>\n
<dtml-if at_date>\n
AND stock.date <= <dtml-sqlvar at_date type="datetime">\n
</dtml-if>\n
<dtml-if simulation_state>\n
AND ( <dtml-in simulation_state>\n
stock.simulation_state = <dtml-sqlvar sequence-item type="string"><dtml-unless sequence-end>OR </dtml-unless>\n
</dtml-in> )\n
</dtml-if>\n
ORDER BY\n ORDER BY\n
catalog.title</string> </value> catalog.portal_type, catalog.title
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>template</string> </key> <key> <string>template</string> </key>
...@@ -183,16 +231,34 @@ ORDER BY\n ...@@ -183,16 +231,34 @@ ORDER BY\n
</item> </item>
<item> <item>
<key> <string>raw</string> </key> <key> <string>raw</string> </key>
<value> <string>SELECT DISTINCT\n <value> <string encoding="cdata"><![CDATA[
SELECT DISTINCT\n
catalog.uid,\n catalog.uid,\n
catalog.path\n catalog.path,\n
catalog.relative_url,\n
catalog.title, \n
catalog.portal_type\n
FROM\n FROM\n
catalog,\n catalog,\n
stock\n stock\n
WHERE\n WHERE\n
stock.mirror_section_uid = catalog.uid\n stock.mirror_section_uid = catalog.uid\n
<dtml-if node_uid>\n
AND stock.node_uid = <dtml-sqlvar node_uid type="string">\n
</dtml-if>\n
<dtml-if at_date>\n
AND stock.date <= <dtml-sqlvar at_date type="datetime">\n
</dtml-if>\n
<dtml-if simulation_state>\n
AND ( <dtml-in simulation_state>\n
stock.simulation_state = <dtml-sqlvar sequence-item type="string"><dtml-unless sequence-end>OR </dtml-unless>\n
</dtml-in> )\n
</dtml-if>\n
ORDER BY\n ORDER BY\n
catalog.title</string> </value> catalog.portal_type, catalog.title
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</state> </state>
......
...@@ -46,6 +46,12 @@ ...@@ -46,6 +46,12 @@
<dictionary/> <dictionary/>
</value> </value>
</item> </item>
<item>
<key> <string>destination_section_uid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item> <item>
<key> <string>from_date</string> </key> <key> <string>from_date</string> </key>
<value> <value>
...@@ -58,6 +64,18 @@ ...@@ -58,6 +64,18 @@
<dictionary/> <dictionary/>
</value> </value>
</item> </item>
<item>
<key> <string>no_destination_section_uid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>no_source_payment_uid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item> <item>
<key> <string>omit_input</string> </key> <key> <string>omit_input</string> </key>
<value> <value>
...@@ -99,6 +117,12 @@ ...@@ -99,6 +117,12 @@
<dictionary/> <dictionary/>
</value> </value>
</item> </item>
<item>
<key> <string>source_payment_uid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item> <item>
<key> <string>to_date</string> </key> <key> <string>to_date</string> </key>
<value> <value>
...@@ -148,6 +172,10 @@ ...@@ -148,6 +172,10 @@
<string>at_date</string> <string>at_date</string>
<string>transaction_simulation_state</string> <string>transaction_simulation_state</string>
<string>transaction_section_category</string> <string>transaction_section_category</string>
<string>source_payment_uid</string>
<string>no_source_payment_uid</string>
<string>destination_section_uid</string>
<string>no_destination_section_uid</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -188,7 +216,11 @@ from_date\r\n ...@@ -188,7 +216,11 @@ from_date\r\n
to_date\r\n to_date\r\n
at_date\r\n at_date\r\n
transaction_simulation_state:list\r\n transaction_simulation_state:list\r\n
transaction_section_category</string> </value> transaction_section_category\r\n
source_payment_uid\r\n
no_source_payment_uid\r\n
destination_section_uid\r\n
no_destination_section_uid</string> </value>
</item> </item>
<item> <item>
<key> <string>cache_time_</string> </key> <key> <string>cache_time_</string> </key>
...@@ -236,14 +268,11 @@ SELECT\n ...@@ -236,14 +268,11 @@ SELECT\n
destination_section.title AS third_party,\n destination_section.title AS third_party,\n
IF(stock.quantity > 0, stock.quantity, 0.0) AS source_debit,\n IF(stock.quantity > 0, stock.quantity, 0.0) AS source_debit,\n
IF(stock.quantity < 0, - stock.quantity, 0.0) AS source_credit,\n IF(stock.quantity < 0, - stock.quantity, 0.0) AS source_credit,\n
stock.quantity AS source_balance\n stock.quantity AS source_balance,\n
stock.payment_uid AS source_payment_uid\n
FROM\n FROM\n
movement,\n movement,\n
stock\n stock,\n
LEFT JOIN catalog AS destination_section \n
ON destination_section.uid = stock.mirror_section_uid\n
AND stock.node_uid = <dtml-var getUid>,\n
\n
catalog,\n catalog,\n
catalog AS transaction_line,\n catalog AS transaction_line,\n
catalog AS transaction,\n catalog AS transaction,\n
...@@ -254,9 +283,14 @@ FROM\n ...@@ -254,9 +283,14 @@ FROM\n
<dtml-if selection_domain>, <dtml-var "selection_domain.asSqlJoinExpression()"> </dtml-if>\n <dtml-if selection_domain>, <dtml-var "selection_domain.asSqlJoinExpression()"> </dtml-if>\n
<dtml-if selection_report>, <dtml-var "selection_report.asSqlJoinExpression()"> </dtml-if>\n <dtml-if selection_report>, <dtml-var "selection_report.asSqlJoinExpression()"> </dtml-if>\n
<dtml-if where_expression>, category </dtml-if>\n <dtml-if where_expression>, category </dtml-if>\n
\n
LEFT JOIN catalog AS destination_section \n
ON destination_section.uid = stock.mirror_section_uid\n
AND stock.node_uid = <dtml-var getUid>\n
\n \n
WHERE stock.node_uid = <dtml-var getUid>\n WHERE stock.node_uid = <dtml-var getUid>\n
AND transaction_line.uid = stock.uid \n AND transaction_line.uid = stock.uid \n
AND transaction_line.portal_type <> \'Simulation Movement\'\n
AND transaction_line.parent_uid = transaction.uid\n AND transaction_line.parent_uid = transaction.uid\n
AND catalog.uid = stock.section_uid\n AND catalog.uid = stock.section_uid\n
AND movement.uid = stock.uid\n AND movement.uid = stock.uid\n
...@@ -269,13 +303,13 @@ WHERE stock.node_uid = <dtml-var getUid>\n ...@@ -269,13 +303,13 @@ WHERE stock.node_uid = <dtml-var getUid>\n
)\n )\n
</dtml-if>\n </dtml-if>\n
<dtml-if from_date>\n <dtml-if from_date>\n
AND movement.stop_date >= <dtml-sqlvar from_date type="datetime">\n AND movement.start_date >= <dtml-sqlvar from_date type="datetime">\n
</dtml-if>\n </dtml-if>\n
<dtml-if at_date>\n <dtml-if at_date>\n
AND movement.stop_date <= <dtml-sqlvar at_date type="datetime">\n AND movement.start_date <= <dtml-sqlvar at_date type="datetime">\n
</dtml-if>\n </dtml-if>\n
<dtml-if to_date>\n <dtml-if to_date>\n
AND movement.stop_date < <dtml-sqlvar to_date type="datetime">\n AND movement.start_date < <dtml-sqlvar to_date type="datetime">\n
</dtml-if>\n </dtml-if>\n
<dtml-if omit_input>\n <dtml-if omit_input>\n
AND stock.quantity < 0\n AND stock.quantity < 0\n
...@@ -283,6 +317,18 @@ WHERE stock.node_uid = <dtml-var getUid>\n ...@@ -283,6 +317,18 @@ WHERE stock.node_uid = <dtml-var getUid>\n
<dtml-if omit_output>\n <dtml-if omit_output>\n
AND stock.quantity > 0\n AND stock.quantity > 0\n
</dtml-if>\n </dtml-if>\n
<dtml-if source_payment_uid>\n
AND stock.payment_uid = <dtml-sqlvar source_payment_uid type="int">\n
</dtml-if>\n
<dtml-if no_source_payment_uid>\n
AND stock.payment_uid IS NULL\n
</dtml-if>\n
<dtml-if destination_section_uid>\n
AND stock.mirror_section_uid = <dtml-sqlvar destination_section_uid type="int">\n
</dtml-if>\n
<dtml-if no_destination_section_uid>\n
AND stock.mirror_section_uid IS NULL\n
</dtml-if>\n
<dtml-if transaction_simulation_state>\n <dtml-if transaction_simulation_state>\n
AND (\n AND (\n
<dtml-in transaction_simulation_state>\n <dtml-in transaction_simulation_state>\n
...@@ -359,14 +405,11 @@ SELECT\n ...@@ -359,14 +405,11 @@ SELECT\n
destination_section.title AS third_party,\n destination_section.title AS third_party,\n
IF(stock.quantity > 0, stock.quantity, 0.0) AS source_debit,\n IF(stock.quantity > 0, stock.quantity, 0.0) AS source_debit,\n
IF(stock.quantity < 0, - stock.quantity, 0.0) AS source_credit,\n IF(stock.quantity < 0, - stock.quantity, 0.0) AS source_credit,\n
stock.quantity AS source_balance\n stock.quantity AS source_balance,\n
stock.payment_uid AS source_payment_uid\n
FROM\n FROM\n
movement,\n movement,\n
stock\n stock,\n
LEFT JOIN catalog AS destination_section \n
ON destination_section.uid = stock.mirror_section_uid\n
AND stock.node_uid = <dtml-var getUid>,\n
\n
catalog,\n catalog,\n
catalog AS transaction_line,\n catalog AS transaction_line,\n
catalog AS transaction,\n catalog AS transaction,\n
...@@ -377,9 +420,14 @@ FROM\n ...@@ -377,9 +420,14 @@ FROM\n
<dtml-if selection_domain>, <dtml-var "selection_domain.asSqlJoinExpression()"> </dtml-if>\n <dtml-if selection_domain>, <dtml-var "selection_domain.asSqlJoinExpression()"> </dtml-if>\n
<dtml-if selection_report>, <dtml-var "selection_report.asSqlJoinExpression()"> </dtml-if>\n <dtml-if selection_report>, <dtml-var "selection_report.asSqlJoinExpression()"> </dtml-if>\n
<dtml-if where_expression>, category </dtml-if>\n <dtml-if where_expression>, category </dtml-if>\n
\n
LEFT JOIN catalog AS destination_section \n
ON destination_section.uid = stock.mirror_section_uid\n
AND stock.node_uid = <dtml-var getUid>\n
\n \n
WHERE stock.node_uid = <dtml-var getUid>\n WHERE stock.node_uid = <dtml-var getUid>\n
AND transaction_line.uid = stock.uid \n AND transaction_line.uid = stock.uid \n
AND transaction_line.portal_type <> \'Simulation Movement\'\n
AND transaction_line.parent_uid = transaction.uid\n AND transaction_line.parent_uid = transaction.uid\n
AND catalog.uid = stock.section_uid\n AND catalog.uid = stock.section_uid\n
AND movement.uid = stock.uid\n AND movement.uid = stock.uid\n
...@@ -392,13 +440,13 @@ WHERE stock.node_uid = <dtml-var getUid>\n ...@@ -392,13 +440,13 @@ WHERE stock.node_uid = <dtml-var getUid>\n
)\n )\n
</dtml-if>\n </dtml-if>\n
<dtml-if from_date>\n <dtml-if from_date>\n
AND movement.stop_date >= <dtml-sqlvar from_date type="datetime">\n AND movement.start_date >= <dtml-sqlvar from_date type="datetime">\n
</dtml-if>\n </dtml-if>\n
<dtml-if at_date>\n <dtml-if at_date>\n
AND movement.stop_date <= <dtml-sqlvar at_date type="datetime">\n AND movement.start_date <= <dtml-sqlvar at_date type="datetime">\n
</dtml-if>\n </dtml-if>\n
<dtml-if to_date>\n <dtml-if to_date>\n
AND movement.stop_date < <dtml-sqlvar to_date type="datetime">\n AND movement.start_date < <dtml-sqlvar to_date type="datetime">\n
</dtml-if>\n </dtml-if>\n
<dtml-if omit_input>\n <dtml-if omit_input>\n
AND stock.quantity < 0\n AND stock.quantity < 0\n
...@@ -406,6 +454,18 @@ WHERE stock.node_uid = <dtml-var getUid>\n ...@@ -406,6 +454,18 @@ WHERE stock.node_uid = <dtml-var getUid>\n
<dtml-if omit_output>\n <dtml-if omit_output>\n
AND stock.quantity > 0\n AND stock.quantity > 0\n
</dtml-if>\n </dtml-if>\n
<dtml-if source_payment_uid>\n
AND stock.payment_uid = <dtml-sqlvar source_payment_uid type="int">\n
</dtml-if>\n
<dtml-if no_source_payment_uid>\n
AND stock.payment_uid IS NULL\n
</dtml-if>\n
<dtml-if destination_section_uid>\n
AND stock.mirror_section_uid = <dtml-sqlvar destination_section_uid type="int">\n
</dtml-if>\n
<dtml-if no_destination_section_uid>\n
AND stock.mirror_section_uid IS NULL\n
</dtml-if>\n
<dtml-if transaction_simulation_state>\n <dtml-if transaction_simulation_state>\n
AND (\n AND (\n
<dtml-in transaction_simulation_state>\n <dtml-in transaction_simulation_state>\n
......
...@@ -50,12 +50,30 @@ ...@@ -50,12 +50,30 @@
<dictionary/> <dictionary/>
</value> </value>
</item> </item>
<item>
<key> <string>destination_section_uid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item> <item>
<key> <string>from_date</string> </key> <key> <string>from_date</string> </key>
<value> <value>
<dictionary/> <dictionary/>
</value> </value>
</item> </item>
<item>
<key> <string>no_destination_section_uid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>no_source_payment_uid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item> <item>
<key> <string>node_uid</string> </key> <key> <string>node_uid</string> </key>
<value> <value>
...@@ -91,6 +109,12 @@ ...@@ -91,6 +109,12 @@
</dictionary> </dictionary>
</value> </value>
</item> </item>
<item>
<key> <string>source_payment_uid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item> <item>
<key> <string>to_date</string> </key> <key> <string>to_date</string> </key>
<value> <value>
...@@ -131,6 +155,10 @@ ...@@ -131,6 +155,10 @@
<string>at_date</string> <string>at_date</string>
<string>transaction_simulation_state</string> <string>transaction_simulation_state</string>
<string>transaction_section_category</string> <string>transaction_section_category</string>
<string>source_payment_uid</string>
<string>no_source_payment_uid</string>
<string>destination_section_uid</string>
<string>no_destination_section_uid</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -160,9 +188,13 @@ omit_output\r\n ...@@ -160,9 +188,13 @@ omit_output\r\n
resource_uid:list\r\n resource_uid:list\r\n
from_date\r\n from_date\r\n
to_date\r\n to_date\r\n
at_date\n at_date\r\n
transaction_simulation_state:list\r\n transaction_simulation_state:list\r\n
transaction_section_category</string> </value> transaction_section_category\r\n
source_payment_uid\r\n
no_source_payment_uid\r\n
destination_section_uid\r\n
no_destination_section_uid</string> </value>
</item> </item>
<item> <item>
<key> <string>cache_time_</string> </key> <key> <string>cache_time_</string> </key>
...@@ -220,6 +252,7 @@ WHERE stock.node_uid = <dtml-var node_uid>\n ...@@ -220,6 +252,7 @@ WHERE stock.node_uid = <dtml-var node_uid>\n
AND child.uid = stock.uid \n AND child.uid = stock.uid \n
AND child.parent_uid = catalog.uid\n AND child.parent_uid = catalog.uid\n
AND movement.uid = stock.uid\n AND movement.uid = stock.uid\n
AND child.portal_type <> \'Simulation Movement\'\n
AND movement.is_accountable = 1\n AND movement.is_accountable = 1\n
<dtml-if resource_uid>\n <dtml-if resource_uid>\n
AND (\n AND (\n
...@@ -243,6 +276,18 @@ WHERE stock.node_uid = <dtml-var node_uid>\n ...@@ -243,6 +276,18 @@ WHERE stock.node_uid = <dtml-var node_uid>\n
<dtml-if omit_output>\n <dtml-if omit_output>\n
AND stock.quantity < 0.0\n AND stock.quantity < 0.0\n
</dtml-if>\n </dtml-if>\n
<dtml-if source_payment_uid>\n
AND stock.payment_uid = <dtml-sqlvar source_payment_uid type="int">\n
</dtml-if>\n
<dtml-if no_source_payment_uid>\n
AND stock.payment_uid IS NULL\n
</dtml-if>\n
<dtml-if destination_section_uid>\n
AND stock.mirror_section_uid = <dtml-sqlvar destination_section_uid type="int">\n
</dtml-if>\n
<dtml-if no_destination_section_uid>\n
AND stock.mirror_section_uid IS NULL\n
</dtml-if>\n
<dtml-if transaction_simulation_state>\n <dtml-if transaction_simulation_state>\n
AND (\n AND (\n
<dtml-in transaction_simulation_state>\n <dtml-in transaction_simulation_state>\n
...@@ -320,6 +365,7 @@ WHERE stock.node_uid = <dtml-var node_uid>\n ...@@ -320,6 +365,7 @@ WHERE stock.node_uid = <dtml-var node_uid>\n
AND child.uid = stock.uid \n AND child.uid = stock.uid \n
AND child.parent_uid = catalog.uid\n AND child.parent_uid = catalog.uid\n
AND movement.uid = stock.uid\n AND movement.uid = stock.uid\n
AND child.portal_type <> \'Simulation Movement\'\n
AND movement.is_accountable = 1\n AND movement.is_accountable = 1\n
<dtml-if resource_uid>\n <dtml-if resource_uid>\n
AND (\n AND (\n
...@@ -343,6 +389,18 @@ WHERE stock.node_uid = <dtml-var node_uid>\n ...@@ -343,6 +389,18 @@ WHERE stock.node_uid = <dtml-var node_uid>\n
<dtml-if omit_output>\n <dtml-if omit_output>\n
AND stock.quantity < 0.0\n AND stock.quantity < 0.0\n
</dtml-if>\n </dtml-if>\n
<dtml-if source_payment_uid>\n
AND stock.payment_uid = <dtml-sqlvar source_payment_uid type="int">\n
</dtml-if>\n
<dtml-if no_source_payment_uid>\n
AND stock.payment_uid IS NULL\n
</dtml-if>\n
<dtml-if destination_section_uid>\n
AND stock.mirror_section_uid = <dtml-sqlvar destination_section_uid type="int">\n
</dtml-if>\n
<dtml-if no_destination_section_uid>\n
AND stock.mirror_section_uid IS NULL\n
</dtml-if>\n
<dtml-if transaction_simulation_state>\n <dtml-if transaction_simulation_state>\n
AND (\n AND (\n
<dtml-in transaction_simulation_state>\n <dtml-in transaction_simulation_state>\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