[Erp5-report] r7170 - /erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workfl...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed May 10 22:43:51 CEST 2006


Author: aurel
Date: Wed May 10 22:43:49 2006
New Revision: 7170

URL: http://svn.erp5.org?rev=7170&view=rev
Log:
remove uneeded stuff in workflow script

Modified:
    erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validateVaultBalance.xml

Modified: erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validateVaultBalance.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validateVaultBalance.xml?rev=7170&r1=7169&r2=7170&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validateVaultBalance.xml (original)
+++ erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validateVaultBalance.xml Wed May 10 22:43:49 2006
@@ -75,36 +75,29 @@
 # user logged in\n
 user_id = transaction.portal_membership.getAuthenticatedMember().getUserName()\n
 site_list = context.Baobab_getUserAssignedSiteList(user_id=user_id)\n
-#context.log(\'validateVaultBalance site_list\',site_list)\n
+# context.log(\'validateVaultBalance site_list\',site_list)\n
 source = transaction.getSource()\n
 baobab_source = None\n
 for site in site_list:\n
   site_value = context.portal_categories.getCategoryValue(site)\n
-  if site_value.getVault().endswith(\'guichet\') and source in site:\n
-    baobab_source = site\n
+  if site_value.getVaultType().endswith(\'guichet\') and source in site:\n
+    baobab_source = site + \'/encaisse_des_billets_et_monnaies/sortante\'\n
     break\n
 source = baobab_source\n
-source_object = context.portal_category.getCategoryValue(source)\n
-#source_object = transaction.getSourceValue()\n
-\n
-site_list = context.ERP5Type_getSecurityCategoryFromAssignment((\'site\',),user_id,context,context.getPortalType())\n
-context.log(\'CheckPayment_getBaobabSource site_list\',site_list)\n
-for site in site_list:\n
-  site_value = context.portal_categories.getCategoryValue(site)\n
-  if site_value.getVault().endswith(\'guichet\') and source in site:\n
-    baobab_source = site\n
+source_object = context.portal_categories.getCategoryValue(source)\n
 \n
 # check again that we are in the good accounting date\n
 if not transaction.Baobab_checkCounterDateOpen(site=source_object, date=transaction.getStartDate()):\n
   msg = Message(domain = "ui", message="Transaction not in the good accounting date")\n
   raise ValidationFailed, (msg,)\n
 \n
-resource = transaction.CashDelivery_checkCounterInventory(source = source, portal_type=\'Cash Delivery Line\')\n
+resource = transaction.CashDelivery_checkCounterInventory(source = source, portal_type=\'Cash Delivery Line\', same_source=1)\n
+#transaction.log("call to CashDelivery_getCounterInventory return", resource)\n
 \n
 # Get price and total_price.\n
 price = transaction.getSourceTotalAssetPrice()\n
 cash_detail = transaction.getTotalPrice(portal_type = \'Cash Delivery Cell\')\n
-\n
+#transaction.log("price vs cash detail", str((price, cash_detail)))\n
 if resource == 3:\n
   msg = Message(domain="ui", message="No banknote or coin defined.")\n
   raise ValidationFailed, (msg,)\n




More information about the Erp5-report mailing list