From 1685bf744248ae1f623755d904e57f9be8e01929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com> Date: Thu, 5 Jul 2007 13:48:32 +0000 Subject: [PATCH] change way to check for main account git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15158 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_banking_core/Baobab_getMainAgencyAccountForSite.xml | 4 ++-- bt5/erp5_banking_core/bt/revision | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getMainAgencyAccountForSite.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getMainAgencyAccountForSite.xml index 45f58cc092..fd7f29155c 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getMainAgencyAccountForSite.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getMainAgencyAccountForSite.xml @@ -67,8 +67,8 @@ <key> <string>_body</string> </key> <value> <string>code = site.getCodification()\n \n -if not \'00\' in code:\n - main_code = "%1s00" %code[0]\n +if code[-1] != "0":\n + main_code = "%s0" %code[:-1]\n main_site = context.Baobab_getSiteFromCodification(main_code)\n else:\n main_site = site\n diff --git a/bt5/erp5_banking_core/bt/revision b/bt5/erp5_banking_core/bt/revision index 0e92c3c0fc..4d85316228 100644 --- a/bt5/erp5_banking_core/bt/revision +++ b/bt5/erp5_banking_core/bt/revision @@ -1 +1 @@ -306 \ No newline at end of file +308 \ No newline at end of file -- 2.30.9