charges add module add in the saving account and current account
This commit is contained in:
+86
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd">
|
||||
|
||||
<changeSet id="2012-current-account-permissions" author="lincpay">
|
||||
<comment>Seed all current account permissions and assign to super-admin role</comment>
|
||||
|
||||
<sql>
|
||||
INSERT INTO m_permission (grouping, code, entity_name, action_name, can_maker_checker) VALUES
|
||||
('currentaccount', 'READ_CURRENTACCOUNT', 'CURRENTACCOUNT', 'READ', false),
|
||||
('currentaccount', 'CREATE_CURRENTACCOUNT', 'CURRENTACCOUNT', 'CREATE', false),
|
||||
('currentaccount', 'UPDATE_CURRENTACCOUNT', 'CURRENTACCOUNT', 'UPDATE', false),
|
||||
('currentaccount', 'DELETE_CURRENTACCOUNT', 'CURRENTACCOUNT', 'DELETE', false),
|
||||
('currentaccount', 'APPROVE_CURRENTACCOUNT', 'CURRENTACCOUNT', 'APPROVE', true),
|
||||
('currentaccount', 'APPROVALUNDO_CURRENTACCOUNT', 'CURRENTACCOUNT', 'APPROVALUNDO', true),
|
||||
('currentaccount', 'REJECT_CURRENTACCOUNT', 'CURRENTACCOUNT', 'REJECT', true),
|
||||
('currentaccount', 'WITHDRAW_CURRENTACCOUNT', 'CURRENTACCOUNT', 'WITHDRAW', true),
|
||||
('currentaccount', 'ACTIVATE_CURRENTACCOUNT', 'CURRENTACCOUNT', 'ACTIVATE', true),
|
||||
('currentaccount', 'CLOSE_CURRENTACCOUNT', 'CURRENTACCOUNT', 'CLOSE', true),
|
||||
('currentaccount', 'DEPOSIT_CURRENTACCOUNT', 'CURRENTACCOUNT', 'DEPOSIT', true),
|
||||
('currentaccount', 'WITHDRAWAL_CURRENTACCOUNT', 'CURRENTACCOUNT', 'WITHDRAWAL', true),
|
||||
('currentaccount', 'POSTINTEREST_CURRENTACCOUNT', 'CURRENTACCOUNT', 'POSTINTEREST', true),
|
||||
('currentaccount', 'CALCULATEINTEREST_CURRENTACCOUNT', 'CURRENTACCOUNT', 'CALCULATEINTEREST', false),
|
||||
('currentaccount', 'BLOCK_CURRENTACCOUNT', 'CURRENTACCOUNT', 'BLOCK', true),
|
||||
('currentaccount', 'UNBLOCK_CURRENTACCOUNT', 'CURRENTACCOUNT', 'UNBLOCK', true),
|
||||
('currentaccount', 'BLOCKDEPOSIT_CURRENTACCOUNT', 'CURRENTACCOUNT', 'BLOCKDEPOSIT', true),
|
||||
('currentaccount', 'UNBLOCKDEPOSIT_CURRENTACCOUNT', 'CURRENTACCOUNT', 'UNBLOCKDEPOSIT', true),
|
||||
('currentaccount', 'BLOCKWITHDRAWAL_CURRENTACCOUNT', 'CURRENTACCOUNT', 'BLOCKWITHDRAWAL', true),
|
||||
('currentaccount', 'UNBLOCKWITHDRAWAL_CURRENTACCOUNT', 'CURRENTACCOUNT', 'UNBLOCKWITHDRAWAL', true),
|
||||
('currentaccount', 'HOLDAMOUNT_CURRENTACCOUNT', 'CURRENTACCOUNT', 'HOLDAMOUNT', true),
|
||||
('currentaccount', 'UPDATESAVINGSOFFICER_CURRENTACCOUNT','CURRENTACCOUNT', 'UPDATESAVINGSOFFICER',false),
|
||||
('currentaccount', 'REMOVESAVINGSOFFICER_CURRENTACCOUNT','CURRENTACCOUNT', 'REMOVESAVINGSOFFICER',false),
|
||||
('currentaccount', 'APPLYANNUALFEE_CURRENTACCOUNT', 'CURRENTACCOUNT', 'APPLYANNUALFEE', true),
|
||||
('currentaccount', 'UPDATEWITHHOLDTAX_CURRENTACCOUNT', 'CURRENTACCOUNT', 'UPDATEWITHHOLDTAX', true),
|
||||
('currentaccount', 'CREATE_CURRENTACCOUNTCHARGE', 'CURRENTACCOUNTCHARGE', 'CREATE', true),
|
||||
('currentaccount', 'READ_CURRENTACCOUNTCHARGE', 'CURRENTACCOUNTCHARGE', 'READ', false),
|
||||
('currentaccount', 'UPDATE_CURRENTACCOUNTCHARGE', 'CURRENTACCOUNTCHARGE', 'UPDATE', true),
|
||||
('currentaccount', 'DELETE_CURRENTACCOUNTCHARGE', 'CURRENTACCOUNTCHARGE', 'DELETE', true),
|
||||
('currentaccount', 'PAY_CURRENTACCOUNTCHARGE', 'CURRENTACCOUNTCHARGE', 'PAY', true),
|
||||
('currentaccount', 'WAIVE_CURRENTACCOUNTCHARGE', 'CURRENTACCOUNTCHARGE', 'WAIVE', true),
|
||||
('currentaccount', 'INACTIVATE_CURRENTACCOUNTCHARGE', 'CURRENTACCOUNTCHARGE', 'INACTIVATE', true),
|
||||
('currentaccount', 'READ_CURRENTACCOUNTNOTE', 'CURRENTACCOUNTNOTE', 'READ', false),
|
||||
('currentaccount', 'CREATE_CURRENTACCOUNTNOTE', 'CURRENTACCOUNTNOTE', 'CREATE', false),
|
||||
('currentaccount', 'UPDATE_CURRENTACCOUNTNOTE', 'CURRENTACCOUNTNOTE', 'UPDATE', false),
|
||||
('currentaccount', 'DELETE_CURRENTACCOUNTNOTE', 'CURRENTACCOUNTNOTE', 'DELETE', false)
|
||||
ON CONFLICT (code) DO NOTHING;
|
||||
</sql>
|
||||
|
||||
<sql>
|
||||
INSERT INTO m_role_permission (role_id, permission_id)
|
||||
SELECT 1, id FROM m_permission
|
||||
WHERE grouping = 'currentaccount'
|
||||
ON CONFLICT DO NOTHING;
|
||||
</sql>
|
||||
|
||||
<sql>
|
||||
INSERT INTO m_role_permission (role_id, permission_id)
|
||||
SELECT DISTINCT rp.role_id, p2.id
|
||||
FROM m_role_permission rp
|
||||
JOIN m_permission p1 ON rp.permission_id = p1.id AND p1.code = 'READ_SAVINGSACCOUNT'
|
||||
JOIN m_permission p2 ON p2.grouping = 'currentaccount'
|
||||
WHERE rp.role_id != 1
|
||||
ON CONFLICT DO NOTHING;
|
||||
</sql>
|
||||
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
+3
@@ -33,4 +33,7 @@
|
||||
<include file="parts/2008_add_other_gl_mappings_to_savings_product.xml" relativeToChangelogFile="true" />
|
||||
<include file="parts/2009_add_gl_account_id_to_savings_product.xml" relativeToChangelogFile="true" />
|
||||
<include file="parts/2010_add_savings_account_cbs_fields.xml" relativeToChangelogFile="true" />
|
||||
<include file="parts/2011_add_facility_charge_mapping.xml" relativeToChangelogFile="true" />
|
||||
<include file="parts/2012_add_current_account_permissions.xml" relativeToChangelogFile="true" />
|
||||
<include file="parts/2013_add_missing_current_account_columns.xml" relativeToChangelogFile="true" />
|
||||
</databaseChangeLog>
|
||||
|
||||
+296
@@ -0,0 +1,296 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
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.
|
||||
|
||||
-->
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd">
|
||||
|
||||
<!-- Step 1: Create facility charge mapping table -->
|
||||
<changeSet id="2011-1" author="cbs-nitesh">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_facility_charge_mapping"/></not>
|
||||
</preConditions>
|
||||
<createTable tableName="m_facility_charge_mapping">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="facility_type" type="VARCHAR(60)">
|
||||
<constraints nullable="false" unique="true"/>
|
||||
</column>
|
||||
<column name="charge_id" type="BIGINT">
|
||||
<constraints nullable="true" foreignKeyName="fk_facility_charge" references="m_charge(id)"/>
|
||||
</column>
|
||||
<column name="charge_name" type="VARCHAR(200)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="default_amount" type="DECIMAL(19,6)" defaultValueNumeric="0.000000">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="charge_time_type" type="INT" defaultValueNumeric="3">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="charge_applies_to" type="INT" defaultValueNumeric="2">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="is_active" type="BOOLEAN" defaultValueBoolean="true">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</createTable>
|
||||
</changeSet>
|
||||
|
||||
<!-- Step 2: Insert facility charges into m_charge (only if not already present) -->
|
||||
<!-- Note: PostgreSQL uses false/true for boolean columns, not 0/1 -->
|
||||
<changeSet id="2011-2" author="cbs-nitesh">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_charge WHERE name = 'ATM Facility Charge' AND is_deleted = false</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_charge (name, currency_code, amount, charge_applies_to_enum, charge_time_enum,
|
||||
charge_calculation_enum, is_penalty, is_active, is_deleted, is_free_withdrawal, is_payment_type,
|
||||
income_or_liability_account_id)
|
||||
SELECT 'ATM Facility Charge', 'INR', 100.00, 2, 3, 1, false, true, false, false, false,
|
||||
(SELECT id FROM acc_gl_account WHERE classification_enum = 4 AND account_usage = 1 AND disabled = false ORDER BY id LIMIT 1);
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="2011-3" author="cbs-nitesh">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_charge WHERE name = 'ATM Withdrawal Charge' AND is_deleted = false</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_charge (name, currency_code, amount, charge_applies_to_enum, charge_time_enum,
|
||||
charge_calculation_enum, is_penalty, is_active, is_deleted, is_free_withdrawal, is_payment_type,
|
||||
income_or_liability_account_id)
|
||||
SELECT 'ATM Withdrawal Charge', 'INR', 20.00, 2, 3, 1, false, true, false, false, false,
|
||||
(SELECT id FROM acc_gl_account WHERE classification_enum = 4 AND account_usage = 1 AND disabled = false ORDER BY id LIMIT 1);
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="2011-4" author="cbs-nitesh">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_charge WHERE name = 'UPI Facility Charge' AND is_deleted = false</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_charge (name, currency_code, amount, charge_applies_to_enum, charge_time_enum,
|
||||
charge_calculation_enum, is_penalty, is_active, is_deleted, is_free_withdrawal, is_payment_type,
|
||||
income_or_liability_account_id)
|
||||
SELECT 'UPI Facility Charge', 'INR', 100.00, 2, 3, 1, false, true, false, false, false,
|
||||
(SELECT id FROM acc_gl_account WHERE classification_enum = 4 AND account_usage = 1 AND disabled = false ORDER BY id LIMIT 1);
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="2011-5" author="cbs-nitesh">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_charge WHERE name = 'POS Transaction Charge' AND is_deleted = false</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_charge (name, currency_code, amount, charge_applies_to_enum, charge_time_enum,
|
||||
charge_calculation_enum, is_penalty, is_active, is_deleted, is_free_withdrawal, is_payment_type,
|
||||
income_or_liability_account_id)
|
||||
SELECT 'POS Transaction Charge', 'INR', 100.00, 2, 3, 1, false, true, false, false, false,
|
||||
(SELECT id FROM acc_gl_account WHERE classification_enum = 4 AND account_usage = 1 AND disabled = false ORDER BY id LIMIT 1);
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="2011-6" author="cbs-nitesh">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_charge WHERE name = 'Cheque Book Charge' AND is_deleted = false</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_charge (name, currency_code, amount, charge_applies_to_enum, charge_time_enum,
|
||||
charge_calculation_enum, is_penalty, is_active, is_deleted, is_free_withdrawal, is_payment_type,
|
||||
income_or_liability_account_id)
|
||||
SELECT 'Cheque Book Charge', 'INR', 300.00, 2, 3, 1, false, true, false, false, false,
|
||||
(SELECT id FROM acc_gl_account WHERE classification_enum = 4 AND account_usage = 1 AND disabled = false ORDER BY id LIMIT 1);
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="2011-7" author="cbs-nitesh">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_charge WHERE name = 'IMPS Facility Charge' AND is_deleted = false</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_charge (name, currency_code, amount, charge_applies_to_enum, charge_time_enum,
|
||||
charge_calculation_enum, is_penalty, is_active, is_deleted, is_free_withdrawal, is_payment_type,
|
||||
income_or_liability_account_id)
|
||||
SELECT 'IMPS Facility Charge', 'INR', 5.00, 2, 3, 1, false, true, false, false, false,
|
||||
(SELECT id FROM acc_gl_account WHERE classification_enum = 4 AND account_usage = 1 AND disabled = false ORDER BY id LIMIT 1);
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="2011-8" author="cbs-nitesh">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_charge WHERE name = 'SMS Alert Monthly Charge' AND is_deleted = false</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_charge (name, currency_code, amount, charge_applies_to_enum, charge_time_enum,
|
||||
charge_calculation_enum, is_penalty, is_active, is_deleted, is_free_withdrawal, is_payment_type,
|
||||
income_or_liability_account_id)
|
||||
SELECT 'SMS Alert Monthly Charge', 'INR', 15.00, 2, 7, 1, false, true, false, false, false,
|
||||
(SELECT id FROM acc_gl_account WHERE classification_enum = 4 AND account_usage = 1 AND disabled = false ORDER BY id LIMIT 1);
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="2011-9" author="cbs-nitesh">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_charge WHERE name = 'BBPS Facility Charge' AND is_deleted = false</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_charge (name, currency_code, amount, charge_applies_to_enum, charge_time_enum,
|
||||
charge_calculation_enum, is_penalty, is_active, is_deleted, is_free_withdrawal, is_payment_type,
|
||||
income_or_liability_account_id)
|
||||
SELECT 'BBPS Facility Charge', 'INR', 2.00, 2, 3, 1, false, true, false, false, false,
|
||||
(SELECT id FROM acc_gl_account WHERE classification_enum = 4 AND account_usage = 1 AND disabled = false ORDER BY id LIMIT 1);
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="2011-10" author="cbs-nitesh">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_charge WHERE name = 'Insurance Cover Charge' AND is_deleted = false</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_charge (name, currency_code, amount, charge_applies_to_enum, charge_time_enum,
|
||||
charge_calculation_enum, is_penalty, is_active, is_deleted, is_free_withdrawal, is_payment_type,
|
||||
income_or_liability_account_id)
|
||||
SELECT 'Insurance Cover Charge', 'INR', 500.00, 2, 6, 1, false, true, false, false, false,
|
||||
(SELECT id FROM acc_gl_account WHERE classification_enum = 4 AND account_usage = 1 AND disabled = false ORDER BY id LIMIT 1);
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="2011-11" author="cbs-nitesh">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_charge WHERE name = 'BEPG Facility Charge' AND is_deleted = false</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_charge (name, currency_code, amount, charge_applies_to_enum, charge_time_enum,
|
||||
charge_calculation_enum, is_penalty, is_active, is_deleted, is_free_withdrawal, is_payment_type,
|
||||
income_or_liability_account_id)
|
||||
SELECT 'BEPG Facility Charge', 'INR', 5.00, 2, 3, 1, false, true, false, false, false,
|
||||
(SELECT id FROM acc_gl_account WHERE classification_enum = 4 AND account_usage = 1 AND disabled = false ORDER BY id LIMIT 1);
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="2011-12" author="cbs-nitesh">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_charge WHERE name = 'NEFT Facility Charge' AND is_deleted = false</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_charge (name, currency_code, amount, charge_applies_to_enum, charge_time_enum,
|
||||
charge_calculation_enum, is_penalty, is_active, is_deleted, is_free_withdrawal, is_payment_type,
|
||||
income_or_liability_account_id)
|
||||
SELECT 'NEFT Facility Charge', 'INR', 5.00, 2, 3, 1, false, true, false, false, false,
|
||||
(SELECT id FROM acc_gl_account WHERE classification_enum = 4 AND account_usage = 1 AND disabled = false ORDER BY id LIMIT 1);
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="2011-13" author="cbs-nitesh">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_charge WHERE name = 'RTGS Facility Charge' AND is_deleted = false</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_charge (name, currency_code, amount, charge_applies_to_enum, charge_time_enum,
|
||||
charge_calculation_enum, is_penalty, is_active, is_deleted, is_free_withdrawal, is_payment_type,
|
||||
income_or_liability_account_id)
|
||||
SELECT 'RTGS Facility Charge', 'INR', 25.00, 2, 3, 1, false, true, false, false, false,
|
||||
(SELECT id FROM acc_gl_account WHERE classification_enum = 4 AND account_usage = 1 AND disabled = false ORDER BY id LIMIT 1);
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="2011-14" author="cbs-nitesh">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_charge WHERE name = 'Inter-Bank Cap Charge' AND is_deleted = false</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_charge (name, currency_code, amount, charge_applies_to_enum, charge_time_enum,
|
||||
charge_calculation_enum, is_penalty, is_active, is_deleted, is_free_withdrawal, is_payment_type,
|
||||
income_or_liability_account_id)
|
||||
SELECT 'Inter-Bank Cap Charge', 'INR', 0.00, 2, 3, 1, false, true, false, false, false,
|
||||
(SELECT id FROM acc_gl_account WHERE classification_enum = 4 AND account_usage = 1 AND disabled = false ORDER BY id LIMIT 1);
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="2011-15" author="cbs-nitesh">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_charge WHERE name = 'Withdrawal Facility Charge' AND is_deleted = false</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_charge (name, currency_code, amount, charge_applies_to_enum, charge_time_enum,
|
||||
charge_calculation_enum, is_penalty, is_active, is_deleted, is_free_withdrawal, is_payment_type,
|
||||
income_or_liability_account_id)
|
||||
SELECT 'Withdrawal Facility Charge', 'INR', 5.00, 2, 3, 1, false, true, false, false, false,
|
||||
(SELECT id FROM acc_gl_account WHERE classification_enum = 4 AND account_usage = 1 AND disabled = false ORDER BY id LIMIT 1);
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="2011-16" author="cbs-nitesh">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_charge WHERE name = 'Deposit KYC Charge' AND is_deleted = false</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_charge (name, currency_code, amount, charge_applies_to_enum, charge_time_enum,
|
||||
charge_calculation_enum, is_penalty, is_active, is_deleted, is_free_withdrawal, is_payment_type,
|
||||
income_or_liability_account_id)
|
||||
SELECT 'Deposit KYC Charge', 'INR', 0.00, 2, 3, 1, false, true, false, false, false,
|
||||
(SELECT id FROM acc_gl_account WHERE classification_enum = 4 AND account_usage = 1 AND disabled = false ORDER BY id LIMIT 1);
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="2011-17" author="cbs-nitesh">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_charge WHERE name = 'Virtual Debit Card Charge' AND is_deleted = false</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_charge (name, currency_code, amount, charge_applies_to_enum, charge_time_enum,
|
||||
charge_calculation_enum, is_penalty, is_active, is_deleted, is_free_withdrawal, is_payment_type,
|
||||
income_or_liability_account_id)
|
||||
SELECT 'Virtual Debit Card Charge', 'INR', 199.00, 2, 3, 1, false, true, false, false, false,
|
||||
(SELECT id FROM acc_gl_account WHERE classification_enum = 4 AND account_usage = 1 AND disabled = false ORDER BY id LIMIT 1);
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<!-- Step 3: Insert mapping rows linking facility_type → charge_id -->
|
||||
<changeSet id="2011-18" author="cbs-nitesh">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_facility_charge_mapping WHERE facility_type = 'ATM_FACILITY'</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_facility_charge_mapping (facility_type, charge_name, default_amount, charge_time_type, charge_applies_to, charge_id, is_active)
|
||||
VALUES
|
||||
('ATM_FACILITY', 'ATM Facility Charge', 100.00, 3, 2, (SELECT id FROM m_charge WHERE name = 'ATM Facility Charge' AND is_deleted = false LIMIT 1), true),
|
||||
('ATM_WITHDRAWAL', 'ATM Withdrawal Charge', 20.00, 3, 2, (SELECT id FROM m_charge WHERE name = 'ATM Withdrawal Charge' AND is_deleted = false LIMIT 1), true),
|
||||
('UPI_FACILITY', 'UPI Facility Charge', 100.00, 3, 2, (SELECT id FROM m_charge WHERE name = 'UPI Facility Charge' AND is_deleted = false LIMIT 1), true),
|
||||
('POS_TRANSACTIONS', 'POS Transaction Charge', 100.00, 3, 2, (SELECT id FROM m_charge WHERE name = 'POS Transaction Charge' AND is_deleted = false LIMIT 1), true),
|
||||
('CHEQUE_BOOK', 'Cheque Book Charge', 300.00, 3, 2, (SELECT id FROM m_charge WHERE name = 'Cheque Book Charge' AND is_deleted = false LIMIT 1), true),
|
||||
('IMPS_FACILITY', 'IMPS Facility Charge', 5.00, 3, 2, (SELECT id FROM m_charge WHERE name = 'IMPS Facility Charge' AND is_deleted = false LIMIT 1), true),
|
||||
('SMS_ALERTS', 'SMS Alert Monthly Charge', 15.00, 7, 2, (SELECT id FROM m_charge WHERE name = 'SMS Alert Monthly Charge' AND is_deleted = false LIMIT 1), true),
|
||||
('BBPS_FACILITY', 'BBPS Facility Charge', 2.00, 3, 2, (SELECT id FROM m_charge WHERE name = 'BBPS Facility Charge' AND is_deleted = false LIMIT 1), true),
|
||||
('INSURANCE_COVER', 'Insurance Cover Charge', 500.00, 6, 2, (SELECT id FROM m_charge WHERE name = 'Insurance Cover Charge' AND is_deleted = false LIMIT 1), true),
|
||||
('BEPG_FACILITY', 'BEPG Facility Charge', 5.00, 3, 2, (SELECT id FROM m_charge WHERE name = 'BEPG Facility Charge' AND is_deleted = false LIMIT 1), true),
|
||||
('NEFT_FACILITY', 'NEFT Facility Charge', 5.00, 3, 2, (SELECT id FROM m_charge WHERE name = 'NEFT Facility Charge' AND is_deleted = false LIMIT 1), true),
|
||||
('RTGS_FACILITY', 'RTGS Facility Charge', 25.00, 3, 2, (SELECT id FROM m_charge WHERE name = 'RTGS Facility Charge' AND is_deleted = false LIMIT 1), true),
|
||||
('INTER_BANK_TOTAL_CAP','Inter-Bank Cap Charge', 0.00, 3, 2, (SELECT id FROM m_charge WHERE name = 'Inter-Bank Cap Charge' AND is_deleted = false LIMIT 1), true),
|
||||
('WITHDRAWAL_FACILITY', 'Withdrawal Facility Charge', 5.00, 3, 2, (SELECT id FROM m_charge WHERE name = 'Withdrawal Facility Charge' AND is_deleted = false LIMIT 1), true),
|
||||
('DEPOSIT_FACILITY_KYC','Deposit KYC Charge', 0.00, 3, 2, (SELECT id FROM m_charge WHERE name = 'Deposit KYC Charge' AND is_deleted = false LIMIT 1), true),
|
||||
('VIRTUAL_DEBIT_CARD', 'Virtual Debit Card Charge', 199.00, 3, 2, (SELECT id FROM m_charge WHERE name = 'Virtual Debit Card Charge' AND is_deleted = false LIMIT 1), true);
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd">
|
||||
|
||||
<changeSet id="2012-current-account-permissions" author="lincpay">
|
||||
<comment>Seed all current account permissions and assign to super-admin role</comment>
|
||||
|
||||
<sql>
|
||||
INSERT INTO m_permission (grouping, code, entity_name, action_name, can_maker_checker) VALUES
|
||||
('currentaccount', 'READ_CURRENTACCOUNT', 'CURRENTACCOUNT', 'READ', false),
|
||||
('currentaccount', 'CREATE_CURRENTACCOUNT', 'CURRENTACCOUNT', 'CREATE', false),
|
||||
('currentaccount', 'UPDATE_CURRENTACCOUNT', 'CURRENTACCOUNT', 'UPDATE', false),
|
||||
('currentaccount', 'DELETE_CURRENTACCOUNT', 'CURRENTACCOUNT', 'DELETE', false),
|
||||
('currentaccount', 'APPROVE_CURRENTACCOUNT', 'CURRENTACCOUNT', 'APPROVE', true),
|
||||
('currentaccount', 'APPROVALUNDO_CURRENTACCOUNT', 'CURRENTACCOUNT', 'APPROVALUNDO', true),
|
||||
('currentaccount', 'REJECT_CURRENTACCOUNT', 'CURRENTACCOUNT', 'REJECT', true),
|
||||
('currentaccount', 'WITHDRAW_CURRENTACCOUNT', 'CURRENTACCOUNT', 'WITHDRAW', true),
|
||||
('currentaccount', 'ACTIVATE_CURRENTACCOUNT', 'CURRENTACCOUNT', 'ACTIVATE', true),
|
||||
('currentaccount', 'CLOSE_CURRENTACCOUNT', 'CURRENTACCOUNT', 'CLOSE', true),
|
||||
('currentaccount', 'DEPOSIT_CURRENTACCOUNT', 'CURRENTACCOUNT', 'DEPOSIT', true),
|
||||
('currentaccount', 'WITHDRAWAL_CURRENTACCOUNT', 'CURRENTACCOUNT', 'WITHDRAWAL', true),
|
||||
('currentaccount', 'POSTINTEREST_CURRENTACCOUNT', 'CURRENTACCOUNT', 'POSTINTEREST', true),
|
||||
('currentaccount', 'CALCULATEINTEREST_CURRENTACCOUNT', 'CURRENTACCOUNT', 'CALCULATEINTEREST', false),
|
||||
('currentaccount', 'BLOCK_CURRENTACCOUNT', 'CURRENTACCOUNT', 'BLOCK', true),
|
||||
('currentaccount', 'UNBLOCK_CURRENTACCOUNT', 'CURRENTACCOUNT', 'UNBLOCK', true),
|
||||
('currentaccount', 'BLOCKDEPOSIT_CURRENTACCOUNT', 'CURRENTACCOUNT', 'BLOCKDEPOSIT', true),
|
||||
('currentaccount', 'UNBLOCKDEPOSIT_CURRENTACCOUNT', 'CURRENTACCOUNT', 'UNBLOCKDEPOSIT', true),
|
||||
('currentaccount', 'BLOCKWITHDRAWAL_CURRENTACCOUNT', 'CURRENTACCOUNT', 'BLOCKWITHDRAWAL', true),
|
||||
('currentaccount', 'UNBLOCKWITHDRAWAL_CURRENTACCOUNT', 'CURRENTACCOUNT', 'UNBLOCKWITHDRAWAL', true),
|
||||
('currentaccount', 'HOLDAMOUNT_CURRENTACCOUNT', 'CURRENTACCOUNT', 'HOLDAMOUNT', true),
|
||||
('currentaccount', 'UPDATESAVINGSOFFICER_CURRENTACCOUNT','CURRENTACCOUNT', 'UPDATESAVINGSOFFICER',false),
|
||||
('currentaccount', 'REMOVESAVINGSOFFICER_CURRENTACCOUNT','CURRENTACCOUNT', 'REMOVESAVINGSOFFICER',false),
|
||||
('currentaccount', 'APPLYANNUALFEE_CURRENTACCOUNT', 'CURRENTACCOUNT', 'APPLYANNUALFEE', true),
|
||||
('currentaccount', 'UPDATEWITHHOLDTAX_CURRENTACCOUNT', 'CURRENTACCOUNT', 'UPDATEWITHHOLDTAX', true),
|
||||
('currentaccount', 'CREATE_CURRENTACCOUNTCHARGE', 'CURRENTACCOUNTCHARGE', 'CREATE', true),
|
||||
('currentaccount', 'READ_CURRENTACCOUNTCHARGE', 'CURRENTACCOUNTCHARGE', 'READ', false),
|
||||
('currentaccount', 'UPDATE_CURRENTACCOUNTCHARGE', 'CURRENTACCOUNTCHARGE', 'UPDATE', true),
|
||||
('currentaccount', 'DELETE_CURRENTACCOUNTCHARGE', 'CURRENTACCOUNTCHARGE', 'DELETE', true),
|
||||
('currentaccount', 'PAY_CURRENTACCOUNTCHARGE', 'CURRENTACCOUNTCHARGE', 'PAY', true),
|
||||
('currentaccount', 'WAIVE_CURRENTACCOUNTCHARGE', 'CURRENTACCOUNTCHARGE', 'WAIVE', true),
|
||||
('currentaccount', 'INACTIVATE_CURRENTACCOUNTCHARGE', 'CURRENTACCOUNTCHARGE', 'INACTIVATE', true),
|
||||
('currentaccount', 'READ_CURRENTACCOUNTNOTE', 'CURRENTACCOUNTNOTE', 'READ', false),
|
||||
('currentaccount', 'CREATE_CURRENTACCOUNTNOTE', 'CURRENTACCOUNTNOTE', 'CREATE', false),
|
||||
('currentaccount', 'UPDATE_CURRENTACCOUNTNOTE', 'CURRENTACCOUNTNOTE', 'UPDATE', false),
|
||||
('currentaccount', 'DELETE_CURRENTACCOUNTNOTE', 'CURRENTACCOUNTNOTE', 'DELETE', false)
|
||||
ON CONFLICT (code) DO NOTHING;
|
||||
</sql>
|
||||
|
||||
<sql>
|
||||
INSERT INTO m_role_permission (role_id, permission_id)
|
||||
SELECT 1, id FROM m_permission
|
||||
WHERE grouping = 'currentaccount'
|
||||
ON CONFLICT DO NOTHING;
|
||||
</sql>
|
||||
|
||||
<sql>
|
||||
INSERT INTO m_role_permission (role_id, permission_id)
|
||||
SELECT DISTINCT rp.role_id, p2.id
|
||||
FROM m_role_permission rp
|
||||
JOIN m_permission p1 ON rp.permission_id = p1.id AND p1.code = 'READ_SAVINGSACCOUNT'
|
||||
JOIN m_permission p2 ON p2.grouping = 'currentaccount'
|
||||
WHERE rp.role_id != 1
|
||||
ON CONFLICT DO NOTHING;
|
||||
</sql>
|
||||
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
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.
|
||||
|
||||
-->
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd">
|
||||
|
||||
<changeSet id="2013-add-missing-current-account-columns" author="fineract">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="m_current_account" columnName="account_closed_zero_balance_in_day_closing"/>
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_current_account">
|
||||
<column name="account_closed_zero_balance_in_day_closing" type="boolean" defaultValueBoolean="false">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="valid_for_period" type="varchar(10)">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="od_account_closed_zero_balance_in_day_closing" type="boolean" defaultValueBoolean="false">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
Reference in New Issue
Block a user