From d620e30300c98b0394241d70fd2880cb4cbb43b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Mon, 23 Nov 2009 13:49:09 +0000
Subject: [PATCH] - fix the test for "omit balanced accounts" - fix the
 ordering of fields in the report

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30810 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../AccountModule_getOtherPartiesReportSectionList.xml    | 8 ++++++--
 .../AccountModule_viewOtherPartiesReport.xml              | 6 +++---
 bt5/erp5_accounting/bt/revision                           | 2 +-
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getOtherPartiesReportSectionList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getOtherPartiesReportSectionList.xml
index 4a78192776..c12f74a151 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getOtherPartiesReportSectionList.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getOtherPartiesReportSectionList.xml
@@ -135,11 +135,15 @@ for party in context.Account_zDistinctSectionList(\n
         # don\'t show entities belonging to the group we are reporting\n
     if omit_balanced_accounts and (\n
             simulation_tool.getInventoryAssetPrice(\n
+                    section_category=section_category,\n
+                    at_date=at_date,\n
+                    simulation_state=simulation_state,\n
                     mirror_section_uid=party.uid,\n
                     node_category_strict_membership=(\n
                           \'account_type/asset/receivable\',\n
-                          # TODO: don\'t compare floats for equality ...\n
-                          \'account_type/liability/payable\')) == 0.):\n
+                          \'account_type/liability/payable\'),\n
+                    # TODO: don\'t compare floats for equality ...\n
+                    ) == 0.):\n
       pass\n
     else:\n
       title = o.getTitle()\n
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReport.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReport.xml
index 9ebea8231d..5c829aa1ee 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReport.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReport.xml
@@ -92,14 +92,14 @@
                     <key> <string>left</string> </key>
                     <value>
                       <list>
+                        <string>your_section_category</string>
+                        <string>your_at_date</string>
+                        <string>your_simulation_state</string>
                         <string>your_omit_balanced_accounts</string>
                         <string>your_omit_empty_accounts</string>
                         <string>your_omit_grouped_references</string>
                         <string>your_entity_role</string>
-                        <string>your_at_date</string>
                         <string>your_gap_root</string>
-                        <string>your_section_category</string>
-                        <string>your_simulation_state</string>
                       </list>
                     </value>
                 </item>
diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision
index ee530325f3..062e64ab9d 100644
--- a/bt5/erp5_accounting/bt/revision
+++ b/bt5/erp5_accounting/bt/revision
@@ -1 +1 @@
-1052
\ No newline at end of file
+1054
\ No newline at end of file
-- 
2.30.9