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
\n
request = context.REQUEST\n
\n
at_date = request[\'at_date\']\n
transaction_section_category = request[\'transaction_section_category\']\n
transaction_simulation_state = request[\'transaction_simulation_state\']\n
gap_root = request[\'gap_root\']\n
from_date = request.get(\'from_date\', None)\n
at_date = request[\'at_date\']\n
transaction_section_category = request[\'transaction_section_category\']\n
transaction_simulation_state = request[\'transaction_simulation_state\']\n
gap_root = request[\'gap_root\']\n
from_date = request.get(\'from_date\', None)\n
expand_accounts = request.get(\'expand_accounts\', 0)\n
\n
\n
# flat_mode is a boolean that indicate wether we should use a report tree \n
# or a flat list of all accounts. \n
tree_mode = request.get(\'tree_mode\', 0)\n
\n
tree_mode = request.get(\'tree_mode\', 0)\n
if tree_mode :\n
raise \'tree mode no longer supported, sorry\'\n
\n
result = []\n
params = {\n
......@@ -96,6 +99,7 @@ params = {\n
\'is_report_opened\' : 1,\n
\'report_depth\' : 5,\n
\'gap_root\' : gap_root,\n
\'expand_accounts\' : expand_accounts ,\n
}\n
\n
preferences = {\n
......@@ -121,19 +125,18 @@ else :\n
balance_columns = (\n
gap_id_line,\n
(\'title\', \'Account\'),\n
# TODO\n
# (\'AccountModule_getAccountingTransactionCount\', \'Transaction Count\'),\n
(\'debit\', \'Debit\'),\n
(\'credit\', \'Credit\'),\n
(\'debit_balance\', \'Debit Balance\'),\n
(\'credit_balance\', \'Credit Balance\')\n
(\'opening_balance\', \'Opening Balance\'),\n
(\'debit_movement\', \'Debit Movements\'),\n
(\'credit_movement\', \'Credit Movements\'),\n
(\'closing_balance\', \'Closing Balance\'),\n
)\n
\n
\n
if not tree_mode :\n
result.append(\n
ReportSection(path=portal.account_module.getPhysicalPath(),\n
title=\'Trial Balance\',\n
ReportSection( path=portal.account_module.getPhysicalPath(),\n
# FIXME translate later\n
title=portal.translation_service.translate(\'ui\', \'Trial Balance\').encode(\'utf8\'),\n
level=1,\n
form_id=\'AccountModule_viewAccountListForTrialBalance\',\n
selection_name=\'accounting_selection\',\n
......@@ -151,7 +154,7 @@ else :\n
\n
result.append(\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
form_id=\'AccountModule_viewAccountList\',\n
selection_name=\'account_selection\',\n
......@@ -170,64 +173,67 @@ return result\n
</item>
<item>
<key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAAAAABYAAAApAAAAQwAA
AHP8AgAAZAEAawAAbAEAfQEAAXQCAHQDAGQCAIMCAH0EAHQFAHwEAGQDAIMCAH0GAHQFAHwEAGQE
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAAAAABcAAAAsAAAAQwAA
AHMuAwAAZAEAawAAbAEAfQEAAXQCAHQDAGQCAIMCAH0EAHQFAHwEAGQDAIMCAH0GAHQFAHwEAGQE
AIMCAH0HAHQFAHwEAGQFAIMCAH0IAHQFAHwEAGQGAIMCAH0JAHQCAHwEAGQHAIMCAGQIAHQKAIMC
AH0LAHQCAHwEAGQHAIMCAGQJAGQKAIMCAH0MAGcAAH0NAGgAAARkAwB8BgADPARkBAB8BwADPARk
CwB8BwADPARkBQB8CAADPARkDAB0CgADPARkDQBkDgADPARkDwBkEAADPARkBgB8CQADPH0OAGgA
AARkEQB8BgADPARkEgB8BwADPARkEwB8CAADPARkFAB8CQADPH0PAHwLAG8kAAF8CwB0EAB8DgCD
AQBkCAA8fAsAdBAAfA8AgwEAZBUAPG4BAAF0AgB0AgB0AwBkFgCDAgBkFwCDAgCDAAB9EQB8DABv
E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zBwAAAHJlcXVlc3RzCQAAAF9nZXRpdGVt
X3MHAAAAYXRfZGF0ZXMcAAAAdHJhbnNhY3Rpb25fc2VjdGlvbl9jYXRlZ29yeXMcAAAAdHJhbnNh
Y3Rpb25fc2ltdWxhdGlvbl9zdGF0ZXMIAAAAZ2FwX3Jvb3RzBAAAAE5vbmVzCQAAAGZyb21fZGF0
ZXMPAAAAZXhwYW5kX2FjY291bnRzcwkAAAB0cmVlX21vZGVzBgAAAHJlc3VsdHMGAAAAcGFyYW1z
cwsAAABwcmVmZXJlbmNlc3MHAAAAX3dyaXRlX3MGAAAAcG9ydGFscwsAAABnYXBfaWRfbGluZXMP
AAAAYmFsYW5jZV9jb2x1bW5zcxUAAABzZWxlY3Rpb25fcmVwb3J0X3BhdGhzFQAAAHNlbGVjdGlv
bl9yZXBvcnRfbGlzdCgAAAAAKAAAAABzDwAAAFNjcmlwdCAoUHl0aG9uKXMuAAAAQWNjb3VudE1v
ZHVsZV9nZXRUcmlhbEJhbGFuY2VSZXBvcnRTZWN0aW9uTGlzdAEAAABzdAAAAAAFDQIPAg8BDwEP
AQ8BGAEYBRgBBwEKAgYBBwEJAQkBCQEJARsDCQEIAwcBCQIJAgkBCAMHARABFAIbAgcBEAIMAgAB
AwEJAQkBCQEJAQ8ECwEJASoCOQQMAgYBDgQKASEBEAETAgkBOQUMAgYBBgEGAQoEKAEAAABzLgAA
AEFjY291bnRNb2R1bGVfZ2V0VHJpYWxCYWxhbmNlUmVwb3J0U2VjdGlvbkxpc3QoAQAAAHMuAAAA
QWNjb3VudE1vZHVsZV9nZXRUcmlhbEJhbGFuY2VSZXBvcnRTZWN0aW9uTGlzdCgAAAAAKAAAAABz
DwAAAFNjcmlwdCAoUHl0aG9uKXMIAAAAPG1vZHVsZT4BAAAAcwAAAAA=</string> </value>
</item>
<item>
<key> <string>_dav_writelocks</string> </key>
......@@ -237,7 +243,7 @@ AQAAAHMAAAAA</string> </value>
</item>
<item>
<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>
<key> <string>_params</string> </key>
......@@ -279,6 +285,7 @@ AQAAAHMAAAAA</string> </value>
<string>gap_root</string>
<string>None</string>
<string>from_date</string>
<string>expand_accounts</string>
<string>tree_mode</string>
<string>result</string>
<string>params</string>
......
......@@ -73,6 +73,7 @@
<key> <string>Default</string> </key>
<value>
<list>
<string>from_date</string>
<string>at_date</string>
<string>transaction_section_category</string>
<string>transaction_simulation_state</string>
......
......@@ -78,6 +78,7 @@
<string>my_transaction_section_category</string>
<string>my_from_date</string>
<string>my_at_date</string>
<string>my_expand_accounts</string>
<string>my_portal_skin</string>
</list>
</value>
......
......@@ -70,15 +70,15 @@
if kw.has_key(\'where_expression\'):\n
params[\'where_expression\'] = kw[\'where_expression\']\n
if kw.get(\'resource\'):\n
try: params[\'resource_uid\'] = context.restritedTraverse(selection_params[\'resource\'])\n
except KeyError: pass\n
try: params[\'resource_uid\'] = context.restritedTraverse(selection_params[\'resource\']).getUid()\n
except (KeyError, AttributeError): pass\n
\n
# read settings from user preference\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
params[\'from_date\'] = from_date\n
at_date = preference.getPreferredAccountingTransactionAtDate()\n
at_date = kw.get(\'at_date\', preference.getPreferredAccountingTransactionAtDate())\n
if at_date :\n
params[\'at_date\'] = at_date\n
simulation_state = preference.getPreferredAccountingTransactionSimulationStateList()\n
......@@ -93,48 +93,84 @@ if kw.get(\'omit_input\') :\n
if kw.get(\'omit_output\') :\n
params[\'omit_output\'] = 1\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
return float(\'%.02f\' % (row.quantity or 0.0) )\n
\n
# vim: syntax=python\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAQAAABIAAAAgAAAASwAA
AHMTAgAAaAAAfQIAdAEAfAEAZAEAgwIAZAIAgwEAbx0AAXQDAHwBAGQCAIMCAHQEAHwCAIMBAGQC
ADxuAQABdAEAfAEAZAMAgwIAZAQAgwEAb0YAAXksAHQBAHQFAGQFAIMCAHQDAHQGAGQEAIMCAIMB
AHQEAHwCAIMBAGQGADxXcZUABHQHAGoKAG8HAAEBAQFxlQABWG4BAAF0AQB0AQB0BQBkBwCDAgCD
AABkCACDAgB9CQB0AQB8CQBkCQCDAgCDAAB9CgB8CgBvFAABfAoAdAQAfAIAgwEAZAoAPG4BAAF0
AQB8CQBkCwCDAgCDAAB9CwB8CwBvFAABfAsAdAQAfAIAgwEAZAwAPG4BAAF0AQB8CQBkDQCDAgCD
AAB9DAB8DABvFAABfAwAdAQAfAIAgwEAZA4APG4BAAF0A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ABfYXBwbHlfcwYAAAByZXN1bHRzAwAAAHJvd3MFAAAAZmxvYXQoAAAA
ACgAAAAAcw8AAABTY3JpcHQgKFB5dGhvbilzGQAAAEFjY291bnRfc3RhdFNvdXJjZUJhbGFuY2UB
AAAAc1YAAAAJARMBIAETATsBHQMbASQBBwEUASQBBwEUARIBBwEUARIBBwEXAhMBFwETARQCBgES
ARgBDQEUARgBDQEUAhgBDQEUARgBDQEUAjECGQEWARIDGAEPASgBAAAAcxkAAABBY2NvdW50X3N0
YXRTb3VyY2VCYWxhbmNlKAEAAABzGQAAAEFjY291bnRfc3RhdFNvdXJjZUJhbGFuY2UoAAAAACgA
AAAAcw8AAABTY3JpcHQgKFB5dGhvbilzCAAAADxtb2R1bGU+AQAAAHMAAAAA</string> </value>
</item>
<item>
<key> <string>_dav_writelocks</string> </key>
......@@ -191,11 +227,17 @@ ACgAAAAAcw8AAABTY3JpcHQgKFB5dGhvbilzCAAAADxtb2R1bGU+AQAAAHMAAAAA</string> </valu
<string>context</string>
<string>selection_params</string>
<string>KeyError</string>
<string>AttributeError</string>
<string>preference</string>
<string>from_date</string>
<string>at_date</string>
<string>simulation_state</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>result</string>
<string>row</string>
......
......@@ -39,13 +39,41 @@
<item>
<key> <string>_data</string> </key>
<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>
</item>
<item>
<key> <string>_keys</string> </key>
<value>
<list/>
<list>
<string>node_uid</string>
<string>at_date</string>
<string>simulation_state</string>
</list>
</value>
</item>
</dictionary>
......@@ -104,7 +132,9 @@
</item>
<item>
<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>
<key> <string>cache_time_</string> </key>
......@@ -140,16 +170,34 @@
</item>
<item>
<key> <string>src</string> </key>
<value> <string>SELECT DISTINCT\n
<value> <string encoding="cdata"><![CDATA[
SELECT DISTINCT\n
catalog.uid,\n
catalog.path\n
catalog.path,\n
catalog.relative_url,\n
catalog.title, \n
catalog.portal_type\n
FROM\n
catalog,\n
stock\n
WHERE\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
catalog.title</string> </value>
catalog.portal_type, catalog.title
]]></string> </value>
</item>
<item>
<key> <string>template</string> </key>
......@@ -183,16 +231,34 @@ ORDER BY\n
</item>
<item>
<key> <string>raw</string> </key>
<value> <string>SELECT DISTINCT\n
<value> <string encoding="cdata"><![CDATA[
SELECT DISTINCT\n
catalog.uid,\n
catalog.path\n
catalog.path,\n
catalog.relative_url,\n
catalog.title, \n
catalog.portal_type\n
FROM\n
catalog,\n
stock\n
WHERE\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
catalog.title</string> </value>
catalog.portal_type, catalog.title
]]></string> </value>
</item>
</dictionary>
</state>
......
......@@ -46,6 +46,12 @@
<dictionary/>
</value>
</item>
<item>
<key> <string>destination_section_uid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>from_date</string> </key>
<value>
......@@ -58,6 +64,18 @@
<dictionary/>
</value>
</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>
<key> <string>omit_input</string> </key>
<value>
......@@ -99,6 +117,12 @@
<dictionary/>
</value>
</item>
<item>
<key> <string>source_payment_uid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>to_date</string> </key>
<value>
......@@ -148,6 +172,10 @@
<string>at_date</string>
<string>transaction_simulation_state</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>
</value>
</item>
......@@ -188,7 +216,11 @@ from_date\r\n
to_date\r\n
at_date\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>
<key> <string>cache_time_</string> </key>
......@@ -236,14 +268,11 @@ SELECT\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_credit,\n
stock.quantity AS source_balance\n
stock.quantity AS source_balance,\n
stock.payment_uid AS source_payment_uid\n
FROM\n
movement,\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
stock,\n
catalog,\n
catalog AS transaction_line,\n
catalog AS transaction,\n
......@@ -254,9 +283,14 @@ FROM\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 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
WHERE stock.node_uid = <dtml-var getUid>\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 catalog.uid = stock.section_uid\n
AND movement.uid = stock.uid\n
......@@ -269,13 +303,13 @@ WHERE stock.node_uid = <dtml-var getUid>\n
)\n
</dtml-if>\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 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 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 omit_input>\n
AND stock.quantity < 0\n
......@@ -283,6 +317,18 @@ WHERE stock.node_uid = <dtml-var getUid>\n
<dtml-if omit_output>\n
AND stock.quantity > 0\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
AND (\n
<dtml-in transaction_simulation_state>\n
......@@ -359,14 +405,11 @@ SELECT\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_credit,\n
stock.quantity AS source_balance\n
stock.quantity AS source_balance,\n
stock.payment_uid AS source_payment_uid\n
FROM\n
movement,\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
stock,\n
catalog,\n
catalog AS transaction_line,\n
catalog AS transaction,\n
......@@ -377,9 +420,14 @@ FROM\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 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
WHERE stock.node_uid = <dtml-var getUid>\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 catalog.uid = stock.section_uid\n
AND movement.uid = stock.uid\n
......@@ -392,13 +440,13 @@ WHERE stock.node_uid = <dtml-var getUid>\n
)\n
</dtml-if>\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 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 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 omit_input>\n
AND stock.quantity < 0\n
......@@ -406,6 +454,18 @@ WHERE stock.node_uid = <dtml-var getUid>\n
<dtml-if omit_output>\n
AND stock.quantity > 0\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
AND (\n
<dtml-in transaction_simulation_state>\n
......
......@@ -50,12 +50,30 @@
<dictionary/>
</value>
</item>
<item>
<key> <string>destination_section_uid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>from_date</string> </key>
<value>
<dictionary/>
</value>
</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>
<key> <string>node_uid</string> </key>
<value>
......@@ -91,6 +109,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>source_payment_uid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>to_date</string> </key>
<value>
......@@ -131,6 +155,10 @@
<string>at_date</string>
<string>transaction_simulation_state</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>
</value>
</item>
......@@ -160,9 +188,13 @@ omit_output\r\n
resource_uid:list\r\n
from_date\r\n
to_date\r\n
at_date\n
at_date\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>
<key> <string>cache_time_</string> </key>
......@@ -220,6 +252,7 @@ WHERE stock.node_uid = <dtml-var node_uid>\n
AND child.uid = stock.uid \n
AND child.parent_uid = catalog.uid\n
AND movement.uid = stock.uid\n
AND child.portal_type <> \'Simulation Movement\'\n
AND movement.is_accountable = 1\n
<dtml-if resource_uid>\n
AND (\n
......@@ -243,6 +276,18 @@ WHERE stock.node_uid = <dtml-var node_uid>\n
<dtml-if omit_output>\n
AND stock.quantity < 0.0\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
AND (\n
<dtml-in transaction_simulation_state>\n
......@@ -320,6 +365,7 @@ WHERE stock.node_uid = <dtml-var node_uid>\n
AND child.uid = stock.uid \n
AND child.parent_uid = catalog.uid\n
AND movement.uid = stock.uid\n
AND child.portal_type <> \'Simulation Movement\'\n
AND movement.is_accountable = 1\n
<dtml-if resource_uid>\n
AND (\n
......@@ -343,6 +389,18 @@ WHERE stock.node_uid = <dtml-var node_uid>\n
<dtml-if omit_output>\n
AND stock.quantity < 0.0\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
AND (\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