From fa1296c59bb7d8a494fc43f3c17282a1a322300b Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Wed, 15 Jun 2016 15:19:42 +0530 Subject: [PATCH] CRM-16189, added opening_balance and current_period_opening_balance db fields code for on install and upgrade ---------------------------------------- * CRM-16189: Improve support for Accrual Method bookkeeping https://issues.civicrm.org/jira/browse/CRM-16189 --- CRM/Upgrade/Incremental/sql/4.7.9.mysql.tpl | 5 +++++ xml/schema/Financial/FinancialAccount.xml | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/CRM/Upgrade/Incremental/sql/4.7.9.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.7.9.mysql.tpl index 6aa89fdbe5..292f732f72 100644 --- a/CRM/Upgrade/Incremental/sql/4.7.9.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.7.9.mysql.tpl @@ -14,3 +14,8 @@ UPDATE civicrm_state_province SET name="Wake Island" WHERE name="Wake Ialand"; UPDATE civicrm_dashboard SET {localize field="label"}label = '{ts escape="sql"}CiviCRM Resources{/ts}'{/localize} WHERE name = 'getting-started'; + +-- CRM-16189 +ALTER TABLE civicrm_financial_account + ADD `opening_balance` decimal(20,2) DEFAULT '0.00' COMMENT 'Contains the opening balance for this financial account', + ADD `current_period_opening_balance` decimal(20,2) DEFAULT '0.00' COMMENT 'Contains the opening balance for the current period for this financial account'; diff --git a/xml/schema/Financial/FinancialAccount.xml b/xml/schema/Financial/FinancialAccount.xml index eedf5c6210..4ec6f94416 100644 --- a/xml/schema/Financial/FinancialAccount.xml +++ b/xml/schema/Financial/FinancialAccount.xml @@ -162,4 +162,22 @@ true 4.3 + + opening_balance + decimal + Opening Balance + Contains the opening balance for this financial account + 0 + 20,2 + 4.7 + + + current_period_opening_balance + decimal + 20,2 + Current period opening Balance + Contains the opening balance for the current period for this financial account + 0 + 4.7 + -- 2.25.1