From 767db7ff8b7f4274579a36adb13ef2aaa0d942b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 29 Feb 2008 16:32:06 +0000
Subject: [PATCH] Third party and bank accounts were reversed in the validation
 scripts, as a result, wrong error messages were shown to the user

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19617 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../scripts/validateTransactionLines.xml                 | 9 +++++----
 bt5/erp5_accounting/bt/revision                          | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/validateTransactionLines.xml b/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/validateTransactionLines.xml
index 44a15154f4..92c5245312 100644
--- a/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/validateTransactionLines.xml
+++ b/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/validateTransactionLines.xml
@@ -91,11 +91,12 @@ for line in transaction.contentValues(filter=dict(\n
 \n
   for account, third_party, bank_account in (\n
     ( line.getSourceValue(portal_type=\'Account\'),\n
-      line.getSourcePaymentValue(portal_type=bank_account_portal_type),\n
-      line.getDestinationSectionValue(portal_type=section_portal_type_list),),\n
+      line.getDestinationSectionValue(portal_type=section_portal_type_list),\n
+      line.getSourcePaymentValue(portal_type=bank_account_portal_type),),\n
     ( line.getDestinationValue(portal_type=\'Account\'),\n
-      line.getDestinationPaymentValue(portal_type=bank_account_portal_type),\n
-      line.getSourceSectionValue(portal_type=section_portal_type_list),), ):\n
+      line.getSourceSectionValue(portal_type=section_portal_type_list),\n
+      line.getDestinationPaymentValue(portal_type=bank_account_portal_type),),\n
+    ):\n
 \n
     if account is not None and account.getValidationState() != \'validated\':\n
       raise ValidationFailed, N_(\n
diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision
index 823aeb4b44..53a274896e 100644
--- a/bt5/erp5_accounting/bt/revision
+++ b/bt5/erp5_accounting/bt/revision
@@ -1 +1 @@
-624
\ No newline at end of file
+626
\ No newline at end of file
-- 
2.30.9