[Erp5-report] r45565 vincent - /erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_sk...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Apr 19 11:49:30 CEST 2011
Author: vincent
Date: Tue Apr 19 11:49:30 2011
New Revision: 45565
URL: http://svn.erp5.org?rev=45565&view=rev
Log:
Add closing date for closed bank accounts.
Also, provide bank account state.
Also, simplify code.
Modified:
erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_getReportTransactionList.xml
Modified: erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_getReportTransactionList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_getReportTransactionList.xml?rev=45565&r1=45564&r2=45565&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_getReportTransactionList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_getReportTransactionList.xml [utf8] Tue Apr 19 11:49:30 2011
@@ -79,19 +79,29 @@ resource_uid = context.currency_module[c
inv_account_dict = {}\n
# Set empty dictionnary for each account\n
for account_uid in account_uids:\n
- acc_dict = inv_account_dict[account_uid] = {}\n
account = account_dict[account_uid]\n
-# context.log(\'account\',account)\n
- acc_dict[\'account_reference\'] = account.getReference()\n
- acc_dict[\'internal_bank_account_number\'] = account.getInternalBankAccountNumber()\n
parent_value = account.getParentValue()\n
- acc_dict[\'account_owner\'] = parent_value.getTitle()\n
- acc_dict[\'activity\'] = None\n
+ account_state = account.getValidationState()\n
+ if account_state == \'closed\':\n
+ closed_date = DateTime(account.Base_getWorkflowHistory()[\'bank_account_workflow\'][\'item_list\'][0][-1]).Date()\n
+ else:\n
+ closed_date = None\n
if parent_value.getPortalType() == \'Organisation\':\n
- acc_dict[\'activity\'] = parent_value.getActivity()\n
- acc_dict[\'currency_title\'] = account.getPriceCurrencyTitle()\n
- acc_dict[\'bic_code\'] = account.getBicCode(None)\n
- acc_dict[\'transaction_list\'] = []\n
+ activity = parent_value.getActivity()\n
+ else:\n
+ activity = None\n
+ inv_account_dict[account_uid] = {\n
+ state_title: account_state,\n
+ closed_date: closed_date,\n
+ account_reference: account.getReference(),\n
+ internal_bank_account_number: account.getInternalBankAccountNumber(),\n
+ state: account.getValidationState(),\n
+ activity: parent_activity,\n
+ account_owner: parent_value.getTitle(),\n
+ currency_title: account.getPriceCurrencyTitle(),\n
+ bic_code: account.getBicCode(None),\n
+ transaction_list: [],\n
+ }\n
\n
# Current inventory\n
if current_inventory:\n
More information about the Erp5-report
mailing list