initial code push
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,21 @@
|
||||
Bare Bones Demo
|
||||
======
|
||||
|
||||
This demo database contains:
|
||||
|
||||
- DDL of latest schema
|
||||
- Minimum reference data required for deployment of platform which is:
|
||||
- Its mandatory to have one selected currency so we default to US Dollar
|
||||
- Its mandatory to have one root or head office, so we have one created by default called a 'Head Office'
|
||||
- Permissions supported/needed by latest release of software are setup
|
||||
- Its mandatory to have at least one role when creating new users so we have one role created by default called 'Super user' which has the special permission 'Full Authorisation'. Any user with this role can do anything in the system.
|
||||
- Its required to have at least one application user setup so remaining setup can be done through ui so we have on application user created by default with username 'mifos' with a password of 'password'. Application users must be associated with an office and a role so this user is associated with 'Head office' and 'Super user' role allowing this user to do any operation in any office(branch).
|
||||
- Configuration
|
||||
- No 'additional data' through the 'datatables' approach is setup
|
||||
- One 'code' is setup called 'Client Identifier' with default values of {'Passport number'} - (required for Client Identity Document functionalty)
|
||||
- Enable/Disable configuration has one entry named 'maker-checker' to allow people to enable disable this feature at global level. It is off or disabled by default.
|
||||
- No products (loans, deposit, savings) are setup
|
||||
- No Charges (fees or penalties) are setup
|
||||
- No Staff (employees) are setup (loan officers are optional when submiting new loan application)
|
||||
- No Portfolio data (no clients, groups, loan accounts, deposit accounts, savings accounts)
|
||||
- No Accounting data (no chart of accounts is setup, by default accounting with respect to portfolio items is off unless enabled when creating a loan product.)
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,9 @@
|
||||
CEDA Microfinance (Kampala, Uganda)
|
||||
======
|
||||
|
||||
This demo database contains:
|
||||
|
||||
- DDL of latest schema
|
||||
- Minimum reference data required for deployment of platform
|
||||
- Customisatons for CEDA on m_code/m_code_value tables, extra datatables for client and loan data capture
|
||||
- Extra reports over and beyond core reports customisation for CEDA operations
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,344 @@
|
||||
DELETE FROM `ref_loan_transaction_processing_strategy` WHERE id in (1, 3, 4);
|
||||
|
||||
INSERT INTO `m_code` (`code_name`, `is_system_defined`)
|
||||
VALUES
|
||||
('FieldOfEmployment', '0'),
|
||||
('EducationLevel', '0'),
|
||||
('MaritalStatus', '0'),
|
||||
('PovertyStatus', '0');
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.Banker', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "FieldOfEmployment";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.SoftwareDeveloper', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "FieldOfEmployment";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.University', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "EducationLevel";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.Secondary', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "EducationLevel";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.Primary', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "EducationLevel";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.Married', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "MaritalStatus";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.Single', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "MaritalStatus";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.Divorced', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "MaritalStatus";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.Widow', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "MaritalStatus";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.PovertyStatus.Band1', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "PovertyStatus";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.PovertyStatus.Band2', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "PovertyStatus";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.PovertyStatus.Band3', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "PovertyStatus";
|
||||
|
||||
-- ======= ADD in loan purspose and collateral values to enable this functionality
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.House', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "LoanCollateral";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.Television', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "LoanCollateral";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.Gold', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "LoanCollateral";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.Agriculture', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "LoanPurpose";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.Manufacturing', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "LoanPurpose";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.HousingImprovement', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "LoanPurpose";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.Male', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "Gender";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.Female', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "Gender";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.Yes', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "YesNo";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.No', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "YesNo";
|
||||
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `client additional data`;
|
||||
CREATE TABLE `client additional data` (
|
||||
`client_id` bigint(20) NOT NULL,
|
||||
`Gender_cd` int(11) NOT NULL,
|
||||
`Date of Birth` date NOT NULL,
|
||||
`Home address` text NOT NULL,
|
||||
`Telephone number` varchar(20) NOT NULL,
|
||||
`Telephone number (2nd)` varchar(20) NOT NULL,
|
||||
`Email address` varchar(50) NOT NULL,
|
||||
`EducationLevel_cd` int(11) NOT NULL,
|
||||
`MaritalStatus_cd` int(11) NOT NULL,
|
||||
`Number of children` int(11) NOT NULL,
|
||||
`Citizenship` varchar(50) NOT NULL,
|
||||
`PovertyStatus_cd` int(11) NOT NULL,
|
||||
`YesNo_cd_Employed` int(11) NOT NULL,
|
||||
`FieldOfEmployment_cd_Field of employment` int(11) DEFAULT NULL,
|
||||
`Employer name` varchar(50) DEFAULT NULL,
|
||||
`Number of years` int(11) DEFAULT NULL,
|
||||
`Monthly salary` decimal(19,6) DEFAULT NULL,
|
||||
`YesNo_cd_Self employed` int(11) NOT NULL,
|
||||
`FieldOfEmployment_cd_Field of self-employment` int(11) DEFAULT NULL,
|
||||
`Business address` text,
|
||||
`Number of employees` int(11) DEFAULT NULL,
|
||||
`Monthly salaries paid` decimal(19,6) DEFAULT NULL,
|
||||
`Monthly net income of business activity` decimal(19,6) DEFAULT NULL,
|
||||
`Monthly rent` decimal(19,6) DEFAULT NULL,
|
||||
`Other income generating activities` varchar(100) DEFAULT NULL,
|
||||
`YesNo_cd_Bookkeeping` int(11) DEFAULT NULL,
|
||||
`YesNo_cd_Loans with other institutions` int(11) NOT NULL,
|
||||
`From whom` varchar(100) DEFAULT NULL,
|
||||
`Amount` decimal(19,6) DEFAULT NULL,
|
||||
`Interest rate pa` decimal(19,6) DEFAULT NULL,
|
||||
`Number of people depending on overal income` int(11) NOT NULL,
|
||||
`YesNo_cd_Bank account` int(11) NOT NULL,
|
||||
`YesNo_cd_Business plan provided` int(11) NOT NULL,
|
||||
`YesNo_cd_Access to internet` int(11) DEFAULT NULL,
|
||||
`Introduced by` varchar(100) DEFAULT NULL,
|
||||
`Known to introducer since` varchar(100) NOT NULL,
|
||||
`Last visited by` varchar(100) DEFAULT NULL,
|
||||
`Last visited on` date NOT NULL,
|
||||
PRIMARY KEY (`client_id`),
|
||||
CONSTRAINT `FK_client_additional_data` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `impact measurement`;
|
||||
CREATE TABLE `impact measurement` (
|
||||
`loan_id` bigint(20) NOT NULL,
|
||||
`YesNo_cd_RepaidOnSchedule` int(11) NOT NULL,
|
||||
`ReasonNotRepaidOnSchedule` text DEFAULT NULL,
|
||||
`How was Loan Amount Invested` text NOT NULL,
|
||||
`Additional Income Generated` decimal(19,6) NOT NULL,
|
||||
`Additional Income Used For` text NOT NULL,
|
||||
`YesNo_cd_NewJobsCreated` int(11) NOT NULL,
|
||||
`Number of Jobs Created` bigint(20) DEFAULT NULL,
|
||||
PRIMARY KEY (`loan_id`),
|
||||
CONSTRAINT `FK_impact measurement` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `loan additional data`;
|
||||
CREATE TABLE `loan additional data` (
|
||||
`loan_id` bigint(20) NOT NULL,
|
||||
`PurposeOfLoan_cd` int(11) NOT NULL,
|
||||
`CollateralType_cd` int(11) NOT NULL,
|
||||
`Collateral notes` text NOT NULL,
|
||||
`YesNo_cd_Guarantor` int(11) NOT NULL,
|
||||
`Guarantor name` varchar(100) DEFAULT NULL,
|
||||
`Guarantor relation` varchar(100) DEFAULT NULL,
|
||||
`Guarantor address` varchar(100) DEFAULT NULL,
|
||||
`Guarantor telephone number` varchar(20) DEFAULT NULL,
|
||||
PRIMARY KEY (`loan_id`),
|
||||
CONSTRAINT `FK_loan_additional_data` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- datatables mapping
|
||||
INSERT INTO `x_registered_table`
|
||||
(`registered_table_name`,
|
||||
`application_table_name`)
|
||||
VALUES
|
||||
('client additional data', 'm_client'),
|
||||
('impact measurement', 'm_loan'),
|
||||
('loan additional data', 'm_loan');
|
||||
|
||||
-- make sure permissions created for registered datatables
|
||||
/* add a create, read, update and delete permission for each registered datatable */
|
||||
insert into m_permission(grouping, `code`, entity_name, action_name)
|
||||
select 'datatable', concat('CREATE_', r.registered_table_name), r.registered_table_name, 'CREATE'
|
||||
from x_registered_table r;
|
||||
|
||||
insert into m_permission(grouping, `code`, entity_name, action_name)
|
||||
select 'datatable', concat('READ_', r.registered_table_name), r.registered_table_name, 'READ'
|
||||
from x_registered_table r;
|
||||
|
||||
insert into m_permission(grouping, `code`, entity_name, action_name)
|
||||
select 'datatable', concat('UPDATE_', r.registered_table_name), r.registered_table_name, 'UPDATE'
|
||||
from x_registered_table r;
|
||||
|
||||
insert into m_permission(grouping, `code`, entity_name, action_name)
|
||||
select 'datatable', concat('DELETE_', r.registered_table_name), r.registered_table_name, 'DELETE'
|
||||
from x_registered_table r;
|
||||
|
||||
|
||||
-- ==== Chart of Accounts =====
|
||||
truncate `acc_gl_account`;
|
||||
INSERT INTO `acc_gl_account` VALUES
|
||||
(1,'Petty Cash Balances',NULL,'11100',0,1,2,1,NULL),
|
||||
(2,'Cash in Valut 1',NULL,'11101',0,1,1,1,NULL),
|
||||
(3,'Bank Balances',NULL,'11200',0,1,2,1,NULL),
|
||||
(4,'Centenary Opening Account',NULL,'11201',0,1,1,1,NULL),
|
||||
(5,'Centenary Expense Account',NULL,'11202',0,1,1,1,NULL),
|
||||
(6,'Centenary USD Account',NULL,'11203',0,1,1,1,NULL),
|
||||
(7,'Loans and Advances',NULL,'13100',0,1,2,1,NULL),
|
||||
(8,'Loans to Clients',NULL,'13101',0,1,1,1,NULL),
|
||||
(9,'Outstanding Interest',NULL,'13102',0,1,1,1,NULL),
|
||||
(10,'Outstanding Late Payment Interest',NULL,'13103',0,1,1,1,NULL),
|
||||
(11,'Outstanding Bank Fees to be collected',NULL,'13104',0,1,1,1,NULL),
|
||||
(12,'WriteOff Accounts',NULL,'13200',0,1,2,1,NULL),
|
||||
(13,'Write-offs (use for funds coming in)',NULL,'13201',0,1,1,1,NULL),
|
||||
(14,'Write-offs outstanding principal',NULL,'13202',0,1,1,1,NULL),
|
||||
(15,'Write-offs outstanding interest',NULL,'13203',0,1,1,1,NULL),
|
||||
(16,'Write-offs collected bank fees',NULL,'13204',0,1,1,1,NULL),
|
||||
(17,'Write-offs hardware/furniture',NULL,'13205',0,1,1,1,NULL),
|
||||
(18,'Fixed Assets',NULL,'14100',0,1,2,1,NULL),
|
||||
(19,'Office Equipment',NULL,'14101',0,1,1,1,NULL),
|
||||
(20,'Suspense Items (unidentified deposits)',NULL,'15000',0,1,2,1,NULL),
|
||||
(21,'Assets',NULL,'10000',0,1,2,1,NULL),
|
||||
(22,'Liabilities',NULL,'20000',0,1,2,2,NULL),
|
||||
(23,'Shares Account',NULL,'26100',0,1,2,2,NULL),
|
||||
(24,'Shares Captial',NULL,'26101',0,1,1,2,NULL),
|
||||
(25,'Donated Equity',NULL,'26300',0,1,2,2,NULL),
|
||||
(26,'Donated Equity Ameropa Foundation',NULL,'26301',0,1,1,2,NULL),
|
||||
(27,'Donated Equity e.h',NULL,'26302',0,1,1,2,NULL),
|
||||
(28,'Overpaid Amounts',NULL,'27000',0,1,2,2,NULL),
|
||||
(29,'Loss Provision',NULL,'28000',0,1,2,2,NULL),
|
||||
(30,'Provision Outstanding Principal',NULL,'28001',0,1,1,2,NULL),
|
||||
(31,'Provision Oustanding Interest',NULL,'28002',0,1,1,2,NULL),(32,'Income',NULL,'30000',0,1,2,4,NULL),
|
||||
(33,'Interest Income from Loans',NULL,'31100',0,1,2,4,NULL),
|
||||
(34,'Interest on Loans',NULL,'31101',0,1,1,4,NULL),
|
||||
(35,'Late Payment Interest',NULL,'31102',0,1,1,4,NULL),
|
||||
(36,'Income from Micro credit & Lending Activities',NULL,'31300',0,1,2,4,NULL),
|
||||
(37,'Collected Bank Fees Receivable',NULL,'6201',0,1,1,4,NULL),
|
||||
(38,'Deposits from Loans Write Off',NULL,'31400',0,1,2,4,NULL),
|
||||
(39,'Expenditure',NULL,'40000',0,1,2,5,NULL),
|
||||
(40,'Office Expenditure Account',NULL,'42100',0,1,2,5,NULL),
|
||||
(41,'Water Charges',NULL,'42102',0,1,1,5,NULL),
|
||||
(42,'Electricity Charges',NULL,'42103',0,1,1,5,NULL),
|
||||
(43,'Printing and Stationary',NULL,'42105',0,1,1,5,NULL),
|
||||
(44,'Office Rent',NULL,'42107',0,1,1,5,NULL),
|
||||
(45,'Marketing Expense',NULL,'42109',0,1,1,5,NULL),
|
||||
(46,'Office utilities',NULL,'42112',0,1,1,5,'(supplies, toiletries, kitchen)'),
|
||||
(47,'Furniture',NULL,'42113',0,1,1,5,NULL),
|
||||
(48,'CEDA Meeting Expense',NULL,'42114',0,1,1,5,NULL),
|
||||
(49,'Employee Personal Expsense Account',NULL,'42200',0,1,2,5,NULL),
|
||||
(50,'Salary Alice',NULL,'42201',0,1,1,5,NULL),
|
||||
(51,'Salary Irene',NULL,'42202',0,1,1,5,NULL),
|
||||
(52,'Salary Richard',NULL,'42203',0,1,1,5,NULL),
|
||||
(53,'Salary Loan Officer TBA',NULL,'42204',0,1,1,5,NULL),
|
||||
(54,'Medical Insurance Alice & Family',NULL,'42205',0,1,1,5,NULL),
|
||||
(55,'Medical Insurance Irene',NULL,'42206',0,1,1,5,NULL),
|
||||
(56,'Medical Insurance Richard',NULL,'42207',0,1,1,5,NULL),
|
||||
(57,'Medical Insurance Loan Officer TBA',NULL,'42208',0,1,1,5,NULL),
|
||||
(58,'PAYE all employees',NULL,'42209',0,1,1,5,NULL),
|
||||
(59,'NSSF all employees',NULL,'42210',0,1,1,5,NULL),
|
||||
(60,'Lunch Allowances all employees',NULL,'42211',0,1,1,5,NULL),
|
||||
(61,'IT software and maintenance',NULL,'42300',0,1,2,5,NULL),
|
||||
(62,'Mifos maintenance contract 12 months',NULL,'42301',0,1,1,5,NULL),
|
||||
(63,'VPS Contract 12 months',NULL,'42302',0,1,1,5,NULL),
|
||||
(64,'Bulk SMS Service',NULL,'42303',0,1,1,5,NULL),
|
||||
(65,'Support Accounting Software',NULL,'42304',0,1,1,5,NULL),
|
||||
(66,'Mifos Instance Setup',NULL,'42305',0,1,1,5,NULL),
|
||||
(67,'Misc support expense',NULL,'42306',0,1,1,5,NULL),
|
||||
(68,'Warid Mobile Line',NULL,'42307',0,1,1,5,NULL),
|
||||
(69,'Landline',NULL,'42308',0,1,1,5,NULL),
|
||||
(70,'Modem Alice',NULL,'42309',0,1,1,5,NULL),
|
||||
(71,'Modem Irene',NULL,'42310',0,1,1,5,NULL),
|
||||
(72,'Modem Richard',NULL,'42311',0,1,1,5,NULL),
|
||||
(73,'Repairs',NULL,'42312',0,1,1,5,NULL),
|
||||
(74,'Airtime Expenses',NULL,'42400',0,1,2,5,NULL),
|
||||
(75,'Airtime Alice',NULL,'42401',0,1,1,5,NULL),
|
||||
(76,'Airtime Richard',NULL,'42402',0,1,1,5,NULL),
|
||||
(77,'Airtime Loan Office TBA',NULL,'42403',0,1,1,5,NULL),
|
||||
(78,'Special Airtime Alice',NULL,'42404',0,1,1,5,NULL),
|
||||
(79,'Transportation',NULL,'42500',0,1,2,5,NULL),
|
||||
(80,'Flat monthly transportation cost',NULL,'42501',0,1,1,5,NULL),
|
||||
(81,'Faciliation cost for Richard',NULL,'42502',0,1,1,5,NULL),
|
||||
(82,'Faciliation cost for Loan Officer TBA',NULL,'42503',0,1,1,5,NULL),
|
||||
(83,'Consultancy Expenses',NULL,'42600',0,1,2,5,NULL),
|
||||
(84,'Audit Fees',NULL,'42601',0,1,1,5,NULL),
|
||||
(85,'Legal Fees',NULL,'42602',0,1,1,5,NULL),
|
||||
(86,'Miscellaneous Expenses Account',NULL,'42700',0,1,2,5,NULL),
|
||||
(87,'MFI License',NULL,'42703',0,1,1,5,NULL),
|
||||
(88,'Sundy Expenses',NULL,'42704',0,1,1,5,NULL),
|
||||
(89,'Bank Fees',NULL,'42800',0,1,2,5,NULL),
|
||||
(90,'Bank Charges Operating Account',NULL,'42801',0,1,1,5,NULL),
|
||||
(91,'Bank Charges Expense Account',NULL,'42802',0,1,1,5,NULL),
|
||||
(92,'E.H Account',NULL,'42900',0,1,2,5,NULL),
|
||||
(93,'Airtime',NULL,'42901',0,1,1,5,NULL),
|
||||
(94,'Modem',NULL,'42902',0,1,1,5,NULL),
|
||||
(95,'Meals',NULL,'42903',0,1,1,5,NULL),
|
||||
(96,'Transportation',NULL,'42904',0,1,1,5,NULL),
|
||||
(97,'Miscellaneous',NULL,'42905',0,1,1,5,NULL);
|
||||
@@ -0,0 +1,104 @@
|
||||
DELETE FROM `m_organisation_currency` WHERE id>0;
|
||||
|
||||
INSERT INTO `m_organisation_currency`
|
||||
(
|
||||
`code`,
|
||||
`decimal_places`,
|
||||
`name`,
|
||||
`display_symbol`,
|
||||
`internationalized_name_code`)
|
||||
VALUES
|
||||
('UGX', 2, 'Uganda Shilling', 'USh', 'currency.UGX');
|
||||
|
||||
|
||||
UPDATE `m_appuser` SET `username` = 'admin' WHERE id=1;
|
||||
|
||||
INSERT INTO `m_appuser`
|
||||
(`is_deleted`,
|
||||
`office_id`,
|
||||
`username`,
|
||||
`firstname`,
|
||||
`lastname`,
|
||||
`password`,
|
||||
`email`,
|
||||
`firsttime_login_remaining`,
|
||||
`nonexpired`,
|
||||
`nonlocked`,
|
||||
`nonexpired_credentials`,
|
||||
`enabled`)
|
||||
VALUES
|
||||
(0, 1, 'keithwoodlock', 'Keith', 'Woodlock',
|
||||
'4f607e9b6cffbe7d3db92d4bfa3391c7aa751727b4ea29d08fddf9dd72e6e7e3', 'keithwoodlock@gmail.com', 0, 1, 1, 1, 1);
|
||||
|
||||
INSERT INTO `m_appuser_role`
|
||||
(`appuser_id`,`role_id`) VALUES (2,1);
|
||||
|
||||
UPDATE `m_office` SET `name` = 'CEDA Microfinance Ltd.' WHERE id=1;
|
||||
|
||||
INSERT INTO `m_office`
|
||||
(
|
||||
`parent_id`,
|
||||
`hierarchy`,
|
||||
`external_id`,
|
||||
`name`,
|
||||
`opening_date`)
|
||||
VALUES
|
||||
(1, '.2.', 2, 'Uganda (Kampala)', '2009-01-01');
|
||||
|
||||
|
||||
INSERT INTO `m_staff`
|
||||
(
|
||||
`is_loan_officer`,
|
||||
`office_id`,
|
||||
`firstname`,
|
||||
`lastname`,
|
||||
`display_name`)
|
||||
VALUES
|
||||
(1, 1, 'CEDA HO', 'LoanOfficer', 'LoanOfficer, CEDA HO'),
|
||||
(1, 2, 'Kampala', 'LoanOfficer', 'LoanOfficer, Kampala');
|
||||
|
||||
|
||||
INSERT INTO `m_charge`
|
||||
(
|
||||
`name`,
|
||||
`currency_code`,
|
||||
`charge_applies_to_enum`,
|
||||
`charge_time_enum`,
|
||||
`charge_calculation_enum`,
|
||||
`amount`,
|
||||
`is_penalty`,
|
||||
`is_active`,
|
||||
`is_deleted`)
|
||||
VALUES ('Bank Fee (per installment)', 'UGX', 1, 2, 1, 1500.000000, 0, 1, 0);
|
||||
|
||||
|
||||
INSERT INTO `m_product_loan`
|
||||
(
|
||||
`currency_code`,
|
||||
`currency_digits`,
|
||||
`principal_amount`,
|
||||
`min_principal_amount`,
|
||||
`max_principal_amount`,
|
||||
`arrearstolerance_amount`,
|
||||
`name`,
|
||||
`description`,
|
||||
`fund_id`,
|
||||
`nominal_interest_rate_per_period`,
|
||||
`interest_period_frequency_enum`,
|
||||
`annual_nominal_interest_rate`,
|
||||
`interest_method_enum`,
|
||||
`interest_calculated_in_period_enum`,
|
||||
`repay_every`,
|
||||
`repayment_period_frequency_enum`,
|
||||
`number_of_repayments`,
|
||||
`amortization_method_enum`,
|
||||
`accounting_type`,
|
||||
`loan_transaction_strategy_id`)
|
||||
VALUES
|
||||
('UGX', 2, 1000000.000000, 0, 1000000000000.000000, null , 'Kampala Product (with cash accounting)',
|
||||
'Typical Kampala loan product with cash accounting enabled for testing.', null ,
|
||||
24.000000, 3, 24.000000, 1, 1, 1, 2, 12, 1, 2, 2);
|
||||
|
||||
-- mapping of that loan product to GL Accounts
|
||||
INSERT INTO `acc_product_mapping`
|
||||
VALUES (1,4,1,1,1),(2,8,1,1,2),(3,34,1,1,3),(4,37,1,1,4),(5,35,1,1,5),(6,97,1,1,6);
|
||||
@@ -0,0 +1,15 @@
|
||||
default Demo
|
||||
======
|
||||
|
||||
This demo database contains:
|
||||
|
||||
- DDL of latest schema
|
||||
|
||||
- Minimum reference data required for deployment of platform which is:
|
||||
- Its mandatory to have one selected currency so we default to several of latin-america currencies
|
||||
- Its mandatory to have one root or head office, so we have one created by default called a 'Latam HO'
|
||||
- Permissions supported/needed by latest release of software are setup
|
||||
- Its mandatory to have at least one role when creating new users so we have one role created by default called 'Super user' which has the special permission 'Full Authorisation'. Any user with this role can do anything in the system.
|
||||
- Its required to have at least one application user setup so remaining setup can be done through ui so we have on application user created by default with username 'quipo' with a password of 'quipo'. Application users must be associated with an office and a role so this user is associated with 'Latam HO' and 'Super user' role allowing this user to do any operation in any office(branch).
|
||||
|
||||
Minimum amount of data to support api-docs interaction.
|
||||
File diff suppressed because one or more lines are too long
+221
@@ -0,0 +1,221 @@
|
||||
-- add code and code values for datatables dropdowns
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.Male', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "Gender";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.Female', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "Gender";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.Yes', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "YesNo";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'option.No', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "YesNo";
|
||||
|
||||
INSERT INTO `m_code`
|
||||
(`code_name`, `is_system_defined`)
|
||||
VALUES
|
||||
('Education',1);
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'Primary', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "Education";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'Secondary', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "Education";
|
||||
|
||||
INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`)
|
||||
select mc.id, 'University', ifnull(max(mv.id), 1)
|
||||
from m_code mc
|
||||
join m_code_value mv on mv.code_id = mc.id
|
||||
where mc.`code_name` = "Education";
|
||||
|
||||
-- ========= datatables=======
|
||||
|
||||
DROP TABLE IF EXISTS `extra_client_details`;
|
||||
CREATE TABLE `extra_client_details` (
|
||||
`client_id` bigint(20) NOT NULL,
|
||||
`Business Description` varchar(100) DEFAULT NULL,
|
||||
`Years in Business` int(11) DEFAULT NULL,
|
||||
`Gender_cd` int(11) DEFAULT NULL,
|
||||
`Education_cv` varchar(60) DEFAULT NULL,
|
||||
`Next Visit` date DEFAULT NULL,
|
||||
`Highest Rate Paid` decimal(19,6) DEFAULT NULL,
|
||||
`Comment` text,
|
||||
PRIMARY KEY (`client_id`),
|
||||
CONSTRAINT `FK_extra_client_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `extra_family_details`;
|
||||
CREATE TABLE `extra_family_details` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`client_id` bigint(20) NOT NULL,
|
||||
`Name` varchar(40) DEFAULT NULL,
|
||||
`Date of Birth` date DEFAULT NULL,
|
||||
`Points Score` int(11) DEFAULT NULL,
|
||||
`Education_cd_Highest` int(11) DEFAULT NULL,
|
||||
`Other Notes` text,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `FK_Extra Family Details Data_1` (`client_id`),
|
||||
CONSTRAINT `FK_family_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `extra_loan_details`;
|
||||
CREATE TABLE `extra_loan_details` (
|
||||
`loan_id` bigint(20) NOT NULL,
|
||||
`Business Description` varchar(100) DEFAULT NULL,
|
||||
`Years in Business` int(11) DEFAULT NULL,
|
||||
`Gender_cd` int(11) DEFAULT NULL,
|
||||
`Education_cv` varchar(60) DEFAULT NULL,
|
||||
`Next Visit` date DEFAULT NULL,
|
||||
`Highest Rate Paid` decimal(19,6) DEFAULT NULL,
|
||||
`Comment` text,
|
||||
PRIMARY KEY (`loan_id`),
|
||||
CONSTRAINT `FK_extra_loan_details` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- datatables mapping
|
||||
INSERT INTO `x_registered_table`
|
||||
(`registered_table_name`,`application_table_name`)
|
||||
VALUES
|
||||
('extra_client_details', 'm_client'),
|
||||
('extra_family_details', 'm_client'),
|
||||
('extra_loan_details', 'm_loan');
|
||||
|
||||
|
||||
-- make sure permissions created for registered datatables
|
||||
/* add a create, read, update and delete permission for each registered datatable */
|
||||
insert into m_permission(grouping, `code`, entity_name, action_name)
|
||||
select 'datatable', concat('CREATE_', r.registered_table_name), r.registered_table_name, 'CREATE'
|
||||
from x_registered_table r;
|
||||
|
||||
insert into m_permission(grouping, `code`, entity_name, action_name)
|
||||
select 'datatable', concat('READ_', r.registered_table_name), r.registered_table_name, 'READ'
|
||||
from x_registered_table r;
|
||||
|
||||
insert into m_permission(grouping, `code`, entity_name, action_name)
|
||||
select 'datatable', concat('UPDATE_', r.registered_table_name), r.registered_table_name, 'UPDATE'
|
||||
from x_registered_table r;
|
||||
|
||||
insert into m_permission(grouping, `code`, entity_name, action_name)
|
||||
select 'datatable', concat('DELETE_', r.registered_table_name), r.registered_table_name, 'DELETE'
|
||||
from x_registered_table r;
|
||||
|
||||
|
||||
|
||||
-- ==== Chart of Accounts =====
|
||||
truncate `acc_gl_account`;
|
||||
INSERT INTO `acc_gl_account` VALUES
|
||||
(1,'Petty Cash Balances',NULL,'11100',0,1,2,1,NULL),
|
||||
(2,'Cash in Valut 1',NULL,'11101',0,1,1,1,NULL),
|
||||
(3,'Bank Balances',NULL,'11200',0,1,2,1,NULL),
|
||||
(4,'Centenary Opening Account',NULL,'11201',0,1,1,1,NULL),
|
||||
(5,'Centenary Expense Account',NULL,'11202',0,1,1,1,NULL),
|
||||
(6,'Centenary USD Account',NULL,'11203',0,1,1,1,NULL),
|
||||
(7,'Loans and Advances',NULL,'13100',0,1,2,1,NULL),
|
||||
(8,'Loans to Clients',NULL,'13101',0,1,1,1,NULL),
|
||||
(9,'Outstanding Interest',NULL,'13102',0,1,1,1,NULL),
|
||||
(10,'Outstanding Late Payment Interest',NULL,'13103',0,1,1,1,NULL),
|
||||
(11,'Outstanding Bank Fees to be collected',NULL,'13104',0,1,1,1,NULL),
|
||||
(12,'WriteOff Accounts',NULL,'13200',0,1,2,1,NULL),
|
||||
(13,'Write-offs (use for funds coming in)',NULL,'13201',0,1,1,1,NULL),
|
||||
(14,'Write-offs outstanding principal',NULL,'13202',0,1,1,1,NULL),
|
||||
(15,'Write-offs outstanding interest',NULL,'13203',0,1,1,1,NULL),
|
||||
(16,'Write-offs collected bank fees',NULL,'13204',0,1,1,1,NULL),
|
||||
(17,'Write-offs hardware/furniture',NULL,'13205',0,1,1,1,NULL),
|
||||
(18,'Fixed Assets',NULL,'14100',0,1,2,1,NULL),
|
||||
(19,'Office Equipment',NULL,'14101',0,1,1,1,NULL),
|
||||
(20,'Suspense Items (unidentified deposits)',NULL,'15000',0,1,2,1,NULL),
|
||||
(21,'Assets',NULL,'10000',0,1,2,1,NULL),
|
||||
(22,'Liabilities',NULL,'20000',0,1,2,2,NULL),
|
||||
(23,'Shares Account',NULL,'26100',0,1,2,2,NULL),
|
||||
(24,'Shares Captial',NULL,'26101',0,1,1,2,NULL),
|
||||
(25,'Donated Equity',NULL,'26300',0,1,2,2,NULL),
|
||||
(26,'Donated Equity Ameropa Foundation',NULL,'26301',0,1,1,2,NULL),
|
||||
(27,'Donated Equity e.h',NULL,'26302',0,1,1,2,NULL),
|
||||
(28,'Overpaid Amounts',NULL,'27000',0,1,2,2,NULL),
|
||||
(29,'Loss Provision',NULL,'28000',0,1,2,2,NULL),
|
||||
(30,'Provision Outstanding Principal',NULL,'28001',0,1,1,2,NULL),
|
||||
(31,'Provision Oustanding Interest',NULL,'28002',0,1,1,2,NULL),(32,'Income',NULL,'30000',0,1,2,4,NULL),
|
||||
(33,'Interest Income from Loans',NULL,'31100',0,1,2,4,NULL),
|
||||
(34,'Interest on Loans',NULL,'31101',0,1,1,4,NULL),
|
||||
(35,'Late Payment Interest',NULL,'31102',0,1,1,4,NULL),
|
||||
(36,'Income from Micro credit & Lending Activities',NULL,'31300',0,1,2,4,NULL),
|
||||
(37,'Collected Bank Fees Receivable',NULL,'6201',0,1,1,4,NULL),
|
||||
(38,'Deposits from Loans Write Off',NULL,'31400',0,1,2,4,NULL),
|
||||
(39,'Expenditure',NULL,'40000',0,1,2,5,NULL),
|
||||
(40,'Office Expenditure Account',NULL,'42100',0,1,2,5,NULL),
|
||||
(41,'Water Charges',NULL,'42102',0,1,1,5,NULL),
|
||||
(42,'Electricity Charges',NULL,'42103',0,1,1,5,NULL),
|
||||
(43,'Printing and Stationary',NULL,'42105',0,1,1,5,NULL),
|
||||
(44,'Office Rent',NULL,'42107',0,1,1,5,NULL),
|
||||
(45,'Marketing Expense',NULL,'42109',0,1,1,5,NULL),
|
||||
(46,'Office utilities',NULL,'42112',0,1,1,5,'(supplies, toiletries, kitchen)'),
|
||||
(47,'Furniture',NULL,'42113',0,1,1,5,NULL),
|
||||
(48,'CEDA Meeting Expense',NULL,'42114',0,1,1,5,NULL),
|
||||
(49,'Employee Personal Expsense Account',NULL,'42200',0,1,2,5,NULL),
|
||||
(50,'Salary Alice',NULL,'42201',0,1,1,5,NULL),
|
||||
(51,'Salary Irene',NULL,'42202',0,1,1,5,NULL),
|
||||
(52,'Salary Richard',NULL,'42203',0,1,1,5,NULL),
|
||||
(53,'Salary Loan Officer TBA',NULL,'42204',0,1,1,5,NULL),
|
||||
(54,'Medical Insurance Alice & Family',NULL,'42205',0,1,1,5,NULL),
|
||||
(55,'Medical Insurance Irene',NULL,'42206',0,1,1,5,NULL),
|
||||
(56,'Medical Insurance Richard',NULL,'42207',0,1,1,5,NULL),
|
||||
(57,'Medical Insurance Loan Officer TBA',NULL,'42208',0,1,1,5,NULL),
|
||||
(58,'PAYE all employees',NULL,'42209',0,1,1,5,NULL),
|
||||
(59,'NSSF all employees',NULL,'42210',0,1,1,5,NULL),
|
||||
(60,'Lunch Allowances all employees',NULL,'42211',0,1,1,5,NULL),
|
||||
(61,'IT software and maintenance',NULL,'42300',0,1,2,5,NULL),
|
||||
(62,'Mifos maintenance contract 12 months',NULL,'42301',0,1,1,5,NULL),
|
||||
(63,'VPS Contract 12 months',NULL,'42302',0,1,1,5,NULL),
|
||||
(64,'Bulk SMS Service',NULL,'42303',0,1,1,5,NULL),
|
||||
(65,'Support Accounting Software',NULL,'42304',0,1,1,5,NULL),
|
||||
(66,'Mifos Instance Setup',NULL,'42305',0,1,1,5,NULL),
|
||||
(67,'Misc support expense',NULL,'42306',0,1,1,5,NULL),
|
||||
(68,'Warid Mobile Line',NULL,'42307',0,1,1,5,NULL),
|
||||
(69,'Landline',NULL,'42308',0,1,1,5,NULL),
|
||||
(70,'Modem Alice',NULL,'42309',0,1,1,5,NULL),
|
||||
(71,'Modem Irene',NULL,'42310',0,1,1,5,NULL),
|
||||
(72,'Modem Richard',NULL,'42311',0,1,1,5,NULL),
|
||||
(73,'Repairs',NULL,'42312',0,1,1,5,NULL),
|
||||
(74,'Airtime Expenses',NULL,'42400',0,1,2,5,NULL),
|
||||
(75,'Airtime Alice',NULL,'42401',0,1,1,5,NULL),
|
||||
(76,'Airtime Richard',NULL,'42402',0,1,1,5,NULL),
|
||||
(77,'Airtime Loan Office TBA',NULL,'42403',0,1,1,5,NULL),
|
||||
(78,'Special Airtime Alice',NULL,'42404',0,1,1,5,NULL),
|
||||
(79,'Transportation',NULL,'42500',0,1,2,5,NULL),
|
||||
(80,'Flat monthly transportation cost',NULL,'42501',0,1,1,5,NULL),
|
||||
(81,'Faciliation cost for Richard',NULL,'42502',0,1,1,5,NULL),
|
||||
(82,'Faciliation cost for Loan Officer TBA',NULL,'42503',0,1,1,5,NULL),
|
||||
(83,'Consultancy Expenses',NULL,'42600',0,1,2,5,NULL),
|
||||
(84,'Audit Fees',NULL,'42601',0,1,1,5,NULL),
|
||||
(85,'Legal Fees',NULL,'42602',0,1,1,5,NULL),
|
||||
(86,'Miscellaneous Expenses Account',NULL,'42700',0,1,2,5,NULL),
|
||||
(87,'MFI License',NULL,'42703',0,1,1,5,NULL),
|
||||
(88,'Sundy Expenses',NULL,'42704',0,1,1,5,NULL),
|
||||
(89,'Bank Fees',NULL,'42800',0,1,2,5,NULL),
|
||||
(90,'Bank Charges Operating Account',NULL,'42801',0,1,1,5,NULL),
|
||||
(91,'Bank Charges Expense Account',NULL,'42802',0,1,1,5,NULL),
|
||||
(92,'E.H Account',NULL,'42900',0,1,2,5,NULL),
|
||||
(93,'Airtime',NULL,'42901',0,1,1,5,NULL),
|
||||
(94,'Modem',NULL,'42902',0,1,1,5,NULL),
|
||||
(95,'Meals',NULL,'42903',0,1,1,5,NULL),
|
||||
(96,'Transportation',NULL,'42904',0,1,1,5,NULL),
|
||||
(97,'Miscellaneous',NULL,'42905',0,1,1,5,NULL);
|
||||
@@ -0,0 +1,39 @@
|
||||
DROP TABLE IF EXISTS `risk_analysis`;
|
||||
CREATE TABLE `risk_analysis` (
|
||||
`client_id` bigint(20) NOT NULL,
|
||||
`proposed_loan_amount` decimal(19,6) DEFAULT NULL,
|
||||
`assets_cash` decimal(19,6) DEFAULT NULL,
|
||||
`assets_bank_accounts` decimal(19,6) DEFAULT NULL,
|
||||
`assets_accounts_receivable` decimal(19,6) DEFAULT NULL,
|
||||
`assets_inventory` decimal(19,6) DEFAULT NULL,
|
||||
`assets_total_fixed_business` decimal(19,6) DEFAULT NULL,
|
||||
`assets_total_business` decimal(19,6) DEFAULT NULL,
|
||||
`assets_total_household` decimal(19,6) DEFAULT NULL,
|
||||
`liabilities_accounts_payable` decimal(19,6) DEFAULT NULL,
|
||||
`liabilities_business_debts` decimal(19,6) DEFAULT NULL,
|
||||
`liabilities_total_business` decimal(19,6) DEFAULT NULL,
|
||||
`liabilities_equity_working_capital` decimal(19,6) DEFAULT NULL,
|
||||
`liabilities_total_household` decimal(19,6) DEFAULT NULL,
|
||||
`liabilities_household_equity` decimal(19,6) DEFAULT NULL,
|
||||
`cashflow_cash_sales` decimal(19,6) DEFAULT NULL,
|
||||
`cashflow_cash_sales2` decimal(19,6) DEFAULT NULL,
|
||||
`cashflow_cost_goods_sold` decimal(19,6) DEFAULT NULL,
|
||||
`cashflow_cost_goods_sold2` decimal(19,6) DEFAULT NULL,
|
||||
`cashflow_gross_profit` decimal(19,6) DEFAULT NULL,
|
||||
`cashflow_other_income1` decimal(19,6) DEFAULT NULL,
|
||||
`cashflow_total_income2` decimal(19,6) DEFAULT NULL,
|
||||
`cashflow_household_expense` decimal(19,6) DEFAULT NULL,
|
||||
`cashflow_payments_to_savings` decimal(19,6) DEFAULT NULL,
|
||||
`cashflow_operational_expenses` decimal(19,6) DEFAULT NULL,
|
||||
`cashflow_disposable_income` decimal(19,6) DEFAULT NULL,
|
||||
`cashflow_amount_loan_installment` decimal(19,6) DEFAULT NULL,
|
||||
`cashflow_available_surplus` decimal(19,6) DEFAULT NULL,
|
||||
`fi_inventory_turnover` decimal(19,6) DEFAULT NULL,
|
||||
`fi_gross_margin` decimal(19,6) DEFAULT NULL,
|
||||
`fi_indebtedness` decimal(19,6) DEFAULT NULL,
|
||||
`fi_loan_recommendation` decimal(19,6) DEFAULT NULL,
|
||||
`fi_roe` decimal(19,6) DEFAULT NULL,
|
||||
`fi_repayment_capacity` decimal(19,6) DEFAULT NULL,
|
||||
PRIMARY KEY (`client_id`),
|
||||
CONSTRAINT `FK_risk_analysis_1` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
@@ -0,0 +1,16 @@
|
||||
latam Demo
|
||||
======
|
||||
|
||||
This demo database contains:
|
||||
|
||||
- DDL of latest schema
|
||||
- Minimum reference data required for deployment of platform which is:
|
||||
- Its mandatory to have one selected currency so we default to several of latin-america currencies
|
||||
- Its mandatory to have one root or head office, so we have one created by default called a 'Latam HO'
|
||||
- Permissions supported/needed by latest release of software are setup
|
||||
- Its mandatory to have at least one role when creating new users so we have one role created by default called 'Super user' which has the special permission 'Full Authorisation'. Any user with this role can do anything in the system.
|
||||
- Its required to have at least one application user setup so remaining setup can be done through ui so we have on application user created by default with username 'quipo' with a password of 'quipo'. Application users must be associated with an office and a role so this user is associated with 'Latam HO' and 'Super user' role allowing this user to do any operation in any office(branch).
|
||||
- Configuration
|
||||
- No 'additional data' through the 'datatables' approach is setup
|
||||
- One 'code' is setup called 'Client Identifier' with default values of {'Passport number'} - (required for Client Identity Document functionalty)
|
||||
- Enable/Disable configuration has one entry named 'maker-checker' to allow people to enable disable this feature at global level. It is off or disabled by default.
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,49 @@
|
||||
DROP TABLE IF EXISTS `latam_extra_client_details`;
|
||||
CREATE TABLE `latam_extra_client_details` (
|
||||
`client_id` bigint(20) NOT NULL,
|
||||
`Business Description` varchar(100) DEFAULT NULL,
|
||||
`Years in Business` int(11) DEFAULT NULL,
|
||||
`Gender_cd` int(11) DEFAULT NULL,
|
||||
`Education_cv` varchar(60) DEFAULT NULL,
|
||||
`Next Visit` date DEFAULT NULL,
|
||||
`Highest Rate Paid` decimal(19,6) DEFAULT NULL,
|
||||
`Comment` text,
|
||||
PRIMARY KEY (`client_id`),
|
||||
CONSTRAINT `FK_latam_extra_client_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `latam_family_details`;
|
||||
CREATE TABLE `latam_family_details` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`client_id` bigint(20) NOT NULL,
|
||||
`Name` varchar(40) DEFAULT NULL,
|
||||
`Date of Birth` date DEFAULT NULL,
|
||||
`Points Score` int(11) DEFAULT NULL,
|
||||
`Education_cd_Highest` int(11) DEFAULT NULL,
|
||||
`Other Notes` text,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `FK_Extra Family Details Data_1` (`client_id`),
|
||||
CONSTRAINT `FK_latam_family_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `latam_extra_loan_details`;
|
||||
CREATE TABLE `latam_extra_loan_details` (
|
||||
`loan_id` bigint(20) NOT NULL,
|
||||
`Business Description` varchar(100) DEFAULT NULL,
|
||||
`Years in Business` int(11) DEFAULT NULL,
|
||||
`Gender_cd` int(11) DEFAULT NULL,
|
||||
`Education_cv` varchar(60) DEFAULT NULL,
|
||||
`Next Visit` date DEFAULT NULL,
|
||||
`Highest Rate Paid` decimal(19,6) DEFAULT NULL,
|
||||
`Comment` text,
|
||||
PRIMARY KEY (`loan_id`),
|
||||
CONSTRAINT `FK_latam_extra_loan_details` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
INSERT INTO `mifostenant-latam`.`m_code` (`code_name`, `is_system_defined`) VALUES ('Gender', 1);
|
||||
INSERT INTO `mifostenant-latam`.`m_code_value` (`code_id`, `code_value`, `order_position`) VALUES (2, 'Male', 1); INSERT INTO `mifostenant-latam`.`m_code_value` (`code_id`, `code_value`, `order_position`) VALUES (2, 'Female', 2);
|
||||
|
||||
|
||||
INSERT INTO `mifostenant-latam`.`m_code` (`code_name`, `is_system_defined`) VALUES ('Education', 1);
|
||||
INSERT INTO `mifostenant-latam`.`m_code_value` (`code_id`, `code_value`, `order_position`) VALUES (3, 'Primary', 1); INSERT INTO `mifostenant-latam`.`m_code_value` (`code_id`, `code_value`, `order_position`) VALUES (3, 'Secondary', 2); INSERT INTO `mifostenant-latam`.`m_code_value` (`code_id`, `code_value`, `order_position`) VALUES (3, 'University', 3);
|
||||
Reference in New Issue
Block a user