From 60b5ed874d9ba7e61ced1a01af4c7b630d51fdab Mon Sep 17 00:00:00 2001
From: Sebastien Robin <seb@nexedi.com>
Date: Fri, 1 Dec 2006 14:42:44 +0000
Subject: [PATCH] change the order of checking, it will be more convenient for
 unit tests

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11579 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../counter_date_workflow/scripts/closeAllCounter.xml     | 8 ++++----
 bt5/erp5_banking_core/bt/revision                         | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/counter_date_workflow/scripts/closeAllCounter.xml b/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/counter_date_workflow/scripts/closeAllCounter.xml
index c822ab5715..d23270d49f 100644
--- a/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/counter_date_workflow/scripts/closeAllCounter.xml
+++ b/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/counter_date_workflow/scripts/closeAllCounter.xml
@@ -83,12 +83,12 @@ while True:\n
     break\n
   site = site.getParentValue()\n
 \n
-# First make sure there is nothing any more on counters\n
-transaction.Baobab_checkStockBeforeClosingDate(site=site)\n
-\n
-# Then make sure there is not any pending operation\n
+# First make sure there is not any pending operation\n
 transaction.Baobab_checkRemainingOperation(site=site)\n
 \n
+# Then make sure there is nothing any more on counters\n
+transaction.Baobab_checkStockBeforeClosingDate(site=site)\n
+\n
 current_date = transaction.getStartDate()\n
 counter_list = [x.getObject() for x in context.portal_catalog(portal_type="Counter", simulation_state = [\'open\', \'closing\'], site_uid = site.getUid())]\n
 \n
diff --git a/bt5/erp5_banking_core/bt/revision b/bt5/erp5_banking_core/bt/revision
index 9cd72aa941..0aeb548544 100644
--- a/bt5/erp5_banking_core/bt/revision
+++ b/bt5/erp5_banking_core/bt/revision
@@ -1 +1 @@
-72
\ No newline at end of file
+74
\ No newline at end of file
-- 
2.30.9