FINERACT-1498: Cleaning up Flyway files

This commit is contained in:
Arnold Galovics
2022-02-24 09:55:53 +01:00
committed by Aleksandar Vidakovic
parent aa24599244
commit a5672fbe25
410 changed files with 0 additions and 18291 deletions
@@ -1,20 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES ('GroupSavingSummary', 'Table', NULL, NULL, 'select ifnull(cur.display_symbol, sa.currency_code) as currency,\ncount(sa.id) as totalSavingAccounts, ifnull(sum(sa.account_balance_derived),0) as totalSavings\nfrom m_group topgroup\njoin m_office o on o.id = topgroup.office_id and o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, \'%\')\njoin m_savings_account sa on sa.group_id = g.id\nleft join m_currency cur on cur.code = sa.currency_code\nwhere topgroup.id = ${groupId}\nand sa.activatedon_date is not null\ngroup by sa.currency_code', 'Utility query for getting group or center saving summary details for a group_id', 1, 0);
@@ -1,21 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_savings_account_transfer`
ADD COLUMN `currency_multiplesof` SMALLINT NULL DEFAULT NULL AFTER `currency_digits`;
@@ -1,49 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
CREATE TABLE `m_meeting` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`calendar_instance_id` BIGINT NOT NULL,
`meeting_date` DATE NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `unique_calendar_instance_id_meeting_date` (`calendar_instance_id`, `meeting_date`),
CONSTRAINT `FK_m_calendar_instance_m_meeting` FOREIGN KEY (`calendar_instance_id`) REFERENCES `m_calendar_instance` (`id`)
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB;
CREATE TABLE `m_client_attendance` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`client_id` BIGINT NOT NULL DEFAULT '0',
`meeting_id` BIGINT NOT NULL,
`attendance_type_enum` SMALLINT NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `unique_client_meeting_attendance` (`client_id`, `meeting_id`),
INDEX `FK_m_meeting_m_client_attendance` (`meeting_id`),
CONSTRAINT `FK_m_client_m_client_attendance` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`),
CONSTRAINT `FK_m_meeting_m_client_attendance` FOREIGN KEY (`meeting_id`) REFERENCES `m_meeting` (`id`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB;
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'CREATE_MEETING', 'MEETING', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'UPDATE_MEETING', 'MEETING', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'DELETE_MEETING', 'MEETING', 'DELETE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'SAVEORUPDATEATTENDANCE_MEETING', 'MEETING', 'SAVEORUPDATEATTENDANCE', 0);
@@ -1,33 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `job`
ADD COLUMN `is_misfired` tinyint NOT NULL DEFAULT '0' AFTER `scheduler_group`;
CREATE TABLE `scheduler_detail` (
`id` SMALLINT NOT NULL AUTO_INCREMENT,
`is_suspended` tinyint NOT NULL DEFAULT '0',
`execute_misfired_jobs` tinyint NOT NULL DEFAULT '1',
`reset_scheduler_on_bootup` tinyint NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB;
INSERT INTO `scheduler_detail` (`is_suspended`, `execute_misfired_jobs`, `reset_scheduler_on_bootup`) VALUES (FALSE,TRUE,TRUE);
@@ -1,30 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('portfolio_group', 'TRANSFERCLIENTS_GROUP', 'GROUP', 'TRANSFERCLIENTS', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('portfolio_group', 'TRANSFERCLIENTS_GROUP_CHECKER', 'GROUP', 'TRANSFERCLIENTS', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('portfolio', 'TRANSFER_CLIENT', 'CLIENT', 'TRANSFER', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('portfolio', 'TRANSFER_CLIENT_CHECKER', 'CLIENT', 'TRANSFER', 0);
@@ -1,34 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_loan_transaction`
ADD COLUMN `office_id` BIGINT NULL DEFAULT NULL AFTER `loan_id`;
/**update client loans**/
UPDATE m_loan_transaction lt set lt.office_id = (SELECT c.office_id AS officeId FROM m_loan l JOIN m_client c on l.client_id=c.id where l.id=lt.loan_id) where lt.loan_id in (Select l.id from m_loan l where l.client_id is not null);
/**update group loans**/
UPDATE m_loan_transaction lt set lt.office_id = (SELECT g.office_id AS officeId FROM m_loan l JOIN m_group g on l.group_id=g.id where l.id=lt.loan_id) where lt.loan_id in (Select l.id from m_loan l where l.group_id is not null);
/**Add foreign key constraints**/
ALTER TABLE `m_loan_transaction`
CHANGE COLUMN `office_id` `office_id` BIGINT NOT NULL AFTER `loan_id`;
ALTER TABLE `m_loan_transaction`
ADD CONSTRAINT `FK_m_loan_transaction_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`);
@@ -1,49 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
DELETE FROM `m_permission` WHERE `code`="TRANSFER_CLIENT";
DELETE FROM `m_permission` WHERE `code`="TRANSFER_CLIENT_CHECKER";
/**Permissions for proposing a transfer**/
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('portfolio', 'PROPOSETRANSFER_CLIENT', 'CLIENT', 'PROPOSETRANSFER', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('portfolio', 'PROPOSETRANSFER_CLIENT_CHECKER', 'CLIENT', 'PROPOSETRANSFER', 0);
/**Permissions for accepting a transfer**/
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('portfolio', 'ACCEPTTRANSFER_CLIENT', 'CLIENT', 'ACCEPTTRANSFER', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('portfolio', 'ACCEPTTRANSFER_CLIENT_CHECKER', 'CLIENT', 'ACCEPTTRANSFER', 0);
/**Permissions for rejecting a transfer**/
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('portfolio', 'REJECTTRANSFER_CLIENT', 'CLIENT', 'REJECTTRANSFER', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('portfolio', 'REJECTTRANSFER_CLIENT_CHECKER', 'CLIENT', 'REJECTTRANSFER', 0);
/**Permissions for withdrawing a transfer proposal**/
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('portfolio', 'WITHDRAWTRANSFER_CLIENT', 'CLIENT', 'WITHDRAWTRANSFER', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('portfolio', 'WITHDRAWTRANSFER_CLIENT_CHECKER', 'CLIENT', 'WITHDRAWTRANSFER', 0);
@@ -1,30 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
CREATE TABLE `x_table_cloumn_code_mappings` (
`column_alias_name` VARCHAR(50) NOT NULL,
`code_id` INT NOT NULL,
PRIMARY KEY (`column_alias_name`),
INDEX `FK_x_code_id` (`code_id`),
CONSTRAINT `FK_x_code_id` FOREIGN KEY (`code_id`) REFERENCES `m_code` (`id`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB;
INSERT INTO `c_configuration` (`name`, `enabled`) VALUES ('constraint_approach_for_datatables', 1);
@@ -1,28 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
/***Store destination office Id while client is pending transfers and effective joining date in a particular branch**/
ALTER TABLE `m_client`
ADD COLUMN `office_joining_date` DATE NULL AFTER `activation_date`,
ADD COLUMN `transfer_to_office_id` BIGINT NULL AFTER `office_id`,
ADD CONSTRAINT `FK_m_client_m_office` FOREIGN KEY (`transfer_to_office_id`) REFERENCES `m_office` (`id`);
/**For current Clients, set the office joining date to activation date**/
update m_client set office_joining_date=activation_date;
@@ -1,24 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_savings_product`
ADD COLUMN `withdrawal_fee_for_transfer` TINYINT NULL DEFAULT '1' AFTER `withdrawal_fee_type_enum`;
ALTER TABLE `m_savings_account`
ADD COLUMN `withdrawal_fee_for_transfer` TINYINT NULL DEFAULT '1' AFTER `withdrawal_fee_type_enum`;
@@ -1,31 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES
('transaction_savings', 'POSTINTEREST_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'POSTINTEREST', '1'),
('transaction_savings', 'POSTINTEREST_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'POSTINTEREST', '0');
ALTER TABLE `m_savings_product`
ADD COLUMN `interest_posting_period_enum` SMALLINT NOT NULL DEFAULT 4 AFTER `interest_compounding_period_enum`;
ALTER TABLE `m_savings_account`
ADD COLUMN `interest_posting_period_enum` SMALLINT NOT NULL DEFAULT 4 AFTER `interest_compounding_period_enum`;
@@ -1,27 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `m_code` (`code_name`, `is_system_defined`) VALUES ('GroupClosureReason', 1);
ALTER TABLE `m_group` ADD COLUMN `closure_reason_cv_id` INT NULL DEFAULT NULL,
ADD COLUMN `closedon_date` DATE NULL DEFAULT NULL,
ADD CONSTRAINT `FK_m_group_m_code` FOREIGN KEY (`closure_reason_cv_id`) REFERENCES `m_code_value` (`id`);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`) VALUES ('portfolio', 'CLOSE_GROUP', 'GROUP', 'CLOSE');
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`) VALUES ('portfolio', 'CLOSE_CENTER', 'CENTER', 'CLOSE');
@@ -1,23 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `acc_product_mapping` (`gl_account_id`,`product_id`,`product_type`,`payment_type`,`charge_id`,`financial_account_type`)
select mapping.gl_account_id,mapping.product_id,mapping.product_type,mapping.payment_type,mapping.charge_id, 10
from acc_product_mapping mapping
where mapping.financial_account_type = 1 and mapping.product_type=1;
@@ -1,20 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
update c_configuration set enabled=0 where name="constraint_approach_for_datatables";
@@ -1,132 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES
('xbrlmapping', 'UPDATE_XBRLMAPPING', 'XBRLMAPPING', 'UPDATE', 0);
DROP TABLE IF EXISTS `mix_taxonomy`;
CREATE TABLE `mix_taxonomy` (
`id` INT unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(100) DEFAULT NULL,
`namespace_id` INT DEFAULT NULL,
`dimension` varchar(100) DEFAULT NULL,
`type` INT DEFAULT NULL,
`description` varchar(1000) DEFAULT NULL,
`need_mapping` tinyint DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
LOCK TABLES `mix_taxonomy` WRITE;
INSERT INTO `mix_taxonomy` (`id`, `name`, `namespace_id`, `dimension`, `type`, `description`, `need_mapping`)
VALUES
(1,'AdministrativeExpense',1,NULL,3,NULL,1),
(2,'Assets',3,NULL,1,'All outstanding principals due for all outstanding client loans. This includes current, delinquent, and renegotiated loans, but not loans that have been written off. It does not include interest receivable.',1),
(3,'Assets',3,'MaturityDimension:LessThanOneYearMember',1,'Segmentation based on the life of an asset or liability.',1),
(4,'Assets',3,'MaturityDimension:MoreThanOneYearMember',1,'Segmentation based on the life of an asset or liability.',1),
(5,'CashAndCashEquivalents',1,NULL,1,NULL,1),
(6,'Deposits',3,NULL,1,'The total value of funds placed in an account with an MFI that are payable to a depositor. This item includes any current, checking, or savings accounts that are payable on demand. It also includes time deposits which have a fixed maturity date and compulsory deposits.',1),
(7,'Deposits',3,'DepositProductsDimension:CompulsoryMember',1,'The value of deposits that an MFI\'s clients are required to maintain as a condition of an existing or future loan.',NULL),
(8,'Deposits',3,'DepositProductsDimension:VoluntaryMember',1,'The value of deposits that an MFI\'s clients are not required to maintain as a condition of an existing or future loan.',NULL),
(9,'Deposits',3,'LocationDimension:RuralMember',1,'Located in rural areas. Segmentation based on location.',NULL),
(10,'Deposits',3,'LocationDimension:UrbanMember',1,'Located in urban areas. Segmentation based on location.',NULL),
(11,'Deposits',3,'MaturityDimension:LessThanOneYearMember',1,'Segmentation based on the life of an asset or liability.',NULL),
(12,'Deposits',3,'MaturityDimension:MoreThanOneYearMember',1,'Segmentation based on the life of an asset or liability.',NULL),
(13,'EmployeeBenefitsExpense',1,NULL,3,NULL,NULL),
(14,'Equity',1,NULL,1,NULL,NULL),
(15,'Expense',1,NULL,3,NULL,NULL),
(16,'FinancialExpense',3,NULL,3,'All costs All costs incurred in raising funds from third parties, fee expenses from non-financial services, net gains (losses) due to changes in fair value of financial liabilities, impairment losses net of reversals of financial assets other than loan portfolio and net gains (losses) from restatement of financial statements in terms of the measuring unit current at the end of the reporting period.',NULL),
(17,'FinancialRevenueOnLoans',3,NULL,2,'Interest and non-interest income generated by the provision of credit services to the clients. Fees and commissions for late payment are also included.',NULL),
(18,'ImpairmentLossAllowanceGrossLoanPortfolio',3,NULL,2,'An allowance for the risk of losses in the gross loan portfolio due to default .',NULL),
(19,'Liabilities',1,NULL,1,NULL,NULL),
(20,'Liabilities',3,'MaturityDimension:LessThanOneYearMember',1,'Segmentation based on the life of an asset or liability.',NULL),
(21,'Liabilities',3,'MaturityDimension:MoreThanOneYearMember',1,'Segmentation based on the life of an asset or liability.',NULL),
(22,'LoanPortfolioGross',3,NULL,2,'All outstanding principals due for all outstanding client loans. This includes current, delinquent, and renegotiated loans, but not loans that have been written off. It does not include interest receivable.',NULL),
(23,'LoanPortfolioGross',3,'CreditProductsDimension:MicroenterpriseMember',2,'Loans that finance the production or trade of goods and services for an individual\'s microenterprise, whether or not the microenterprise is legally registered. Segmentation based on loan product.',NULL),
(24,'LoanPortfolioGross',3,'DelinquencyDimension:OneMonthOrMoreMember',2,'Segmentation based on the principal balance of all loans outstanding that have one or more installments of principal past due or renegotiated. Segmentation based on the principal balance of all loans outstanding that have one or more installments of principal past due or renegotiated.',NULL),
(25,'LoanPortfolioGross',3,'DelinquencyDimension:ThreeMonthsOrMoreMember',2,'Segmentation based on the principal balance of all loans outstanding that have one or more installments of principal past due or renegotiated.? Segmentation based on the principal balance of all loans outstanding that have one or more installments of principal past due or renegotiated.',NULL),
(26,'LoanPortfolioGross',3,'LocationDimension:RuralMember',2,'Located in rural areas. Segmentation based on geographic location.',NULL),
(27,'LoanPortfolioGross',3,'LocationDimension:UrbanMember',2,'Located in urbal areas. Segmentation based on geographic location.',NULL),
(28,'LoanPortfolioGross',3,'MaturityDimension:LessThanOneYearMember',2,'Segmentation based on the life of an asset or liability.',NULL),
(29,'LoanPortfolioGross',3,'MaturityDimension:MoreThanOneYearMember',2,'Segmentation based on the life of an asset or liability.',NULL),
(30,'NetLoanLoss',3,'',3,'Referred to the value of delinquency loans written off net of any principal recovery.',NULL),
(31,'NetLoanLossProvisionExpense',3,NULL,3,'Represent the net value of loan portfolio impairment loss considering any reversal on impairment loss and any recovery on loans written off recognized as a income during the accounting period.',NULL),
(32,'NetOperatingIncome',3,NULL,2,'Total operating revenue less all expenses related to the MFI\'s core financial service operation including total financial expense, impairment loss and operating expense. Donations are excluded.',NULL),
(33,'NetOperatingIncomeNetOfTaxExpense',3,NULL,3,'Net operating income reported incorporating the effect of taxes. Taxes include all domestic and foreign taxes which are based on taxable profits, other taxes related to personnel, financial transactions or value-added taxes are not considered in calculation of this value.',NULL),
(34,'NumberOfActiveBorrowers',3,NULL,0,'The number of individuals who currently have an outstanding loan balance with the MFI or are primarily responsible for repaying any portion of the gross loan portfolio. Individuals who have multiple loans with an MFI should be counted as a single borrower.',NULL),
(35,'NumberOfActiveBorrowers',3,'GenderDimension:FemaleMember',0,'The number of individuals who currently have an outstanding loan balance with the MFI or are primarily responsible for repaying any portion of the gross loan portfolio. Individuals who have multiple loans with an MFI should be counted as a single borrower.',NULL),
(36,'NumberOfBoardMembers',3,'GenderDimension:FemaleMember',0,'The number of members that comprise the board of directors at the end of the reporting period who are female.',NULL),
(37,'NumberOfDepositAccounts',3,NULL,0,'The number of individuals who currently have funds on deposit with the MFI on a voluntary basis; i.e., they are not required to maintain the deposit account to access a loan. This number applies only to deposits held by an MFI, not to those deposits held in other institutions by the MFI\'s clients. The number should be based on the number of individuals rather than the number of groups. A single deposit account may represent multiple depositors.',NULL),
(38,'NumberOfDepositors',3,'',0,'The number of deposit accounts, both voluntary and compulsory, opened at the MFI whose balances the institution is liable to repay. The number should be based on the number of individual accounts rather than on the number of groups.',NULL),
(39,'NumberOfEmployees',3,NULL,0,'The number of individuals who are actively employed by an entity. This number includes contract employees or advisors who dedicate a substantial portion of their time to the entity, even if they are not on the entity\'s employees roster.',NULL),
(40,'NumberOfEmployees',3,'GenderDimension:FemaleMember',0,'The number of individuals who are actively employed by an entity. This number includes contract employees or advisors who dedicate a substantial portion of their time to the entity, even if they are not on the entity\'s employees roster.',NULL),
(41,'NumberOfLoanOfficers',3,NULL,0,'The number of employees whose main activity is to manage a portion of the gross loan portfolio. A loan officer is a staff member of record who is directly responsible for arranging and monitoring client loans.',NULL),
(42,'NumberOfLoanOfficers',3,'GenderDimension:FemaleMember',0,'The number of employees whose main activity is to manage a portion of the gross loan portfolio. A loan officer is a staff member of record who is directly responsible for arranging and monitoring client loans.',NULL),
(43,'NumberOfManagers',3,'GenderDimension:FemaleMember',0,'The number of members that comprise the management of the institution who are female.',NULL),
(44,'NumberOfOffices',3,NULL,0,'The number of staffed points of service and administrative sites used to deliver or support the delivery of financial services to microfinance clients.',NULL),
(45,'NumberOfOutstandingLoans',3,NULL,0,'The number of loans in the gross loan portfolio. For MFIs using a group lending methodology, the number of loans should refer to the number of individuals receiving loans as part of a group or as part of a group loan.',NULL),
(46,'OperatingExpense',3,NULL,3,'Includes expenses not related to financial and credit loss impairment, such as personnel expenses, depreciation, amortization and administrative expenses.',NULL),
(47,'OperatingIncome',3,NULL,2,'Includes all financial income and other operating revenue which is generated from non-financial services. Operating income also includes net gains (losses) from holding financial assets (changes on their values during the period and foreign exchange differences). Donations or any revenue not related with an MFI\'s core business of making loans and providing financial services are not considered under this category.',NULL),
(48,'WriteOffsOnGrossLoanPortfolio',3,NULL,2,'The value of loans that have been recognized as uncollectible for accounting purposes. A write-off is an accounting procedure that removes the outstanding balance of the loan from the gross loan portfolio and impairment loss allowance. Thus, the write-off does not affect the net loan portfolio, total assets, or any equity account. If the impairment loss allowance is insufficient to cover the amount written off, the excess amount will result in an additional impairment loss on loans recognised in profit or loss of the period.',NULL);
UNLOCK TABLES;
DROP TABLE IF EXISTS `mix_taxonomy_mapping`;
CREATE TABLE `mix_taxonomy_mapping` (
`id` INT unsigned NOT NULL AUTO_INCREMENT,
`identifier` varchar(50) NOT NULL DEFAULT '',
`config` varchar(200) DEFAULT NULL,
`last_update_date` datetime DEFAULT NULL,
`currency` varchar(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
LOCK TABLES `mix_taxonomy_mapping` WRITE;
INSERT INTO `mix_taxonomy_mapping` (`id`, `identifier`, `config`, `last_update_date`, `currency`) VALUES
(1,'default',NULL,NULL,'');
UNLOCK TABLES;
DROP TABLE IF EXISTS `mix_xbrl_namespace`;
CREATE TABLE `mix_xbrl_namespace` (
`id` INT unsigned NOT NULL AUTO_INCREMENT,
`prefix` varchar(20) NOT NULL DEFAULT '',
`url` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UNQUE` (`prefix`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
LOCK TABLES `mix_xbrl_namespace` WRITE;
INSERT INTO `mix_xbrl_namespace` (`id`, `prefix`, `url`)
VALUES
(1,'ifrs','http://xbrl.iasb.org/taxonomy/2009-04-01/ifrs'),
(2,'iso4217','http://www.xbrl.org/2003/iso4217'),
(3,'mix','http://www.themix.org/INT/fr/ifrs/basi/YYYY-MM-DD/mx-cor'),
(4,'xbrldi','http://xbrl.org/2006/xbrldi'),
(5,'xbrli','http://www.xbrl.org/2003/instance'),
(6,'link','http://www.xbrl.org/2003/linkbase'),
(7,'dc-all','http://www.themix.org/INT/fr/ifrs/basi/2010-08-31/dc-all');
UNLOCK TABLES;
@@ -1,34 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_savings_account_transaction`
ADD COLUMN `office_id` BIGINT NULL DEFAULT NULL AFTER `savings_account_id`;
/**update client savings**/
UPDATE m_savings_account_transaction st set st.office_id = (SELECT c.office_id AS officeId FROM m_savings_account sa JOIN m_client c on sa.client_id=c.id where sa.id=st.savings_account_id) where st.savings_account_id in (Select sa.id from m_savings_account sa where sa.client_id is not null);
/**update group savings**/
UPDATE m_savings_account_transaction st set st.office_id = (SELECT g.office_id AS officeId FROM m_savings_account sa JOIN m_group g on sa.group_id=g.id where sa.id=st.savings_account_id) where st.savings_account_id in (Select sa.id from m_savings_account sa where sa.group_id is not null);
/**Add foreign key constraints**/
ALTER TABLE `m_savings_account_transaction`
CHANGE COLUMN `office_id` `office_id` BIGINT NOT NULL AFTER `savings_account_id`;
ALTER TABLE `m_savings_account_transaction`
ADD CONSTRAINT `FK_m_savings_account_transaction_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`);
@@ -1,23 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `acc_product_mapping` (`gl_account_id`,`product_id`,`product_type`,`payment_type`,`charge_id`,`financial_account_type`)
select mapping.gl_account_id,mapping.product_id,mapping.product_type,mapping.payment_type,mapping.charge_id, 10
from acc_product_mapping mapping
where mapping.financial_account_type = 1 and mapping.product_type=2;
@@ -1,38 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
DROP TABLE IF EXISTS `c_cache`;
CREATE TABLE `c_cache` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`cache_type_enum` tinyint NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
INSERT INTO `c_cache`
(`id`,`cache_type_enum`)
VALUES
(1, 1);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('configuration', 'READ_CACHE', 'CACHE', 'READ', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('configuration', 'UPDATE_CACHE', 'CACHE', 'UPDATE', 0);
@@ -1,48 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
/**Add currency code**/
ALTER TABLE `acc_gl_journal_entry`
ADD COLUMN `currency_code` VARCHAR(3) NULL DEFAULT NULL AFTER `reversal_id`;
/**Update currency codes for loans**/
UPDATE acc_gl_journal_entry journal_entry SET currency_code = (
SELECT m_loan.currency_code
FROM m_loan, m_loan_transaction
WHERE m_loan.id = m_loan_transaction.loan_id AND m_loan_transaction.id=journal_entry.transaction_id)
WHERE journal_entry.entity_type_enum=1;
/**Update currency codes for savings**/
UPDATE acc_gl_journal_entry journal_entry SET currency_code = (
SELECT m_savings_account.currency_code
FROM m_savings_account, m_savings_account_transaction
WHERE m_savings_account.id = m_savings_account_transaction.savings_account_id AND m_savings_account_transaction.id=journal_entry.transaction_id)
WHERE journal_entry.entity_type_enum=2;
/**Update currency codes for manual journal entries***/
update acc_gl_journal_entry set currency_code = (select code from m_organisation_currency limit 1)
where acc_gl_journal_entry.currency_code is NULL;
/**Make currency code not null**/
ALTER TABLE `acc_gl_journal_entry`
ALTER `currency_code` DROP DEFAULT;
ALTER TABLE `acc_gl_journal_entry`
CHANGE COLUMN `currency_code` `currency_code` VARCHAR(3) NOT NULL AFTER `reversal_id`;
@@ -1,43 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
CREATE TABLE `m_portfolio_account_associations` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`loan_account_id` BIGINT NULL DEFAULT NULL,
`savings_account_id` BIGINT NULL DEFAULT NULL,
`linked_loan_account_id` BIGINT NULL DEFAULT NULL,
`linked_savings_account_id` BIGINT NULL DEFAULT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `account_association_loan_fk` FOREIGN KEY (`loan_account_id`) REFERENCES `m_loan` (`id`),
CONSTRAINT `account_association_savings_fk` FOREIGN KEY (`savings_account_id`) REFERENCES `m_savings_account` (`id`),
CONSTRAINT `linked_loan_fk` FOREIGN KEY (`linked_loan_account_id`) REFERENCES `m_loan` (`id`),
CONSTRAINT `linked_savings_fk` FOREIGN KEY (`linked_savings_account_id`) REFERENCES `m_savings_account` (`id`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB;
ALTER TABLE `m_charge`
ADD COLUMN `charge_payment_mode_enum` SMALLINT NOT NULL DEFAULT '0' AFTER `charge_calculation_enum`;
ALTER TABLE `m_loan_charge`
ADD COLUMN `charge_payment_mode_enum` SMALLINT NOT NULL DEFAULT '0' AFTER `charge_calculation_enum`;
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('transaction_loan', 'PAY_LOANCHARGE', 'LOANCHARGE', 'PAY', 0);
INSERT INTO `job` (`name`, `display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, `previous_run_start_time`, `next_run_time`, `job_key`, `initializing_errorlog`, `is_active`, `currently_running`, `updates_allowed`, `scheduler_group`, `is_misfired`) VALUES ('Transfer Fee For Loans From Savings', 'Transfer Fee For Loans From Savings', '0 1 0 1/1 * ? *', now(), 5, NULL, NULL, NULL, NULL, NULL, 1, 0, 1, 0, 0);
@@ -1,22 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_savings_account`
ADD COLUMN `total_fees_charge_derived` DECIMAL(19,6) NULL DEFAULT NULL AFTER `total_withdrawal_fees_derived`,
ADD COLUMN `total_penalty_charge_derived` DECIMAL(19,6) NULL DEFAULT NULL AFTER `total_fees_charge_derived`;
@@ -1,20 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
delete from acc_product_mapping where financial_account_type=10 and payment_type is not null;
@@ -1,25 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
/**Permissions for proposing and accepting a transfer**/
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('portfolio', 'PROPOSEANDACCEPTTRANSFER_CLIENT', 'CLIENT', 'PROPOSEANDACCEPTTRANSFER', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('portfolio', 'PROPOSEANDACCEPTTRANSFER_CLIENT_CHECKER', 'CLIENT', 'PROPOSEANDACCEPTTRANSFER', 0);
@@ -1,27 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
/***Delete previously set defaults**/
delete from acc_product_mapping where financial_account_type=10 and product_type=2;
/***Set the proper defaults**/
INSERT INTO `acc_product_mapping` (`gl_account_id`,`product_id`,`product_type`,`payment_type`,`charge_id`,`financial_account_type`)
select mapping.gl_account_id,mapping.product_id,mapping.product_type,mapping.payment_type,mapping.charge_id, 10
from acc_product_mapping mapping
where mapping.financial_account_type = 2 and mapping.product_type=2;
@@ -1,20 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `job` (`name`, `display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, `previous_run_start_time`, `next_run_time`, `job_key`, `initializing_errorlog`, `is_active`, `currently_running`, `updates_allowed`, `scheduler_group`, `is_misfired`) VALUES ('Pay Due Savings Charges', 'Pay Due Savings Charges', '0 0 12 * * ?', '2013-09-23 00:00:00', 5, NULL, NULL, NULL, 'Pay Due Savings ChargesJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0);
@@ -1,24 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
/***Set defaults for income from Penalties for existing Saving Products**/
INSERT INTO `acc_product_mapping` (`gl_account_id`,`product_id`,`product_type`,`payment_type`,`charge_id`,`financial_account_type`)
select mapping.gl_account_id,mapping.product_id,mapping.product_type,mapping.payment_type,mapping.charge_id, 5
from acc_product_mapping mapping
where mapping.financial_account_type = 4 and mapping.product_type=2;
@@ -1,272 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_savings_account_charge`
CHANGE COLUMN `due_for_collection_as_of_date` `charge_due_date` DATE NULL DEFAULT NULL AFTER `charge_time_enum`;
ALTER TABLE `m_savings_account_charge`
ADD COLUMN `fee_on_month` SMALLINT NULL DEFAULT NULL AFTER `charge_due_date`,
ADD COLUMN `fee_on_day` SMALLINT NULL DEFAULT NULL AFTER `fee_on_month`,
ADD COLUMN `is_active` tinyint NOT NULL DEFAULT '1' AFTER `waived`;
delimiter //
CREATE PROCEDURE migrate_withdrwal_fees()
begin
declare no_more_rows boolean default false;
declare v_currency_code VARCHAR(3);
declare v_withdrawal_fee_type_enum SMALLINT;
declare v_withdrawal_fee_amount_charge_def DECIMAL(19,6);
declare v_account_id BIGINT;
declare v_withdrawal_fee_amount DECIMAL(19,6);
declare t_calculation_percentage DECIMAL(19,6);
declare t_calculation_on_amount DECIMAL(19,6);
declare t_withdrawal_fee_name VARCHAR(100);
declare t_charge_id BIGINT;
declare t_savings_charge_id BIGINT;
-- savings transaction variables
declare v_savings_transaction_id BIGINT;
declare v_transaction_amount DECIMAL(19,6);
declare cursor1 cursor for
select sa.currency_code, sa.withdrawal_fee_type_enum, sa.withdrawal_fee_amount
from m_savings_account sa where sa.withdrawal_fee_amount is not null and sa.withdrawal_fee_amount > 0 group by sa.currency_code, sa.withdrawal_fee_type_enum, sa.withdrawal_fee_amount;
declare cursor2 cursor for
select sa.id, sa.withdrawal_fee_amount from m_savings_account sa where sa.currency_code=v_currency_code and sa.withdrawal_fee_type_enum=v_withdrawal_fee_type_enum and sa.withdrawal_fee_amount is not null and sa.withdrawal_fee_amount > 0;
declare cursor3 cursor for
select sat.id, sat.amount from m_savings_account_transaction sat
where sat.savings_account_id=v_account_id and sat.transaction_type_enum=4;
declare continue handler for not found
set no_more_rows := true;
open cursor1;
LOOP1: loop
fetch cursor1 into v_currency_code, v_withdrawal_fee_type_enum, v_withdrawal_fee_amount_charge_def;
if no_more_rows then
close cursor1;
leave LOOP1;
end if;
-- set withdrawal fee name
if(v_withdrawal_fee_type_enum = 1) then
set t_withdrawal_fee_name = CONCAT('Withdrawal fee-Flat-',v_currency_code);
else
set t_withdrawal_fee_name = CONCAT('Withdrawal fee-Percentage-',v_currency_code);
end if;
-- get charge id if already exists
set t_charge_id = (select id from m_charge where name = t_withdrawal_fee_name);
if t_charge_id is null then
-- add withdrawal fee to charges
INSERT INTO `m_charge` (`name`, `currency_code`, `charge_applies_to_enum`, `charge_time_enum`, `charge_calculation_enum`, `charge_payment_mode_enum`, `amount`, `is_penalty`, `is_active`, `is_deleted`) VALUES (t_withdrawal_fee_name , v_currency_code, 2, 5, v_withdrawal_fee_type_enum, 0, v_withdrawal_fee_amount_charge_def, 0, 1, 0);
-- get inserted charge id
set t_charge_id = last_insert_id();
end if;
open cursor2;
LOOP2: loop
fetch cursor2 into v_account_id, v_withdrawal_fee_amount;
if no_more_rows then
set no_more_rows := false;
close cursor2;
leave LOOP2;
end if;
if (v_withdrawal_fee_type_enum=1) then
set t_calculation_percentage = NULL;
set t_calculation_on_amount = NULL;
else
set t_calculation_percentage = v_withdrawal_fee_amount;
set v_withdrawal_fee_amount = 0;
set t_calculation_on_amount = 0;
end if;
if not exists (select id from m_savings_account_charge sac where
sac.savings_account_id=v_account_id and sac.charge_id=t_charge_id and sac.charge_time_enum=5) then
-- attach withdrawal charge to savings
INSERT INTO `m_savings_account_charge` (`savings_account_id`, `charge_id`, `is_penalty`, `charge_time_enum`, `charge_due_date`, `fee_on_month`, `fee_on_day`, `charge_calculation_enum`, `calculation_percentage`, `calculation_on_amount`, `amount`, `amount_paid_derived`, `amount_waived_derived`, `amount_writtenoff_derived`, `amount_outstanding_derived`, `is_paid_derived`, `waived`, `is_active`) VALUES (v_account_id, t_charge_id, 0, 5, NULL, NULL, NULL, v_withdrawal_fee_type_enum, t_calculation_percentage, t_calculation_on_amount, v_withdrawal_fee_amount, NULL, NULL, NULL, 0.000000, 0, 0, 1);
-- set savings account charge id
set t_savings_charge_id = last_insert_id();
else
set t_savings_charge_id = (select id from m_savings_account_charge sac where sac.savings_account_id=v_account_id and sac.charge_id=t_charge_id and sac.charge_time_enum=5);
end if;
open cursor3;
LOOP3: loop
fetch cursor3 into v_savings_transaction_id, v_transaction_amount;
if no_more_rows then
set no_more_rows := false;
close cursor3;
leave LOOP3;
end if;
if not exists (select id from m_savings_account_charge_paid_by sacp where
sacp.savings_account_transaction_id=v_savings_transaction_id and sacp.savings_account_charge_id=t_savings_charge_id) then
-- insert a record into savings account charge paid by
INSERT INTO `m_savings_account_charge_paid_by` (`savings_account_transaction_id`, `savings_account_charge_id`, `amount`) VALUES(v_savings_transaction_id, t_savings_charge_id, v_transaction_amount);
end if;
end loop LOOP3;
end loop LOOP2;
end loop LOOP1;
end //
CREATE PROCEDURE migrate_annual_fees()
begin
declare no_more_rows boolean default false;
declare v_currency_code VARCHAR(3);
declare v_annual_fee_amount_charge_def DECIMAL(19,6);
declare v_account_id BIGINT;
declare v_annual_fee_amount DECIMAL(19,6);
declare v_annual_fee_on_month SMALLINT;
declare v_annual_fee_on_day SMALLINT;
declare v_annual_fee_next_due_date DATE;
declare t_annual_fee_name VARCHAR(100);
declare t_charge_id BIGINT;
declare t_savings_charge_id BIGINT;
-- savings transaction variables
declare v_savings_transaction_id BIGINT;
declare v_transaction_amount DECIMAL(19,6);
declare cursor1 cursor for
select sa.currency_code, sa.annual_fee_amount
from m_savings_account sa where sa.annual_fee_amount is not null and sa.annual_fee_on_month is not null and sa.annual_fee_on_day is not null group by sa.currency_code, sa.annual_fee_amount;
declare cursor2 cursor for
select sa.id, sa.annual_fee_amount, sa.annual_fee_on_month, sa.annual_fee_on_day, sa.annual_fee_next_due_date from m_savings_account sa where sa.currency_code=v_currency_code and sa.annual_fee_amount is not null and sa.annual_fee_on_month is not null and sa.annual_fee_on_day is not null;
declare cursor3 cursor for
select sat.id, sat.amount from m_savings_account_transaction sat
where sat.savings_account_id=v_account_id and sat.transaction_type_enum=5;
declare continue handler for not found
set no_more_rows := true;
open cursor1;
LOOP1: loop
fetch cursor1 into v_currency_code, v_annual_fee_amount_charge_def;
if no_more_rows then
close cursor1;
leave LOOP1;
end if;
-- set annual fee name
set t_annual_fee_name = CONCAT('Annual fee - ',v_currency_code);
-- get charge id if already exists
set t_charge_id = (select id from m_charge where name = t_annual_fee_name);
if t_charge_id is null then
-- add annual fee to charges
INSERT INTO `m_charge` (`name`, `currency_code`, `charge_applies_to_enum`, `charge_time_enum`, `charge_calculation_enum`, `charge_payment_mode_enum`, `amount`, `is_penalty`, `is_active`, `is_deleted`) VALUES (t_annual_fee_name, v_currency_code, 2, 6, 1, 0, v_annual_fee_amount_charge_def, 0, 1, 0);
-- get inserted charge id
set t_charge_id = last_insert_id();
end if;
open cursor2;
LOOP2: loop
fetch cursor2 into v_account_id, v_annual_fee_amount, v_annual_fee_on_month, v_annual_fee_on_day, v_annual_fee_next_due_date;
if no_more_rows then
set no_more_rows := false;
close cursor2;
leave LOOP2;
end if;
if not exists (select id from m_savings_account_charge sac where
sac.savings_account_id=v_account_id and sac.charge_id=t_charge_id and sac.charge_time_enum=6) then
-- attach annual charge to savings
INSERT INTO `m_savings_account_charge` (`savings_account_id`, `charge_id`, `is_penalty`, `charge_time_enum`, `charge_due_date`, `fee_on_month`, `fee_on_day`, `charge_calculation_enum`, `calculation_percentage`, `calculation_on_amount`, `amount`, `amount_paid_derived`, `amount_waived_derived`, `amount_writtenoff_derived`, `amount_outstanding_derived`, `is_paid_derived`, `waived`, `is_active`) VALUES (v_account_id, t_charge_id, 0, 6, v_annual_fee_next_due_date, v_annual_fee_on_month, v_annual_fee_on_day, 1, NULL, NULL, v_annual_fee_amount, NULL, NULL, NULL, v_annual_fee_amount, 0, 0, 1);
-- set savings account charge id
set t_savings_charge_id = last_insert_id();
else
set t_savings_charge_id = (select id from m_savings_account_charge sac where sac.savings_account_id=v_account_id and sac.charge_id=t_charge_id and sac.charge_time_enum=6);
end if;
open cursor3;
LOOP3: loop
fetch cursor3 into v_savings_transaction_id, v_transaction_amount;
if no_more_rows then
set no_more_rows := false;
close cursor3;
leave LOOP3;
end if;
if not exists (select id from m_savings_account_charge_paid_by sacp where
sacp.savings_account_transaction_id=v_savings_transaction_id and sacp.savings_account_charge_id=t_savings_charge_id) then
-- insert a record into savings account charge paid by
INSERT INTO `m_savings_account_charge_paid_by` (`savings_account_transaction_id`, `savings_account_charge_id`, `amount`) VALUES(v_savings_transaction_id, t_savings_charge_id, v_transaction_amount);
end if;
end loop LOOP3;
end loop LOOP2;
end loop LOOP1;
end //
delimiter ;
call migrate_withdrwal_fees();
call migrate_annual_fees();
drop procedure if exists migrate_annual_fees;
drop procedure if exists migrate_withdrwal_fees;
ALTER TABLE `m_savings_account`
DROP COLUMN `annual_fee_amount`,
DROP COLUMN `annual_fee_on_month`,
DROP COLUMN `annual_fee_on_day`,
DROP COLUMN `annual_fee_next_due_date`,
DROP COLUMN `withdrawal_fee_amount`,
DROP COLUMN `withdrawal_fee_type_enum`;
ALTER TABLE `m_savings_product`
DROP COLUMN `annual_fee_amount`,
DROP COLUMN `annual_fee_on_month`,
DROP COLUMN `annual_fee_on_day`;
@@ -1,35 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
/***Set defaults for income from Penalties for existing Saving Products**/
ALTER TABLE `m_loan_transaction`
ADD COLUMN `overpayment_portion_derived` DECIMAL(19,6) NULL DEFAULT NULL AFTER `penalty_charges_portion_derived`;
/**Add dummy liability account if organization already has a loan product with accounting enabled**/
INSERT INTO `acc_gl_account` (`name`, `hierarchy`, `gl_code`,`account_usage`, `classification_enum`,`description`)
select 'Loan Overpayments (Temp)', '.', '22000-Temp', 1, 2,'Temporary account to track Loan overpayments Liabilities'
FROM m_product_loan WHERE accounting_type != 1
limit 1;
/**Map a liability account for every loan which has accounting enabled**/
INSERT INTO `acc_product_mapping` (`gl_account_id`,`product_id`,`product_type`,`financial_account_type`)
select (select max(id) from acc_gl_account where classification_enum=2 and account_usage=1 LIMIT 1), mapping.product_id, mapping.product_type, 11
from acc_product_mapping mapping
where mapping.financial_account_type = 2 and mapping.product_type=1;
@@ -1,83 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
CREATE TABLE `m_savings_account_charge` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`savings_account_id` BIGINT NOT NULL,
`charge_id` BIGINT NOT NULL,
`is_penalty` tinyint NOT NULL DEFAULT '0',
`charge_time_enum` SMALLINT NOT NULL,
`due_for_collection_as_of_date` DATE NULL DEFAULT NULL,
`charge_calculation_enum` SMALLINT NOT NULL,
`calculation_percentage` DECIMAL(19,6) NULL DEFAULT NULL,
`calculation_on_amount` DECIMAL(19,6) NULL DEFAULT NULL,
`amount` DECIMAL(19,6) NOT NULL,
`amount_paid_derived` DECIMAL(19,6) NULL DEFAULT NULL,
`amount_waived_derived` DECIMAL(19,6) NULL DEFAULT NULL,
`amount_writtenoff_derived` DECIMAL(19,6) NULL DEFAULT NULL,
`amount_outstanding_derived` DECIMAL(19,6) NOT NULL DEFAULT '0.000000',
`is_paid_derived` tinyint NOT NULL DEFAULT '0',
`waived` tinyint NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
INDEX `charge_id` (`charge_id`),
INDEX `m_savings_account_charge_ibfk_2` (`savings_account_id`),
CONSTRAINT `m_savings_account_charge_ibfk_1` FOREIGN KEY (`charge_id`) REFERENCES `m_charge` (`id`),
CONSTRAINT `m_savings_account_charge_ibfk_2` FOREIGN KEY (`savings_account_id`) REFERENCES `m_savings_account` (`id`)
)
ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
CREATE TABLE `m_savings_product_charge` (
`savings_product_id` BIGINT NOT NULL,
`charge_id` BIGINT NOT NULL,
PRIMARY KEY (`savings_product_id`, `charge_id`),
INDEX `charge_id` (`charge_id`),
CONSTRAINT `m_savings_product_charge_ibfk_1` FOREIGN KEY (`charge_id`) REFERENCES `m_charge` (`id`),
CONSTRAINT `m_savings_product_charge_ibfk_2` FOREIGN KEY (`savings_product_id`) REFERENCES `m_savings_product` (`id`)
)
ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'CREATE_SAVINGSACCOUNTCHARGE', 'SAVINGSACCOUNTCHARGE', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'CREATE_SAVINGSACCOUNTCHARGE_CHECKER', 'SAVINGSACCOUNTCHARGE', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'UPDATE_SAVINGSACCOUNTCHARGE', 'SAVINGSACCOUNTCHARGE', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'UPDATE_SAVINGSACCOUNTCHARGE_CHECKER', 'SAVINGSACCOUNTCHARGE', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'DELETE_SAVINGSACCOUNTCHARGE', 'SAVINGSACCOUNTCHARGE', 'DELETE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'DELETE_SAVINGSACCOUNTCHARGE_CHECKER', 'SAVINGSACCOUNTCHARGE', 'DELETE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'WAIVE_SAVINGSACCOUNTCHARGE', 'SAVINGSACCOUNTCHARGE', 'WAIVE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'WAIVE_SAVINGSACCOUNTCHARGE_CHECKER', 'SAVINGSACCOUNTCHARGE', 'WAIVE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'PAY_SAVINGSACCOUNTCHARGE', 'SAVINGSACCOUNTCHARGE', 'PAY', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'PAY_SAVINGSACCOUNTCHARGE_CHECKER', 'SAVINGSACCOUNTCHARGE', 'PAY', 0);
CREATE TABLE `m_savings_account_charge_paid_by` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`savings_account_transaction_id` BIGINT NOT NULL,
`savings_account_charge_id` BIGINT NOT NULL,
`amount` DECIMAL(19,6) NOT NULL,
PRIMARY KEY (`id`),
INDEX `FK__m_savings_account_transaction` (`savings_account_transaction_id`),
INDEX `FK__m_savings_account_charge` (`savings_account_charge_id`),
CONSTRAINT `FK__m_savings_account_charge` FOREIGN KEY (`savings_account_charge_id`) REFERENCES `m_savings_account_charge` (`id`),
CONSTRAINT `FK__m_savings_account_transaction` FOREIGN KEY (`savings_account_transaction_id`) REFERENCES `m_savings_account_transaction` (`id`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB;
@@ -1,53 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
DROP TABLE IF EXISTS `m_template`;
CREATE TABLE `m_template` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`text` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`entity` INT DEFAULT NULL,
`type` INT DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unq_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
DROP TABLE IF EXISTS `m_templatemappers`;
CREATE TABLE `m_templatemappers` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`mapperkey` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`mapperorder` INT DEFAULT NULL,
`mappervalue` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
DROP TABLE IF EXISTS `m_template_m_templatemappers`;
CREATE TABLE `m_template_m_templatemappers` (
`m_template_id` BIGINT NOT NULL,
`mappers_id` BIGINT NOT NULL,
UNIQUE KEY `mappers_id` (`mappers_id`),
KEY (`mappers_id`),
KEY (`m_template_id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('organistion', 'DELETE_TEMPLATE', 'TEMPLATE', 'DELETE', 0),
('organistion', 'CREATE_TEMPLATE', 'TEMPLATE', 'CREATE', 0),
('organistion', 'UPDATE_TEMPLATE', 'TEMPLATE', 'UPDATE', 0),
('organistion', 'READ_TEMPLATE', 'TEMPLATE', 'READ', 0);
@@ -1,43 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
/*
New table for storing transaction details (for both loan and savings)
*/
CREATE TABLE `m_payment_detail` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`payment_type_enum` SMALLINT NOT NULL,
`account_number` VARCHAR(100) NULL DEFAULT NULL,
`check_number` VARCHAR(100) NULL DEFAULT NULL,
`receipt_number` VARCHAR(100) NULL DEFAULT NULL,
`bank_number` VARCHAR(100) NULL DEFAULT NULL,
`routing_code` VARCHAR(100) NULL DEFAULT NULL,
PRIMARY KEY (`id`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB;
/*
Update loan transaction to add a link to transaction detail table
*/
ALTER TABLE `m_loan_transaction`
ADD COLUMN `payment_detail_id` BIGINT NULL AFTER `loan_id`,
ADD CONSTRAINT `FK_m_loan_transaction_m_payment_detail` FOREIGN KEY (`payment_detail_id`) REFERENCES `m_payment_detail` (`id`);
@@ -1,24 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `acc_gl_journal_entry`
ADD COLUMN `is_running_balance_caculated` TINYINT NOT NULL DEFAULT '0' AFTER `lastmodified_date`,
ADD COLUMN `office_running_balance` DECIMAL(19,6) NOT NULL DEFAULT '0.000000' AFTER `is_running_balance_caculated`;
INSERT INTO `job` (`name`, `display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, `previous_run_start_time`, `next_run_time`, `job_key`, `initializing_errorlog`, `is_active`, `currently_running`, `updates_allowed`, `scheduler_group`, `is_misfired`) VALUES ('Update Accounting Running Balances', 'Update Accounting Running Balances', '0 1 0 1/1 * ? *', now(), 5, NULL, NULL, NULL, NULL, NULL, 1, 0, 1, 0, 0);
@@ -1,23 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `acc_gl_journal_entry`
ADD COLUMN `organization_running_balance` DECIMAL(19,6) NOT NULL DEFAULT '0.000000' AFTER `office_running_balance`;
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('accounting', 'UPDATERUNNINGBALANCE_JOURNALENTRY', 'JOURNALENTRY', 'UPDATERUNNINGBALANCE', 0);
@@ -1,27 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_charge`
ADD COLUMN `fee_on_day` SMALLINT NULL AFTER `amount`,
ADD COLUMN `fee_interval` SMALLINT NULL AFTER `fee_on_day`,
ADD COLUMN `fee_on_month` SMALLINT NULL AFTER `fee_interval`;
ALTER TABLE `m_savings_account_charge`
ADD COLUMN `fee_interval` SMALLINT NULL DEFAULT NULL AFTER `fee_on_day`;
@@ -1,21 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_charge`
CHANGE COLUMN `charge_payment_mode_enum` `charge_payment_mode_enum` SMALLINT NULL DEFAULT NULL AFTER `charge_calculation_enum`;
@@ -1,26 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_charge`
ADD COLUMN `min_cap` DECIMAL(19,6) NULL AFTER `is_deleted`,
ADD COLUMN `max_cap` DECIMAL(19,6) NULL AFTER `min_cap`;
ALTER TABLE `m_loan_charge`
ADD COLUMN `min_cap` DECIMAL(19,6) NULL AFTER `waived`,
ADD COLUMN `max_cap` DECIMAL(19,6) NULL AFTER `min_cap`;
@@ -1,21 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_loan_charge`
ADD COLUMN `charge_amount_or_percentage` DECIMAL(19,6) NULL DEFAULT NULL AFTER `calculation_on_amount`;
@@ -1,55 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
DROP TABLE IF EXISTS `sms_messages_outbound`;
CREATE TABLE `sms_messages_outbound` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`group_id` BIGINT DEFAULT NULL,
`client_id` BIGINT DEFAULT NULL,
`staff_id` BIGINT DEFAULT NULL,
`status_enum` INT NOT NULL DEFAULT '100',
`mobile_no` varchar(50) NOT NULL,
`message` varchar(1000) NOT NULL,
PRIMARY KEY (`id`),
KEY `FKGROUP000000001` (`group_id`),
KEY `FKCLIENT00000001` (`client_id`),
CONSTRAINT `FKGROUP000000001` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`),
CONSTRAINT `FKCLIENT00000001` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`),
CONSTRAINT `FKSTAFF000000001` FOREIGN KEY (`staff_id`) REFERENCES `m_staff` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
-- Permissions for CRUD on SMS outbound message tracking
DELETE FROM `m_permission` WHERE `entity_name`='SMS';
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('organisation', 'READ_SMS', 'SMS', 'READ', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('organisation', 'CREATE_SMS', 'SMS', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('organisation', 'CREATE_SMS_CHECKER', 'SMS', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('organisation', 'UPDATE_SMS', 'SMS', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('organisation', 'UPDATE_SMS_CHECKER', 'SMS', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('organisation', 'DELETE_SMS', 'SMS', 'DELETE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
VALUES ('organisation', 'DELETE_SMS_CHECKER', 'SMS', 'DELETE', 0);
@@ -1,27 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_client`
ADD COLUMN `mobile_no` VARCHAR(50) NULL DEFAULT NULL AFTER `display_name`,
ADD UNIQUE INDEX `mobile_no_UNIQUE` (`mobile_no` ASC);
ALTER TABLE `m_staff`
ADD COLUMN `mobile_no` VARCHAR(50) NULL DEFAULT NULL AFTER `display_name`,
ADD UNIQUE INDEX `mobile_no_UNIQUE` (`mobile_no` ASC);
@@ -1,38 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
CREATE TABLE `m_loan_installment_charge` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`loan_charge_id` BIGINT NOT NULL,
`loan_schedule_id` BIGINT NOT NULL,
`due_date` DATE NULL DEFAULT NULL,
`amount` DECIMAL(19,6) NOT NULL,
`amount_paid_derived` DECIMAL(19,6) NULL DEFAULT NULL,
`amount_waived_derived` DECIMAL(19,6) NULL DEFAULT NULL,
`amount_writtenoff_derived` DECIMAL(19,6) NULL DEFAULT NULL,
`amount_outstanding_derived` DECIMAL(19,6) NOT NULL DEFAULT '0.000000',
`is_paid_derived` tinyint NOT NULL DEFAULT '0',
`waived` tinyint NOT NULL DEFAULT '0',
`amount_through_charge_payment` DECIMAL(19,6) NULL DEFAULT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `FK_loan_charge_id_charge_schedule` FOREIGN KEY (`loan_charge_id`) REFERENCES `m_loan_charge` (`id`),
CONSTRAINT `FK_loan_schedule_id_charge_schedule` FOREIGN KEY (`loan_schedule_id`) REFERENCES `m_loan_repayment_schedule` (`id`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB;
@@ -1,28 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_client` ADD `submittedon_date` DATE NULL DEFAULT NULL ,
ADD `submittedon_userid` BIGINT NULL DEFAULT NULL ,
ADD `activatedon_userid` BIGINT NULL DEFAULT NULL ,
ADD `closedon_userid` BIGINT NULL DEFAULT NULL ;
ALTER TABLE `m_group` ADD `activatedon_userid` BIGINT NULL ,
ADD `submittedon_date` DATE NULL ,
ADD `submittedon_userid` BIGINT NULL ,
ADD `closedon_userid` BIGINT NULL ;
@@ -1,45 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE m_group
ADD UNIQUE INDEX `external_id_UNIQUE` (`external_id` ASC) ;
ALTER TABLE m_product_loan
ADD COLUMN `external_id` VARCHAR(100) NULL AFTER `loan_transaction_strategy_id` ,
ADD UNIQUE INDEX `external_id_UNIQUE` (`external_id` ASC) ;
ALTER TABLE m_staff
ADD COLUMN `external_id` VARCHAR(100) NULL AFTER `display_name` ,
ADD UNIQUE INDEX `external_id_UNIQUE` (`external_id` ASC) ;
/* status_id values for client and group
0 - Invalid
100 - Pending
300 - Active
600 - Closed( or Exited)
*/
ALTER TABLE m_client
ADD COLUMN `status_id` INT NOT NULL DEFAULT 300 AFTER `is_deleted` ;
ALTER TABLE m_group
ADD COLUMN `status_id` INT NOT NULL DEFAULT 300 AFTER `is_deleted` ;
@@ -1,38 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
CREATE TABLE `m_calendar_history` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`calendar_id` BIGINT NOT NULL,
`title` VARCHAR(50) NOT NULL,
`description` VARCHAR(100) NULL DEFAULT NULL,
`location` VARCHAR(50) NULL DEFAULT NULL,
`start_date` DATE NOT NULL,
`end_date` DATE NULL DEFAULT NULL,
`duration` SMALLINT NULL DEFAULT NULL,
`calendar_type_enum` SMALLINT NOT NULL,
`repeating` tinyint NOT NULL DEFAULT '0',
`recurrence` VARCHAR(100) NULL DEFAULT NULL,
`remind_by_enum` SMALLINT NULL DEFAULT NULL,
`first_reminder` SMALLint NULL DEFAULT NULL,
`second_reminder` SMALLint NULL DEFAULT NULL,
PRIMARY KEY (`id`),
INDEX `FK_m_calendar_m_calendar_history` (`calendar_id`),
CONSTRAINT `FK_m_calendar_m_calendar_history` FOREIGN KEY (`calendar_id`) REFERENCES `m_calendar` (`id`)
);
@@ -1,35 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_holiday`
ADD COLUMN `status_enum` INT NOT NULL DEFAULT '100' AFTER `repayments_rescheduled_to`;
ALTER TABLE `m_holiday`
DROP INDEX `holiday_name`,
ADD UNIQUE INDEX `holiday_name` (`name`, `from_date`);
UPDATE `m_holiday` set `status_enum`=300;
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('organisation', 'CREATE_HOLIDAY_CHECKER', 'HOLIDAY', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('organisation', 'ACTIVATE_HOLIDAY', 'HOLIDAY', 'ACTIVATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('organisation', 'ACTIVATE_HOLIDAY_CHECKER', 'HOLIDAY', 'ACTIVATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('organisation', 'UPDATE_HOLIDAY', 'HOLIDAY', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('organisation', 'UPDATE_HOLIDAY_CHECKER', 'HOLIDAY', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('organisation', 'DELETE_HOLIDAY', 'HOLIDAY', 'DELETE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('organisation', 'DELETE_HOLIDAY_CHECKER', 'HOLIDAY', 'DELETE', 0);
@@ -1,38 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
CREATE TABLE `m_product_loan_variations_borrower_cycle` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`loan_product_id` BIGINT NOT NULL DEFAULT '0',
`borrower_cycle_number` INT NOT NULL DEFAULT '0',
`value_condition` INT NOT NULL DEFAULT '0',
`param_type` INT NOT NULL DEFAULT '0',
`default_value` DECIMAL(19,6) NOT NULL DEFAULT '0.000000',
`max_value` DECIMAL(19,6) NULL DEFAULT NULL,
`min_value` DECIMAL(19,6) NULL DEFAULT NULL,
PRIMARY KEY (`id`),
INDEX `borrower_cycle_loan_product_FK` (`loan_product_id`),
CONSTRAINT `borrower_cycle_loan_product_FK` FOREIGN KEY (`loan_product_id`) REFERENCES `m_product_loan` (`id`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB;
ALTER TABLE `m_product_loan`
ADD COLUMN `use_borrower_cycle` tinyint NOT NULL DEFAULT '0' AFTER `include_in_borrower_cycle`;
@@ -1,28 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `acc_gl_journal_entry`
ADD COLUMN `loan_transaction_id` BIGINT NULL AFTER `transaction_id`,
ADD COLUMN `savings_transaction_id` BIGINT NULL AFTER `loan_transaction_id`,
ADD CONSTRAINT `FK_acc_gl_journal_entry_m_loan_transaction` FOREIGN KEY (`loan_transaction_id`) REFERENCES `m_loan_transaction` (`id`),
ADD CONSTRAINT `FK_acc_gl_journal_entry_m_savings_account_transaction` FOREIGN KEY (`savings_transaction_id`) REFERENCES `m_savings_account_transaction` (`id`);
UPDATE acc_gl_journal_entry je SET je.savings_transaction_id=je.transaction_id,je.transaction_id=Concat('S',je.transaction_id) WHERE je.entity_type_enum=2;
UPDATE acc_gl_journal_entry je SET je.loan_transaction_id=je.transaction_id,je.transaction_id=Concat('L',je.transaction_id) WHERE je.entity_type_enum=1;
@@ -1,24 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
UPDATE m_client mc SET mc.submittedon_date=mc.activation_date where mc.submittedon_date is NULL;
UPDATE m_client mc SET mc.submittedon_date=now() where mc.submittedon_date is NULL;
UPDATE m_group mg SET mg.submittedon_date=mg.activation_date where mg.submittedon_date is NULL;
UPDATE m_group mg SET mg.submittedon_date=now() where mg.submittedon_date is NULL;
@@ -1,20 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
update m_permission set `grouping`="organisation" where `grouping` = "organistion";
@@ -1,31 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `c_configuration`
ADD COLUMN `value` INT NULL AFTER `name`;
INSERT INTO `c_configuration` (
`id` ,
`name` ,
`value` ,
`enabled`
)
VALUES (
NULL , 'penalty-wait-period', '2', '1'
);
@@ -1,20 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('transaction_loan', 'UNDOWRITEOFF_LOAN', 'LOAN', 'UNDOWRITEOFF', 0);
@@ -1,20 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
UPDATE stretchy_parameter SET `parameter_sql`='select p.id, p.`name`\r\nfrom m_product_loan p\r\nwhere (p.currency_code = \'$\{currencyId}\' or \'-1\'= \'$\{currencyId}\')\r\norder by 2' WHERE parameter_name='loanProductIdSelectAll';
@@ -1,20 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_staff` ADD COLUMN `is_active` tinyint DEFAULT '0' AFTER `organisational_role_parent_staff_id`;
@@ -1,37 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_product_loan`
ADD COLUMN `short_name` VARCHAR(4) NULL DEFAULT NULL AFTER `id`;
update m_product_loan set short_name=concat(LEFT(name,2), RIGHT(id,2)) where short_name is null;
ALTER TABLE `m_product_loan`
ALTER `short_name` DROP DEFAULT;
ALTER TABLE `m_product_loan`
CHANGE COLUMN `short_name` `short_name` VARCHAR(4) NOT NULL AFTER `id`;
ALTER TABLE `m_product_loan`
ADD UNIQUE INDEX `unq_short_name` (`short_name`);
ALTER TABLE `m_savings_product`
ADD COLUMN `short_name` VARCHAR(4) NULL DEFAULT NULL AFTER `name`;
update m_savings_product set short_name=concat(LEFT(name,2), RIGHT(id,2)) where short_name is null;
ALTER TABLE `m_savings_product`
ALTER `short_name` DROP DEFAULT;
ALTER TABLE `m_savings_product`
CHANGE COLUMN `short_name` `short_name` VARCHAR(4) NOT NULL AFTER `name`,
ADD UNIQUE INDEX `sp_unq_short_name` (`short_name`);
@@ -1,22 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_staff`
CHANGE COLUMN `is_active` `is_active` tinyint NOT NULL DEFAULT '1' AFTER `organisational_role_parent_staff_id`;
UPDATE `m_staff` SET `is_active`=1;
@@ -1,38 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
/*
default client and group status is active 300. If you want to be able to have pending as the initial client stat
*/
INSERT INTO c_configuration (`name`, `enabled`) VALUES ('allow-pending-client-status', '0');
INSERT INTO c_configuration (`name`, `enabled`) VALUES ('allow-pending-group-status', '0');
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`)
VALUES ('status_id', '0', 'Invalid', 'Invalid');
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`)
VALUES ('status_id', '100', 'Pending', 'Pending');
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`)
VALUES ('status_id', '300', 'Active', 'Active');
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`)
VALUES ('status_id', '600', 'Closed', 'Closed');
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`)
VALUES ('loan_status_id', '0', 'Invalid', 'Invalid');
@@ -1,22 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `acc_gl_journal_entry`
ADD COLUMN `payment_details_id` BIGINT NULL AFTER `organization_running_balance`,
ADD CONSTRAINT `FK_acc_gl_journal_entry_m_payment_detail` FOREIGN KEY (`payment_details_id`) REFERENCES `m_payment_detail` (`id`);
@@ -1,21 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_loan_charge`
ADD COLUMN `is_active` tinyint NOT NULL DEFAULT '1' AFTER `max_cap`;
@@ -1,22 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `ref_loan_transaction_processing_strategy` ( `code`, `name`)
VALUES
( 'early-repayment-strategy', 'Early Repayment Strategy');
@@ -1,20 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
insert into `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'READ_SAVINGSACCOUNTCHARGE', 'SAVINGSACCOUNTCHARGE', 'READ', 0);
@@ -1,20 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
insert into `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('accounting', 'CREATE_JOURNALENTRY_CHECKER', 'JOURNALENTRY', 'CREATE', 0);
@@ -1,23 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
RENAME TABLE `x_table_cloumn_code_mappings` TO `x_table_column_code_mappings`;
ALTER TABLE `acc_gl_journal_entry`
CHANGE COLUMN `is_running_balance_caculated` `is_running_balance_calculated` TINYINT NOT NULL DEFAULT '0' AFTER `lastmodified_date`;
@@ -1,36 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `c_configuration` (`id`, `name`, `value`, `enabled`) VALUES (NULL, 'force-password-reset-days', '0', '0');
ALTER TABLE `m_appuser` ADD `last_time_password_updated` DATE NOT NULL DEFAULT '1970-01-01',
ADD INDEX ( `last_time_password_updated` ) ;
UPDATE `m_appuser` SET `last_time_password_updated` = NOW() WHERE `m_appuser`.`last_time_password_updated` ='1970-01-01';
CREATE TABLE IF NOT EXISTS `m_appuser_previous_password` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`user_id` BIGINT NOT NULL,
`password` varchar(255) NOT NULL,
`removal_date` date NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
ALTER TABLE m_appuser_previous_password
ADD FOREIGN KEY (user_id) REFERENCES m_appuser(id);
@@ -1,57 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_product_loan`
ADD COLUMN `multi_disburse_loan` tinyint NOT NULL DEFAULT '0' AFTER `close_date`,
ADD COLUMN `max_tranche_count` INT NULL DEFAULT NULL AFTER `multi_disburse_loan`,
ADD COLUMN `outstanding_loan_balance` DECIMAL(19,6) NULL DEFAULT NULL AFTER `max_tranche_count`;
CREATE TABLE `m_loan_disbursement_detail` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`loan_id` BIGINT NOT NULL,
`expected_disburse_date` DATETIME NOT NULL,
`disbursedon_date` DATETIME NULL,
`principal` DECIMAL(19,6) NOT NULL,
`approved_principal` DECIMAL(19,6) NOT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `FK_loan_disbursement_detail_loan_id` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB;
ALTER TABLE `m_loan`
ADD COLUMN `fixed_emi_amount` DECIMAL(19,6) NULL AFTER `loan_product_counter`,
ADD COLUMN `approved_principal` DECIMAL(19,6) NOT NULL AFTER `principal_amount`,
ADD COLUMN `max_outstanding_loan_balance` DECIMAL(19,6) NULL DEFAULT NULL AFTER `fixed_emi_amount`;
UPDATE m_loan ml SET ml.approved_principal = ml.principal_amount;
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'UPDATE_DISBURSEMENTDETAIL', 'DISBURSEMENTDETAIL', 'UPDATE', 0);
CREATE TABLE `m_loan_term_variations` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`loan_id` BIGINT NOT NULL,
`term_type` SMALLINT NOT NULL,
`applicable_from` DATE NOT NULL,
`term_value` DECIMAL(19,6) NOT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `FK_loan_id_m_loan_id` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB;
@@ -1,23 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_product_loan`
CHANGE COLUMN `multi_disburse_loan` `allow_multiple_disbursals` tinyint NOT NULL DEFAULT '0' AFTER `close_date`,
CHANGE COLUMN `max_tranche_count` `max_disbursals` INT NULL DEFAULT NULL AFTER `allow_multiple_disbursals`,
CHANGE COLUMN `outstanding_loan_balance` `max_outstanding_loan_balance` DECIMAL(19,6) NULL DEFAULT NULL AFTER `max_disbursals`;
@@ -1,33 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_savings_product`
ADD COLUMN `allow_overdraft` tinyint NOT NULL DEFAULT '0' AFTER `withdrawal_fee_for_transfer`,
ADD COLUMN `overdraft_limit` DECIMAL(19,6) NULL DEFAULT NULL AFTER `allow_overdraft`;
ALTER TABLE `m_savings_account`
ADD COLUMN `allow_overdraft` tinyint NOT NULL DEFAULT '0' AFTER `withdrawal_fee_for_transfer`,
ADD COLUMN `overdraft_limit` DECIMAL(19,6) NULL DEFAULT NULL AFTER `allow_overdraft`;
ALTER TABLE `m_savings_account_transaction`
ADD COLUMN `overdraft_amount_derived` DECIMAL(19,6) NULL DEFAULT NULL AFTER `amount`;
ALTER TABLE `m_client`
ADD COLUMN `default_savings_product` BIGINT NULL DEFAULT NULL AFTER `closedon_userid`,
ADD CONSTRAINT `FK_m_client_m_savings_product` FOREIGN KEY (`default_savings_product`) REFERENCES `m_savings_product` (`id`);
@@ -1,23 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_savings_account_transaction`
ADD COLUMN `created_date` DATETIME NOT NULL AFTER `cumulative_balance_derived`;
update m_savings_account_transaction sat set sat.created_date=sat.transaction_date;
@@ -1,27 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE m_group CHANGE COLUMN `status_id` `status_enum` INT NOT NULL DEFAULT '300' ;
ALTER TABLE m_client CHANGE COLUMN `status_id` `status_enum` INT NOT NULL DEFAULT '300' ;
update r_enum_value
set enum_name = 'status_enum'
where enum_name = 'status_id';
@@ -1,49 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES ('Savings Transactions', 'Pentaho', NULL, 'Savings', NULL, NULL, 0, 1);
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES ('Client Savings Summary', 'Pentaho', NULL, 'Savings', NULL, NULL, 0, 1);
INSERT INTO `stretchy_parameter` (`parameter_name`, `parameter_variable`, `parameter_label`, `parameter_displayType`, `parameter_FormatType`, `parameter_default`, `special`, `selectOne`, `selectAll`, `parameter_sql`, `parent_id`) VALUES ( 'selectAccount', 'accountNo', 'Enter Account No', 'text', 'string', 'n/a', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `stretchy_parameter` (`parameter_name`, `parameter_variable`, `parameter_label`, `parameter_displayType`, `parameter_FormatType`, `parameter_default`, `special`, `selectOne`, `selectAll`, `parameter_sql`, `parent_id`) VALUES ('savingsProductIdSelectAll', 'savingsProductId', 'Product', 'select', 'number', '0', NULL, NULL, 'Y', 'select p.id, p.`name`\r\nfrom m_savings_product p\r\norder by 2', NULL);
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select id from stretchy_report where report_name = 'Savings Transactions'), (select id from stretchy_parameter where parameter_name='startDateSelect'), 'fromDate');
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select id from stretchy_report where report_name = 'Savings Transactions'), (select id from stretchy_parameter where parameter_name='endDateSelect'), 'toDate');
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select id from stretchy_report where report_name = 'Savings Transactions'), (select id from stretchy_parameter where parameter_name='selectAccount'), 'accountNo');
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select id from stretchy_report where report_name = 'Client Savings Summary'), (select id from stretchy_parameter where parameter_name='startDateSelect'), 'fromDate');
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select id from stretchy_report where report_name = 'Client Savings Summary'), (select id from stretchy_parameter where parameter_name='endDateSelect'), 'toDate');
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select id from stretchy_report where report_name = 'Client Savings Summary'), (select id from stretchy_parameter where parameter_name='OfficeIdSelectOne'), 'selectOffice');
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select id from stretchy_report where report_name = 'Client Savings Summary'), (select id from stretchy_parameter where parameter_name='savingsProductIdSelectAll'), 'selectProduct');
ALTER TABLE `r_enum_value`
ADD COLUMN `enum_type` tinyint NOT NULL AFTER `enum_value`;
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`, `enum_type`) VALUES ('savings_transaction_type_enum', 1, 'deposit', 'deposit', 0);
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`, `enum_type`) VALUES ('savings_transaction_type_enum', 2, 'withdrawal', 'withdrawal', 1);
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`, `enum_type`) VALUES ('savings_transaction_type_enum', 3, 'Interest Posting', 'Interest Posting', 0);
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`, `enum_type`) VALUES ('savings_transaction_type_enum', 4, 'Withdrawal Fee', 'Withdrawal Fee', 1);
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`, `enum_type`) VALUES ('savings_transaction_type_enum', 5, 'Annual Fee', 'Annual Fee', 1);
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`, `enum_type`) VALUES ('savings_transaction_type_enum', 6, 'Waive Charge', 'Waive Charge', 0);
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`, `enum_type`) VALUES ('savings_transaction_type_enum', 7, 'Pay Charge', 'Pay Charge', 1);
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`, `enum_type`) VALUES ('savings_transaction_type_enum', 12, 'Initiate Transfer', 'Initiate Transfer', 0);
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`, `enum_type`) VALUES ('savings_transaction_type_enum', 13, 'Approve Transfer', 'Approve Transfer', 0);
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`, `enum_type`) VALUES ('savings_transaction_type_enum', 14, 'Withdraw Transfer', 'Withdraw Transfer', 0);
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`, `enum_type`) VALUES ('savings_transaction_type_enum', 15, 'Reject Transfer', 'Reject Transfer', 0);
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`, `enum_type`) VALUES ('savings_transaction_type_enum', 16, 'Written-Off', 'Written-Off', 0);
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`, `enum_type`) VALUES ('savings_transaction_type_enum', 17, 'Overdraft Interest', 'Overdraft Interest', 0);
@@ -1,24 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_client`
ADD COLUMN `default_savings_account` BIGINT NULL DEFAULT NULL AFTER `default_savings_product`,
ADD CONSTRAINT `FK_m_client_m_savings_account` FOREIGN KEY (`default_savings_account`) REFERENCES `m_savings_account` (`id`);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'UPDATESAVINGSACCOUNT_CLIENT', 'CLIENT', 'UPDATESAVINGSACCOUNT', 0);
@@ -1,24 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_product_loan`
ADD COLUMN `grace_on_arrears_ageing` SMALLINT NULL DEFAULT NULL AFTER `max_outstanding_loan_balance`;
ALTER TABLE `m_loan`
ADD COLUMN `grace_on_arrears_ageing` SMALLINT NULL DEFAULT NULL AFTER `max_outstanding_loan_balance`;
@@ -1,28 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('accounting', 'READ_ACCOUNTINGRULE', 'ACCOUNTINGRULE', 'READ', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('accounting', 'READ_JOURNALENTRY', 'JOURNALENTRY', 'READ', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('accounting', 'READ_GLACCOUNT', 'GLACCOUNT', 'READ', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('accounting', 'READ_GLCLOSURE', 'GLCLOSURE', 'READ', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('organisation', 'READ_HOLIDAY', 'HOLIDAY', 'READ', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('jobs', 'READ_SCHEDULER', 'SCHEDULER', 'READ', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'READ_PRODUCTMIX', 'PRODUCTMIX', 'READ', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'READ_MEETING', 'MEETING', 'READ', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('jobs', 'EXECUTEJOB_SCHEDULER', 'SCHEDULER', 'EXECUTEJOB', 0);
@@ -1,20 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
UPDATE `stretchy_report` SET `report_sql`='\r\nSELECT \r\nconcat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nmc.account_no as "Client Account No.",\r\n mc.display_name AS "Client Name",\r\n ml.account_no AS "Account Number",\r\n ml.principal_amount AS "Loan Amount",\r\n ml.principal_disbursed_derived AS "Original Principal",\r\n ml.interest_charged_derived AS "Original Interest",\r\n ml.principal_repaid_derived AS "Principal Paid",\r\n ml.interest_repaid_derived AS "Interest Paid",\r\n laa.principal_overdue_derived AS "Principal Overdue",\r\n laa.interest_overdue_derived AS "Interest Overdue",\r\nDATEDIFF(CURDATE(), laa.overdue_since_date_derived) as "Days in Arrears",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<7, \'<1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<8, \' 1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<22, \' 3\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<29, \' 4\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<36, \' 5\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<43, \' 6\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<50, \' 7\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<57, \' 8\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<64, \' 9\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<85, \'12\', \'12+\')))))))))))) )AS "Weeks In Arrears Band",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<361, \'180 - 360\', \r\n \'> 360\'))))) AS "Days in Arrears Band"\r\n\r\n FROM m_office mo \r\n JOIN m_office ounder ON ounder.hierarchy like concat(mo.hierarchy, \'%\')\r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n INNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = \'loan_status_id\'\r\n INNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\n left join m_currency cur on cur.code = ml.currency_code\r\n WHERE ml.loan_status_id=300\r\n AND mo.id=${officeId}\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no\r\n' WHERE `report_name`='Aging Detail';
@@ -1,735 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report)VALUES ("Active Loans - Details(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Active Loans - Summary(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Active Loans by Disbursal Period(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Active Loans in last installment Summary(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report)VALUES ("Active Loans in last installment(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Active Loans Passed Final Maturity Summary(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Active Loans Passed Final Maturity(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Aging Detail(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Aging Summary (Arrears in Months)(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Aging Summary (Arrears in Weeks)(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Client Listing(Pentaho)", 'Pentaho', 'Client', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Client Loans Listing(Pentaho)", 'Pentaho', 'Client', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Expected Payments By Date - Basic(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Funds Disbursed Between Dates Summary by Office(Pentaho)", 'Pentaho', 'Fund', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Funds Disbursed Between Dates Summary(Pentaho)", 'Pentaho', 'Fund', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Loans Awaiting Disbursal Summary by Month(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Loans Awaiting Disbursal Summary(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Loans Awaiting Disbursal(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Loans Pending Approval(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Obligation Met Loans Details(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Obligation Met Loans Summary(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Portfolio at Risk by Branch(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Portfolio at Risk(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Rescheduled Loans(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("TxnRunningBalances(Pentaho)", 'Pentaho', 'Transaction', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report (report_name, report_type, report_category, report_sql, description, core_report, use_report) VALUES ("Written-Off Loans(Pentaho)", 'Pentaho', 'Loan', '(NULL)', '(NULL)', 1, 1);
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name) VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans - Details(Pentaho)'),(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),'branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name) VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans - Details(Pentaho)'),(select sp.id from stretchy_parameter sp where sp.parameter_name='loanOfficerIdSelectAll'),
'loanOfficer');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name) VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans - Details(Pentaho)'),(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'currencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name) VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans - Details(Pentaho)'),(select sp.id from stretchy_parameter sp where sp.parameter_name='fundIdSelectAll'),'fundId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name) VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans - Details(Pentaho)'),(select sp.id from stretchy_parameter sp where sp.parameter_name='loanProductIdSelectAll'),
'loanProductId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name) VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans - Details(Pentaho)'),(select sp.id from stretchy_parameter sp where sp.parameter_name='loanPurposeIdSelectAll'),'loanPurposeId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans - Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans - Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanOfficerIdSelectAll'),
'loanOfficer');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans - Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans - Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='fundIdSelectAll'),
'fundId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans - Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanProductIdSelectAll'),
'loanProductId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans - Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanPurposeIdSelectAll'),
'loanPurposeId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans - Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='parTypeSelect'),
'parType');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans by Disbursal Period(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans by Disbursal Period(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanOfficerIdSelectAll'),
'loanOfficer');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans by Disbursal Period(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans by Disbursal Period(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='fundIdSelectAll'),
'fundId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans by Disbursal Period(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanProductIdSelectAll'),
'loanProductId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans by Disbursal Period(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanPurposeIdSelectAll'),
'loanPurposeId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans by Disbursal Period(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='startDateSelect'),
'startDate');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans by Disbursal Period(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='endDateSelect'),
'endDate');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans in last installment Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans in last installment Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanOfficerIdSelectAll'),
'Loan Officer');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans in last installment Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans in last installment Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='fundIdSelectAll'),
'fundId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans in last installment Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanProductIdSelectAll'),
'loanProductId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans in last installment Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanPurposeIdSelectAll'),
'loanPurposeId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans in last installment Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='parTypeSelect'),
'parType');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans in last installment(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans in last installment(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanOfficerIdSelectAll'),
'Loan Officer');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans in last installment(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans in last installment(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='fundIdSelectAll'),
'fundId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans in last installment(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanProductIdSelectAll'),
'loanProductId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans in last installment(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanPurposeIdSelectAll'),
'loanPurposeId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans Passed Final Maturity Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans Passed Final Maturity Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanOfficerIdSelectAll'),
'Loan Officer');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans Passed Final Maturity Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans Passed Final Maturity Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='fundIdSelectAll'),
'fundId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans Passed Final Maturity Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanProductIdSelectAll'),
'loanProductId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans Passed Final Maturity Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanPurposeIdSelectAll'),
'loanPurposeId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans Passed Final Maturity Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='parTypeSelect'),
'parType');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans Passed Final Maturity(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans Passed Final Maturity(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanOfficerIdSelectAll'),
'Loan Officer');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans Passed Final Maturity(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans Passed Final Maturity(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='fundIdSelectAll'),
'fundId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans Passed Final Maturity(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanProductIdSelectAll'),
'loanProductId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Active Loans Passed Final Maturity(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanPurposeIdSelectAll'),
'loanPurposeId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Aging Detail(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Aging Summary (Arrears in Months)(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Aging Summary (Arrears in Months)(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Aging Summary (Arrears in Weeks)(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Aging Summary (Arrears in Weeks)(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Client Listing(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'selectOffice');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Client Loans Listing(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Client Loans Listing(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanOfficerIdSelectAll'),
'Loan Officer');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Client Loans Listing(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Client Loans Listing(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='fundIdSelectAll'),
'fundId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Client Loans Listing(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanProductIdSelectAll'),
'loanProductId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Client Loans Listing(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanPurposeIdSelectAll'),
'loanPurposeId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Expected Payments By Date - Basic(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Expected Payments By Date - Basic(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanOfficerIdSelectAll'),
'Loan Officer');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Expected Payments By Date - Basic(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='startDateSelect'),
'startDate');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Expected Payments By Date - Basic(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='endDateSelect'),
'endDate');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Funds Disbursed Between Dates Summary by Office(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Funds Disbursed Between Dates Summary by Office(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Funds Disbursed Between Dates Summary by Office(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='fundIdSelectAll'),
'fundId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Funds Disbursed Between Dates Summary by Office(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='startDateSelect'),
'startDate');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Funds Disbursed Between Dates Summary by Office(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='endDateSelect'),
'endDate');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Funds Disbursed Between Dates Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Funds Disbursed Between Dates Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='fundIdSelectAll'),
'fundId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Funds Disbursed Between Dates Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='startDateSelect'),
'startDate');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Funds Disbursed Between Dates Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='endDateSelect'),
'endDate');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Awaiting Disbursal Summary by Month(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Awaiting Disbursal Summary by Month(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanOfficerIdSelectAll'),
'Loan Officer');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Awaiting Disbursal Summary by Month(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Awaiting Disbursal Summary by Month(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='fundIdSelectAll'),
'fundId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Awaiting Disbursal Summary by Month(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanProductIdSelectAll'),
'loanProductId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Awaiting Disbursal Summary by Month(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanPurposeIdSelectAll'),
'loanPurposeId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Awaiting Disbursal Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Awaiting Disbursal Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanOfficerIdSelectAll'),
'Loan Officer');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Awaiting Disbursal Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Awaiting Disbursal Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='fundIdSelectAll'),
'fundId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Awaiting Disbursal Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanProductIdSelectAll'),
'loanProductId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Awaiting Disbursal Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanPurposeIdSelectAll'),
'loanPurposeId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Awaiting Disbursal(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Awaiting Disbursal(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanOfficerIdSelectAll'),
'Loan Officer');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Awaiting Disbursal(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Awaiting Disbursal(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='fundIdSelectAll'),
'fundId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Awaiting Disbursal(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanProductIdSelectAll'),
'loanProductId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Awaiting Disbursal(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanPurposeIdSelectAll'),
'loanPurposeId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Pending Approval(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Pending Approval(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanOfficerIdSelectAll'),
'Loan Officer');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Pending Approval(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Pending Approval(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='fundIdSelectAll'),
'fundId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Pending Approval(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanProductIdSelectAll'),
'loanProductId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Loans Pending Approval(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanPurposeIdSelectAll'),
'loanPurposeId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Obligation Met Loans Details(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Obligation Met Loans Details(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanOfficerIdSelectAll'),
'Loan Officer');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Obligation Met Loans Details(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Obligation Met Loans Details(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='fundIdSelectAll'),
'fundId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Obligation Met Loans Details(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanProductIdSelectAll'),
'loanProductId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Obligation Met Loans Details(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanPurposeIdSelectAll'),
'loanPurposeId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Obligation Met Loans Details(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='startDateSelect'),
'startDate');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Obligation Met Loans Details(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='endDateSelect'),
'endDate');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Obligation Met Loans Details(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='obligDateTypeSelect'),
'obligDateType');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Obligation Met Loans Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Obligation Met Loans Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanOfficerIdSelectAll'),
'Loan Officer');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Obligation Met Loans Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Obligation Met Loans Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='fundIdSelectAll'),
'fundId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Obligation Met Loans Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanProductIdSelectAll'),
'loanProductId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Obligation Met Loans Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanPurposeIdSelectAll'),
'loanPurposeId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Obligation Met Loans Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='startDateSelect'),
'Startdate');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Obligation Met Loans Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='endDateSelect'),
'Enddate');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Obligation Met Loans Summary(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='obligDateTypeSelect'),
'obligDateType');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Portfolio at Risk by Branch(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Portfolio at Risk by Branch(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanOfficerIdSelectAll'),
'Loan Officer');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Portfolio at Risk by Branch(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Portfolio at Risk by Branch(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='fundIdSelectAll'),
'fundId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Portfolio at Risk by Branch(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanProductIdSelectAll'),
'loanProductId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Portfolio at Risk by Branch(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanPurposeIdSelectAll'),
'loanPurposeId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Portfolio at Risk by Branch(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='parTypeSelect'),
'parType');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Portfolio at Risk(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Portfolio at Risk(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanOfficerIdSelectAll'),
'loanOfficer');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Portfolio at Risk(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Portfolio at Risk(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='fundIdSelectAll'),
'fundId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Portfolio at Risk(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanProductIdSelectAll'),
'loanProductId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Portfolio at Risk(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanPurposeIdSelectAll'),
'loanPurposeId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Portfolio at Risk(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='parTypeSelect'),
'parType');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Rescheduled Loans(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Rescheduled Loans(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Rescheduled Loans(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanProductIdSelectAll'),
'loanProductId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Rescheduled Loans(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='startDateSelect'),
'startDate');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Rescheduled Loans(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='endDateSelect'),
'endDate');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='TxnRunningBalances(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='TxnRunningBalances(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanOfficerIdSelectAll'),
'Loan Officer');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='TxnRunningBalances(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='startDateSelect'),
'startDate');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='TxnRunningBalances(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='endDateSelect'),
'endDate');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Written-Off Loans(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='OfficeIdSelectOne'),
'Branch');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Written-Off Loans(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='currencyIdSelectAll'),
'CurrencyId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Written-Off Loans(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='loanProductIdSelectAll'),
'loanProductId');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Written-Off Loans(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='startDateSelect'),
'startDate');
INSERT INTO stretchy_report_parameter (report_id, parameter_id, report_parameter_name)
VALUES ((select sr.id From stretchy_report sr where sr.report_name='Written-Off Loans(Pentaho)'),
(select sp.id from stretchy_parameter sp where sp.parameter_name='endDateSelect'),
'endDate');
@@ -1,28 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES ('Client Saving Transactions', 'Pentaho', NULL, 'Savings', NULL, NULL, 0, 0);
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select id from stretchy_report where report_name = 'Client Saving Transactions'), (select id from stretchy_parameter where parameter_name='startDateSelect'), 'startDate');
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select id from stretchy_report where report_name = 'Client Saving Transactions'), (select id from stretchy_parameter where parameter_name='endDateSelect'), 'endDate');
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select id from stretchy_report where report_name = 'Client Saving Transactions'), (select id from stretchy_parameter where parameter_name='selectAccount'), 'accountNo');
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES ('Client Loan Account Schedule', 'Pentaho', NULL, 'Loans', NULL, NULL, 0, 0);
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select id from stretchy_report where report_name = 'Client Loan Account Schedule'), (select id from stretchy_parameter where parameter_name='startDateSelect'), 'startDate');
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select id from stretchy_report where report_name = 'Client Loan Account Schedule'), (select id from stretchy_parameter where parameter_name='endDateSelect'), 'endDate');
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select id from stretchy_report where report_name = 'Client Loan Account Schedule'), (select id from stretchy_parameter where parameter_name='selectAccount'), 'accountNo');
@@ -1,37 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_charge`
ADD COLUMN `fee_frequency` SMALLINT NULL DEFAULT NULL AFTER `max_cap`;
CREATE TABLE `m_loan_overdue_installment_charge` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`loan_charge_id` BIGINT NOT NULL,
`loan_schedule_id` BIGINT NOT NULL,
`frequency_number` INT NOT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `FK_m_loan_overdue_installment_charge_m_loan_charge` FOREIGN KEY (`loan_charge_id`) REFERENCES `m_loan_charge` (`id`),
CONSTRAINT `FK_m_loan_overdue_installment_charge_m_loan_repayment_schedule` FOREIGN KEY (`loan_schedule_id`) REFERENCES `m_loan_repayment_schedule` (`id`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB;
INSERT INTO `c_configuration` (`name`, `value`, `enabled`) VALUES ('grace-on-penalty-posting', 0, 1);
INSERT INTO m_loan_overdue_installment_charge (`loan_charge_id`, `loan_schedule_id`, `frequency_number`) SELECT mlc.id ,ls.id ,1 from m_loan_charge as mlc inner join m_charge mc on mc.id = mlc.charge_id inner join m_loan_repayment_schedule ls on ls.loan_id = mlc.loan_id and ls.duedate = mlc.due_for_collection_as_of_date where mc.charge_time_enum = 9 and mlc.is_active = 1;
@@ -1,36 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES ('GroupNamesByStaff', 'Table', '', '', 'Select gr.id as id, gr.display_name as name from m_group gr where gr.level_id=1 and gr.staff_id = ${staffId}', '', 0, 1);
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES ('ClientTrendsByDay', 'Table', '', 'Client', 'SELECT COUNT(cl.id) AS count, \n cl.activation_date AS days\nFROM m_office of \n LEFT JOIN m_client cl on of.id = cl.office_id\nWHERE of.hierarchy like concat((select ino.hierarchy from m_office ino where ino.id = ${officeId}),"%" ) \n AND (cl.activation_date BETWEEN DATE_SUB(CURDATE(), INTERVAL 12 DAY) AND DATE(NOW()- INTERVAL 1 DAY))\nGROUP BY days', 'Retrieves the number of clients joined in last 12 days', 0, 1);
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES ('ClientTrendsByWeek', 'Table', '', 'Client', 'SELECT COUNT(cl.id) AS count, \n WEEK(cl.activation_date) AS Weeks\nFROM m_office of \n LEFT JOIN m_client cl on of.id = cl.office_id\nWHERE of.hierarchy like concat((select ino.hierarchy from m_office ino where ino.id = ${officeId}),"%" ) \n AND (cl.activation_date BETWEEN DATE_SUB(CURDATE(), INTERVAL 12 WEEK) AND DATE(NOW()))\nGROUP BY Weeks', '', 0, 1);
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES ('ClientTrendsByMonth', 'Table', '', 'Client', 'SELECT COUNT(cl.id) AS count, \n MONTHNAME(cl.activation_date) AS Months\nFROM m_office of \n LEFT JOIN m_client cl on of.id = cl.office_id\nWHERE of.hierarchy like concat((select ino.hierarchy from m_office ino where ino.id = ${officeId}),"%" ) \n AND (cl.activation_date BETWEEN DATE_SUB(CURDATE(), INTERVAL 12 MONTH) AND DATE(NOW()))\nGROUP BY Months', '', 0, 1);
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES ('LoanTrendsByDay', 'Table', '', 'Loan', 'SELECT COUNT(ln.id) AS lcount, \n ln.disbursedon_date AS days\nFROM m_office of \n LEFT JOIN m_client cl on of.id = cl.office_id\n LEFT JOIN m_loan ln on cl.id = ln.client_id\nWHERE of.hierarchy like concat((select ino.hierarchy from m_office ino where ino.id = ${officeId}),"%" ) \n AND (ln.disbursedon_date BETWEEN DATE_SUB(CURDATE(), INTERVAL 12 DAY) AND DATE(NOW()- INTERVAL 1 DAY))\nGROUP BY days', 'Retrieves Number of loans disbursed for last 12 days', 0, 1);
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES ('LoanTrendsByWeek', 'Table', '', 'Loan', 'SELECT COUNT(ln.id) AS lcount, \n WEEK(ln.disbursedon_date) AS Weeks\nFROM m_office of \n LEFT JOIN m_client cl on of.id = cl.office_id\n LEFT JOIN m_loan ln on cl.id = ln.client_id\nWHERE of.hierarchy like concat((select ino.hierarchy from m_office ino where ino.id = ${officeId}),"%" ) \n AND (ln.disbursedon_date BETWEEN DATE_SUB(CURDATE(), INTERVAL 12 WEEK) AND DATE(NOW()))\nGROUP BY Weeks', '', 0, 1);
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES ('LoanTrendsByMonth', 'Table', '', 'Loan', 'SELECT COUNT(ln.id) AS lcount, \n MONTHNAME(ln.disbursedon_date) AS Months\nFROM m_office of \n LEFT JOIN m_client cl on of.id = cl.office_id\n LEFT JOIN m_loan ln on cl.id = ln.client_id\nWHERE of.hierarchy like concat((select ino.hierarchy from m_office ino where ino.id = ${officeId}),"%" ) \n AND (ln.disbursedon_date BETWEEN DATE_SUB(CURDATE(), INTERVAL 12 MONTH) AND DATE(NOW()))\nGROUP BY Months', '', 0, 1);
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES ('Demand_Vs_Collection', 'Table', '', 'Loan', 'select amount.AmountDue-amount.AmountPaid as AmountDue, amount.AmountPaid as AmountPaid from\n(SELECT \n(IFNULL(SUM(ls.principal_amount),0) - IFNULL(SUM(ls.principal_writtenoff_derived),0)\n + IFNULL(SUM(ls.interest_amount),0) - IFNULL(SUM(ls.interest_writtenoff_derived),0) \n - IFNULL(SUM(ls.interest_waived_derived),0)\n + IFNULL(SUM(ls.fee_charges_amount),0) - IFNULL(SUM(ls.fee_charges_writtenoff_derived),0) \n - IFNULL(SUM(ls.fee_charges_waived_derived),0)\n + IFNULL(SUM(ls.penalty_charges_amount),0) - IFNULL(SUM(ls.penalty_charges_writtenoff_derived),0) \n - IFNULL(SUM(ls.penalty_charges_waived_derived),0)\n) AS AmountDue, \n\n(IFNULL(SUM(ls.principal_completed_derived),0) - IFNULL(SUM(ls.principal_writtenoff_derived),0) + IFNULL(SUM(ls.interest_completed_derived),0) - IFNULL(SUM(ls.interest_writtenoff_derived),0) \n - IFNULL(SUM(ls.interest_waived_derived),0)\n + IFNULL(SUM(ls.fee_charges_completed_derived),0) - IFNULL(SUM(ls.fee_charges_writtenoff_derived),0) \n - IFNULL(SUM(ls.fee_charges_waived_derived),0)\n + IFNULL(SUM(ls.penalty_charges_completed_derived),0) - IFNULL(SUM(ls.penalty_charges_writtenoff_derived),0) \n - IFNULL(SUM(ls.penalty_charges_waived_derived),0)\n) AS AmountPaid\nFROM m_office of\nLEFT JOIN m_client cl ON of.id = cl.office_id\nLEFT JOIN m_loan ln ON cl.id = ln.client_id\nLEFT JOIN m_loan_repayment_schedule ls ON ln.id = ls.loan_id\nWHERE ls.duedate = DATE(NOW()) AND \n (of.hierarchy LIKE CONCAT((\nSELECT ino.hierarchy\nFROM m_office ino\nWHERE ino.id = ${officeId}),"%"))) as amount', 'Demand Vs Collection', 0, 1);
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES ('Disbursal_Vs_Awaitingdisbursal', 'Table', '', 'Loan', 'select awaitinddisbursal.amount-disbursedAmount.amount as amountToBeDisburse, disbursedAmount.amount as disbursedAmount from \n(\nSELECT COUNT(ln.id) AS noOfLoans, \n IFNULL(SUM(ln.principal_amount),0) AS amount\nFROM \nm_office of\nLEFT JOIN m_client cl ON cl.office_id = of.id\nLEFT JOIN m_loan ln ON cl.id = ln.client_id\nWHERE \nln.expected_disbursedon_date = DATE(NOW()) AND \n(ln.loan_status_id=200 OR ln.loan_status_id=300) AND\n of.hierarchy like concat((select ino.hierarchy from m_office ino where ino.id = ${officeId}),"%" )\n) awaitinddisbursal,\n(\nSELECT COUNT(ltrxn.id) as count, \n IFNULL(SUM(ltrxn.amount),0) as amount \nFROM \nm_office of\nLEFT JOIN m_client cl ON cl.office_id = of.id\nLEFT JOIN m_loan ln ON cl.id = ln.client_id\nLEFT JOIN m_loan_transaction ltrxn ON ln.id = ltrxn.loan_id\nWHERE \nltrxn.transaction_date = DATE(NOW()) AND \nltrxn.transaction_type_enum=1 AND\n of.hierarchy like concat((select ino.hierarchy from m_office ino where ino.id = ${officeId}),"%" ) \n) disbursedAmount', 'Disbursal_Vs_Awaitingdisbursal', 0, 1);
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select sr.id from stretchy_report sr where sr.report_name = 'ClientTrendsByDay'), (select sp.id from stretchy_parameter sp where sp.parameter_name = 'OfficeIdSelectOne'), '');
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select sr.id from stretchy_report sr where sr.report_name = 'ClientTrendsByWeek'), (select sp.id from stretchy_parameter sp where sp.parameter_name = 'OfficeIdSelectOne'), '');
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select sr.id from stretchy_report sr where sr.report_name = 'ClientTrendsByMonth'), (select sp.id from stretchy_parameter sp where sp.parameter_name = 'OfficeIdSelectOne'), '');
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select sr.id from stretchy_report sr where sr.report_name = 'LoanTrendsByDay'), (select sp.id from stretchy_parameter sp where sp.parameter_name = 'OfficeIdSelectOne'), '');
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select sr.id from stretchy_report sr where sr.report_name = 'LoanTrendsByWeek'), (select sp.id from stretchy_parameter sp where sp.parameter_name = 'OfficeIdSelectOne'), '');
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select sr.id from stretchy_report sr where sr.report_name = 'LoanTrendsByMonth'), (select sp.id from stretchy_parameter sp where sp.parameter_name = 'OfficeIdSelectOne'), '');
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select sr.id from stretchy_report sr where sr.report_name = 'Demand_Vs_Collection'), (select sp.id from stretchy_parameter sp where sp.parameter_name = 'OfficeIdSelectOne'), '');
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select sr.id from stretchy_report sr where sr.report_name = 'Disbursal_Vs_Awaitingdisbursal'), (select sp.id from stretchy_parameter sp where sp.parameter_name = 'OfficeIdSelectOne'), '');
@@ -1,21 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_portfolio_command_source`
ADD COLUMN `transaction_id` VARCHAR(100) NULL DEFAULT NULL AFTER `product_id`;
@@ -1,26 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'READ_CENTER', 'CENTER', 'READ', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'CREATE_CENTER', 'CENTER', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'CREATE_CENTER_CHECKER', 'CENTER', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'UPDATE_CENTER', 'CENTER', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'UPDATE_CENTER_CHECKER', 'CENTER', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'DELETE_CENTER', 'CENTER', 'DELETE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'DELETE_CENTER_CHECKER', 'CENTER', 'DELETE', 0);
@@ -1,20 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_product_loan` CHANGE `principal_amount` `principal_amount` DECIMAL( 19, 6 ) NULL ;
@@ -1,144 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
CREATE TABLE `m_account_transfer_details` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`from_office_id` BIGINT NOT NULL,
`to_office_id` BIGINT NOT NULL,
`from_client_id` BIGINT NULL DEFAULT NULL,
`to_client_id` BIGINT NULL DEFAULT NULL,
`from_savings_account_id` BIGINT NULL DEFAULT NULL,
`to_savings_account_id` BIGINT NULL DEFAULT NULL,
`from_loan_account_id` BIGINT NULL DEFAULT NULL,
`to_loan_account_id` BIGINT NULL DEFAULT NULL,
`transfer_type` SMALLINT NULL DEFAULT NULL,
`from_savings_transaction_id` BIGINT NULL DEFAULT NULL,
`from_loan_transaction_id` BIGINT NULL DEFAULT NULL,
`to_savings_transaction_id` BIGINT NULL DEFAULT NULL,
`to_loan_transaction_id` BIGINT NULL DEFAULT NULL,
`is_reversed` tinyint NOT NULL,
`transaction_date` DATE NOT NULL,
`currency_code` VARCHAR(3) NOT NULL,
`currency_digits` SMALLINT NOT NULL,
`currency_multiplesof` SMALLINT NULL DEFAULT NULL,
`amount` DECIMAL(19,6) NOT NULL,
`description` VARCHAR(200) NOT NULL,
PRIMARY KEY (`id`),
INDEX `FK_m_account_transfer_details_from_office` (`from_office_id`),
INDEX `FK_m_account_transfer_details_to_office` (`to_office_id`),
INDEX `FK_m_account_transfer_details_from_client` (`from_client_id`),
INDEX `FK_m_account_transfer_details_to_client` (`to_client_id`),
INDEX `FK_m_account_transfer_details_from_savings_account` (`from_savings_account_id`),
INDEX `FK_m_account_transfer_details_to_savings_account` (`to_savings_account_id`),
INDEX `FK_m_account_transfer_details_from_loan_account` (`from_loan_account_id`),
INDEX `FK_m_account_transfer_details_to_loan_account` (`to_loan_account_id`),
CONSTRAINT `FK_m_account_transfer_details_from_client` FOREIGN KEY (`from_client_id`) REFERENCES `m_client` (`id`),
CONSTRAINT `FK_m_account_transfer_details_from_loan_account` FOREIGN KEY (`from_loan_account_id`) REFERENCES `m_loan` (`id`),
CONSTRAINT `FK_m_account_transfer_details_from_office` FOREIGN KEY (`from_office_id`) REFERENCES `m_office` (`id`),
CONSTRAINT `FK_m_account_transfer_details_from_savings_account` FOREIGN KEY (`from_savings_account_id`) REFERENCES `m_savings_account` (`id`),
CONSTRAINT `FK_m_account_transfer_details_to_client` FOREIGN KEY (`to_client_id`) REFERENCES `m_client` (`id`),
CONSTRAINT `FK_m_account_transfer_details_to_loan_account` FOREIGN KEY (`to_loan_account_id`) REFERENCES `m_loan` (`id`),
CONSTRAINT `FK_m_account_transfer_details_to_office` FOREIGN KEY (`to_office_id`) REFERENCES `m_office` (`id`),
CONSTRAINT `FK_m_account_transfer_details_to_savings_account` FOREIGN KEY (`to_savings_account_id`) REFERENCES `m_savings_account` (`id`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB;
CREATE TABLE `m_account_transfer_standing_instructions` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(250) NOT NULL,
`account_transfer_details_id` BIGINT NOT NULL,
`priority` TINYINT NOT NULL,
`status` TINYINT NOT NULL,
`instruction_type` TINYINT NOT NULL,
`amount` DECIMAL(19,6) NULL DEFAULT NULL,
`valid_from` DATE NOT NULL,
`valid_till` DATE NULL DEFAULT NULL,
`recurrence_type` tinyint NOT NULL,
`recurrence_frequency` SMALLINT NULL DEFAULT NULL,
`recurrence_interval` SMALLINT NULL DEFAULT NULL,
`recurrence_on_day` SMALLINT NULL DEFAULT NULL,
`recurrence_on_month` SMALLINT NULL DEFAULT NULL,
`last_run_date` DATE NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `name` (`name`),
INDEX `FK_m_standing_instructions_account_transfer_details` (`account_transfer_details_id`),
CONSTRAINT `FK_m_standing_instructions_account_transfer_details` FOREIGN KEY (`account_transfer_details_id`) REFERENCES `m_account_transfer_details` (`id`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB;
CREATE TABLE `m_account_transfer_transaction` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`account_transfer_details_id` BIGINT NOT NULL,
`from_savings_transaction_id` BIGINT NULL DEFAULT NULL,
`from_loan_transaction_id` BIGINT NULL DEFAULT NULL,
`to_savings_transaction_id` BIGINT NULL DEFAULT NULL,
`to_loan_transaction_id` BIGINT NULL DEFAULT NULL,
`is_reversed` tinyint NOT NULL,
`transaction_date` DATE NOT NULL,
`currency_code` VARCHAR(3) NOT NULL,
`currency_digits` SMALLINT NOT NULL,
`currency_multiplesof` SMALLINT NULL DEFAULT NULL,
`amount` DECIMAL(19,6) NOT NULL,
`description` VARCHAR(200) NOT NULL,
PRIMARY KEY (`id`),
INDEX `FK_m_account_transfer_transaction_from_m_savings_transaction` (`from_savings_transaction_id`),
INDEX `FK_m_account_transfer_transaction_to_m_savings_transaction` (`to_savings_transaction_id`),
INDEX `FK_m_account_transfer_transaction_to_m_loan_transaction` (`to_loan_transaction_id`),
INDEX `FK_m_account_transfer_transaction_from_m_loan_transaction` (`from_loan_transaction_id`),
INDEX `FK_m_account_transfer_transaction_account_detail` (`account_transfer_details_id`),
CONSTRAINT `FK_m_account_transfer_transaction_account_detail` FOREIGN KEY (`account_transfer_details_id`) REFERENCES `m_account_transfer_details` (`id`),
CONSTRAINT `FK_m_account_transfer_transaction_from_m_loan_transaction` FOREIGN KEY (`from_loan_transaction_id`) REFERENCES `m_loan_transaction` (`id`),
CONSTRAINT `FK_m_account_transfer_transaction_from_m_savings_transaction` FOREIGN KEY (`from_savings_transaction_id`) REFERENCES `m_savings_account_transaction` (`id`),
CONSTRAINT `FK_m_account_transfer_transaction_to_m_loan_transaction` FOREIGN KEY (`to_loan_transaction_id`) REFERENCES `m_loan_transaction` (`id`),
CONSTRAINT `FK_m_account_transfer_transaction_to_m_savings_transaction` FOREIGN KEY (`to_savings_transaction_id`) REFERENCES `m_savings_account_transaction` (`id`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB;
INSERT INTO `m_account_transfer_details` (`from_office_id`, `to_office_id`, `from_client_id`, `to_client_id`, `from_savings_account_id`, `to_savings_account_id`, `from_loan_account_id`, `to_loan_account_id`, `from_savings_transaction_id`, `from_loan_transaction_id`, `to_savings_transaction_id`, `to_loan_transaction_id`, `is_reversed`, `transaction_date`, `currency_code`, `currency_digits`, `currency_multiplesof`, `amount`, `description`) select at.from_office_id,at.to_office_id,at.from_client_id,at.to_client_id,at.from_savings_account_id,at.to_savings_account_id,at.from_loan_account_id,at.to_loan_account_id,at.from_savings_transaction_id,at.from_loan_transaction_id,at.to_savings_transaction_id,at.to_loan_transaction_id,at.is_reversed,at.transaction_date,at.currency_code,at.currency_digits,at.currency_multiplesof,at.amount,at.description from m_savings_account_transfer at;
INSERT INTO `m_account_transfer_transaction` (`account_transfer_details_id`, `from_savings_transaction_id`, `from_loan_transaction_id`, `to_savings_transaction_id`, `to_loan_transaction_id`, `is_reversed`, `transaction_date`, `currency_code`, `currency_digits`, `currency_multiplesof`, `amount`, `description`) select ad.id,ad.from_savings_transaction_id,ad.from_loan_transaction_id,ad.to_savings_transaction_id,ad.to_loan_transaction_id,ad.is_reversed,ad.transaction_date,ad.currency_code,ad.currency_digits,ad.currency_multiplesof,ad.amount,ad.description from m_account_transfer_details ad;
ALTER TABLE `m_account_transfer_details`
DROP COLUMN `from_savings_transaction_id`,
DROP COLUMN `from_loan_transaction_id`,
DROP COLUMN `to_savings_transaction_id`,
DROP COLUMN `to_loan_transaction_id`,
DROP COLUMN `is_reversed`,
DROP COLUMN `transaction_date`,
DROP COLUMN `currency_code`,
DROP COLUMN `currency_digits`,
DROP COLUMN `currency_multiplesof`,
DROP COLUMN `amount`,
DROP COLUMN `description`;
DROP TABLE `m_savings_account_transfer`;
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('account_transfer', 'READ_STANDINGINSTRUCTION ', 'STANDINGINSTRUCTION ', 'READ', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('account_transfer', 'CREATE_STANDINGINSTRUCTION ', 'STANDINGINSTRUCTION ', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('account_transfer', 'UPDATE_STANDINGINSTRUCTION ', 'STANDINGINSTRUCTION ', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('account_transfer', 'DELETE_STANDINGINSTRUCTION ', 'STANDINGINSTRUCTION ', 'DELETE', 0);
INSERT INTO `job` (`name`, `display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, `previous_run_start_time`, `next_run_time`, `job_key`, `initializing_errorlog`, `is_active`, `currently_running`, `updates_allowed`, `scheduler_group`, `is_misfired`) VALUES ('Execute Standing Instruction', 'Execute Standing Instruction', '0 0 0 1/1 * ? *', now(), 5, NULL, NULL, NULL, NULL, NULL, 1, 0, 1, 0, 0);
@@ -1,25 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_loan_repayment_schedule`
ADD COLUMN `accrual_interest_derived` DECIMAL(19,6) NULL DEFAULT NULL AFTER `interest_waived_derived`,
ADD COLUMN `accrual_fee_charges_derived` DECIMAL(19,6) NULL DEFAULT NULL AFTER `fee_charges_waived_derived`,
ADD COLUMN `accrual_penalty_charges_derived` DECIMAL(19,6) NULL DEFAULT NULL AFTER `penalty_charges_waived_derived`;
INSERT INTO `job` (`name`, `display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, `previous_run_start_time`, `next_run_time`, `job_key`, `initializing_errorlog`, `is_active`, `currently_running`, `updates_allowed`, `scheduler_group`, `is_misfired`) VALUES ('Add Accrual Transactions', 'Add Accrual Transactions', '0 1 0 1/1 * ? *', now(), 5, NULL, NULL, NULL, NULL, NULL, 1, 0, 1, 0, 0);
@@ -1,20 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `job` (`name`, `display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, `previous_run_start_time`, `next_run_time`, `job_key`, `initializing_errorlog`, `is_active`, `currently_running`, `updates_allowed`, `scheduler_group`, `is_misfired`) VALUES ('Apply penalty to overdue loans', 'Apply penalty to overdue loans', '0 0 0 1/1 * ? *', now(), 5, NULL, NULL, NULL, NULL, NULL, 1, 0, 1, 0, 0);
@@ -1,26 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_product_loan`
ADD COLUMN `overdue_days_for_npa` SMALLINT NULL DEFAULT NULL AFTER `grace_on_arrears_ageing`;
ALTER TABLE `m_loan`
ADD COLUMN `is_npa` tinyint NOT NULL DEFAULT '0' AFTER `grace_on_arrears_ageing`;
INSERT INTO `job` (`name`, `display_name`, `cron_expression`, `create_time`) VALUES ('Update Non Performing Assets', 'Update Non Performing Assets', '0 0 0 1/1 * ? *', now());
@@ -1,256 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
CREATE TABLE IF NOT EXISTS `m_interest_rate_chart` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`name` varchar(100) DEFAULT NULL,
`description` varchar(200) DEFAULT NULL,
`from_date` date NOT NULL,
`end_date` date DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
CREATE TABLE IF NOT EXISTS `m_interest_rate_slab` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`interest_rate_chart_id` BIGINT NOT NULL,
`description` varchar(200) DEFAULT NULL,
`period_type_enum` SMALLINT NOT NULL DEFAULT '1',
`from_period` INT NOT NULL DEFAULT '0',
`to_period` INT DEFAULT NULL,
`amount_range_from` decimal(19,6) DEFAULT NULL,
`amount_range_to` decimal(19,6) DEFAULT NULL,
`annual_interest_rate` decimal(19,6) NOT NULL,
`currency_code` varchar(3) NOT NULL,
PRIMARY KEY (`id`),
KEY `FKIRS00000000000001` (`interest_rate_chart_id`),
CONSTRAINT `FKIRS00000000000001` FOREIGN KEY (`interest_rate_chart_id`) REFERENCES `m_interest_rate_chart` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
CREATE TABLE IF NOT EXISTS `m_deposit_product_interest_rate_chart` (
`deposit_product_id` BIGINT NOT NULL,
`interest_rate_chart_id` BIGINT NOT NULL,
UNIQUE KEY `deposit_product_id_interest_rate_chart_id` (`deposit_product_id`,`interest_rate_chart_id`),
KEY `FKDPIRC00000000000002` (`interest_rate_chart_id`),
CONSTRAINT `FKDPIRC00000000000001` FOREIGN KEY (`deposit_product_id`) REFERENCES `m_savings_product` (`id`),
CONSTRAINT `FKDPIRC00000000000002` FOREIGN KEY (`interest_rate_chart_id`) REFERENCES `m_interest_rate_chart` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
CREATE TABLE IF NOT EXISTS `m_deposit_product_term_and_preclosure` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`savings_product_id` BIGINT NOT NULL DEFAULT '0',
`min_deposit_term` INT DEFAULT NULL,
`max_deposit_term` INT DEFAULT NULL,
`min_deposit_term_type_enum` SMALLINT DEFAULT NULL,
`max_deposit_term_type_enum` SMALLINT DEFAULT NULL,
`in_multiples_of_deposit_term` INT DEFAULT NULL,
`in_multiples_of_deposit_term_type_enum` SMALLINT DEFAULT NULL,
`interest_free_period_applicable` SMALLINT DEFAULT NULL,
`interest_free_from_period` INT DEFAULT NULL,
`interest_free_to_period` INT DEFAULT NULL,
`interest_free_period_frequency_enum` SMALLINT DEFAULT NULL,
`pre_closure_penal_applicable` SMALLINT DEFAULT NULL,
`pre_closure_penal_interest` decimal(19,6) DEFAULT NULL,
`pre_closure_penal_interest_on_enum` SMALLINT DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FKDPTP00000000000001` (`savings_product_id`),
CONSTRAINT `FKDPTP00000000000001` FOREIGN KEY (`savings_product_id`) REFERENCES `m_savings_product` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
CREATE TABLE IF NOT EXISTS `m_deposit_product_recurring_detail` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`savings_product_id` BIGINT NOT NULL DEFAULT '0',
`recurring_deposit_type_enum` SMALLINT DEFAULT NULL,
`recurring_deposit_frequency` INT DEFAULT NULL,
`recurring_deposit_frequency_type_enum` SMALLINT DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FKDPRD00000000000001` (`savings_product_id`),
CONSTRAINT `FKDPRD00000000000001` FOREIGN KEY (`savings_product_id`) REFERENCES `m_savings_product` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
CREATE TABLE IF NOT EXISTS `m_savings_account_interest_rate_chart` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`savings_account_id` BIGINT NOT NULL,
`name` varchar(100) DEFAULT NULL,
`description` varchar(200) DEFAULT NULL,
`from_date` date NOT NULL,
`end_date` date DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FKSAIRC00000000000001` (`savings_account_id`),
CONSTRAINT `FKSAIRC00000000000001` FOREIGN KEY (`savings_account_id`) REFERENCES `m_savings_account` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
CREATE TABLE IF NOT EXISTS `m_savings_account_interest_rate_slab` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`savings_account_interest_rate_chart_id` BIGINT NOT NULL,
`description` varchar(200) DEFAULT NULL,
`period_type_enum` SMALLINT NOT NULL DEFAULT '1',
`from_period` INT NOT NULL DEFAULT '0',
`to_period` INT DEFAULT NULL,
`amount_range_from` decimal(19,6) DEFAULT NULL,
`amount_range_to` decimal(19,6) DEFAULT NULL,
`annual_interest_rate` decimal(19,6) NOT NULL,
`currency_code` varchar(3) NOT NULL,
PRIMARY KEY (`id`),
KEY `FKSAIRS00000000000001` (`savings_account_interest_rate_chart_id`),
CONSTRAINT `FKSAIRS00000000000001` FOREIGN KEY (`savings_account_interest_rate_chart_id`) REFERENCES `m_savings_account_interest_rate_chart` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
CREATE TABLE IF NOT EXISTS `m_deposit_account_recurring_detail` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`savings_account_id` BIGINT NOT NULL DEFAULT '0',
`recurring_deposit_amount` decimal(19,6) DEFAULT NULL,
`recurring_deposit_type_enum` SMALLINT DEFAULT NULL,
`recurring_deposit_frequency` INT DEFAULT NULL,
`recurring_deposit_frequency_type_enum` SMALLINT DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FKDARD00000000000001` (`savings_account_id`),
CONSTRAINT `FKDARD00000000000001` FOREIGN KEY (`savings_account_id`) REFERENCES `m_savings_account` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
CREATE TABLE IF NOT EXISTS `m_deposit_account_term_and_preclosure` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`savings_account_id` BIGINT NOT NULL DEFAULT '0',
`min_deposit_term` INT DEFAULT NULL,
`max_deposit_term` INT DEFAULT NULL,
`min_deposit_term_type_enum` SMALLINT DEFAULT NULL,
`max_deposit_term_type_enum` SMALLINT DEFAULT NULL,
`in_multiples_of_deposit_term` INT DEFAULT NULL,
`in_multiples_of_deposit_term_type_enum` SMALLINT DEFAULT NULL,
`interest_free_period_applicable` SMALLINT DEFAULT NULL,
`interest_free_from_period` INT DEFAULT NULL,
`interest_free_to_period` INT DEFAULT NULL,
`interest_free_period_frequency_enum` SMALLINT DEFAULT NULL,
`pre_closure_penal_applicable` SMALLINT DEFAULT NULL,
`pre_closure_penal_interest` decimal(19,6) DEFAULT NULL,
`pre_closure_penal_interest_on_enum` SMALLINT DEFAULT NULL,
`deposit_period` INT DEFAULT NULL,
`deposit_period_frequency_enum` SMALLINT DEFAULT NULL,
`deposit_amount` decimal(19,6) DEFAULT NULL,
`maturity_amount` decimal(19,6) DEFAULT NULL,
`maturity_date` date DEFAULT NULL,
`on_account_closure_enum` SMALLINT DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FKDATP00000000000001` (`savings_account_id`),
CONSTRAINT `FKDATP00000000000001` FOREIGN KEY (`savings_account_id`) REFERENCES `m_savings_account` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
ALTER TABLE `m_savings_product`
ADD COLUMN `deposit_type_enum` SMALLINT NOT NULL DEFAULT '100' AFTER `description`;
ALTER TABLE `m_savings_account`
ADD COLUMN `deposit_type_enum` SMALLINT NOT NULL DEFAULT '100' AFTER `account_type_enum`;
ALTER TABLE `m_client`
ADD COLUMN `gender_cv_id` INT NULL DEFAULT NULL AFTER `mobile_no`,
ADD COLUMN `date_of_birth` DATE NULL DEFAULT NULL AFTER `gender_cv_id`;
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'CREATE_INTERESTRATECHART', 'INTERESTRATECHART', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'CREATE_INTERESTRATECHART_CHECKER', 'INTERESTRATECHART', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'UPDATE_INTERESTRATECHART', 'INTERESTRATECHART', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'DELETE_INTERESTRATECHART', 'INTERESTRATECHART', 'DELETE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'UPDATE_INTERESTRATECHART_CHECKER', 'INTERESTRATECHART', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'DELETE_INTERESTRATECHART_CHECKER', 'INTERESTRATECHART', 'DELETE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'CREATE_CHARTSLAB', 'CHARTSLAB', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'CREATE_CHARTSLAB_CHECKER', 'CHARTSLAB', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'UPDATE_CHARTSLAB', 'CHARTSLAB', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'DELETE_CHARTSLAB', 'CHARTSLAB', 'DELETE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'UPDATE_CHARTSLAB_CHECKER', 'CHARTSLAB', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'DELETE_CHARTSLAB_CHECKER', 'CHARTSLAB', 'DELETE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'CREATE_FIXEDDEPOSITPRODUCT', 'FIXEDDEPOSITPRODUCT', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'CREATE_FIXEDDEPOSITPRODUCT_CHECKER', 'FIXEDDEPOSITPRODUCT', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'UPDATE_FIXEDDEPOSITPRODUCT', 'FIXEDDEPOSITPRODUCT', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'DELETE_FIXEDDEPOSITPRODUCT', 'FIXEDDEPOSITPRODUCT', 'DELETE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'UPDATE_FIXEDDEPOSITPRODUCT_CHECKER', 'FIXEDDEPOSITPRODUCT', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'DELETE_FIXEDDEPOSITPRODUCT_CHECKER', 'FIXEDDEPOSITPRODUCT', 'DELETE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'CREATE_RECURRINGDEPOSITPRODUCT', 'RECURRINGDEPOSITPRODUCT', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'CREATE_RECURRINGDEPOSITPRODUCT_CHECKER', 'RECURRINGDEPOSITPRODUCT', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'UPDATE_RECURRINGDEPOSITPRODUCT', 'RECURRINGDEPOSITPRODUCT', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'DELETE_RECURRINGDEPOSITPRODUCT', 'RECURRINGDEPOSITPRODUCT', 'DELETE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'UPDATE_RECURRINGDEPOSITPRODUCT_CHECKER', 'RECURRINGDEPOSITPRODUCT', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'DELETE_RECURRINGDEPOSITPRODUCT_CHECKER', 'RECURRINGDEPOSITPRODUCT', 'DELETE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'READ_FIXEDDEPOSITACCOUNT', 'FIXEDDEPOSITACCOUNT', 'READ', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'CREATE_FIXEDDEPOSITACCOUNT', 'FIXEDDEPOSITACCOUNT', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'CREATE_FIXEDDEPOSITACCOUNT_CHECKER', 'FIXEDDEPOSITACCOUNT', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'UPDATE_FIXEDDEPOSITACCOUNT', 'FIXEDDEPOSITACCOUNT', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'UPDATE_FIXEDDEPOSITACCOUNT_CHECKER', 'FIXEDDEPOSITACCOUNT', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'DELETE_FIXEDDEPOSITACCOUNT', 'FIXEDDEPOSITACCOUNT', 'DELETE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'DELETE_FIXEDDEPOSITACCOUNT_CHECKER', 'FIXEDDEPOSITACCOUNT', 'DELETE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'DEPOSIT_FIXEDDEPOSITACCOUNT', 'FIXEDDEPOSITACCOUNT', 'DEPOSIT', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'DEPOSIT_FIXEDDEPOSITACCOUNT_CHECKER', 'FIXEDDEPOSITACCOUNT', 'DEPOSIT', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'WITHDRAWAL_FIXEDDEPOSITACCOUNT', 'FIXEDDEPOSITACCOUNT', 'WITHDRAWAL', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'WITHDRAWAL_FIXEDDEPOSITACCOUNT_CHECKER', 'FIXEDDEPOSITACCOUNT', 'WITHDRAWAL', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'ACTIVATE_FIXEDDEPOSITACCOUNT', 'FIXEDDEPOSITACCOUNT', 'ACTIVATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'ACTIVATE_FIXEDDEPOSITACCOUNT_CHECKER', 'FIXEDDEPOSITACCOUNT', 'ACTIVATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'CALCULATEINTEREST_FIXEDDEPOSITACCOUNT', 'FIXEDDEPOSITACCOUNT', 'CALCULATEINTEREST', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'CALCULATEINTEREST_FIXEDDEPOSITACCOUNT_CHECKER', 'FIXEDDEPOSITACCOUNT', 'CALCULATEINTEREST', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'POSTINTEREST_FIXEDDEPOSITACCOUNT', 'FIXEDDEPOSITACCOUNT', 'POSTINTEREST', 1);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'POSTINTEREST_FIXEDDEPOSITACCOUNT_CHECKER', 'FIXEDDEPOSITACCOUNT', 'POSTINTEREST', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'APPROVE_FIXEDDEPOSITACCOUNT', 'FIXEDDEPOSITACCOUNT', 'APPROVE', 1);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'REJECT_FIXEDDEPOSITACCOUNT', 'FIXEDDEPOSITACCOUNT', 'REJECT', 1);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'WITHDRAW_FIXEDDEPOSITACCOUNT', 'FIXEDDEPOSITACCOUNT', 'WITHDRAW', 1);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'APPROVALUNDO_FIXEDDEPOSITACCOUNT', 'FIXEDDEPOSITACCOUNT', 'APPROVALUNDO', 1);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'CLOSE_FIXEDDEPOSITACCOUNT', 'FIXEDDEPOSITACCOUNT', 'CLOSE', 1);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'APPROVE_FIXEDDEPOSITACCOUNT_CHECKER', 'FIXEDDEPOSITACCOUNT', 'APPROVE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'REJECT_FIXEDDEPOSITACCOUNT_CHECKER', 'FIXEDDEPOSITACCOUNT', 'REJECT', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'WITHDRAW_FIXEDDEPOSITACCOUNT_CHECKER', 'FIXEDDEPOSITACCOUNT', 'WITHDRAW', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'APPROVALUNDO_FIXEDDEPOSITACCOUNT_CHECKER', 'FIXEDDEPOSITACCOUNT', 'APPROVALUNDO', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'CLOSE_FIXEDDEPOSITACCOUNT_CHECKER', 'FIXEDDEPOSITACCOUNT', 'CLOSE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'UNDOTRANSACTION_FIXEDDEPOSITACCOUNT', 'FIXEDDEPOSITACCOUNT', 'UNDOTRANSACTION', 1);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'UNDOTRANSACTION_FIXEDDEPOSITACCOUNT_CHECKER', 'FIXEDDEPOSITACCOUNT', 'UNDOTRANSACTION', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'ADJUSTTRANSACTION_FIXEDDEPOSITACCOUNT', 'FIXEDDEPOSITACCOUNT', 'ADJUSTTRANSACTION', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'READ_RECURRINGDEPOSITACCOUNT', 'RECURRINGDEPOSITACCOUNT', 'READ', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'CREATE_RECURRINGDEPOSITACCOUNT', 'RECURRINGDEPOSITACCOUNT', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'CREATE_RECURRINGDEPOSITACCOUNT_CHECKER', 'RECURRINGDEPOSITACCOUNT', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'UPDATE_RECURRINGDEPOSITACCOUNT', 'RECURRINGDEPOSITACCOUNT', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'UPDATE_RECURRINGDEPOSITACCOUNT_CHECKER', 'RECURRINGDEPOSITACCOUNT', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'DELETE_RECURRINGDEPOSITACCOUNT', 'RECURRINGDEPOSITACCOUNT', 'DELETE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'portfolio', 'DELETE_RECURRINGDEPOSITACCOUNT_CHECKER', 'RECURRINGDEPOSITACCOUNT', 'DELETE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'DEPOSIT_RECURRINGDEPOSITACCOUNT', 'RECURRINGDEPOSITACCOUNT', 'DEPOSIT', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'DEPOSIT_RECURRINGDEPOSITACCOUNT_CHECKER', 'RECURRINGDEPOSITACCOUNT', 'DEPOSIT', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'WITHDRAWAL_RECURRINGDEPOSITACCOUNT', 'RECURRINGDEPOSITACCOUNT', 'WITHDRAWAL', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'WITHDRAWAL_RECURRINGDEPOSITACCOUNT_CHECKER', 'RECURRINGDEPOSITACCOUNT', 'WITHDRAWAL', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'ACTIVATE_RECURRINGDEPOSITACCOUNT', 'RECURRINGDEPOSITACCOUNT', 'ACTIVATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'ACTIVATE_RECURRINGDEPOSITACCOUNT_CHECKER', 'RECURRINGDEPOSITACCOUNT', 'ACTIVATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'CALCULATEINTEREST_RECURRINGDEPOSITACCOUNT', 'RECURRINGDEPOSITACCOUNT', 'CALCULATEINTEREST', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'CALCULATEINTEREST_RECURRINGDEPOSITACCOUNT_CHECKER', 'RECURRINGDEPOSITACCOUNT', 'CALCULATEINTEREST', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'POSTINTEREST_RECURRINGDEPOSITACCOUNT', 'RECURRINGDEPOSITACCOUNT', 'POSTINTEREST', 1);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'POSTINTEREST_RECURRINGDEPOSITACCOUNT_CHECKER', 'RECURRINGDEPOSITACCOUNT', 'POSTINTEREST', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'APPROVE_RECURRINGDEPOSITACCOUNT', 'RECURRINGDEPOSITACCOUNT', 'APPROVE', 1);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'REJECT_RECURRINGDEPOSITACCOUNT', 'RECURRINGDEPOSITACCOUNT', 'REJECT', 1);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'WITHDRAW_RECURRINGDEPOSITACCOUNT', 'RECURRINGDEPOSITACCOUNT', 'WITHDRAW', 1);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'APPROVALUNDO_RECURRINGDEPOSITACCOUNT', 'RECURRINGDEPOSITACCOUNT', 'APPROVALUNDO', 1);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'CLOSE_RECURRINGDEPOSITACCOUNT', 'RECURRINGDEPOSITACCOUNT', 'CLOSE', 1);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'APPROVE_RECURRINGDEPOSITACCOUNT_CHECKER', 'RECURRINGDEPOSITACCOUNT', 'APPROVE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'REJECT_RECURRINGDEPOSITACCOUNT_CHECKER', 'RECURRINGDEPOSITACCOUNT', 'REJECT', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'WITHDRAW_RECURRINGDEPOSITACCOUNT_CHECKER', 'RECURRINGDEPOSITACCOUNT', 'WITHDRAW', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'APPROVALUNDO_RECURRINGDEPOSITACCOUNT_CHECKER', 'RECURRINGDEPOSITACCOUNT', 'APPROVALUNDO', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'CLOSE_RECURRINGDEPOSITACCOUNT_CHECKER', 'RECURRINGDEPOSITACCOUNT', 'CLOSE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'UNDOTRANSACTION_RECURRINGDEPOSITACCOUNT', 'RECURRINGDEPOSITACCOUNT', 'UNDOTRANSACTION', 1);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'UNDOTRANSACTION_RECURRINGDEPOSITACCOUNT_CHECKER', 'RECURRINGDEPOSITACCOUNT', 'UNDOTRANSACTION', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ( 'transaction_savings', 'ADJUSTTRANSACTION_RECURRINGDEPOSITACCOUNT', 'RECURRINGDEPOSITACCOUNT', 'ADJUSTTRANSACTION', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('transaction_savings', 'PREMATURECLOSE_FIXEDDEPOSITACCOUNT_CHECKER', 'FIXEDDEPOSITACCOUNT', 'PREMATURECLOSE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`) VALUES ('transaction_savings', 'PREMATURECLOSE_FIXEDDEPOSITACCOUNT', 'FIXEDDEPOSITACCOUNT', 'PREMATURECLOSE');
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('transaction_savings', 'PREMATURECLOSE_RECURRINGDEPOSITACCOUNT_CHECKER', 'RECURRINGDEPOSITACCOUNT', 'PREMATURECLOSE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`) VALUES ('transaction_savings', 'PREMATURECLOSE_RECURRINGDEPOSITACCOUNT', 'RECURRINGDEPOSITACCOUNT', 'PREMATURECLOSE');
@@ -1,20 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('transaction_loan', 'DISBURSETOSAVINGS_LOAN', 'LOAN', 'DISBURSETOSAVINGS', 0);
@@ -1,26 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_deposit_product_term_and_preclosure`
ADD COLUMN `min_deposit_amount` DECIMAL(19,6) NULL DEFAULT NULL,
ADD COLUMN `max_deposit_amount` DECIMAL(19,6) NULL DEFAULT NULL,
ADD COLUMN `deposit_amount` DECIMAL(19,6) NULL DEFAULT NULL;
ALTER TABLE m_deposit_account_term_and_preclosure
ADD COLUMN `expected_firstdepositon_date` DATE NULL DEFAULT NULL;
@@ -1,46 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `m_permission` (
`id` ,
`grouping` ,
`code` ,
`entity_name` ,
`action_name` ,
`can_maker_checker`
)
VALUES (
NULL , 'transaction_loan', 'RECOVERYPAYMENT_LOAN', 'LOAN', 'RECOVERYPAYMENT', '0'
);
Alter table m_loan
add column total_recovered_derived Decimal(19,6);
INSERT INTO `acc_gl_account` (`name`, `hierarchy`, `gl_code`,`account_usage`, `classification_enum`,`description`)
select 'Loan Recovery (Temp)', '.', '220002-Temp', 1, 4,'Temporary account to track income from Loan recovery'
FROM m_product_loan WHERE accounting_type != 1
limit 1;
INSERT INTO `acc_product_mapping` (`gl_account_id`,`product_id`,`product_type`,`financial_account_type`)
select (select max(id) from acc_gl_account where classification_enum=4 and account_usage=1 LIMIT 1), mapping.product_id, mapping.product_type, 12
from acc_product_mapping mapping
where mapping.financial_account_type = 4 and mapping.product_type=1
group by mapping.product_id;
@@ -1,28 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `job_run_history`
CHANGE COLUMN `error_message` `error_message` TEXT NULL DEFAULT NULL AFTER `status`;
ALTER TABLE `m_deposit_account_term_and_preclosure`
ADD COLUMN `transfer_interest_to_linked_account` tinyint NOT NULL DEFAULT '0' AFTER `expected_firstdepositon_date`;
UPDATE `job` SET `scheduler_group`=1 WHERE `name`='Post Interest For Savings';
INSERT INTO `job` (`name`, `display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, `previous_run_start_time`, `next_run_time`, `job_key`, `initializing_errorlog`, `is_active`, `currently_running`, `updates_allowed`, `scheduler_group`, `is_misfired`) VALUES ('Transfer Interest To Savings', 'Transfer Interest To Savings', '0 2 0 1/1 * ? *', now(), 4, NULL, NULL, NULL, NULL, NULL, 1, 0, 1, 1, 0);
@@ -1,20 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
UPDATE stretchy_report SET core_report=1, use_report=0 WHERE report_name in ('ClientTrendsByDay','ClientTrendsByWeek','ClientTrendsByMonth','LoanTrendsByDay','LoanTrendsByWeek','LoanTrendsByMonth','Demand_Vs_Collection','Disbursal_Vs_Awaitingdisbursal');
@@ -1,26 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_loan`
DROP COLUMN `min_principal_amount`,
DROP COLUMN `max_principal_amount`,
DROP COLUMN `min_nominal_interest_rate_per_period`,
DROP COLUMN `max_nominal_interest_rate_per_period`,
DROP COLUMN `min_number_of_repayments`,
DROP COLUMN `max_number_of_repayments`;
@@ -1,20 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `job` (`name`, `display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, `previous_run_start_time`, `next_run_time`, `job_key`, `initializing_errorlog`, `is_active`, `currently_running`, `updates_allowed`, `scheduler_group`, `is_misfired`) VALUES ('Update Deposit Accounts Maturity details', 'Update Deposit Accounts Maturity details', '0 0 0 1/1 * ? *', now(), 5, NULL, NULL, NULL, NULL, NULL, 1, 0, 1, 0, 0);
@@ -1,90 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `c_configuration` (`name`, `value`, `enabled`) VALUES ('age_limit_for_senior_citizen', 65, 1);
INSERT INTO `c_configuration` (`name`, `value`, `enabled`) VALUES ('age_limit_for_children', 15, 1);
ALTER TABLE `m_interest_rate_slab`
ADD COLUMN `interest_rate_for_female` DECIMAL(19,6) NULL AFTER `annual_interest_rate`,
ADD COLUMN `interest_rate_for_children` DECIMAL(19,6) NULL AFTER `interest_rate_for_female`,
ADD COLUMN `interest_rate_for_senior_citizen` DECIMAL(19,6) NULL AFTER `interest_rate_for_children`;
ALTER TABLE `m_savings_account_interest_rate_slab`
ADD COLUMN `interest_rate_for_female` DECIMAL(19,6) NULL AFTER `annual_interest_rate`,
ADD COLUMN `interest_rate_for_children` DECIMAL(19,6) NULL AFTER `interest_rate_for_female`,
ADD COLUMN `interest_rate_for_senior_citizen` DECIMAL(19,6) NULL AFTER `interest_rate_for_children`;
ALTER TABLE `m_deposit_account_recurring_detail`
CHANGE COLUMN `recurring_deposit_amount` `mandatory_recommended_deposit_amount` DECIMAL(19,6) NULL DEFAULT NULL,
ADD COLUMN `is_mandatory` TINYINT NOT NULL DEFAULT '0',
ADD COLUMN `allow_withdrawal` TINYINT NOT NULL DEFAULT '0',
ADD COLUMN `adjust_advance_towards_future_payments` TINYINT NOT NULL DEFAULT '1',
ADD COLUMN `is_calendar_inherited` TINYINT NOT NULL DEFAULT '0',
ADD COLUMN `total_overdue_amount` DECIMAL(19,6) NULL DEFAULT NULL,
ADD COLUMN `no_of_overdue_installments` INT NULL DEFAULT NULL,
DROP COLUMN `recurring_deposit_type_enum`,
DROP COLUMN `recurring_deposit_frequency`,
DROP COLUMN `recurring_deposit_frequency_type_enum`;
ALTER TABLE `m_deposit_product_term_and_preclosure`
DROP COLUMN `interest_free_period_applicable`,
DROP COLUMN `interest_free_from_period`,
DROP COLUMN `interest_free_to_period`,
DROP COLUMN `interest_free_period_frequency_enum`;
ALTER TABLE `m_deposit_product_recurring_detail`
ADD COLUMN `is_mandatory` tinyint NOT NULL DEFAULT '1',
ADD COLUMN `allow_withdrawal` tinyint NOT NULL DEFAULT '0',
ADD COLUMN `adjust_advance_towards_future_payments` tinyint NOT NULL DEFAULT '1',
DROP COLUMN `recurring_deposit_type_enum`,
DROP COLUMN `recurring_deposit_frequency`,
DROP COLUMN `recurring_deposit_frequency_type_enum`;
ALTER TABLE `m_deposit_account_term_and_preclosure`
DROP COLUMN `interest_free_period_applicable`,
DROP COLUMN `interest_free_from_period`,
DROP COLUMN `interest_free_to_period`,
DROP COLUMN `interest_free_period_frequency_enum`;
CREATE TABLE `m_mandatory_savings_schedule` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`savings_account_id` BIGINT NOT NULL,
`fromdate` DATE NULL DEFAULT NULL,
`duedate` DATE NOT NULL,
`installment` SMALLINT NOT NULL,
`deposit_amount` DECIMAL(19,6) NULL DEFAULT NULL,
`deposit_amount_completed_derived` DECIMAL(19,6) NULL DEFAULT NULL,
`total_paid_in_advance_derived` DECIMAL(19,6) NULL DEFAULT NULL,
`total_paid_late_derived` DECIMAL(19,6) NULL DEFAULT NULL,
`completed_derived` BIT(1) NOT NULL,
`obligations_met_on_date` DATE NULL DEFAULT NULL,
`createdby_id` BIGINT NULL DEFAULT NULL,
`created_date` DATETIME NULL DEFAULT NULL,
`lastmodified_date` DATETIME NULL DEFAULT NULL,
`lastmodifiedby_id` BIGINT NULL DEFAULT NULL,
PRIMARY KEY (`id`),
INDEX `FKMSS0000000001` (`savings_account_id`),
CONSTRAINT `FKMSS0000000001` FOREIGN KEY (`savings_account_id`) REFERENCES `m_savings_account` (`id`)
);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('organisation', 'READ_RECURRINGDEPOSITPRODUCT', 'RECURRINGDEPOSITPRODUCT', 'READ', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('organisation', 'READ_FIXEDDEPOSITPRODUCT', 'FIXEDDEPOSITPRODUCT', 'READ', 0);
@@ -1,40 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('accounting', 'READ_OFFICEGLACCOUNT', 'OFFICEGLACCOUNT', 'READ', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('accounting', 'CREATE_OFFICEGLACCOUNT', 'OFFICEGLACCOUNT', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('accounting', 'DELETE_OFFICEGLACCOUNT', 'OFFICEGLACCOUNT', 'DELETE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('accounting', 'UPDATE_OFFICEGLACCOUNT', 'OFFICEGLACCOUNT', 'UPDATE', 0);
CREATE TABLE `acc_gl_office_mapping` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`gl_account_id` BIGINT NOT NULL DEFAULT '0',
`office_id` BIGINT NOT NULL,
`financial_account_type` SMALLINT NOT NULL,
PRIMARY KEY (`id`),
INDEX `FK_office_mapping_acc_gl_account` (`gl_account_id`),
INDEX `FK_office_mapping_office` (`office_id`),
CONSTRAINT `FK_office_mapping_acc_gl_account` FOREIGN KEY (`gl_account_id`) REFERENCES `acc_gl_account` (`id`),
CONSTRAINT `FK_office_mapping_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB;
@@ -1,122 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_code_value`
ADD COLUMN `code_score` INT NULL AFTER `order_position`;
CREATE TABLE IF NOT EXISTS `ppi_scores` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`score_from` INT NOT NULL,
`score_to` INT NOT NULL,
PRIMARY KEY (`id`)
) COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB;
INSERT INTO `ppi_scores` ( `score_from`, `score_to`)
VALUES
(0, 4);
INSERT INTO `ppi_scores` ( `score_from`, `score_to`)
VALUES
(5, 9);
INSERT INTO `ppi_scores` ( `score_from`, `score_to`)
VALUES
(10, 14);
INSERT INTO `ppi_scores` ( `score_from`, `score_to`)
VALUES
(15, 19);
INSERT INTO `ppi_scores` ( `score_from`, `score_to`)
VALUES
(20, 24);
INSERT INTO `ppi_scores` ( `score_from`, `score_to`)
VALUES
(25,29 );
INSERT INTO `ppi_scores` ( `score_from`, `score_to`)
VALUES
(30, 34);
INSERT INTO `ppi_scores` ( `score_from`, `score_to`)
VALUES
(35, 39);
INSERT INTO `ppi_scores` ( `score_from`, `score_to`)
VALUES
(40, 44);
INSERT INTO `ppi_scores` ( `score_from`, `score_to`)
VALUES
(45, 49);
INSERT INTO `ppi_scores` ( `score_from`, `score_to`)
VALUES
(50, 54);
INSERT INTO `ppi_scores` ( `score_from`, `score_to`)
VALUES
(55, 59);
INSERT INTO `ppi_scores` ( `score_from`, `score_to`)
VALUES
(60,64);
INSERT INTO `ppi_scores` ( `score_from`, `score_to`)
VALUES
(65, 69);
INSERT INTO `ppi_scores` ( `score_from`, `score_to`)
VALUES
(70, 74);
INSERT INTO `ppi_scores` ( `score_from`, `score_to`)
VALUES
(75, 79);
INSERT INTO `ppi_scores` ( `score_from`, `score_to`)
VALUES
(80,84);
INSERT INTO `ppi_scores` ( `score_from`, `score_to`)
VALUES
(85, 89);
INSERT INTO `ppi_scores` ( `score_from`, `score_to`)
VALUES
(90, 94);
INSERT INTO `ppi_scores` ( `score_from`, `score_to`)
VALUES
(95, 100);
CREATE TABLE IF NOT EXISTS `ppi_likelihoods` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`code` varchar(100) NOT NULL,
`name` varchar(250) NOT NULL,
PRIMARY KEY (`id`)
) COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB ;
CREATE TABLE IF NOT EXISTS `ppi_likelihoods_ppi` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`likelihood_id` BIGINT NOT NULL,
`ppi_name` varchar(250) NOT NULL,
`enabled` INT NOT NULL DEFAULT '100',
PRIMARY KEY (`id`)
) COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB;
/**PPI permission**/
INSERT INTO `m_permission` (`id`, `grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES (NULL, 'datatable', 'UPDATE_LIKELIHOOD', 'likelihood', 'UPDATE', '0');
INSERT INTO `m_permission` (`id`, `grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES (NULL, 'survey', 'REGISTER_SURVEY', 'survey', 'CREATE', '0');
/**Registered table category**/
ALTER TABLE `x_registered_table` ADD `category` INT NOT NULL DEFAULT 100;
@@ -1,22 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
/**Remove all existing apply interest transaction Types**/
update m_loan_transaction set interest_portion_derived=amount where transaction_type_enum=11;
update m_loan_transaction set transaction_type_enum=10 where transaction_type_enum=11;
@@ -1,68 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE `m_client`
ADD COLUMN `client_type_cv_id` INT NULL DEFAULT NULL AFTER `default_savings_account`,
ADD COLUMN `client_classification_cv_id` INT NULL DEFAULT NULL AFTER `client_type_cv_id`,
ADD CONSTRAINT `FK_m_client_type_m_code_value` FOREIGN KEY (`client_type_cv_id`) REFERENCES `m_code_value` (`id`),
ADD CONSTRAINT `FK_m_client_classification_m_code_value` FOREIGN KEY (`client_classification_cv_id`) REFERENCES `m_code_value` (`id`),
ADD CONSTRAINT `FK1_m_client_gender_m_code_value` FOREIGN KEY (`gender_cv_id`) REFERENCES `m_code_value` (`id`);
INSERT INTO `m_code` (`code_name`, `is_system_defined`) VALUES ('ClientType', 1);
INSERT INTO `m_code` (`code_name`, `is_system_defined`) VALUES ('ClientClassification', 1);
CREATE TABLE `m_interest_incentives` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`interest_rate_slab_id` BIGINT NOT NULL,
`entiry_type` SMALLINT NOT NULL,
`attribute_name` SMALLINT NOT NULL,
`condition_type` SMALLINT NOT NULL,
`attribute_value` VARCHAR(50) NOT NULL,
`incentive_type` SMALLINT NOT NULL,
`amount` DECIMAL(19,6) NOT NULL,
PRIMARY KEY (`id`),
INDEX `FK_m_interest_incentives_m_interest_rate_slab` (`interest_rate_slab_id`),
CONSTRAINT `FK_m_interest_incentives_m_interest_rate_slab` FOREIGN KEY (`interest_rate_slab_id`) REFERENCES `m_interest_rate_slab` (`id`)
);
CREATE TABLE `m_savings_interest_incentives` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`deposit_account_interest_rate_slab_id` BIGINT NOT NULL,
`entiry_type` SMALLINT NOT NULL,
`attribute_name` SMALLINT NOT NULL,
`condition_type` SMALLINT NOT NULL,
`attribute_value` VARCHAR(50) NOT NULL,
`incentive_type` SMALLINT NOT NULL,
`amount` DECIMAL(19,6) NOT NULL,
PRIMARY KEY (`id`),
INDEX `FK_m_savings_interest_incentives_m_savings_interest_rate_slab` (`deposit_account_interest_rate_slab_id`),
CONSTRAINT `FK_m_savings_interest_incentives_m_savings_interest_rate_slab` FOREIGN KEY (`deposit_account_interest_rate_slab_id`) REFERENCES `m_savings_account_interest_rate_slab` (`id`)
);
ALTER TABLE `m_interest_rate_slab`
DROP COLUMN `interest_rate_for_female`,
DROP COLUMN `interest_rate_for_children`,
DROP COLUMN `interest_rate_for_senior_citizen`;
ALTER TABLE `m_savings_account_interest_rate_slab`
DROP COLUMN `interest_rate_for_female`,
DROP COLUMN `interest_rate_for_children`,
DROP COLUMN `interest_rate_for_senior_citizen`;
@@ -1,34 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE acc_gl_office_mapping DROP FOREIGN KEY `FK_office_mapping_office`;
ALTER TABLE acc_gl_office_mapping DROP column office_id;
ALTER TABLE `acc_gl_office_mapping`
ALTER `financial_account_type` DROP DEFAULT;
ALTER TABLE `acc_gl_office_mapping`
CHANGE COLUMN `financial_account_type` `financial_activity_type` SMALLINT NOT NULL;
ALTER TABLE `acc_gl_office_mapping`
ADD UNIQUE INDEX `financial_activity_type` (`financial_activity_type`);
RENAME TABLE `acc_gl_office_mapping` TO `acc_gl_financial_activity_account`;
@@ -1,21 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
DELETE FROM `c_configuration` WHERE `name`='age_limit_for_senior_citizen';
DELETE FROM `c_configuration` WHERE `name`='age_limit_for_children';
@@ -1,35 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
update m_permission set entity_name="FINANCIALACTIVITYACCOUNT" where entity_name="OFFICEGLACCOUNT";
update m_permission set code="READ_FINANCIALACTIVITYACCOUNT" where code="READ_OFFICEGLACCOUNT";
update m_permission set code="CREATE_FINANCIALACTIVITYACCOUNT" where code="CREATE_OFFICEGLACCOUNT";
update m_permission set code="DELETE_FINANCIALACTIVITYACCOUNT" where code="DELETE_OFFICEGLACCOUNT";
update m_permission set code="UPDATE_FINANCIALACTIVITYACCOUNT" where code="UPDATE_OFFICEGLACCOUNT";
/*Default Account for tracking account transfer*/
INSERT INTO `acc_gl_account` (`name`, `hierarchy`, `gl_code`,`account_usage`, `classification_enum`,`description`)
select 'Liability Transfer (Temp)', '.', '220004-Temp', 1, 2,'Temporary Liability account to track Account Transfers'
FROM m_product_loan WHERE accounting_type != 1
limit 1;
INSERT INTO `acc_gl_financial_activity_account` (`gl_account_id`,`financial_activity_type`)
select (select max(id) from acc_gl_account where classification_enum=2 and account_usage=1 LIMIT 1), 200
FROM m_product_loan WHERE accounting_type != 1
limit 1;
@@ -1,22 +0,0 @@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
--
UPDATE m_permission
SET action_name = CONCAT(action_name,'_CHECKER')
WHERE code LIKE "%_CHECKER";

Some files were not shown because too many files have changed in this diff Show More