diff --git a/mifosng-db/multi-tenant-demo-backups/bare-bones-demo/bk_bare_bones_demo.sql b/mifosng-db/multi-tenant-demo-backups/bare-bones-demo/bk_bare_bones_demo.sql index c86a35617..282bb195f 100644 --- a/mifosng-db/multi-tenant-demo-backups/bare-bones-demo/bk_bare_bones_demo.sql +++ b/mifosng-db/multi-tenant-demo-backups/bare-bones-demo/bk_bare_bones_demo.sql @@ -184,6 +184,97 @@ INSERT INTO `c_configuration` VALUES (1,'maker-checker',0); /*!40000 ALTER TABLE `c_configuration` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `extra_client_details` +-- + +DROP TABLE IF EXISTS `extra_client_details`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +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; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `extra_client_details` +-- + +LOCK TABLES `extra_client_details` WRITE; +/*!40000 ALTER TABLE `extra_client_details` DISABLE KEYS */; +/*!40000 ALTER TABLE `extra_client_details` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `extra_family_details` +-- + +DROP TABLE IF EXISTS `extra_family_details`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +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 AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `extra_family_details` +-- + +LOCK TABLES `extra_family_details` WRITE; +/*!40000 ALTER TABLE `extra_family_details` DISABLE KEYS */; +INSERT INTO `extra_family_details` VALUES (3,1,'adfa',NULL,NULL,NULL,NULL),(6,1,'two',NULL,NULL,NULL,NULL),(7,1,'three',NULL,NULL,NULL,NULL); +/*!40000 ALTER TABLE `extra_family_details` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `extra_loan_details` +-- + +DROP TABLE IF EXISTS `extra_loan_details`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +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; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `extra_loan_details` +-- + +LOCK TABLES `extra_loan_details` WRITE; +/*!40000 ALTER TABLE `extra_loan_details` DISABLE KEYS */; +/*!40000 ALTER TABLE `extra_loan_details` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `m_appuser` -- @@ -1192,7 +1283,7 @@ CREATE TABLE `m_permission` ( LOCK TABLES `m_permission` WRITE; /*!40000 ALTER TABLE `m_permission` DISABLE KEYS */; -INSERT INTO `m_permission` VALUES (1,'special','ALL_FUNCTIONS',NULL,NULL,0),(2,'special','ALL_FUNCTIONS_READ',NULL,NULL,0),(3,'special','CHECKER_SUPER_USER',NULL,NULL,0),(4,'special','REPORTING_SUPER_USER',NULL,NULL,0),(5,'authorisation','READ_PERMISSION','PERMISSION','READ',0),(6,'authorisation','PERMISSIONS_ROLE','ROLE','PERMISSIONS',1),(7,'authorisation','CREATE_ROLE','ROLE','CREATE',1),(8,'authorisation','CREATE_ROLE_CHECKER','ROLE','CREATE',1),(9,'authorisation','READ_ROLE','ROLE','READ',0),(10,'authorisation','UPDATE_ROLE','ROLE','UPDATE',1),(11,'authorisation','UPDATE_ROLE_CHECKER','ROLE','UPDATE',1),(12,'authorisation','DELETE_ROLE','ROLE','DELETE',1),(13,'authorisation','DELETE_ROLE_CHECKER','ROLE','DELETE',1),(14,'authorisation','CREATE_USER','USER','CREATE',1),(15,'authorisation','CREATE_USER_CHECKER','USER','CREATE',1),(16,'authorisation','READ_USER','USER','READ',0),(17,'authorisation','UPDATE_USER','USER','UPDATE',1),(18,'authorisation','UPDATE_USER_CHECKER','USER','UPDATE',1),(19,'authorisation','DELETE_USER','USER','DELETE',1),(20,'authorisation','DELETE_USER_CHECKER','USER','DELETE',1),(21,'configuration','READ_CONFIGURATION','CONFIGURATION','READ',1),(22,'configuration','UPDATE_CONFIGURATION','CONFIGURATION','UPDATE',1),(23,'configuration','UPDATE_CONFIGURATION_CHECKER','CONFIGURATION','UPDATE',1),(24,'configuration','READ_CODE','CODE','READ',0),(25,'configuration','CREATE_CODE','CODE','CREATE',1),(26,'configuration','CREATE_CODE_CHECKER','CODE','CREATE',1),(27,'configuration','UPDATE_CODE','CODE','UPDATE',1),(28,'configuration','UPDATE_CODE_CHECKER','CODE','UPDATE',1),(29,'configuration','DELETE_CODE','CODE','DELETE',1),(30,'configuration','DELETE_CODE_CHECKER','CODE','DELETE',1),(31,'configuration','READ_CODEVALUE','CODEVALUE','READ',0),(32,'configuration','CREATE_CODEVALUE','CODEVALUE','CREATE',1),(33,'configuration','CREATE_CODEVALUE_CHECKER','CODEVALUE','CREATE',1),(34,'configuration','UPDATE_CODEVALUE','CODEVALUE','UPDATE',1),(35,'configuration','UPDATE_CODEVALUE_CHECKER','CODEVALUE','UPDATE',1),(36,'configuration','DELETE_CODEVALUE','CODEVALUE','DELETE',1),(37,'configuration','DELETE_CODEVALUE_CHECKER','CODEVALUE','DELETE',1),(38,'configuration','READ_CURRENCY','CURRENCY','READ',0),(39,'configuration','UPDATE_CURRENCY','CURRENCY','UPDATE',1),(40,'configuration','UPDATE_CURRENCY_CHECKER','CURRENCY','UPDATE',1),(41,'configuration','UPDATE_PERMISSION','PERMISSION','UPDATE',1),(42,'configuration','UPDATE_PERMISSION_CHECKER','PERMISSION','UPDATE',1),(43,'configuration','READ_DATATABLE','DATATABLE','READ',0),(44,'configuration','REGISTER_DATATABLE','DATATABLE','REGISTER',1),(45,'configuration','REGISTER_DATATABLE_CHECKER','DATATABLE','REGISTER',1),(46,'configuration','DEREGISTER_DATATABLE','DATATABLE','DEREGISTER',1),(47,'configuration','DEREGISTER_DATATABLE_CHECKER','DATATABLE','DEREGISTER',1),(48,'configuration','READ_AUDIT','AUDIT','READ',0),(49,'configuration','CREATE_CALENDAR','CALENDAR','CREATE',1),(50,'configuration','READ_CALENDAR','CALENDAR','READ',0),(51,'configuration','UPDATE_CALENDAR','CALENDAR','UPDATE',1),(52,'configuration','DELETE_CALENDAR','CALENDAR','DELETE',1),(53,'configuration','CREATE_CALENDAR_CHECKER','CALENDAR','CREATE',1),(54,'configuration','UPDATE_CALENDAR_CHECKER','CALENDAR','UPDATE',1),(55,'configuration','DELETE_CALENDAR_CHECKER','CALENDAR','DELETE',1),(56,'organisation','READ_MAKERCHECKER','MAKERCHECKER','READ',0),(57,'organisation','READ_CHARGE','CHARGE','READ',0),(58,'organisation','CREATE_CHARGE','CHARGE','CREATE',1),(59,'organisation','CREATE_CHARGE_CHECKER','CHARGE','CREATE',1),(60,'organisation','UPDATE_CHARGE','CHARGE','UPDATE',1),(61,'organisation','UPDATE_CHARGE_CHECKER','CHARGE','UPDATE',1),(62,'organisation','DELETE_CHARGE','CHARGE','DELETE',1),(63,'organisation','DELETE_CHARGE_CHECKER','CHARGE','DELETE',1),(64,'organisation','READ_FUND','FUND','READ',0),(65,'organisation','CREATE_FUND','FUND','CREATE',1),(66,'organisation','CREATE_FUND_CHECKER','FUND','CREATE',1),(67,'organisation','UPDATE_FUND','FUND','UPDATE',1),(68,'organisation','UPDATE_FUND_CHECKER','FUND','UPDATE',1),(69,'organisation','DELETE_FUND','FUND','DELETE',1),(70,'organisation','DELETE_FUND_CHECKER','FUND','DELETE',1),(71,'organisation','READ_LOANPRODUCT','LOANPRODUCT','READ',0),(72,'organisation','CREATE_LOANPRODUCT','LOANPRODUCT','CREATE',1),(73,'organisation','CREATE_LOANPRODUCT_CHECKER','LOANPRODUCT','CREATE',1),(74,'organisation','UPDATE_LOANPRODUCT','LOANPRODUCT','UPDATE',1),(75,'organisation','UPDATE_LOANPRODUCT_CHECKER','LOANPRODUCT','UPDATE',1),(76,'organisation','DELETE_LOANPRODUCT','LOANPRODUCT','DELETE',1),(77,'organisation','DELETE_LOANPRODUCT_CHECKER','LOANPRODUCT','DELETE',1),(78,'organisation','READ_OFFICE','OFFICE','READ',0),(79,'organisation','CREATE_OFFICE','OFFICE','CREATE',1),(80,'organisation','CREATE_OFFICE_CHECKER','OFFICE','CREATE',1),(81,'organisation','UPDATE_OFFICE','OFFICE','UPDATE',1),(82,'organisation','UPDATE_OFFICE_CHECKER','OFFICE','UPDATE',1),(83,'organisation','READ_OFFICETRANSACTION','OFFICETRANSACTION','READ',0),(84,'organisation','DELETE_OFFICE_CHECKER','OFFICE','DELETE',1),(85,'organisation','CREATE_OFFICETRANSACTION','OFFICETRANSACTION','CREATE',1),(86,'organisation','CREATE_OFFICETRANSACTION_CHECKER','OFFICETRANSACTION','CREATE',1),(87,'organisation','DELETE_OFFICETRANSACTION','OFFICETRANSACTION','DELETE',1),(88,'organisation','DELETE_OFFICETRANSACTION_CHECKER','OFFICETRANSACTION','DELETE',1),(89,'organisation','READ_STAFF','STAFF','READ',0),(90,'organisation','CREATE_STAFF','STAFF','CREATE',1),(91,'organisation','CREATE_STAFF_CHECKER','STAFF','CREATE',1),(92,'organisation','UPDATE_STAFF','STAFF','UPDATE',1),(93,'organisation','UPDATE_STAFF_CHECKER','STAFF','UPDATE',1),(94,'organisation','DELETE_STAFF','STAFF','DELETE',1),(95,'organisation','DELETE_STAFF_CHECKER','STAFF','DELETE',1),(96,'organisation','READ_SAVINGSPRODUCT','SAVINGSPRODUCT','READ',0),(97,'organisation','CREATE_SAVINGSPRODUCT','SAVINGSPRODUCT','CREATE',1),(98,'organisation','CREATE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','CREATE',1),(99,'organisation','UPDATE_SAVINGSPRODUCT','SAVINGSPRODUCT','UPDATE',1),(100,'organisation','UPDATE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','UPDATE',1),(101,'organisation','DELETE_SAVINGSPRODUCT','SAVINGSPRODUCT','DELETE',1),(102,'organisation','DELETE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','DELETE',1),(103,'organisation','READ_DEPOSITPRODUCT','DEPOSITPRODUCT','READ',0),(104,'organisation','CREATE_DEPOSITPRODUCT','DEPOSITPRODUCT','CREATE',1),(105,'organisation','CREATE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','CREATE',1),(106,'organisation','UPDATE_DEPOSITPRODUCT','DEPOSITPRODUCT','UPDATE',1),(107,'organisation','UPDATE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','UPDATE',1),(108,'organisation','DELETE_DEPOSITPRODUCT','DEPOSITPRODUCT','DELETE',1),(109,'organisation','DELETE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','DELETE',1),(110,'portfolio','READ_LOAN','LOAN','READ',0),(111,'portfolio','CREATE_LOAN','LOAN','CREATE',1),(112,'portfolio','CREATE_LOAN_CHECKER','LOAN','CREATE',1),(113,'portfolio','UPDATE_LOAN','LOAN','UPDATE',1),(114,'portfolio','UPDATE_LOAN_CHECKER','LOAN','UPDATE',1),(115,'portfolio','DELETE_LOAN','LOAN','DELETE',1),(116,'portfolio','DELETE_LOAN_CHECKER','LOAN','DELETE',1),(117,'portfolio','READ_CLIENT','CLIENT','READ',0),(118,'portfolio','CREATE_CLIENT','CLIENT','CREATE',1),(119,'portfolio','CREATE_CLIENT_CHECKER','CLIENT','CREATE',1),(120,'portfolio','UPDATE_CLIENT','CLIENT','UPDATE',1),(121,'portfolio','UPDATE_CLIENT_CHECKER','CLIENT','UPDATE',1),(122,'portfolio','DELETE_CLIENT','CLIENT','DELETE',1),(123,'portfolio','DELETE_CLIENT_CHECKER','CLIENT','DELETE',1),(124,'portfolio','READ_CLIENTIMAGE','CLIENTIMAGE','READ',0),(125,'portfolio','CREATE_CLIENTIMAGE','CLIENTIMAGE','CREATE',1),(126,'portfolio','CREATE_CLIENTIMAGE_CHECKER','CLIENTIMAGE','CREATE',1),(127,'portfolio','DELETE_CLIENTIMAGE','CLIENTIMAGE','DELETE',1),(128,'portfolio','DELETE_CLIENTIMAGE_CHECKER','CLIENTIMAGE','DELETE',1),(129,'portfolio','READ_CLIENTNOTE','CLIENTNOTE','READ',0),(130,'portfolio','CREATE_CLIENTNOTE','CLIENTNOTE','CREATE',1),(131,'portfolio','CREATE_CLIENTNOTE_CHECKER','CLIENTNOTE','CREATE',1),(132,'portfolio','UPDATE_CLIENTNOTE','CLIENTNOTE','UPDATE',1),(133,'portfolio','UPDATE_CLIENTNOTE_CHECKER','CLIENTNOTE','UPDATE',1),(134,'portfolio','DELETE_CLIENTNOTE','CLIENTNOTE','DELETE',1),(135,'portfolio','DELETE_CLIENTNOTE_CHECKER','CLIENTNOTE','DELETE',1),(136,'portfolio','READ_GROUPNOTE','GROUPNOTE','READ',0),(137,'portfolio','CREATE_GROUPNOTE','GROUPNOTE','CREATE',1),(138,'portfolio','UPDATE_GROUPNOTE','GROUPNOTE','UPDATE',1),(139,'portfolio','DELETE_GROUPNOTE','GROUPNOTE','DELETE',1),(140,'portfolio','CREATE_GROUPNOTE_CHECKER','GROUPNOTE','CREATE',1),(141,'portfolio','UPDATE_GROUPNOTE_CHECKER','GROUPNOTE','UPDATE',1),(142,'portfolio','DELETE_GROUPNOTE_CHECKER','GROUPNOTE','DELETE',1),(143,'portfolio','READ_LOANNOTE','LOANNOTE','READ',0),(144,'portfolio','CREATE_LOANNOTE','LOANNOTE','CREATE',1),(145,'portfolio','UPDATE_LOANNOTE','LOANNOTE','UPDATE',1),(146,'portfolio','DELETE_LOANNOTE','LOANNOTE','DELETE',1),(147,'portfolio','CREATE_LOANNOTE_CHECKER','LOANNOTE','CREATE',1),(148,'portfolio','UPDATE_LOANNOTE_CHECKER','LOANNOTE','UPDATE',1),(149,'portfolio','DELETE_LOANNOTE_CHECKER','LOANNOTE','DELETE',1),(150,'portfolio','READ_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','READ',0),(151,'portfolio','CREATE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','CREATE',1),(152,'portfolio','UPDATE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','UPDATE',1),(153,'portfolio','DELETE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','DELETE',1),(154,'portfolio','CREATE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','CREATE',1),(155,'portfolio','UPDATE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','UPDATE',1),(156,'portfolio','DELETE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','DELETE',1),(157,'portfolio','READ_DEPOSITNOTE','DEPOSITNOTE','READ',0),(158,'portfolio','CREATE_DEPOSITNOTE','DEPOSITNOTE','CREATE',1),(159,'portfolio','UPDATE_DEPOSITNOTE','DEPOSITNOTE','UPDATE',1),(160,'portfolio','DELETE_DEPOSITNOTE','DEPOSITNOTE','DELETE',1),(161,'portfolio','CREATE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','CREATE',1),(162,'portfolio','UPDATE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','UPDATE',1),(163,'portfolio','DELETE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','DELETE',1),(164,'portfolio','READ_SAVINGNOTE','SAVINGNOTE','READ',0),(165,'portfolio','CREATE_SAVINGNOTE','SAVINGNOTE','CREATE',1),(166,'portfolio','UPDATE_SAVINGNOTE','SAVINGNOTE','UPDATE',1),(167,'portfolio','DELETE_SAVINGNOTE','SAVINGNOTE','DELETE',1),(168,'portfolio','CREATE_SAVINGNOTE_CHECKER','SAVINGNOTE','CREATE',1),(169,'portfolio','UPDATE_SAVINGNOTE_CHECKER','SAVINGNOTE','UPDATE',1),(170,'portfolio','DELETE_SAVINGNOTE_CHECKER','SAVINGNOTE','DELETE',1),(171,'portfolio','READ_CLIENTIDENTIFIER','CLIENTIDENTIFIER','READ',0),(172,'portfolio','CREATE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','CREATE',1),(173,'portfolio','CREATE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','CREATE',1),(174,'portfolio','UPDATE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','UPDATE',1),(175,'portfolio','UPDATE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','UPDATE',1),(176,'portfolio','DELETE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','DELETE',1),(177,'portfolio','DELETE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','DELETE',1),(178,'portfolio','READ_DOCUMENT','DOCUMENT','READ',0),(179,'portfolio','CREATE_DOCUMENT','DOCUMENT','CREATE',1),(180,'portfolio','CREATE_DOCUMENT_CHECKER','DOCUMENT','CREATE',1),(181,'portfolio','UPDATE_DOCUMENT','DOCUMENT','UPDATE',1),(182,'portfolio','UPDATE_DOCUMENT_CHECKER','DOCUMENT','UPDATE',1),(183,'portfolio','DELETE_DOCUMENT','DOCUMENT','DELETE',1),(184,'portfolio','DELETE_DOCUMENT_CHECKER','DOCUMENT','DELETE',1),(185,'portfolio','READ_GROUP','GROUP','READ',0),(186,'portfolio','CREATE_GROUP','GROUP','CREATE',1),(187,'portfolio','CREATE_GROUP_CHECKER','GROUP','CREATE',1),(188,'portfolio','UPDATE_GROUP','GROUP','UPDATE',1),(189,'portfolio','UPDATE_GROUP_CHECKER','GROUP','UPDATE',1),(190,'portfolio','DELETE_GROUP','GROUP','DELETE',1),(191,'portfolio','DELETE_GROUP_CHECKER','GROUP','DELETE',1),(192,'portfolio','UNASSIGNSTAFF_GROUP','GROUP','UNASSIGNSTAFF',1),(193,'portfolio','UNASSIGNSTAFF_GROUP_CHECKER','GROUP','UNASSIGNSTAFF',1),(194,'portfolio','CREATE_LOANCHARGE','LOANCHARGE','CREATE',1),(195,'portfolio','CREATE_LOANCHARGE_CHECKER','LOANCHARGE','CREATE',1),(196,'portfolio','UPDATE_LOANCHARGE','LOANCHARGE','UPDATE',1),(197,'portfolio','UPDATE_LOANCHARGE_CHECKER','LOANCHARGE','UPDATE',1),(198,'portfolio','DELETE_LOANCHARGE','LOANCHARGE','DELETE',1),(199,'portfolio','DELETE_LOANCHARGE_CHECKER','LOANCHARGE','DELETE',1),(200,'portfolio','WAIVE_LOANCHARGE','LOANCHARGE','WAIVE',1),(201,'portfolio','WAIVE_LOANCHARGE_CHECKER','LOANCHARGE','WAIVE',1),(202,'portfolio','READ_DEPOSITACCOUNT','DEPOSITACCOUNT','READ',0),(203,'portfolio','CREATE_DEPOSITACCOUNT','DEPOSITACCOUNT','CREATE',1),(204,'portfolio','CREATE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','CREATE',1),(205,'portfolio','UPDATE_DEPOSITACCOUNT','DEPOSITACCOUNT','UPDATE',1),(206,'portfolio','UPDATE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','UPDATE',1),(207,'portfolio','DELETE_DEPOSITACCOUNT','DEPOSITACCOUNT','DELETE',1),(208,'portfolio','DELETE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','DELETE',1),(209,'portfolio','READ_SAVINGSACCOUNT','SAVINGSACCOUNT','READ',0),(210,'portfolio','CREATE_SAVINGSACCOUNT','SAVINGSACCOUNT','CREATE',1),(211,'portfolio','CREATE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','CREATE',1),(212,'portfolio','UPDATE_SAVINGSACCOUNT','SAVINGSACCOUNT','UPDATE',1),(213,'portfolio','UPDATE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','UPDATE',1),(214,'portfolio','DELETE_SAVINGSACCOUNT','SAVINGSACCOUNT','DELETE',1),(215,'portfolio','DELETE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','DELETE',1),(216,'portfolio','READ_GUARANTOR','GUARANTOR','READ',0),(217,'portfolio','CREATE_GUARANTOR','GUARANTOR','CREATE',1),(218,'portfolio','CREATE_GUARANTOR_CHECKER','GUARANTOR','CREATE',1),(219,'portfolio','UPDATE_GUARANTOR','GUARANTOR','UPDATE',1),(220,'portfolio','UPDATE_GUARANTOR_CHECKER','GUARANTOR','UPDATE',1),(221,'portfolio','DELETE_GUARANTOR','GUARANTOR','DELETE',1),(222,'portfolio','DELETE_GUARANTOR_CHECKER','GUARANTOR','DELETE',1),(223,'transaction_loan','APPROVE_LOAN','LOAN','APPROVE',1),(224,'transaction_loan','APPROVEINPAST_LOAN','LOAN','APPROVEINPAST',1),(225,'transaction_loan','REJECT_LOAN','LOAN','REJECT',1),(226,'transaction_loan','REJECTINPAST_LOAN','LOAN','REJECTINPAST',1),(227,'transaction_loan','WITHDRAW_LOAN','LOAN','WITHDRAW',1),(228,'transaction_loan','WITHDRAWINPAST_LOAN','LOAN','WITHDRAWINPAST',1),(229,'transaction_loan','APPROVALUNDO_LOAN','LOAN','APPROVALUNDO',1),(230,'transaction_loan','DISBURSE_LOAN','LOAN','DISBURSE',1),(231,'transaction_loan','DISBURSEINPAST_LOAN','LOAN','DISBURSEINPAST',1),(232,'transaction_loan','DISBURSALUNDO_LOAN','LOAN','DISBURSALUNDO',1),(233,'transaction_loan','REPAYMENT_LOAN','LOAN','REPAYMENT',1),(234,'transaction_loan','REPAYMENTINPAST_LOAN','LOAN','REPAYMENTINPAST',1),(235,'transaction_loan','ADJUST_LOAN','LOAN','ADJUST',1),(236,'transaction_loan','WAIVEINTERESTPORTION_LOAN','LOAN','WAIVEINTERESTPORTION',1),(237,'transaction_loan','WRITEOFF_LOAN','LOAN','WRITEOFF',1),(238,'transaction_loan','CLOSE_LOAN','LOAN','CLOSE',1),(239,'transaction_loan','CLOSEASRESCHEDULED_LOAN','LOAN','CLOSEASRESCHEDULED',1),(240,'transaction_loan','UPDATELOANOFFICER_LOAN','LOAN','UPDATELOANOFFICER',1),(241,'transaction_loan','UPDATELOANOFFICER_LOAN_CHECKER','LOAN','UPDATELOANOFFICER',1),(242,'transaction_loan','REMOVELOANOFFICER_LOAN','LOAN','REMOVELOANOFFICER',1),(243,'transaction_loan','REMOVELOANOFFICER_LOAN_CHECKER','LOAN','REMOVELOANOFFICER',1),(244,'transaction_loan','BULKREASSIGN_LOAN','LOAN','BULKREASSIGN',1),(245,'transaction_loan','BULKREASSIGN_LOAN_CHECKER','LOAN','BULKREASSIGN',1),(246,'transaction_loan','APPROVE_LOAN_CHECKER','LOAN','APPROVE',1),(247,'transaction_loan','APPROVEINPAST_LOAN_CHECKER','LOAN','APPROVEINPAST',1),(248,'transaction_loan','REJECT_LOAN_CHECKER','LOAN','REJECT',1),(249,'transaction_loan','REJECTINPAST_LOAN_CHECKER','LOAN','REJECTINPAST',1),(250,'transaction_loan','WITHDRAW_LOAN_CHECKER','LOAN','WITHDRAW',1),(251,'transaction_loan','WITHDRAWINPAST_LOAN_CHECKER','LOAN','WITHDRAWINPAST',1),(252,'transaction_loan','APPROVALUNDO_LOAN_CHECKER','LOAN','APPROVALUNDO',1),(253,'transaction_loan','DISBURSE_LOAN_CHECKER','LOAN','DISBURSE',1),(254,'transaction_loan','DISBURSEINPAST_LOAN_CHECKER','LOAN','DISBURSEINPAST',1),(255,'transaction_loan','DISBURSALUNDO_LOAN_CHECKER','LOAN','DISBURSALUNDO',1),(256,'transaction_loan','REPAYMENT_LOAN_CHECKER','LOAN','REPAYMENT',1),(257,'transaction_loan','REPAYMENTINPAST_LOAN_CHECKER','LOAN','REPAYMENTINPAST',1),(258,'transaction_loan','ADJUST_LOAN_CHECKER','LOAN','ADJUST',1),(259,'transaction_loan','WAIVEINTERESTPORTION_LOAN_CHECKER','LOAN','WAIVEINTERESTPORTION',1),(260,'transaction_loan','WRITEOFF_LOAN_CHECKER','LOAN','WRITEOFF',1),(261,'transaction_loan','CLOSE_LOAN_CHECKER','LOAN','CLOSE',1),(262,'transaction_loan','CLOSEASRESCHEDULED_LOAN_CHECKER','LOAN','CLOSEASRESCHEDULED',1),(263,'transaction_deposit','APPROVE_DEPOSITACCOUNT','DEPOSITACCOUNT','APPROVE',1),(264,'transaction_deposit','REJECT_DEPOSITACCOUNT','DEPOSITACCOUNT','REJECT',1),(265,'transaction_deposit','WITHDRAW_DEPOSITACCOUNT','DEPOSITACCOUNT','WITHDRAW',1),(266,'transaction_deposit','APPROVALUNDO_DEPOSITACCOUNT','DEPOSITACCOUNT','APPROVALUNDO',1),(267,'transaction_deposit','WITHDRAWAL_DEPOSITACCOUNT','DEPOSITACCOUNT','WITHDRAWAL',1),(268,'transaction_deposit','INTEREST_DEPOSITACCOUNT','DEPOSITACCOUNT','INTEREST',1),(269,'transaction_deposit','RENEW_DEPOSITACCOUNT','DEPOSITACCOUNT','RENEW',1),(270,'transaction_deposit','APPROVE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','APPROVE',1),(271,'transaction_deposit','REJECT_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','REJECT',1),(272,'transaction_deposit','WITHDRAW_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','WITHDRAW',1),(273,'transaction_deposit','APPROVALUNDO_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','APPROVALUNDO',1),(274,'transaction_deposit','WITHDRAWAL_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','WITHDRAWAL',1),(275,'transaction_deposit','INTEREST_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','INTEREST',1),(276,'transaction_deposit','RENEW_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','RENEW',1),(277,'accounting','CREATE_GLACCOUNT','GLACCOUNT','CREATE',1),(278,'accounting','UPDATE_GLACCOUNT','GLACCOUNT','UPDATE',1),(279,'accounting','DELETE_GLACCOUNT','GLACCOUNT','DELETE',1),(280,'accounting','CREATE_GLCLOSURE','GLCLOSURE','CREATE',1),(281,'accounting','UPDATE_GLCLOSURE','GLCLOSURE','UPDATE',1),(282,'accounting','DELETE_GLCLOSURE','GLCLOSURE','DELETE',1),(283,'accounting','CREATE_JOURNALENTRY','JOURNALENTRY','CREATE',1),(284,'accounting','REVERSE_JOURNALENTRY','JOURNALENTRY','REVERSE',1),(285,'report','READ_Active Loans - Details','Active Loans - Details','READ',0),(286,'report','READ_Active Loans - Summary','Active Loans - Summary','READ',0),(287,'report','READ_Active Loans by Disbursal Period','Active Loans by Disbursal Period','READ',0),(288,'report','READ_Active Loans in last installment','Active Loans in last installment','READ',0),(289,'report','READ_Active Loans in last installment Summary','Active Loans in last installment Summary','READ',0),(290,'report','READ_Active Loans Passed Final Maturity','Active Loans Passed Final Maturity','READ',0),(291,'report','READ_Active Loans Passed Final Maturity Summary','Active Loans Passed Final Maturity Summary','READ',0),(292,'report','READ_Aging Detail','Aging Detail','READ',0),(293,'report','READ_Aging Summary (Arrears in Months)','Aging Summary (Arrears in Months)','READ',0),(294,'report','READ_Aging Summary (Arrears in Weeks)','Aging Summary (Arrears in Weeks)','READ',0),(295,'report','READ_Balance Sheet','Balance Sheet','READ',0),(296,'report','READ_Branch Expected Cash Flow','Branch Expected Cash Flow','READ',0),(297,'report','READ_Client Listing','Client Listing','READ',0),(298,'report','READ_Client Loans Listing','Client Loans Listing','READ',0),(299,'report','READ_Expected Payments By Date - Basic','Expected Payments By Date - Basic','READ',0),(300,'report','READ_Expected Payments By Date - Formatted','Expected Payments By Date - Formatted','READ',0),(301,'report','READ_Funds Disbursed Between Dates Summary','Funds Disbursed Between Dates Summary','READ',0),(302,'report','READ_Funds Disbursed Between Dates Summary by Office','Funds Disbursed Between Dates Summary by Office','READ',0),(303,'report','READ_Income Statement','Income Statement','READ',0),(304,'report','READ_Loan Account Schedule','Loan Account Schedule','READ',0),(305,'report','READ_Loans Awaiting Disbursal','Loans Awaiting Disbursal','READ',0),(306,'report','READ_Loans Awaiting Disbursal Summary','Loans Awaiting Disbursal Summary','READ',0),(307,'report','READ_Loans Awaiting Disbursal Summary by Month','Loans Awaiting Disbursal Summary by Month','READ',0),(308,'report','READ_Loans Pending Approval','Loans Pending Approval','READ',0),(309,'report','READ_Obligation Met Loans Details','Obligation Met Loans Details','READ',0),(310,'report','READ_Obligation Met Loans Summary','Obligation Met Loans Summary','READ',0),(311,'report','READ_Portfolio at Risk','Portfolio at Risk','READ',0),(312,'report','READ_Portfolio at Risk by Branch','Portfolio at Risk by Branch','READ',0),(313,'report','READ_Rescheduled Loans','Rescheduled Loans','READ',0),(314,'report','READ_Trial Balance','Trial Balance','READ',0),(315,'report','READ_Written-Off Loans','Written-Off Loans','READ',0); +INSERT INTO `m_permission` VALUES (1,'special','ALL_FUNCTIONS',NULL,NULL,0),(2,'special','ALL_FUNCTIONS_READ',NULL,NULL,0),(3,'special','CHECKER_SUPER_USER',NULL,NULL,0),(4,'special','REPORTING_SUPER_USER',NULL,NULL,0),(5,'authorisation','READ_PERMISSION','PERMISSION','READ',0),(6,'authorisation','PERMISSIONS_ROLE','ROLE','PERMISSIONS',0),(7,'authorisation','CREATE_ROLE','ROLE','CREATE',0),(8,'authorisation','CREATE_ROLE_CHECKER','ROLE','CREATE',0),(9,'authorisation','READ_ROLE','ROLE','READ',0),(10,'authorisation','UPDATE_ROLE','ROLE','UPDATE',0),(11,'authorisation','UPDATE_ROLE_CHECKER','ROLE','UPDATE',0),(12,'authorisation','DELETE_ROLE','ROLE','DELETE',0),(13,'authorisation','DELETE_ROLE_CHECKER','ROLE','DELETE',0),(14,'authorisation','CREATE_USER','USER','CREATE',0),(15,'authorisation','CREATE_USER_CHECKER','USER','CREATE',0),(16,'authorisation','READ_USER','USER','READ',0),(17,'authorisation','UPDATE_USER','USER','UPDATE',0),(18,'authorisation','UPDATE_USER_CHECKER','USER','UPDATE',0),(19,'authorisation','DELETE_USER','USER','DELETE',0),(20,'authorisation','DELETE_USER_CHECKER','USER','DELETE',0),(21,'configuration','READ_CONFIGURATION','CONFIGURATION','READ',0),(22,'configuration','UPDATE_CONFIGURATION','CONFIGURATION','UPDATE',0),(23,'configuration','UPDATE_CONFIGURATION_CHECKER','CONFIGURATION','UPDATE',0),(24,'configuration','READ_CODE','CODE','READ',0),(25,'configuration','CREATE_CODE','CODE','CREATE',0),(26,'configuration','CREATE_CODE_CHECKER','CODE','CREATE',0),(27,'configuration','UPDATE_CODE','CODE','UPDATE',0),(28,'configuration','UPDATE_CODE_CHECKER','CODE','UPDATE',0),(29,'configuration','DELETE_CODE','CODE','DELETE',0),(30,'configuration','DELETE_CODE_CHECKER','CODE','DELETE',0),(31,'configuration','READ_CODEVALUE','CODEVALUE','READ',0),(32,'configuration','CREATE_CODEVALUE','CODEVALUE','CREATE',0),(33,'configuration','CREATE_CODEVALUE_CHECKER','CODEVALUE','CREATE',0),(34,'configuration','UPDATE_CODEVALUE','CODEVALUE','UPDATE',0),(35,'configuration','UPDATE_CODEVALUE_CHECKER','CODEVALUE','UPDATE',0),(36,'configuration','DELETE_CODEVALUE','CODEVALUE','DELETE',0),(37,'configuration','DELETE_CODEVALUE_CHECKER','CODEVALUE','DELETE',0),(38,'configuration','READ_CURRENCY','CURRENCY','READ',0),(39,'configuration','UPDATE_CURRENCY','CURRENCY','UPDATE',0),(40,'configuration','UPDATE_CURRENCY_CHECKER','CURRENCY','UPDATE',0),(41,'configuration','UPDATE_PERMISSION','PERMISSION','UPDATE',0),(42,'configuration','UPDATE_PERMISSION_CHECKER','PERMISSION','UPDATE',0),(43,'configuration','READ_DATATABLE','DATATABLE','READ',0),(44,'configuration','REGISTER_DATATABLE','DATATABLE','REGISTER',0),(45,'configuration','REGISTER_DATATABLE_CHECKER','DATATABLE','REGISTER',0),(46,'configuration','DEREGISTER_DATATABLE','DATATABLE','DEREGISTER',0),(47,'configuration','DEREGISTER_DATATABLE_CHECKER','DATATABLE','DEREGISTER',0),(48,'configuration','READ_AUDIT','AUDIT','READ',0),(49,'configuration','CREATE_CALENDAR','CALENDAR','CREATE',0),(50,'configuration','READ_CALENDAR','CALENDAR','READ',0),(51,'configuration','UPDATE_CALENDAR','CALENDAR','UPDATE',0),(52,'configuration','DELETE_CALENDAR','CALENDAR','DELETE',0),(53,'configuration','CREATE_CALENDAR_CHECKER','CALENDAR','CREATE',0),(54,'configuration','UPDATE_CALENDAR_CHECKER','CALENDAR','UPDATE',0),(55,'configuration','DELETE_CALENDAR_CHECKER','CALENDAR','DELETE',0),(56,'organisation','READ_MAKERCHECKER','MAKERCHECKER','READ',0),(57,'organisation','READ_CHARGE','CHARGE','READ',0),(58,'organisation','CREATE_CHARGE','CHARGE','CREATE',0),(59,'organisation','CREATE_CHARGE_CHECKER','CHARGE','CREATE',0),(60,'organisation','UPDATE_CHARGE','CHARGE','UPDATE',0),(61,'organisation','UPDATE_CHARGE_CHECKER','CHARGE','UPDATE',0),(62,'organisation','DELETE_CHARGE','CHARGE','DELETE',0),(63,'organisation','DELETE_CHARGE_CHECKER','CHARGE','DELETE',0),(64,'organisation','READ_FUND','FUND','READ',0),(65,'organisation','CREATE_FUND','FUND','CREATE',0),(66,'organisation','CREATE_FUND_CHECKER','FUND','CREATE',0),(67,'organisation','UPDATE_FUND','FUND','UPDATE',0),(68,'organisation','UPDATE_FUND_CHECKER','FUND','UPDATE',0),(69,'organisation','DELETE_FUND','FUND','DELETE',0),(70,'organisation','DELETE_FUND_CHECKER','FUND','DELETE',0),(71,'organisation','READ_LOANPRODUCT','LOANPRODUCT','READ',0),(72,'organisation','CREATE_LOANPRODUCT','LOANPRODUCT','CREATE',0),(73,'organisation','CREATE_LOANPRODUCT_CHECKER','LOANPRODUCT','CREATE',0),(74,'organisation','UPDATE_LOANPRODUCT','LOANPRODUCT','UPDATE',0),(75,'organisation','UPDATE_LOANPRODUCT_CHECKER','LOANPRODUCT','UPDATE',0),(76,'organisation','DELETE_LOANPRODUCT','LOANPRODUCT','DELETE',0),(77,'organisation','DELETE_LOANPRODUCT_CHECKER','LOANPRODUCT','DELETE',0),(78,'organisation','READ_OFFICE','OFFICE','READ',0),(79,'organisation','CREATE_OFFICE','OFFICE','CREATE',0),(80,'organisation','CREATE_OFFICE_CHECKER','OFFICE','CREATE',0),(81,'organisation','UPDATE_OFFICE','OFFICE','UPDATE',0),(82,'organisation','UPDATE_OFFICE_CHECKER','OFFICE','UPDATE',0),(83,'organisation','READ_OFFICETRANSACTION','OFFICETRANSACTION','READ',0),(84,'organisation','DELETE_OFFICE_CHECKER','OFFICE','DELETE',0),(85,'organisation','CREATE_OFFICETRANSACTION','OFFICETRANSACTION','CREATE',0),(86,'organisation','CREATE_OFFICETRANSACTION_CHECKER','OFFICETRANSACTION','CREATE',0),(87,'organisation','DELETE_OFFICETRANSACTION','OFFICETRANSACTION','DELETE',0),(88,'organisation','DELETE_OFFICETRANSACTION_CHECKER','OFFICETRANSACTION','DELETE',0),(89,'organisation','READ_STAFF','STAFF','READ',0),(90,'organisation','CREATE_STAFF','STAFF','CREATE',0),(91,'organisation','CREATE_STAFF_CHECKER','STAFF','CREATE',0),(92,'organisation','UPDATE_STAFF','STAFF','UPDATE',0),(93,'organisation','UPDATE_STAFF_CHECKER','STAFF','UPDATE',0),(94,'organisation','DELETE_STAFF','STAFF','DELETE',0),(95,'organisation','DELETE_STAFF_CHECKER','STAFF','DELETE',0),(96,'organisation','READ_SAVINGSPRODUCT','SAVINGSPRODUCT','READ',0),(97,'organisation','CREATE_SAVINGSPRODUCT','SAVINGSPRODUCT','CREATE',0),(98,'organisation','CREATE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','CREATE',0),(99,'organisation','UPDATE_SAVINGSPRODUCT','SAVINGSPRODUCT','UPDATE',0),(100,'organisation','UPDATE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','UPDATE',0),(101,'organisation','DELETE_SAVINGSPRODUCT','SAVINGSPRODUCT','DELETE',0),(102,'organisation','DELETE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','DELETE',0),(103,'organisation','READ_DEPOSITPRODUCT','DEPOSITPRODUCT','READ',0),(104,'organisation','CREATE_DEPOSITPRODUCT','DEPOSITPRODUCT','CREATE',0),(105,'organisation','CREATE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','CREATE',0),(106,'organisation','UPDATE_DEPOSITPRODUCT','DEPOSITPRODUCT','UPDATE',0),(107,'organisation','UPDATE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','UPDATE',0),(108,'organisation','DELETE_DEPOSITPRODUCT','DEPOSITPRODUCT','DELETE',0),(109,'organisation','DELETE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','DELETE',0),(110,'portfolio','READ_LOAN','LOAN','READ',0),(111,'portfolio','CREATE_LOAN','LOAN','CREATE',0),(112,'portfolio','CREATE_LOAN_CHECKER','LOAN','CREATE',0),(113,'portfolio','UPDATE_LOAN','LOAN','UPDATE',0),(114,'portfolio','UPDATE_LOAN_CHECKER','LOAN','UPDATE',0),(115,'portfolio','DELETE_LOAN','LOAN','DELETE',0),(116,'portfolio','DELETE_LOAN_CHECKER','LOAN','DELETE',0),(117,'portfolio','READ_CLIENT','CLIENT','READ',0),(118,'portfolio','CREATE_CLIENT','CLIENT','CREATE',0),(119,'portfolio','CREATE_CLIENT_CHECKER','CLIENT','CREATE',0),(120,'portfolio','UPDATE_CLIENT','CLIENT','UPDATE',0),(121,'portfolio','UPDATE_CLIENT_CHECKER','CLIENT','UPDATE',0),(122,'portfolio','DELETE_CLIENT','CLIENT','DELETE',0),(123,'portfolio','DELETE_CLIENT_CHECKER','CLIENT','DELETE',0),(124,'portfolio','READ_CLIENTIMAGE','CLIENTIMAGE','READ',0),(125,'portfolio','CREATE_CLIENTIMAGE','CLIENTIMAGE','CREATE',0),(126,'portfolio','CREATE_CLIENTIMAGE_CHECKER','CLIENTIMAGE','CREATE',0),(127,'portfolio','DELETE_CLIENTIMAGE','CLIENTIMAGE','DELETE',0),(128,'portfolio','DELETE_CLIENTIMAGE_CHECKER','CLIENTIMAGE','DELETE',0),(129,'portfolio','READ_CLIENTNOTE','CLIENTNOTE','READ',0),(130,'portfolio','CREATE_CLIENTNOTE','CLIENTNOTE','CREATE',0),(131,'portfolio','CREATE_CLIENTNOTE_CHECKER','CLIENTNOTE','CREATE',0),(132,'portfolio','UPDATE_CLIENTNOTE','CLIENTNOTE','UPDATE',0),(133,'portfolio','UPDATE_CLIENTNOTE_CHECKER','CLIENTNOTE','UPDATE',0),(134,'portfolio','DELETE_CLIENTNOTE','CLIENTNOTE','DELETE',0),(135,'portfolio','DELETE_CLIENTNOTE_CHECKER','CLIENTNOTE','DELETE',0),(136,'portfolio','READ_GROUPNOTE','GROUPNOTE','READ',0),(137,'portfolio','CREATE_GROUPNOTE','GROUPNOTE','CREATE',0),(138,'portfolio','UPDATE_GROUPNOTE','GROUPNOTE','UPDATE',0),(139,'portfolio','DELETE_GROUPNOTE','GROUPNOTE','DELETE',0),(140,'portfolio','CREATE_GROUPNOTE_CHECKER','GROUPNOTE','CREATE',0),(141,'portfolio','UPDATE_GROUPNOTE_CHECKER','GROUPNOTE','UPDATE',0),(142,'portfolio','DELETE_GROUPNOTE_CHECKER','GROUPNOTE','DELETE',0),(143,'portfolio','READ_LOANNOTE','LOANNOTE','READ',0),(144,'portfolio','CREATE_LOANNOTE','LOANNOTE','CREATE',0),(145,'portfolio','UPDATE_LOANNOTE','LOANNOTE','UPDATE',0),(146,'portfolio','DELETE_LOANNOTE','LOANNOTE','DELETE',0),(147,'portfolio','CREATE_LOANNOTE_CHECKER','LOANNOTE','CREATE',0),(148,'portfolio','UPDATE_LOANNOTE_CHECKER','LOANNOTE','UPDATE',0),(149,'portfolio','DELETE_LOANNOTE_CHECKER','LOANNOTE','DELETE',0),(150,'portfolio','READ_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','READ',0),(151,'portfolio','CREATE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','CREATE',0),(152,'portfolio','UPDATE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','UPDATE',0),(153,'portfolio','DELETE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','DELETE',0),(154,'portfolio','CREATE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','CREATE',0),(155,'portfolio','UPDATE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','UPDATE',0),(156,'portfolio','DELETE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','DELETE',0),(157,'portfolio','READ_DEPOSITNOTE','DEPOSITNOTE','READ',0),(158,'portfolio','CREATE_DEPOSITNOTE','DEPOSITNOTE','CREATE',0),(159,'portfolio','UPDATE_DEPOSITNOTE','DEPOSITNOTE','UPDATE',0),(160,'portfolio','DELETE_DEPOSITNOTE','DEPOSITNOTE','DELETE',0),(161,'portfolio','CREATE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','CREATE',0),(162,'portfolio','UPDATE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','UPDATE',0),(163,'portfolio','DELETE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','DELETE',0),(164,'portfolio','READ_SAVINGNOTE','SAVINGNOTE','READ',0),(165,'portfolio','CREATE_SAVINGNOTE','SAVINGNOTE','CREATE',0),(166,'portfolio','UPDATE_SAVINGNOTE','SAVINGNOTE','UPDATE',0),(167,'portfolio','DELETE_SAVINGNOTE','SAVINGNOTE','DELETE',0),(168,'portfolio','CREATE_SAVINGNOTE_CHECKER','SAVINGNOTE','CREATE',0),(169,'portfolio','UPDATE_SAVINGNOTE_CHECKER','SAVINGNOTE','UPDATE',0),(170,'portfolio','DELETE_SAVINGNOTE_CHECKER','SAVINGNOTE','DELETE',0),(171,'portfolio','READ_CLIENTIDENTIFIER','CLIENTIDENTIFIER','READ',0),(172,'portfolio','CREATE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','CREATE',0),(173,'portfolio','CREATE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','CREATE',0),(174,'portfolio','UPDATE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','UPDATE',0),(175,'portfolio','UPDATE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','UPDATE',0),(176,'portfolio','DELETE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','DELETE',0),(177,'portfolio','DELETE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','DELETE',0),(178,'portfolio','READ_DOCUMENT','DOCUMENT','READ',0),(179,'portfolio','CREATE_DOCUMENT','DOCUMENT','CREATE',0),(180,'portfolio','CREATE_DOCUMENT_CHECKER','DOCUMENT','CREATE',0),(181,'portfolio','UPDATE_DOCUMENT','DOCUMENT','UPDATE',0),(182,'portfolio','UPDATE_DOCUMENT_CHECKER','DOCUMENT','UPDATE',0),(183,'portfolio','DELETE_DOCUMENT','DOCUMENT','DELETE',0),(184,'portfolio','DELETE_DOCUMENT_CHECKER','DOCUMENT','DELETE',0),(185,'portfolio','READ_GROUP','GROUP','READ',0),(186,'portfolio','CREATE_GROUP','GROUP','CREATE',0),(187,'portfolio','CREATE_GROUP_CHECKER','GROUP','CREATE',0),(188,'portfolio','UPDATE_GROUP','GROUP','UPDATE',0),(189,'portfolio','UPDATE_GROUP_CHECKER','GROUP','UPDATE',0),(190,'portfolio','DELETE_GROUP','GROUP','DELETE',0),(191,'portfolio','DELETE_GROUP_CHECKER','GROUP','DELETE',0),(192,'portfolio','UNASSIGNSTAFF_GROUP','GROUP','UNASSIGNSTAFF',0),(193,'portfolio','UNASSIGNSTAFF_GROUP_CHECKER','GROUP','UNASSIGNSTAFF',0),(194,'portfolio','CREATE_LOANCHARGE','LOANCHARGE','CREATE',0),(195,'portfolio','CREATE_LOANCHARGE_CHECKER','LOANCHARGE','CREATE',0),(196,'portfolio','UPDATE_LOANCHARGE','LOANCHARGE','UPDATE',0),(197,'portfolio','UPDATE_LOANCHARGE_CHECKER','LOANCHARGE','UPDATE',0),(198,'portfolio','DELETE_LOANCHARGE','LOANCHARGE','DELETE',0),(199,'portfolio','DELETE_LOANCHARGE_CHECKER','LOANCHARGE','DELETE',0),(200,'portfolio','WAIVE_LOANCHARGE','LOANCHARGE','WAIVE',0),(201,'portfolio','WAIVE_LOANCHARGE_CHECKER','LOANCHARGE','WAIVE',0),(202,'portfolio','READ_DEPOSITACCOUNT','DEPOSITACCOUNT','READ',0),(203,'portfolio','CREATE_DEPOSITACCOUNT','DEPOSITACCOUNT','CREATE',0),(204,'portfolio','CREATE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','CREATE',0),(205,'portfolio','UPDATE_DEPOSITACCOUNT','DEPOSITACCOUNT','UPDATE',0),(206,'portfolio','UPDATE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','UPDATE',0),(207,'portfolio','DELETE_DEPOSITACCOUNT','DEPOSITACCOUNT','DELETE',0),(208,'portfolio','DELETE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','DELETE',0),(209,'portfolio','READ_SAVINGSACCOUNT','SAVINGSACCOUNT','READ',0),(210,'portfolio','CREATE_SAVINGSACCOUNT','SAVINGSACCOUNT','CREATE',0),(211,'portfolio','CREATE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','CREATE',0),(212,'portfolio','UPDATE_SAVINGSACCOUNT','SAVINGSACCOUNT','UPDATE',0),(213,'portfolio','UPDATE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','UPDATE',0),(214,'portfolio','DELETE_SAVINGSACCOUNT','SAVINGSACCOUNT','DELETE',0),(215,'portfolio','DELETE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','DELETE',0),(216,'portfolio','READ_GUARANTOR','GUARANTOR','READ',0),(217,'portfolio','CREATE_GUARANTOR','GUARANTOR','CREATE',0),(218,'portfolio','CREATE_GUARANTOR_CHECKER','GUARANTOR','CREATE',0),(219,'portfolio','UPDATE_GUARANTOR','GUARANTOR','UPDATE',0),(220,'portfolio','UPDATE_GUARANTOR_CHECKER','GUARANTOR','UPDATE',0),(221,'portfolio','DELETE_GUARANTOR','GUARANTOR','DELETE',0),(222,'portfolio','DELETE_GUARANTOR_CHECKER','GUARANTOR','DELETE',0),(223,'transaction_loan','APPROVE_LOAN','LOAN','APPROVE',0),(224,'transaction_loan','APPROVEINPAST_LOAN','LOAN','APPROVEINPAST',0),(225,'transaction_loan','REJECT_LOAN','LOAN','REJECT',0),(226,'transaction_loan','REJECTINPAST_LOAN','LOAN','REJECTINPAST',0),(227,'transaction_loan','WITHDRAW_LOAN','LOAN','WITHDRAW',0),(228,'transaction_loan','WITHDRAWINPAST_LOAN','LOAN','WITHDRAWINPAST',0),(229,'transaction_loan','APPROVALUNDO_LOAN','LOAN','APPROVALUNDO',0),(230,'transaction_loan','DISBURSE_LOAN','LOAN','DISBURSE',0),(231,'transaction_loan','DISBURSEINPAST_LOAN','LOAN','DISBURSEINPAST',0),(232,'transaction_loan','DISBURSALUNDO_LOAN','LOAN','DISBURSALUNDO',0),(233,'transaction_loan','REPAYMENT_LOAN','LOAN','REPAYMENT',0),(234,'transaction_loan','REPAYMENTINPAST_LOAN','LOAN','REPAYMENTINPAST',0),(235,'transaction_loan','ADJUST_LOAN','LOAN','ADJUST',0),(236,'transaction_loan','WAIVEINTERESTPORTION_LOAN','LOAN','WAIVEINTERESTPORTION',0),(237,'transaction_loan','WRITEOFF_LOAN','LOAN','WRITEOFF',0),(238,'transaction_loan','CLOSE_LOAN','LOAN','CLOSE',0),(239,'transaction_loan','CLOSEASRESCHEDULED_LOAN','LOAN','CLOSEASRESCHEDULED',0),(240,'transaction_loan','UPDATELOANOFFICER_LOAN','LOAN','UPDATELOANOFFICER',0),(241,'transaction_loan','UPDATELOANOFFICER_LOAN_CHECKER','LOAN','UPDATELOANOFFICER',0),(242,'transaction_loan','REMOVELOANOFFICER_LOAN','LOAN','REMOVELOANOFFICER',0),(243,'transaction_loan','REMOVELOANOFFICER_LOAN_CHECKER','LOAN','REMOVELOANOFFICER',0),(244,'transaction_loan','BULKREASSIGN_LOAN','LOAN','BULKREASSIGN',0),(245,'transaction_loan','BULKREASSIGN_LOAN_CHECKER','LOAN','BULKREASSIGN',0),(246,'transaction_loan','APPROVE_LOAN_CHECKER','LOAN','APPROVE',0),(247,'transaction_loan','APPROVEINPAST_LOAN_CHECKER','LOAN','APPROVEINPAST',0),(248,'transaction_loan','REJECT_LOAN_CHECKER','LOAN','REJECT',0),(249,'transaction_loan','REJECTINPAST_LOAN_CHECKER','LOAN','REJECTINPAST',0),(250,'transaction_loan','WITHDRAW_LOAN_CHECKER','LOAN','WITHDRAW',0),(251,'transaction_loan','WITHDRAWINPAST_LOAN_CHECKER','LOAN','WITHDRAWINPAST',0),(252,'transaction_loan','APPROVALUNDO_LOAN_CHECKER','LOAN','APPROVALUNDO',0),(253,'transaction_loan','DISBURSE_LOAN_CHECKER','LOAN','DISBURSE',0),(254,'transaction_loan','DISBURSEINPAST_LOAN_CHECKER','LOAN','DISBURSEINPAST',0),(255,'transaction_loan','DISBURSALUNDO_LOAN_CHECKER','LOAN','DISBURSALUNDO',0),(256,'transaction_loan','REPAYMENT_LOAN_CHECKER','LOAN','REPAYMENT',0),(257,'transaction_loan','REPAYMENTINPAST_LOAN_CHECKER','LOAN','REPAYMENTINPAST',0),(258,'transaction_loan','ADJUST_LOAN_CHECKER','LOAN','ADJUST',0),(259,'transaction_loan','WAIVEINTERESTPORTION_LOAN_CHECKER','LOAN','WAIVEINTERESTPORTION',0),(260,'transaction_loan','WRITEOFF_LOAN_CHECKER','LOAN','WRITEOFF',0),(261,'transaction_loan','CLOSE_LOAN_CHECKER','LOAN','CLOSE',0),(262,'transaction_loan','CLOSEASRESCHEDULED_LOAN_CHECKER','LOAN','CLOSEASRESCHEDULED',0),(263,'transaction_deposit','APPROVE_DEPOSITACCOUNT','DEPOSITACCOUNT','APPROVE',0),(264,'transaction_deposit','REJECT_DEPOSITACCOUNT','DEPOSITACCOUNT','REJECT',0),(265,'transaction_deposit','WITHDRAW_DEPOSITACCOUNT','DEPOSITACCOUNT','WITHDRAW',0),(266,'transaction_deposit','APPROVALUNDO_DEPOSITACCOUNT','DEPOSITACCOUNT','APPROVALUNDO',0),(267,'transaction_deposit','WITHDRAWAL_DEPOSITACCOUNT','DEPOSITACCOUNT','WITHDRAWAL',0),(268,'transaction_deposit','INTEREST_DEPOSITACCOUNT','DEPOSITACCOUNT','INTEREST',0),(269,'transaction_deposit','RENEW_DEPOSITACCOUNT','DEPOSITACCOUNT','RENEW',0),(270,'transaction_deposit','APPROVE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','APPROVE',0),(271,'transaction_deposit','REJECT_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','REJECT',0),(272,'transaction_deposit','WITHDRAW_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','WITHDRAW',0),(273,'transaction_deposit','APPROVALUNDO_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','APPROVALUNDO',0),(274,'transaction_deposit','WITHDRAWAL_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','WITHDRAWAL',0),(275,'transaction_deposit','INTEREST_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','INTEREST',0),(276,'transaction_deposit','RENEW_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','RENEW',0),(277,'accounting','CREATE_GLACCOUNT','GLACCOUNT','CREATE',0),(278,'accounting','UPDATE_GLACCOUNT','GLACCOUNT','UPDATE',0),(279,'accounting','DELETE_GLACCOUNT','GLACCOUNT','DELETE',0),(280,'accounting','CREATE_GLCLOSURE','GLCLOSURE','CREATE',0),(281,'accounting','UPDATE_GLCLOSURE','GLCLOSURE','UPDATE',0),(282,'accounting','DELETE_GLCLOSURE','GLCLOSURE','DELETE',0),(283,'accounting','CREATE_JOURNALENTRY','JOURNALENTRY','CREATE',0),(284,'accounting','REVERSE_JOURNALENTRY','JOURNALENTRY','REVERSE',0),(285,'report','READ_Active Loans - Details','Active Loans - Details','READ',0),(286,'report','READ_Active Loans - Summary','Active Loans - Summary','READ',0),(287,'report','READ_Active Loans by Disbursal Period','Active Loans by Disbursal Period','READ',0),(288,'report','READ_Active Loans in last installment','Active Loans in last installment','READ',0),(289,'report','READ_Active Loans in last installment Summary','Active Loans in last installment Summary','READ',0),(290,'report','READ_Active Loans Passed Final Maturity','Active Loans Passed Final Maturity','READ',0),(291,'report','READ_Active Loans Passed Final Maturity Summary','Active Loans Passed Final Maturity Summary','READ',0),(292,'report','READ_Aging Detail','Aging Detail','READ',0),(293,'report','READ_Aging Summary (Arrears in Months)','Aging Summary (Arrears in Months)','READ',0),(294,'report','READ_Aging Summary (Arrears in Weeks)','Aging Summary (Arrears in Weeks)','READ',0),(295,'report','READ_Balance Sheet','Balance Sheet','READ',0),(296,'report','READ_Branch Expected Cash Flow','Branch Expected Cash Flow','READ',0),(297,'report','READ_Client Listing','Client Listing','READ',0),(298,'report','READ_Client Loans Listing','Client Loans Listing','READ',0),(299,'report','READ_Expected Payments By Date - Basic','Expected Payments By Date - Basic','READ',0),(300,'report','READ_Expected Payments By Date - Formatted','Expected Payments By Date - Formatted','READ',0),(301,'report','READ_Funds Disbursed Between Dates Summary','Funds Disbursed Between Dates Summary','READ',0),(302,'report','READ_Funds Disbursed Between Dates Summary by Office','Funds Disbursed Between Dates Summary by Office','READ',0),(303,'report','READ_Income Statement','Income Statement','READ',0),(304,'report','READ_Loan Account Schedule','Loan Account Schedule','READ',0),(305,'report','READ_Loans Awaiting Disbursal','Loans Awaiting Disbursal','READ',0),(306,'report','READ_Loans Awaiting Disbursal Summary','Loans Awaiting Disbursal Summary','READ',0),(307,'report','READ_Loans Awaiting Disbursal Summary by Month','Loans Awaiting Disbursal Summary by Month','READ',0),(308,'report','READ_Loans Pending Approval','Loans Pending Approval','READ',0),(309,'report','READ_Obligation Met Loans Details','Obligation Met Loans Details','READ',0),(310,'report','READ_Obligation Met Loans Summary','Obligation Met Loans Summary','READ',0),(311,'report','READ_Portfolio at Risk','Portfolio at Risk','READ',0),(312,'report','READ_Portfolio at Risk by Branch','Portfolio at Risk by Branch','READ',0),(313,'report','READ_Rescheduled Loans','Rescheduled Loans','READ',0),(314,'report','READ_Trial Balance','Trial Balance','READ',0),(315,'report','READ_Written-Off Loans','Written-Off Loans','READ',0); /*!40000 ALTER TABLE `m_permission` ENABLE KEYS */; UNLOCK TABLES; @@ -1682,4 +1773,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2013-03-20 11:53:53 +-- Dump completed on 2013-03-20 18:56:46 diff --git a/mifosng-db/multi-tenant-demo-backups/bk_mifostenant_default.sql b/mifosng-db/multi-tenant-demo-backups/bk_mifostenant_default.sql index 63374acad..bed35d2a6 100644 --- a/mifosng-db/multi-tenant-demo-backups/bk_mifostenant_default.sql +++ b/mifosng-db/multi-tenant-demo-backups/bk_mifostenant_default.sql @@ -1283,7 +1283,7 @@ CREATE TABLE `m_permission` ( LOCK TABLES `m_permission` WRITE; /*!40000 ALTER TABLE `m_permission` DISABLE KEYS */; -INSERT INTO `m_permission` VALUES (1,'special','ALL_FUNCTIONS',NULL,NULL,0),(2,'special','ALL_FUNCTIONS_READ',NULL,NULL,0),(3,'special','CHECKER_SUPER_USER',NULL,NULL,0),(4,'special','REPORTING_SUPER_USER',NULL,NULL,0),(5,'authorisation','READ_PERMISSION','PERMISSION','READ',0),(6,'authorisation','PERMISSIONS_ROLE','ROLE','PERMISSIONS',1),(7,'authorisation','CREATE_ROLE','ROLE','CREATE',1),(8,'authorisation','CREATE_ROLE_CHECKER','ROLE','CREATE',1),(9,'authorisation','READ_ROLE','ROLE','READ',0),(10,'authorisation','UPDATE_ROLE','ROLE','UPDATE',1),(11,'authorisation','UPDATE_ROLE_CHECKER','ROLE','UPDATE',1),(12,'authorisation','DELETE_ROLE','ROLE','DELETE',1),(13,'authorisation','DELETE_ROLE_CHECKER','ROLE','DELETE',1),(14,'authorisation','CREATE_USER','USER','CREATE',1),(15,'authorisation','CREATE_USER_CHECKER','USER','CREATE',1),(16,'authorisation','READ_USER','USER','READ',0),(17,'authorisation','UPDATE_USER','USER','UPDATE',1),(18,'authorisation','UPDATE_USER_CHECKER','USER','UPDATE',1),(19,'authorisation','DELETE_USER','USER','DELETE',1),(20,'authorisation','DELETE_USER_CHECKER','USER','DELETE',1),(21,'configuration','READ_CONFIGURATION','CONFIGURATION','READ',1),(22,'configuration','UPDATE_CONFIGURATION','CONFIGURATION','UPDATE',1),(23,'configuration','UPDATE_CONFIGURATION_CHECKER','CONFIGURATION','UPDATE',1),(24,'configuration','READ_CODE','CODE','READ',0),(25,'configuration','CREATE_CODE','CODE','CREATE',1),(26,'configuration','CREATE_CODE_CHECKER','CODE','CREATE',1),(27,'configuration','UPDATE_CODE','CODE','UPDATE',1),(28,'configuration','UPDATE_CODE_CHECKER','CODE','UPDATE',1),(29,'configuration','DELETE_CODE','CODE','DELETE',1),(30,'configuration','DELETE_CODE_CHECKER','CODE','DELETE',1),(31,'configuration','READ_CODEVALUE','CODEVALUE','READ',0),(32,'configuration','CREATE_CODEVALUE','CODEVALUE','CREATE',1),(33,'configuration','CREATE_CODEVALUE_CHECKER','CODEVALUE','CREATE',1),(34,'configuration','UPDATE_CODEVALUE','CODEVALUE','UPDATE',1),(35,'configuration','UPDATE_CODEVALUE_CHECKER','CODEVALUE','UPDATE',1),(36,'configuration','DELETE_CODEVALUE','CODEVALUE','DELETE',1),(37,'configuration','DELETE_CODEVALUE_CHECKER','CODEVALUE','DELETE',1),(38,'configuration','READ_CURRENCY','CURRENCY','READ',0),(39,'configuration','UPDATE_CURRENCY','CURRENCY','UPDATE',1),(40,'configuration','UPDATE_CURRENCY_CHECKER','CURRENCY','UPDATE',1),(41,'configuration','UPDATE_PERMISSION','PERMISSION','UPDATE',1),(42,'configuration','UPDATE_PERMISSION_CHECKER','PERMISSION','UPDATE',1),(43,'configuration','READ_DATATABLE','DATATABLE','READ',0),(44,'configuration','REGISTER_DATATABLE','DATATABLE','REGISTER',1),(45,'configuration','REGISTER_DATATABLE_CHECKER','DATATABLE','REGISTER',1),(46,'configuration','DEREGISTER_DATATABLE','DATATABLE','DEREGISTER',1),(47,'configuration','DEREGISTER_DATATABLE_CHECKER','DATATABLE','DEREGISTER',1),(48,'configuration','READ_AUDIT','AUDIT','READ',0),(49,'configuration','CREATE_CALENDAR','CALENDAR','CREATE',1),(50,'configuration','READ_CALENDAR','CALENDAR','READ',0),(51,'configuration','UPDATE_CALENDAR','CALENDAR','UPDATE',1),(52,'configuration','DELETE_CALENDAR','CALENDAR','DELETE',1),(53,'configuration','CREATE_CALENDAR_CHECKER','CALENDAR','CREATE',1),(54,'configuration','UPDATE_CALENDAR_CHECKER','CALENDAR','UPDATE',1),(55,'configuration','DELETE_CALENDAR_CHECKER','CALENDAR','DELETE',1),(56,'organisation','READ_MAKERCHECKER','MAKERCHECKER','READ',0),(57,'organisation','READ_CHARGE','CHARGE','READ',0),(58,'organisation','CREATE_CHARGE','CHARGE','CREATE',1),(59,'organisation','CREATE_CHARGE_CHECKER','CHARGE','CREATE',1),(60,'organisation','UPDATE_CHARGE','CHARGE','UPDATE',1),(61,'organisation','UPDATE_CHARGE_CHECKER','CHARGE','UPDATE',1),(62,'organisation','DELETE_CHARGE','CHARGE','DELETE',1),(63,'organisation','DELETE_CHARGE_CHECKER','CHARGE','DELETE',1),(64,'organisation','READ_FUND','FUND','READ',0),(65,'organisation','CREATE_FUND','FUND','CREATE',1),(66,'organisation','CREATE_FUND_CHECKER','FUND','CREATE',1),(67,'organisation','UPDATE_FUND','FUND','UPDATE',1),(68,'organisation','UPDATE_FUND_CHECKER','FUND','UPDATE',1),(69,'organisation','DELETE_FUND','FUND','DELETE',1),(70,'organisation','DELETE_FUND_CHECKER','FUND','DELETE',1),(71,'organisation','READ_LOANPRODUCT','LOANPRODUCT','READ',0),(72,'organisation','CREATE_LOANPRODUCT','LOANPRODUCT','CREATE',1),(73,'organisation','CREATE_LOANPRODUCT_CHECKER','LOANPRODUCT','CREATE',1),(74,'organisation','UPDATE_LOANPRODUCT','LOANPRODUCT','UPDATE',1),(75,'organisation','UPDATE_LOANPRODUCT_CHECKER','LOANPRODUCT','UPDATE',1),(76,'organisation','DELETE_LOANPRODUCT','LOANPRODUCT','DELETE',1),(77,'organisation','DELETE_LOANPRODUCT_CHECKER','LOANPRODUCT','DELETE',1),(78,'organisation','READ_OFFICE','OFFICE','READ',0),(79,'organisation','CREATE_OFFICE','OFFICE','CREATE',1),(80,'organisation','CREATE_OFFICE_CHECKER','OFFICE','CREATE',1),(81,'organisation','UPDATE_OFFICE','OFFICE','UPDATE',1),(82,'organisation','UPDATE_OFFICE_CHECKER','OFFICE','UPDATE',1),(83,'organisation','READ_OFFICETRANSACTION','OFFICETRANSACTION','READ',0),(84,'organisation','DELETE_OFFICE_CHECKER','OFFICE','DELETE',1),(85,'organisation','CREATE_OFFICETRANSACTION','OFFICETRANSACTION','CREATE',1),(86,'organisation','CREATE_OFFICETRANSACTION_CHECKER','OFFICETRANSACTION','CREATE',1),(87,'organisation','DELETE_OFFICETRANSACTION','OFFICETRANSACTION','DELETE',1),(88,'organisation','DELETE_OFFICETRANSACTION_CHECKER','OFFICETRANSACTION','DELETE',1),(89,'organisation','READ_STAFF','STAFF','READ',0),(90,'organisation','CREATE_STAFF','STAFF','CREATE',1),(91,'organisation','CREATE_STAFF_CHECKER','STAFF','CREATE',1),(92,'organisation','UPDATE_STAFF','STAFF','UPDATE',1),(93,'organisation','UPDATE_STAFF_CHECKER','STAFF','UPDATE',1),(94,'organisation','DELETE_STAFF','STAFF','DELETE',1),(95,'organisation','DELETE_STAFF_CHECKER','STAFF','DELETE',1),(96,'organisation','READ_SAVINGSPRODUCT','SAVINGSPRODUCT','READ',0),(97,'organisation','CREATE_SAVINGSPRODUCT','SAVINGSPRODUCT','CREATE',1),(98,'organisation','CREATE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','CREATE',1),(99,'organisation','UPDATE_SAVINGSPRODUCT','SAVINGSPRODUCT','UPDATE',1),(100,'organisation','UPDATE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','UPDATE',1),(101,'organisation','DELETE_SAVINGSPRODUCT','SAVINGSPRODUCT','DELETE',1),(102,'organisation','DELETE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','DELETE',1),(103,'organisation','READ_DEPOSITPRODUCT','DEPOSITPRODUCT','READ',0),(104,'organisation','CREATE_DEPOSITPRODUCT','DEPOSITPRODUCT','CREATE',1),(105,'organisation','CREATE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','CREATE',1),(106,'organisation','UPDATE_DEPOSITPRODUCT','DEPOSITPRODUCT','UPDATE',1),(107,'organisation','UPDATE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','UPDATE',1),(108,'organisation','DELETE_DEPOSITPRODUCT','DEPOSITPRODUCT','DELETE',1),(109,'organisation','DELETE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','DELETE',1),(110,'portfolio','READ_LOAN','LOAN','READ',0),(111,'portfolio','CREATE_LOAN','LOAN','CREATE',1),(112,'portfolio','CREATE_LOAN_CHECKER','LOAN','CREATE',1),(113,'portfolio','UPDATE_LOAN','LOAN','UPDATE',1),(114,'portfolio','UPDATE_LOAN_CHECKER','LOAN','UPDATE',1),(115,'portfolio','DELETE_LOAN','LOAN','DELETE',1),(116,'portfolio','DELETE_LOAN_CHECKER','LOAN','DELETE',1),(117,'portfolio','READ_CLIENT','CLIENT','READ',0),(118,'portfolio','CREATE_CLIENT','CLIENT','CREATE',1),(119,'portfolio','CREATE_CLIENT_CHECKER','CLIENT','CREATE',1),(120,'portfolio','UPDATE_CLIENT','CLIENT','UPDATE',1),(121,'portfolio','UPDATE_CLIENT_CHECKER','CLIENT','UPDATE',1),(122,'portfolio','DELETE_CLIENT','CLIENT','DELETE',1),(123,'portfolio','DELETE_CLIENT_CHECKER','CLIENT','DELETE',1),(124,'portfolio','READ_CLIENTIMAGE','CLIENTIMAGE','READ',0),(125,'portfolio','CREATE_CLIENTIMAGE','CLIENTIMAGE','CREATE',1),(126,'portfolio','CREATE_CLIENTIMAGE_CHECKER','CLIENTIMAGE','CREATE',1),(127,'portfolio','DELETE_CLIENTIMAGE','CLIENTIMAGE','DELETE',1),(128,'portfolio','DELETE_CLIENTIMAGE_CHECKER','CLIENTIMAGE','DELETE',1),(129,'portfolio','READ_CLIENTNOTE','CLIENTNOTE','READ',0),(130,'portfolio','CREATE_CLIENTNOTE','CLIENTNOTE','CREATE',1),(131,'portfolio','CREATE_CLIENTNOTE_CHECKER','CLIENTNOTE','CREATE',1),(132,'portfolio','UPDATE_CLIENTNOTE','CLIENTNOTE','UPDATE',1),(133,'portfolio','UPDATE_CLIENTNOTE_CHECKER','CLIENTNOTE','UPDATE',1),(134,'portfolio','DELETE_CLIENTNOTE','CLIENTNOTE','DELETE',1),(135,'portfolio','DELETE_CLIENTNOTE_CHECKER','CLIENTNOTE','DELETE',1),(136,'portfolio','READ_GROUPNOTE','GROUPNOTE','READ',0),(137,'portfolio','CREATE_GROUPNOTE','GROUPNOTE','CREATE',1),(138,'portfolio','UPDATE_GROUPNOTE','GROUPNOTE','UPDATE',1),(139,'portfolio','DELETE_GROUPNOTE','GROUPNOTE','DELETE',1),(140,'portfolio','CREATE_GROUPNOTE_CHECKER','GROUPNOTE','CREATE',1),(141,'portfolio','UPDATE_GROUPNOTE_CHECKER','GROUPNOTE','UPDATE',1),(142,'portfolio','DELETE_GROUPNOTE_CHECKER','GROUPNOTE','DELETE',1),(143,'portfolio','READ_LOANNOTE','LOANNOTE','READ',0),(144,'portfolio','CREATE_LOANNOTE','LOANNOTE','CREATE',1),(145,'portfolio','UPDATE_LOANNOTE','LOANNOTE','UPDATE',1),(146,'portfolio','DELETE_LOANNOTE','LOANNOTE','DELETE',1),(147,'portfolio','CREATE_LOANNOTE_CHECKER','LOANNOTE','CREATE',1),(148,'portfolio','UPDATE_LOANNOTE_CHECKER','LOANNOTE','UPDATE',1),(149,'portfolio','DELETE_LOANNOTE_CHECKER','LOANNOTE','DELETE',1),(150,'portfolio','READ_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','READ',0),(151,'portfolio','CREATE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','CREATE',1),(152,'portfolio','UPDATE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','UPDATE',1),(153,'portfolio','DELETE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','DELETE',1),(154,'portfolio','CREATE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','CREATE',1),(155,'portfolio','UPDATE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','UPDATE',1),(156,'portfolio','DELETE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','DELETE',1),(157,'portfolio','READ_DEPOSITNOTE','DEPOSITNOTE','READ',0),(158,'portfolio','CREATE_DEPOSITNOTE','DEPOSITNOTE','CREATE',1),(159,'portfolio','UPDATE_DEPOSITNOTE','DEPOSITNOTE','UPDATE',1),(160,'portfolio','DELETE_DEPOSITNOTE','DEPOSITNOTE','DELETE',1),(161,'portfolio','CREATE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','CREATE',1),(162,'portfolio','UPDATE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','UPDATE',1),(163,'portfolio','DELETE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','DELETE',1),(164,'portfolio','READ_SAVINGNOTE','SAVINGNOTE','READ',0),(165,'portfolio','CREATE_SAVINGNOTE','SAVINGNOTE','CREATE',1),(166,'portfolio','UPDATE_SAVINGNOTE','SAVINGNOTE','UPDATE',1),(167,'portfolio','DELETE_SAVINGNOTE','SAVINGNOTE','DELETE',1),(168,'portfolio','CREATE_SAVINGNOTE_CHECKER','SAVINGNOTE','CREATE',1),(169,'portfolio','UPDATE_SAVINGNOTE_CHECKER','SAVINGNOTE','UPDATE',1),(170,'portfolio','DELETE_SAVINGNOTE_CHECKER','SAVINGNOTE','DELETE',1),(171,'portfolio','READ_CLIENTIDENTIFIER','CLIENTIDENTIFIER','READ',0),(172,'portfolio','CREATE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','CREATE',1),(173,'portfolio','CREATE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','CREATE',1),(174,'portfolio','UPDATE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','UPDATE',1),(175,'portfolio','UPDATE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','UPDATE',1),(176,'portfolio','DELETE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','DELETE',1),(177,'portfolio','DELETE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','DELETE',1),(178,'portfolio','READ_DOCUMENT','DOCUMENT','READ',0),(179,'portfolio','CREATE_DOCUMENT','DOCUMENT','CREATE',1),(180,'portfolio','CREATE_DOCUMENT_CHECKER','DOCUMENT','CREATE',1),(181,'portfolio','UPDATE_DOCUMENT','DOCUMENT','UPDATE',1),(182,'portfolio','UPDATE_DOCUMENT_CHECKER','DOCUMENT','UPDATE',1),(183,'portfolio','DELETE_DOCUMENT','DOCUMENT','DELETE',1),(184,'portfolio','DELETE_DOCUMENT_CHECKER','DOCUMENT','DELETE',1),(185,'portfolio','READ_GROUP','GROUP','READ',0),(186,'portfolio','CREATE_GROUP','GROUP','CREATE',1),(187,'portfolio','CREATE_GROUP_CHECKER','GROUP','CREATE',1),(188,'portfolio','UPDATE_GROUP','GROUP','UPDATE',1),(189,'portfolio','UPDATE_GROUP_CHECKER','GROUP','UPDATE',1),(190,'portfolio','DELETE_GROUP','GROUP','DELETE',1),(191,'portfolio','DELETE_GROUP_CHECKER','GROUP','DELETE',1),(192,'portfolio','UNASSIGNSTAFF_GROUP','GROUP','UNASSIGNSTAFF',1),(193,'portfolio','UNASSIGNSTAFF_GROUP_CHECKER','GROUP','UNASSIGNSTAFF',1),(194,'portfolio','CREATE_LOANCHARGE','LOANCHARGE','CREATE',1),(195,'portfolio','CREATE_LOANCHARGE_CHECKER','LOANCHARGE','CREATE',1),(196,'portfolio','UPDATE_LOANCHARGE','LOANCHARGE','UPDATE',1),(197,'portfolio','UPDATE_LOANCHARGE_CHECKER','LOANCHARGE','UPDATE',1),(198,'portfolio','DELETE_LOANCHARGE','LOANCHARGE','DELETE',1),(199,'portfolio','DELETE_LOANCHARGE_CHECKER','LOANCHARGE','DELETE',1),(200,'portfolio','WAIVE_LOANCHARGE','LOANCHARGE','WAIVE',1),(201,'portfolio','WAIVE_LOANCHARGE_CHECKER','LOANCHARGE','WAIVE',1),(202,'portfolio','READ_DEPOSITACCOUNT','DEPOSITACCOUNT','READ',0),(203,'portfolio','CREATE_DEPOSITACCOUNT','DEPOSITACCOUNT','CREATE',1),(204,'portfolio','CREATE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','CREATE',1),(205,'portfolio','UPDATE_DEPOSITACCOUNT','DEPOSITACCOUNT','UPDATE',1),(206,'portfolio','UPDATE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','UPDATE',1),(207,'portfolio','DELETE_DEPOSITACCOUNT','DEPOSITACCOUNT','DELETE',1),(208,'portfolio','DELETE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','DELETE',1),(209,'portfolio','READ_SAVINGSACCOUNT','SAVINGSACCOUNT','READ',0),(210,'portfolio','CREATE_SAVINGSACCOUNT','SAVINGSACCOUNT','CREATE',1),(211,'portfolio','CREATE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','CREATE',1),(212,'portfolio','UPDATE_SAVINGSACCOUNT','SAVINGSACCOUNT','UPDATE',1),(213,'portfolio','UPDATE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','UPDATE',1),(214,'portfolio','DELETE_SAVINGSACCOUNT','SAVINGSACCOUNT','DELETE',1),(215,'portfolio','DELETE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','DELETE',1),(216,'portfolio','READ_GUARANTOR','GUARANTOR','READ',0),(217,'portfolio','CREATE_GUARANTOR','GUARANTOR','CREATE',1),(218,'portfolio','CREATE_GUARANTOR_CHECKER','GUARANTOR','CREATE',1),(219,'portfolio','UPDATE_GUARANTOR','GUARANTOR','UPDATE',1),(220,'portfolio','UPDATE_GUARANTOR_CHECKER','GUARANTOR','UPDATE',1),(221,'portfolio','DELETE_GUARANTOR','GUARANTOR','DELETE',1),(222,'portfolio','DELETE_GUARANTOR_CHECKER','GUARANTOR','DELETE',1),(223,'transaction_loan','APPROVE_LOAN','LOAN','APPROVE',1),(224,'transaction_loan','APPROVEINPAST_LOAN','LOAN','APPROVEINPAST',1),(225,'transaction_loan','REJECT_LOAN','LOAN','REJECT',1),(226,'transaction_loan','REJECTINPAST_LOAN','LOAN','REJECTINPAST',1),(227,'transaction_loan','WITHDRAW_LOAN','LOAN','WITHDRAW',1),(228,'transaction_loan','WITHDRAWINPAST_LOAN','LOAN','WITHDRAWINPAST',1),(229,'transaction_loan','APPROVALUNDO_LOAN','LOAN','APPROVALUNDO',1),(230,'transaction_loan','DISBURSE_LOAN','LOAN','DISBURSE',1),(231,'transaction_loan','DISBURSEINPAST_LOAN','LOAN','DISBURSEINPAST',1),(232,'transaction_loan','DISBURSALUNDO_LOAN','LOAN','DISBURSALUNDO',1),(233,'transaction_loan','REPAYMENT_LOAN','LOAN','REPAYMENT',1),(234,'transaction_loan','REPAYMENTINPAST_LOAN','LOAN','REPAYMENTINPAST',1),(235,'transaction_loan','ADJUST_LOAN','LOAN','ADJUST',1),(236,'transaction_loan','WAIVEINTERESTPORTION_LOAN','LOAN','WAIVEINTERESTPORTION',1),(237,'transaction_loan','WRITEOFF_LOAN','LOAN','WRITEOFF',1),(238,'transaction_loan','CLOSE_LOAN','LOAN','CLOSE',1),(239,'transaction_loan','CLOSEASRESCHEDULED_LOAN','LOAN','CLOSEASRESCHEDULED',1),(240,'transaction_loan','UPDATELOANOFFICER_LOAN','LOAN','UPDATELOANOFFICER',1),(241,'transaction_loan','UPDATELOANOFFICER_LOAN_CHECKER','LOAN','UPDATELOANOFFICER',1),(242,'transaction_loan','REMOVELOANOFFICER_LOAN','LOAN','REMOVELOANOFFICER',1),(243,'transaction_loan','REMOVELOANOFFICER_LOAN_CHECKER','LOAN','REMOVELOANOFFICER',1),(244,'transaction_loan','BULKREASSIGN_LOAN','LOAN','BULKREASSIGN',1),(245,'transaction_loan','BULKREASSIGN_LOAN_CHECKER','LOAN','BULKREASSIGN',1),(246,'transaction_loan','APPROVE_LOAN_CHECKER','LOAN','APPROVE',1),(247,'transaction_loan','APPROVEINPAST_LOAN_CHECKER','LOAN','APPROVEINPAST',1),(248,'transaction_loan','REJECT_LOAN_CHECKER','LOAN','REJECT',1),(249,'transaction_loan','REJECTINPAST_LOAN_CHECKER','LOAN','REJECTINPAST',1),(250,'transaction_loan','WITHDRAW_LOAN_CHECKER','LOAN','WITHDRAW',1),(251,'transaction_loan','WITHDRAWINPAST_LOAN_CHECKER','LOAN','WITHDRAWINPAST',1),(252,'transaction_loan','APPROVALUNDO_LOAN_CHECKER','LOAN','APPROVALUNDO',1),(253,'transaction_loan','DISBURSE_LOAN_CHECKER','LOAN','DISBURSE',1),(254,'transaction_loan','DISBURSEINPAST_LOAN_CHECKER','LOAN','DISBURSEINPAST',1),(255,'transaction_loan','DISBURSALUNDO_LOAN_CHECKER','LOAN','DISBURSALUNDO',1),(256,'transaction_loan','REPAYMENT_LOAN_CHECKER','LOAN','REPAYMENT',1),(257,'transaction_loan','REPAYMENTINPAST_LOAN_CHECKER','LOAN','REPAYMENTINPAST',1),(258,'transaction_loan','ADJUST_LOAN_CHECKER','LOAN','ADJUST',1),(259,'transaction_loan','WAIVEINTERESTPORTION_LOAN_CHECKER','LOAN','WAIVEINTERESTPORTION',1),(260,'transaction_loan','WRITEOFF_LOAN_CHECKER','LOAN','WRITEOFF',1),(261,'transaction_loan','CLOSE_LOAN_CHECKER','LOAN','CLOSE',1),(262,'transaction_loan','CLOSEASRESCHEDULED_LOAN_CHECKER','LOAN','CLOSEASRESCHEDULED',1),(263,'transaction_deposit','APPROVE_DEPOSITACCOUNT','DEPOSITACCOUNT','APPROVE',1),(264,'transaction_deposit','REJECT_DEPOSITACCOUNT','DEPOSITACCOUNT','REJECT',1),(265,'transaction_deposit','WITHDRAW_DEPOSITACCOUNT','DEPOSITACCOUNT','WITHDRAW',1),(266,'transaction_deposit','APPROVALUNDO_DEPOSITACCOUNT','DEPOSITACCOUNT','APPROVALUNDO',1),(267,'transaction_deposit','WITHDRAWAL_DEPOSITACCOUNT','DEPOSITACCOUNT','WITHDRAWAL',1),(268,'transaction_deposit','INTEREST_DEPOSITACCOUNT','DEPOSITACCOUNT','INTEREST',1),(269,'transaction_deposit','RENEW_DEPOSITACCOUNT','DEPOSITACCOUNT','RENEW',1),(270,'transaction_deposit','APPROVE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','APPROVE',1),(271,'transaction_deposit','REJECT_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','REJECT',1),(272,'transaction_deposit','WITHDRAW_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','WITHDRAW',1),(273,'transaction_deposit','APPROVALUNDO_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','APPROVALUNDO',1),(274,'transaction_deposit','WITHDRAWAL_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','WITHDRAWAL',1),(275,'transaction_deposit','INTEREST_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','INTEREST',1),(276,'transaction_deposit','RENEW_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','RENEW',1),(277,'accounting','CREATE_GLACCOUNT','GLACCOUNT','CREATE',1),(278,'accounting','UPDATE_GLACCOUNT','GLACCOUNT','UPDATE',1),(279,'accounting','DELETE_GLACCOUNT','GLACCOUNT','DELETE',1),(280,'accounting','CREATE_GLCLOSURE','GLCLOSURE','CREATE',1),(281,'accounting','UPDATE_GLCLOSURE','GLCLOSURE','UPDATE',1),(282,'accounting','DELETE_GLCLOSURE','GLCLOSURE','DELETE',1),(283,'accounting','CREATE_JOURNALENTRY','JOURNALENTRY','CREATE',1),(284,'accounting','REVERSE_JOURNALENTRY','JOURNALENTRY','REVERSE',1),(285,'report','READ_Active Loans - Details','Active Loans - Details','READ',0),(286,'report','READ_Active Loans - Summary','Active Loans - Summary','READ',0),(287,'report','READ_Active Loans by Disbursal Period','Active Loans by Disbursal Period','READ',0),(288,'report','READ_Active Loans in last installment','Active Loans in last installment','READ',0),(289,'report','READ_Active Loans in last installment Summary','Active Loans in last installment Summary','READ',0),(290,'report','READ_Active Loans Passed Final Maturity','Active Loans Passed Final Maturity','READ',0),(291,'report','READ_Active Loans Passed Final Maturity Summary','Active Loans Passed Final Maturity Summary','READ',0),(292,'report','READ_Aging Detail','Aging Detail','READ',0),(293,'report','READ_Aging Summary (Arrears in Months)','Aging Summary (Arrears in Months)','READ',0),(294,'report','READ_Aging Summary (Arrears in Weeks)','Aging Summary (Arrears in Weeks)','READ',0),(295,'report','READ_Balance Sheet','Balance Sheet','READ',0),(296,'report','READ_Branch Expected Cash Flow','Branch Expected Cash Flow','READ',0),(297,'report','READ_Client Listing','Client Listing','READ',0),(298,'report','READ_Client Loans Listing','Client Loans Listing','READ',0),(299,'report','READ_Expected Payments By Date - Basic','Expected Payments By Date - Basic','READ',0),(300,'report','READ_Expected Payments By Date - Formatted','Expected Payments By Date - Formatted','READ',0),(301,'report','READ_Funds Disbursed Between Dates Summary','Funds Disbursed Between Dates Summary','READ',0),(302,'report','READ_Funds Disbursed Between Dates Summary by Office','Funds Disbursed Between Dates Summary by Office','READ',0),(303,'report','READ_Income Statement','Income Statement','READ',0),(304,'report','READ_Loan Account Schedule','Loan Account Schedule','READ',0),(305,'report','READ_Loans Awaiting Disbursal','Loans Awaiting Disbursal','READ',0),(306,'report','READ_Loans Awaiting Disbursal Summary','Loans Awaiting Disbursal Summary','READ',0),(307,'report','READ_Loans Awaiting Disbursal Summary by Month','Loans Awaiting Disbursal Summary by Month','READ',0),(308,'report','READ_Loans Pending Approval','Loans Pending Approval','READ',0),(309,'report','READ_Obligation Met Loans Details','Obligation Met Loans Details','READ',0),(310,'report','READ_Obligation Met Loans Summary','Obligation Met Loans Summary','READ',0),(311,'report','READ_Portfolio at Risk','Portfolio at Risk','READ',0),(312,'report','READ_Portfolio at Risk by Branch','Portfolio at Risk by Branch','READ',0),(313,'report','READ_Rescheduled Loans','Rescheduled Loans','READ',0),(314,'report','READ_Trial Balance','Trial Balance','READ',0),(315,'report','READ_Written-Off Loans','Written-Off Loans','READ',0),(316,'datatable','CREATE_extra_client_details','extra_client_details','CREATE',1),(317,'datatable','CREATE_extra_family_details','extra_family_details','CREATE',1),(318,'datatable','CREATE_extra_loan_details','extra_loan_details','CREATE',1),(319,'datatable','READ_extra_client_details','extra_client_details','READ',1),(320,'datatable','READ_extra_family_details','extra_family_details','READ',1),(321,'datatable','READ_extra_loan_details','extra_loan_details','READ',1),(322,'datatable','UPDATE_extra_client_details','extra_client_details','UPDATE',1),(323,'datatable','UPDATE_extra_family_details','extra_family_details','UPDATE',1),(324,'datatable','UPDATE_extra_loan_details','extra_loan_details','UPDATE',1),(325,'datatable','DELETE_extra_client_details','extra_client_details','DELETE',1),(326,'datatable','DELETE_extra_family_details','extra_family_details','DELETE',1),(327,'datatable','DELETE_extra_loan_details','extra_loan_details','DELETE',1); +INSERT INTO `m_permission` VALUES (1,'special','ALL_FUNCTIONS',NULL,NULL,0),(2,'special','ALL_FUNCTIONS_READ',NULL,NULL,0),(3,'special','CHECKER_SUPER_USER',NULL,NULL,0),(4,'special','REPORTING_SUPER_USER',NULL,NULL,0),(5,'authorisation','READ_PERMISSION','PERMISSION','READ',0),(6,'authorisation','PERMISSIONS_ROLE','ROLE','PERMISSIONS',0),(7,'authorisation','CREATE_ROLE','ROLE','CREATE',0),(8,'authorisation','CREATE_ROLE_CHECKER','ROLE','CREATE',0),(9,'authorisation','READ_ROLE','ROLE','READ',0),(10,'authorisation','UPDATE_ROLE','ROLE','UPDATE',0),(11,'authorisation','UPDATE_ROLE_CHECKER','ROLE','UPDATE',0),(12,'authorisation','DELETE_ROLE','ROLE','DELETE',0),(13,'authorisation','DELETE_ROLE_CHECKER','ROLE','DELETE',0),(14,'authorisation','CREATE_USER','USER','CREATE',0),(15,'authorisation','CREATE_USER_CHECKER','USER','CREATE',0),(16,'authorisation','READ_USER','USER','READ',0),(17,'authorisation','UPDATE_USER','USER','UPDATE',0),(18,'authorisation','UPDATE_USER_CHECKER','USER','UPDATE',0),(19,'authorisation','DELETE_USER','USER','DELETE',0),(20,'authorisation','DELETE_USER_CHECKER','USER','DELETE',0),(21,'configuration','READ_CONFIGURATION','CONFIGURATION','READ',0),(22,'configuration','UPDATE_CONFIGURATION','CONFIGURATION','UPDATE',0),(23,'configuration','UPDATE_CONFIGURATION_CHECKER','CONFIGURATION','UPDATE',0),(24,'configuration','READ_CODE','CODE','READ',0),(25,'configuration','CREATE_CODE','CODE','CREATE',0),(26,'configuration','CREATE_CODE_CHECKER','CODE','CREATE',0),(27,'configuration','UPDATE_CODE','CODE','UPDATE',0),(28,'configuration','UPDATE_CODE_CHECKER','CODE','UPDATE',0),(29,'configuration','DELETE_CODE','CODE','DELETE',0),(30,'configuration','DELETE_CODE_CHECKER','CODE','DELETE',0),(31,'configuration','READ_CODEVALUE','CODEVALUE','READ',0),(32,'configuration','CREATE_CODEVALUE','CODEVALUE','CREATE',0),(33,'configuration','CREATE_CODEVALUE_CHECKER','CODEVALUE','CREATE',0),(34,'configuration','UPDATE_CODEVALUE','CODEVALUE','UPDATE',0),(35,'configuration','UPDATE_CODEVALUE_CHECKER','CODEVALUE','UPDATE',0),(36,'configuration','DELETE_CODEVALUE','CODEVALUE','DELETE',0),(37,'configuration','DELETE_CODEVALUE_CHECKER','CODEVALUE','DELETE',0),(38,'configuration','READ_CURRENCY','CURRENCY','READ',0),(39,'configuration','UPDATE_CURRENCY','CURRENCY','UPDATE',0),(40,'configuration','UPDATE_CURRENCY_CHECKER','CURRENCY','UPDATE',0),(41,'configuration','UPDATE_PERMISSION','PERMISSION','UPDATE',0),(42,'configuration','UPDATE_PERMISSION_CHECKER','PERMISSION','UPDATE',0),(43,'configuration','READ_DATATABLE','DATATABLE','READ',0),(44,'configuration','REGISTER_DATATABLE','DATATABLE','REGISTER',0),(45,'configuration','REGISTER_DATATABLE_CHECKER','DATATABLE','REGISTER',0),(46,'configuration','DEREGISTER_DATATABLE','DATATABLE','DEREGISTER',0),(47,'configuration','DEREGISTER_DATATABLE_CHECKER','DATATABLE','DEREGISTER',0),(48,'configuration','READ_AUDIT','AUDIT','READ',0),(49,'configuration','CREATE_CALENDAR','CALENDAR','CREATE',0),(50,'configuration','READ_CALENDAR','CALENDAR','READ',0),(51,'configuration','UPDATE_CALENDAR','CALENDAR','UPDATE',0),(52,'configuration','DELETE_CALENDAR','CALENDAR','DELETE',0),(53,'configuration','CREATE_CALENDAR_CHECKER','CALENDAR','CREATE',0),(54,'configuration','UPDATE_CALENDAR_CHECKER','CALENDAR','UPDATE',0),(55,'configuration','DELETE_CALENDAR_CHECKER','CALENDAR','DELETE',0),(56,'organisation','READ_MAKERCHECKER','MAKERCHECKER','READ',0),(57,'organisation','READ_CHARGE','CHARGE','READ',0),(58,'organisation','CREATE_CHARGE','CHARGE','CREATE',0),(59,'organisation','CREATE_CHARGE_CHECKER','CHARGE','CREATE',0),(60,'organisation','UPDATE_CHARGE','CHARGE','UPDATE',0),(61,'organisation','UPDATE_CHARGE_CHECKER','CHARGE','UPDATE',0),(62,'organisation','DELETE_CHARGE','CHARGE','DELETE',0),(63,'organisation','DELETE_CHARGE_CHECKER','CHARGE','DELETE',0),(64,'organisation','READ_FUND','FUND','READ',0),(65,'organisation','CREATE_FUND','FUND','CREATE',0),(66,'organisation','CREATE_FUND_CHECKER','FUND','CREATE',0),(67,'organisation','UPDATE_FUND','FUND','UPDATE',0),(68,'organisation','UPDATE_FUND_CHECKER','FUND','UPDATE',0),(69,'organisation','DELETE_FUND','FUND','DELETE',0),(70,'organisation','DELETE_FUND_CHECKER','FUND','DELETE',0),(71,'organisation','READ_LOANPRODUCT','LOANPRODUCT','READ',0),(72,'organisation','CREATE_LOANPRODUCT','LOANPRODUCT','CREATE',0),(73,'organisation','CREATE_LOANPRODUCT_CHECKER','LOANPRODUCT','CREATE',0),(74,'organisation','UPDATE_LOANPRODUCT','LOANPRODUCT','UPDATE',0),(75,'organisation','UPDATE_LOANPRODUCT_CHECKER','LOANPRODUCT','UPDATE',0),(76,'organisation','DELETE_LOANPRODUCT','LOANPRODUCT','DELETE',0),(77,'organisation','DELETE_LOANPRODUCT_CHECKER','LOANPRODUCT','DELETE',0),(78,'organisation','READ_OFFICE','OFFICE','READ',0),(79,'organisation','CREATE_OFFICE','OFFICE','CREATE',0),(80,'organisation','CREATE_OFFICE_CHECKER','OFFICE','CREATE',0),(81,'organisation','UPDATE_OFFICE','OFFICE','UPDATE',0),(82,'organisation','UPDATE_OFFICE_CHECKER','OFFICE','UPDATE',0),(83,'organisation','READ_OFFICETRANSACTION','OFFICETRANSACTION','READ',0),(84,'organisation','DELETE_OFFICE_CHECKER','OFFICE','DELETE',0),(85,'organisation','CREATE_OFFICETRANSACTION','OFFICETRANSACTION','CREATE',0),(86,'organisation','CREATE_OFFICETRANSACTION_CHECKER','OFFICETRANSACTION','CREATE',0),(87,'organisation','DELETE_OFFICETRANSACTION','OFFICETRANSACTION','DELETE',0),(88,'organisation','DELETE_OFFICETRANSACTION_CHECKER','OFFICETRANSACTION','DELETE',0),(89,'organisation','READ_STAFF','STAFF','READ',0),(90,'organisation','CREATE_STAFF','STAFF','CREATE',0),(91,'organisation','CREATE_STAFF_CHECKER','STAFF','CREATE',0),(92,'organisation','UPDATE_STAFF','STAFF','UPDATE',0),(93,'organisation','UPDATE_STAFF_CHECKER','STAFF','UPDATE',0),(94,'organisation','DELETE_STAFF','STAFF','DELETE',0),(95,'organisation','DELETE_STAFF_CHECKER','STAFF','DELETE',0),(96,'organisation','READ_SAVINGSPRODUCT','SAVINGSPRODUCT','READ',0),(97,'organisation','CREATE_SAVINGSPRODUCT','SAVINGSPRODUCT','CREATE',0),(98,'organisation','CREATE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','CREATE',0),(99,'organisation','UPDATE_SAVINGSPRODUCT','SAVINGSPRODUCT','UPDATE',0),(100,'organisation','UPDATE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','UPDATE',0),(101,'organisation','DELETE_SAVINGSPRODUCT','SAVINGSPRODUCT','DELETE',0),(102,'organisation','DELETE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','DELETE',0),(103,'organisation','READ_DEPOSITPRODUCT','DEPOSITPRODUCT','READ',0),(104,'organisation','CREATE_DEPOSITPRODUCT','DEPOSITPRODUCT','CREATE',0),(105,'organisation','CREATE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','CREATE',0),(106,'organisation','UPDATE_DEPOSITPRODUCT','DEPOSITPRODUCT','UPDATE',0),(107,'organisation','UPDATE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','UPDATE',0),(108,'organisation','DELETE_DEPOSITPRODUCT','DEPOSITPRODUCT','DELETE',0),(109,'organisation','DELETE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','DELETE',0),(110,'portfolio','READ_LOAN','LOAN','READ',0),(111,'portfolio','CREATE_LOAN','LOAN','CREATE',0),(112,'portfolio','CREATE_LOAN_CHECKER','LOAN','CREATE',0),(113,'portfolio','UPDATE_LOAN','LOAN','UPDATE',0),(114,'portfolio','UPDATE_LOAN_CHECKER','LOAN','UPDATE',0),(115,'portfolio','DELETE_LOAN','LOAN','DELETE',0),(116,'portfolio','DELETE_LOAN_CHECKER','LOAN','DELETE',0),(117,'portfolio','READ_CLIENT','CLIENT','READ',0),(118,'portfolio','CREATE_CLIENT','CLIENT','CREATE',0),(119,'portfolio','CREATE_CLIENT_CHECKER','CLIENT','CREATE',0),(120,'portfolio','UPDATE_CLIENT','CLIENT','UPDATE',0),(121,'portfolio','UPDATE_CLIENT_CHECKER','CLIENT','UPDATE',0),(122,'portfolio','DELETE_CLIENT','CLIENT','DELETE',0),(123,'portfolio','DELETE_CLIENT_CHECKER','CLIENT','DELETE',0),(124,'portfolio','READ_CLIENTIMAGE','CLIENTIMAGE','READ',0),(125,'portfolio','CREATE_CLIENTIMAGE','CLIENTIMAGE','CREATE',0),(126,'portfolio','CREATE_CLIENTIMAGE_CHECKER','CLIENTIMAGE','CREATE',0),(127,'portfolio','DELETE_CLIENTIMAGE','CLIENTIMAGE','DELETE',0),(128,'portfolio','DELETE_CLIENTIMAGE_CHECKER','CLIENTIMAGE','DELETE',0),(129,'portfolio','READ_CLIENTNOTE','CLIENTNOTE','READ',0),(130,'portfolio','CREATE_CLIENTNOTE','CLIENTNOTE','CREATE',0),(131,'portfolio','CREATE_CLIENTNOTE_CHECKER','CLIENTNOTE','CREATE',0),(132,'portfolio','UPDATE_CLIENTNOTE','CLIENTNOTE','UPDATE',0),(133,'portfolio','UPDATE_CLIENTNOTE_CHECKER','CLIENTNOTE','UPDATE',0),(134,'portfolio','DELETE_CLIENTNOTE','CLIENTNOTE','DELETE',0),(135,'portfolio','DELETE_CLIENTNOTE_CHECKER','CLIENTNOTE','DELETE',0),(136,'portfolio','READ_GROUPNOTE','GROUPNOTE','READ',0),(137,'portfolio','CREATE_GROUPNOTE','GROUPNOTE','CREATE',0),(138,'portfolio','UPDATE_GROUPNOTE','GROUPNOTE','UPDATE',0),(139,'portfolio','DELETE_GROUPNOTE','GROUPNOTE','DELETE',0),(140,'portfolio','CREATE_GROUPNOTE_CHECKER','GROUPNOTE','CREATE',0),(141,'portfolio','UPDATE_GROUPNOTE_CHECKER','GROUPNOTE','UPDATE',0),(142,'portfolio','DELETE_GROUPNOTE_CHECKER','GROUPNOTE','DELETE',0),(143,'portfolio','READ_LOANNOTE','LOANNOTE','READ',0),(144,'portfolio','CREATE_LOANNOTE','LOANNOTE','CREATE',0),(145,'portfolio','UPDATE_LOANNOTE','LOANNOTE','UPDATE',0),(146,'portfolio','DELETE_LOANNOTE','LOANNOTE','DELETE',0),(147,'portfolio','CREATE_LOANNOTE_CHECKER','LOANNOTE','CREATE',0),(148,'portfolio','UPDATE_LOANNOTE_CHECKER','LOANNOTE','UPDATE',0),(149,'portfolio','DELETE_LOANNOTE_CHECKER','LOANNOTE','DELETE',0),(150,'portfolio','READ_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','READ',0),(151,'portfolio','CREATE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','CREATE',0),(152,'portfolio','UPDATE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','UPDATE',0),(153,'portfolio','DELETE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','DELETE',0),(154,'portfolio','CREATE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','CREATE',0),(155,'portfolio','UPDATE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','UPDATE',0),(156,'portfolio','DELETE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','DELETE',0),(157,'portfolio','READ_DEPOSITNOTE','DEPOSITNOTE','READ',0),(158,'portfolio','CREATE_DEPOSITNOTE','DEPOSITNOTE','CREATE',0),(159,'portfolio','UPDATE_DEPOSITNOTE','DEPOSITNOTE','UPDATE',0),(160,'portfolio','DELETE_DEPOSITNOTE','DEPOSITNOTE','DELETE',0),(161,'portfolio','CREATE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','CREATE',0),(162,'portfolio','UPDATE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','UPDATE',0),(163,'portfolio','DELETE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','DELETE',0),(164,'portfolio','READ_SAVINGNOTE','SAVINGNOTE','READ',0),(165,'portfolio','CREATE_SAVINGNOTE','SAVINGNOTE','CREATE',0),(166,'portfolio','UPDATE_SAVINGNOTE','SAVINGNOTE','UPDATE',0),(167,'portfolio','DELETE_SAVINGNOTE','SAVINGNOTE','DELETE',0),(168,'portfolio','CREATE_SAVINGNOTE_CHECKER','SAVINGNOTE','CREATE',0),(169,'portfolio','UPDATE_SAVINGNOTE_CHECKER','SAVINGNOTE','UPDATE',0),(170,'portfolio','DELETE_SAVINGNOTE_CHECKER','SAVINGNOTE','DELETE',0),(171,'portfolio','READ_CLIENTIDENTIFIER','CLIENTIDENTIFIER','READ',0),(172,'portfolio','CREATE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','CREATE',0),(173,'portfolio','CREATE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','CREATE',0),(174,'portfolio','UPDATE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','UPDATE',0),(175,'portfolio','UPDATE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','UPDATE',0),(176,'portfolio','DELETE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','DELETE',0),(177,'portfolio','DELETE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','DELETE',0),(178,'portfolio','READ_DOCUMENT','DOCUMENT','READ',0),(179,'portfolio','CREATE_DOCUMENT','DOCUMENT','CREATE',0),(180,'portfolio','CREATE_DOCUMENT_CHECKER','DOCUMENT','CREATE',0),(181,'portfolio','UPDATE_DOCUMENT','DOCUMENT','UPDATE',0),(182,'portfolio','UPDATE_DOCUMENT_CHECKER','DOCUMENT','UPDATE',0),(183,'portfolio','DELETE_DOCUMENT','DOCUMENT','DELETE',0),(184,'portfolio','DELETE_DOCUMENT_CHECKER','DOCUMENT','DELETE',0),(185,'portfolio','READ_GROUP','GROUP','READ',0),(186,'portfolio','CREATE_GROUP','GROUP','CREATE',0),(187,'portfolio','CREATE_GROUP_CHECKER','GROUP','CREATE',0),(188,'portfolio','UPDATE_GROUP','GROUP','UPDATE',0),(189,'portfolio','UPDATE_GROUP_CHECKER','GROUP','UPDATE',0),(190,'portfolio','DELETE_GROUP','GROUP','DELETE',0),(191,'portfolio','DELETE_GROUP_CHECKER','GROUP','DELETE',0),(192,'portfolio','UNASSIGNSTAFF_GROUP','GROUP','UNASSIGNSTAFF',0),(193,'portfolio','UNASSIGNSTAFF_GROUP_CHECKER','GROUP','UNASSIGNSTAFF',0),(194,'portfolio','CREATE_LOANCHARGE','LOANCHARGE','CREATE',0),(195,'portfolio','CREATE_LOANCHARGE_CHECKER','LOANCHARGE','CREATE',0),(196,'portfolio','UPDATE_LOANCHARGE','LOANCHARGE','UPDATE',0),(197,'portfolio','UPDATE_LOANCHARGE_CHECKER','LOANCHARGE','UPDATE',0),(198,'portfolio','DELETE_LOANCHARGE','LOANCHARGE','DELETE',0),(199,'portfolio','DELETE_LOANCHARGE_CHECKER','LOANCHARGE','DELETE',0),(200,'portfolio','WAIVE_LOANCHARGE','LOANCHARGE','WAIVE',0),(201,'portfolio','WAIVE_LOANCHARGE_CHECKER','LOANCHARGE','WAIVE',0),(202,'portfolio','READ_DEPOSITACCOUNT','DEPOSITACCOUNT','READ',0),(203,'portfolio','CREATE_DEPOSITACCOUNT','DEPOSITACCOUNT','CREATE',0),(204,'portfolio','CREATE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','CREATE',0),(205,'portfolio','UPDATE_DEPOSITACCOUNT','DEPOSITACCOUNT','UPDATE',0),(206,'portfolio','UPDATE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','UPDATE',0),(207,'portfolio','DELETE_DEPOSITACCOUNT','DEPOSITACCOUNT','DELETE',0),(208,'portfolio','DELETE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','DELETE',0),(209,'portfolio','READ_SAVINGSACCOUNT','SAVINGSACCOUNT','READ',0),(210,'portfolio','CREATE_SAVINGSACCOUNT','SAVINGSACCOUNT','CREATE',0),(211,'portfolio','CREATE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','CREATE',0),(212,'portfolio','UPDATE_SAVINGSACCOUNT','SAVINGSACCOUNT','UPDATE',0),(213,'portfolio','UPDATE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','UPDATE',0),(214,'portfolio','DELETE_SAVINGSACCOUNT','SAVINGSACCOUNT','DELETE',0),(215,'portfolio','DELETE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','DELETE',0),(216,'portfolio','READ_GUARANTOR','GUARANTOR','READ',0),(217,'portfolio','CREATE_GUARANTOR','GUARANTOR','CREATE',0),(218,'portfolio','CREATE_GUARANTOR_CHECKER','GUARANTOR','CREATE',0),(219,'portfolio','UPDATE_GUARANTOR','GUARANTOR','UPDATE',0),(220,'portfolio','UPDATE_GUARANTOR_CHECKER','GUARANTOR','UPDATE',0),(221,'portfolio','DELETE_GUARANTOR','GUARANTOR','DELETE',0),(222,'portfolio','DELETE_GUARANTOR_CHECKER','GUARANTOR','DELETE',0),(223,'transaction_loan','APPROVE_LOAN','LOAN','APPROVE',0),(224,'transaction_loan','APPROVEINPAST_LOAN','LOAN','APPROVEINPAST',0),(225,'transaction_loan','REJECT_LOAN','LOAN','REJECT',0),(226,'transaction_loan','REJECTINPAST_LOAN','LOAN','REJECTINPAST',0),(227,'transaction_loan','WITHDRAW_LOAN','LOAN','WITHDRAW',0),(228,'transaction_loan','WITHDRAWINPAST_LOAN','LOAN','WITHDRAWINPAST',0),(229,'transaction_loan','APPROVALUNDO_LOAN','LOAN','APPROVALUNDO',0),(230,'transaction_loan','DISBURSE_LOAN','LOAN','DISBURSE',0),(231,'transaction_loan','DISBURSEINPAST_LOAN','LOAN','DISBURSEINPAST',0),(232,'transaction_loan','DISBURSALUNDO_LOAN','LOAN','DISBURSALUNDO',0),(233,'transaction_loan','REPAYMENT_LOAN','LOAN','REPAYMENT',0),(234,'transaction_loan','REPAYMENTINPAST_LOAN','LOAN','REPAYMENTINPAST',0),(235,'transaction_loan','ADJUST_LOAN','LOAN','ADJUST',0),(236,'transaction_loan','WAIVEINTERESTPORTION_LOAN','LOAN','WAIVEINTERESTPORTION',0),(237,'transaction_loan','WRITEOFF_LOAN','LOAN','WRITEOFF',0),(238,'transaction_loan','CLOSE_LOAN','LOAN','CLOSE',0),(239,'transaction_loan','CLOSEASRESCHEDULED_LOAN','LOAN','CLOSEASRESCHEDULED',0),(240,'transaction_loan','UPDATELOANOFFICER_LOAN','LOAN','UPDATELOANOFFICER',0),(241,'transaction_loan','UPDATELOANOFFICER_LOAN_CHECKER','LOAN','UPDATELOANOFFICER',0),(242,'transaction_loan','REMOVELOANOFFICER_LOAN','LOAN','REMOVELOANOFFICER',0),(243,'transaction_loan','REMOVELOANOFFICER_LOAN_CHECKER','LOAN','REMOVELOANOFFICER',0),(244,'transaction_loan','BULKREASSIGN_LOAN','LOAN','BULKREASSIGN',0),(245,'transaction_loan','BULKREASSIGN_LOAN_CHECKER','LOAN','BULKREASSIGN',0),(246,'transaction_loan','APPROVE_LOAN_CHECKER','LOAN','APPROVE',0),(247,'transaction_loan','APPROVEINPAST_LOAN_CHECKER','LOAN','APPROVEINPAST',0),(248,'transaction_loan','REJECT_LOAN_CHECKER','LOAN','REJECT',0),(249,'transaction_loan','REJECTINPAST_LOAN_CHECKER','LOAN','REJECTINPAST',0),(250,'transaction_loan','WITHDRAW_LOAN_CHECKER','LOAN','WITHDRAW',0),(251,'transaction_loan','WITHDRAWINPAST_LOAN_CHECKER','LOAN','WITHDRAWINPAST',0),(252,'transaction_loan','APPROVALUNDO_LOAN_CHECKER','LOAN','APPROVALUNDO',0),(253,'transaction_loan','DISBURSE_LOAN_CHECKER','LOAN','DISBURSE',0),(254,'transaction_loan','DISBURSEINPAST_LOAN_CHECKER','LOAN','DISBURSEINPAST',0),(255,'transaction_loan','DISBURSALUNDO_LOAN_CHECKER','LOAN','DISBURSALUNDO',0),(256,'transaction_loan','REPAYMENT_LOAN_CHECKER','LOAN','REPAYMENT',0),(257,'transaction_loan','REPAYMENTINPAST_LOAN_CHECKER','LOAN','REPAYMENTINPAST',0),(258,'transaction_loan','ADJUST_LOAN_CHECKER','LOAN','ADJUST',0),(259,'transaction_loan','WAIVEINTERESTPORTION_LOAN_CHECKER','LOAN','WAIVEINTERESTPORTION',0),(260,'transaction_loan','WRITEOFF_LOAN_CHECKER','LOAN','WRITEOFF',0),(261,'transaction_loan','CLOSE_LOAN_CHECKER','LOAN','CLOSE',0),(262,'transaction_loan','CLOSEASRESCHEDULED_LOAN_CHECKER','LOAN','CLOSEASRESCHEDULED',0),(263,'transaction_deposit','APPROVE_DEPOSITACCOUNT','DEPOSITACCOUNT','APPROVE',0),(264,'transaction_deposit','REJECT_DEPOSITACCOUNT','DEPOSITACCOUNT','REJECT',0),(265,'transaction_deposit','WITHDRAW_DEPOSITACCOUNT','DEPOSITACCOUNT','WITHDRAW',0),(266,'transaction_deposit','APPROVALUNDO_DEPOSITACCOUNT','DEPOSITACCOUNT','APPROVALUNDO',0),(267,'transaction_deposit','WITHDRAWAL_DEPOSITACCOUNT','DEPOSITACCOUNT','WITHDRAWAL',0),(268,'transaction_deposit','INTEREST_DEPOSITACCOUNT','DEPOSITACCOUNT','INTEREST',0),(269,'transaction_deposit','RENEW_DEPOSITACCOUNT','DEPOSITACCOUNT','RENEW',0),(270,'transaction_deposit','APPROVE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','APPROVE',0),(271,'transaction_deposit','REJECT_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','REJECT',0),(272,'transaction_deposit','WITHDRAW_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','WITHDRAW',0),(273,'transaction_deposit','APPROVALUNDO_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','APPROVALUNDO',0),(274,'transaction_deposit','WITHDRAWAL_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','WITHDRAWAL',0),(275,'transaction_deposit','INTEREST_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','INTEREST',0),(276,'transaction_deposit','RENEW_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','RENEW',0),(277,'accounting','CREATE_GLACCOUNT','GLACCOUNT','CREATE',0),(278,'accounting','UPDATE_GLACCOUNT','GLACCOUNT','UPDATE',0),(279,'accounting','DELETE_GLACCOUNT','GLACCOUNT','DELETE',0),(280,'accounting','CREATE_GLCLOSURE','GLCLOSURE','CREATE',0),(281,'accounting','UPDATE_GLCLOSURE','GLCLOSURE','UPDATE',0),(282,'accounting','DELETE_GLCLOSURE','GLCLOSURE','DELETE',0),(283,'accounting','CREATE_JOURNALENTRY','JOURNALENTRY','CREATE',0),(284,'accounting','REVERSE_JOURNALENTRY','JOURNALENTRY','REVERSE',0),(285,'report','READ_Active Loans - Details','Active Loans - Details','READ',0),(286,'report','READ_Active Loans - Summary','Active Loans - Summary','READ',0),(287,'report','READ_Active Loans by Disbursal Period','Active Loans by Disbursal Period','READ',0),(288,'report','READ_Active Loans in last installment','Active Loans in last installment','READ',0),(289,'report','READ_Active Loans in last installment Summary','Active Loans in last installment Summary','READ',0),(290,'report','READ_Active Loans Passed Final Maturity','Active Loans Passed Final Maturity','READ',0),(291,'report','READ_Active Loans Passed Final Maturity Summary','Active Loans Passed Final Maturity Summary','READ',0),(292,'report','READ_Aging Detail','Aging Detail','READ',0),(293,'report','READ_Aging Summary (Arrears in Months)','Aging Summary (Arrears in Months)','READ',0),(294,'report','READ_Aging Summary (Arrears in Weeks)','Aging Summary (Arrears in Weeks)','READ',0),(295,'report','READ_Balance Sheet','Balance Sheet','READ',0),(296,'report','READ_Branch Expected Cash Flow','Branch Expected Cash Flow','READ',0),(297,'report','READ_Client Listing','Client Listing','READ',0),(298,'report','READ_Client Loans Listing','Client Loans Listing','READ',0),(299,'report','READ_Expected Payments By Date - Basic','Expected Payments By Date - Basic','READ',0),(300,'report','READ_Expected Payments By Date - Formatted','Expected Payments By Date - Formatted','READ',0),(301,'report','READ_Funds Disbursed Between Dates Summary','Funds Disbursed Between Dates Summary','READ',0),(302,'report','READ_Funds Disbursed Between Dates Summary by Office','Funds Disbursed Between Dates Summary by Office','READ',0),(303,'report','READ_Income Statement','Income Statement','READ',0),(304,'report','READ_Loan Account Schedule','Loan Account Schedule','READ',0),(305,'report','READ_Loans Awaiting Disbursal','Loans Awaiting Disbursal','READ',0),(306,'report','READ_Loans Awaiting Disbursal Summary','Loans Awaiting Disbursal Summary','READ',0),(307,'report','READ_Loans Awaiting Disbursal Summary by Month','Loans Awaiting Disbursal Summary by Month','READ',0),(308,'report','READ_Loans Pending Approval','Loans Pending Approval','READ',0),(309,'report','READ_Obligation Met Loans Details','Obligation Met Loans Details','READ',0),(310,'report','READ_Obligation Met Loans Summary','Obligation Met Loans Summary','READ',0),(311,'report','READ_Portfolio at Risk','Portfolio at Risk','READ',0),(312,'report','READ_Portfolio at Risk by Branch','Portfolio at Risk by Branch','READ',0),(313,'report','READ_Rescheduled Loans','Rescheduled Loans','READ',0),(314,'report','READ_Trial Balance','Trial Balance','READ',0),(315,'report','READ_Written-Off Loans','Written-Off Loans','READ',0),(316,'datatable','CREATE_extra_client_details','extra_client_details','CREATE',1),(317,'datatable','CREATE_extra_family_details','extra_family_details','CREATE',1),(318,'datatable','CREATE_extra_loan_details','extra_loan_details','CREATE',1),(319,'datatable','READ_extra_client_details','extra_client_details','READ',1),(320,'datatable','READ_extra_family_details','extra_family_details','READ',1),(321,'datatable','READ_extra_loan_details','extra_loan_details','READ',1),(322,'datatable','UPDATE_extra_client_details','extra_client_details','UPDATE',1),(323,'datatable','UPDATE_extra_family_details','extra_family_details','UPDATE',1),(324,'datatable','UPDATE_extra_loan_details','extra_loan_details','UPDATE',1),(325,'datatable','DELETE_extra_client_details','extra_client_details','DELETE',1),(326,'datatable','DELETE_extra_family_details','extra_family_details','DELETE',1),(327,'datatable','DELETE_extra_loan_details','extra_loan_details','DELETE',1); /*!40000 ALTER TABLE `m_permission` ENABLE KEYS */; UNLOCK TABLES; @@ -1774,4 +1774,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2013-03-20 11:54:31 +-- Dump completed on 2013-03-20 18:57:24 diff --git a/mifosng-db/multi-tenant-demo-backups/ceda/bk_ceda_trial.sql b/mifosng-db/multi-tenant-demo-backups/ceda/bk_ceda_trial.sql index 57936f65b..a6b692ef9 100644 --- a/mifosng-db/multi-tenant-demo-backups/ceda/bk_ceda_trial.sql +++ b/mifosng-db/multi-tenant-demo-backups/ceda/bk_ceda_trial.sql @@ -1316,7 +1316,7 @@ CREATE TABLE `m_permission` ( LOCK TABLES `m_permission` WRITE; /*!40000 ALTER TABLE `m_permission` DISABLE KEYS */; -INSERT INTO `m_permission` VALUES (1,'special','ALL_FUNCTIONS',NULL,NULL,0),(2,'special','ALL_FUNCTIONS_READ',NULL,NULL,0),(3,'special','CHECKER_SUPER_USER',NULL,NULL,0),(4,'special','REPORTING_SUPER_USER',NULL,NULL,0),(5,'authorisation','READ_PERMISSION','PERMISSION','READ',0),(6,'authorisation','PERMISSIONS_ROLE','ROLE','PERMISSIONS',1),(7,'authorisation','CREATE_ROLE','ROLE','CREATE',1),(8,'authorisation','CREATE_ROLE_CHECKER','ROLE','CREATE',1),(9,'authorisation','READ_ROLE','ROLE','READ',0),(10,'authorisation','UPDATE_ROLE','ROLE','UPDATE',1),(11,'authorisation','UPDATE_ROLE_CHECKER','ROLE','UPDATE',1),(12,'authorisation','DELETE_ROLE','ROLE','DELETE',1),(13,'authorisation','DELETE_ROLE_CHECKER','ROLE','DELETE',1),(14,'authorisation','CREATE_USER','USER','CREATE',1),(15,'authorisation','CREATE_USER_CHECKER','USER','CREATE',1),(16,'authorisation','READ_USER','USER','READ',0),(17,'authorisation','UPDATE_USER','USER','UPDATE',1),(18,'authorisation','UPDATE_USER_CHECKER','USER','UPDATE',1),(19,'authorisation','DELETE_USER','USER','DELETE',1),(20,'authorisation','DELETE_USER_CHECKER','USER','DELETE',1),(21,'configuration','READ_CONFIGURATION','CONFIGURATION','READ',1),(22,'configuration','UPDATE_CONFIGURATION','CONFIGURATION','UPDATE',1),(23,'configuration','UPDATE_CONFIGURATION_CHECKER','CONFIGURATION','UPDATE',1),(24,'configuration','READ_CODE','CODE','READ',0),(25,'configuration','CREATE_CODE','CODE','CREATE',1),(26,'configuration','CREATE_CODE_CHECKER','CODE','CREATE',1),(27,'configuration','UPDATE_CODE','CODE','UPDATE',1),(28,'configuration','UPDATE_CODE_CHECKER','CODE','UPDATE',1),(29,'configuration','DELETE_CODE','CODE','DELETE',1),(30,'configuration','DELETE_CODE_CHECKER','CODE','DELETE',1),(31,'configuration','READ_CODEVALUE','CODEVALUE','READ',0),(32,'configuration','CREATE_CODEVALUE','CODEVALUE','CREATE',1),(33,'configuration','CREATE_CODEVALUE_CHECKER','CODEVALUE','CREATE',1),(34,'configuration','UPDATE_CODEVALUE','CODEVALUE','UPDATE',1),(35,'configuration','UPDATE_CODEVALUE_CHECKER','CODEVALUE','UPDATE',1),(36,'configuration','DELETE_CODEVALUE','CODEVALUE','DELETE',1),(37,'configuration','DELETE_CODEVALUE_CHECKER','CODEVALUE','DELETE',1),(38,'configuration','READ_CURRENCY','CURRENCY','READ',0),(39,'configuration','UPDATE_CURRENCY','CURRENCY','UPDATE',1),(40,'configuration','UPDATE_CURRENCY_CHECKER','CURRENCY','UPDATE',1),(41,'configuration','UPDATE_PERMISSION','PERMISSION','UPDATE',1),(42,'configuration','UPDATE_PERMISSION_CHECKER','PERMISSION','UPDATE',1),(43,'configuration','READ_DATATABLE','DATATABLE','READ',0),(44,'configuration','REGISTER_DATATABLE','DATATABLE','REGISTER',1),(45,'configuration','REGISTER_DATATABLE_CHECKER','DATATABLE','REGISTER',1),(46,'configuration','DEREGISTER_DATATABLE','DATATABLE','DEREGISTER',1),(47,'configuration','DEREGISTER_DATATABLE_CHECKER','DATATABLE','DEREGISTER',1),(48,'configuration','READ_AUDIT','AUDIT','READ',0),(49,'configuration','CREATE_CALENDAR','CALENDAR','CREATE',1),(50,'configuration','READ_CALENDAR','CALENDAR','READ',0),(51,'configuration','UPDATE_CALENDAR','CALENDAR','UPDATE',1),(52,'configuration','DELETE_CALENDAR','CALENDAR','DELETE',1),(53,'configuration','CREATE_CALENDAR_CHECKER','CALENDAR','CREATE',1),(54,'configuration','UPDATE_CALENDAR_CHECKER','CALENDAR','UPDATE',1),(55,'configuration','DELETE_CALENDAR_CHECKER','CALENDAR','DELETE',1),(56,'organisation','READ_MAKERCHECKER','MAKERCHECKER','READ',0),(57,'organisation','READ_CHARGE','CHARGE','READ',0),(58,'organisation','CREATE_CHARGE','CHARGE','CREATE',1),(59,'organisation','CREATE_CHARGE_CHECKER','CHARGE','CREATE',1),(60,'organisation','UPDATE_CHARGE','CHARGE','UPDATE',1),(61,'organisation','UPDATE_CHARGE_CHECKER','CHARGE','UPDATE',1),(62,'organisation','DELETE_CHARGE','CHARGE','DELETE',1),(63,'organisation','DELETE_CHARGE_CHECKER','CHARGE','DELETE',1),(64,'organisation','READ_FUND','FUND','READ',0),(65,'organisation','CREATE_FUND','FUND','CREATE',1),(66,'organisation','CREATE_FUND_CHECKER','FUND','CREATE',1),(67,'organisation','UPDATE_FUND','FUND','UPDATE',1),(68,'organisation','UPDATE_FUND_CHECKER','FUND','UPDATE',1),(69,'organisation','DELETE_FUND','FUND','DELETE',1),(70,'organisation','DELETE_FUND_CHECKER','FUND','DELETE',1),(71,'organisation','READ_LOANPRODUCT','LOANPRODUCT','READ',0),(72,'organisation','CREATE_LOANPRODUCT','LOANPRODUCT','CREATE',1),(73,'organisation','CREATE_LOANPRODUCT_CHECKER','LOANPRODUCT','CREATE',1),(74,'organisation','UPDATE_LOANPRODUCT','LOANPRODUCT','UPDATE',1),(75,'organisation','UPDATE_LOANPRODUCT_CHECKER','LOANPRODUCT','UPDATE',1),(76,'organisation','DELETE_LOANPRODUCT','LOANPRODUCT','DELETE',1),(77,'organisation','DELETE_LOANPRODUCT_CHECKER','LOANPRODUCT','DELETE',1),(78,'organisation','READ_OFFICE','OFFICE','READ',0),(79,'organisation','CREATE_OFFICE','OFFICE','CREATE',1),(80,'organisation','CREATE_OFFICE_CHECKER','OFFICE','CREATE',1),(81,'organisation','UPDATE_OFFICE','OFFICE','UPDATE',1),(82,'organisation','UPDATE_OFFICE_CHECKER','OFFICE','UPDATE',1),(83,'organisation','READ_OFFICETRANSACTION','OFFICETRANSACTION','READ',0),(84,'organisation','DELETE_OFFICE_CHECKER','OFFICE','DELETE',1),(85,'organisation','CREATE_OFFICETRANSACTION','OFFICETRANSACTION','CREATE',1),(86,'organisation','CREATE_OFFICETRANSACTION_CHECKER','OFFICETRANSACTION','CREATE',1),(87,'organisation','DELETE_OFFICETRANSACTION','OFFICETRANSACTION','DELETE',1),(88,'organisation','DELETE_OFFICETRANSACTION_CHECKER','OFFICETRANSACTION','DELETE',1),(89,'organisation','READ_STAFF','STAFF','READ',0),(90,'organisation','CREATE_STAFF','STAFF','CREATE',1),(91,'organisation','CREATE_STAFF_CHECKER','STAFF','CREATE',1),(92,'organisation','UPDATE_STAFF','STAFF','UPDATE',1),(93,'organisation','UPDATE_STAFF_CHECKER','STAFF','UPDATE',1),(94,'organisation','DELETE_STAFF','STAFF','DELETE',1),(95,'organisation','DELETE_STAFF_CHECKER','STAFF','DELETE',1),(96,'organisation','READ_SAVINGSPRODUCT','SAVINGSPRODUCT','READ',0),(97,'organisation','CREATE_SAVINGSPRODUCT','SAVINGSPRODUCT','CREATE',1),(98,'organisation','CREATE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','CREATE',1),(99,'organisation','UPDATE_SAVINGSPRODUCT','SAVINGSPRODUCT','UPDATE',1),(100,'organisation','UPDATE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','UPDATE',1),(101,'organisation','DELETE_SAVINGSPRODUCT','SAVINGSPRODUCT','DELETE',1),(102,'organisation','DELETE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','DELETE',1),(103,'organisation','READ_DEPOSITPRODUCT','DEPOSITPRODUCT','READ',0),(104,'organisation','CREATE_DEPOSITPRODUCT','DEPOSITPRODUCT','CREATE',1),(105,'organisation','CREATE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','CREATE',1),(106,'organisation','UPDATE_DEPOSITPRODUCT','DEPOSITPRODUCT','UPDATE',1),(107,'organisation','UPDATE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','UPDATE',1),(108,'organisation','DELETE_DEPOSITPRODUCT','DEPOSITPRODUCT','DELETE',1),(109,'organisation','DELETE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','DELETE',1),(110,'portfolio','READ_LOAN','LOAN','READ',0),(111,'portfolio','CREATE_LOAN','LOAN','CREATE',1),(112,'portfolio','CREATE_LOAN_CHECKER','LOAN','CREATE',1),(113,'portfolio','UPDATE_LOAN','LOAN','UPDATE',1),(114,'portfolio','UPDATE_LOAN_CHECKER','LOAN','UPDATE',1),(115,'portfolio','DELETE_LOAN','LOAN','DELETE',1),(116,'portfolio','DELETE_LOAN_CHECKER','LOAN','DELETE',1),(117,'portfolio','READ_CLIENT','CLIENT','READ',0),(118,'portfolio','CREATE_CLIENT','CLIENT','CREATE',1),(119,'portfolio','CREATE_CLIENT_CHECKER','CLIENT','CREATE',1),(120,'portfolio','UPDATE_CLIENT','CLIENT','UPDATE',1),(121,'portfolio','UPDATE_CLIENT_CHECKER','CLIENT','UPDATE',1),(122,'portfolio','DELETE_CLIENT','CLIENT','DELETE',1),(123,'portfolio','DELETE_CLIENT_CHECKER','CLIENT','DELETE',1),(124,'portfolio','READ_CLIENTIMAGE','CLIENTIMAGE','READ',0),(125,'portfolio','CREATE_CLIENTIMAGE','CLIENTIMAGE','CREATE',1),(126,'portfolio','CREATE_CLIENTIMAGE_CHECKER','CLIENTIMAGE','CREATE',1),(127,'portfolio','DELETE_CLIENTIMAGE','CLIENTIMAGE','DELETE',1),(128,'portfolio','DELETE_CLIENTIMAGE_CHECKER','CLIENTIMAGE','DELETE',1),(129,'portfolio','READ_CLIENTNOTE','CLIENTNOTE','READ',0),(130,'portfolio','CREATE_CLIENTNOTE','CLIENTNOTE','CREATE',1),(131,'portfolio','CREATE_CLIENTNOTE_CHECKER','CLIENTNOTE','CREATE',1),(132,'portfolio','UPDATE_CLIENTNOTE','CLIENTNOTE','UPDATE',1),(133,'portfolio','UPDATE_CLIENTNOTE_CHECKER','CLIENTNOTE','UPDATE',1),(134,'portfolio','DELETE_CLIENTNOTE','CLIENTNOTE','DELETE',1),(135,'portfolio','DELETE_CLIENTNOTE_CHECKER','CLIENTNOTE','DELETE',1),(136,'portfolio','READ_GROUPNOTE','GROUPNOTE','READ',0),(137,'portfolio','CREATE_GROUPNOTE','GROUPNOTE','CREATE',1),(138,'portfolio','UPDATE_GROUPNOTE','GROUPNOTE','UPDATE',1),(139,'portfolio','DELETE_GROUPNOTE','GROUPNOTE','DELETE',1),(140,'portfolio','CREATE_GROUPNOTE_CHECKER','GROUPNOTE','CREATE',1),(141,'portfolio','UPDATE_GROUPNOTE_CHECKER','GROUPNOTE','UPDATE',1),(142,'portfolio','DELETE_GROUPNOTE_CHECKER','GROUPNOTE','DELETE',1),(143,'portfolio','READ_LOANNOTE','LOANNOTE','READ',0),(144,'portfolio','CREATE_LOANNOTE','LOANNOTE','CREATE',1),(145,'portfolio','UPDATE_LOANNOTE','LOANNOTE','UPDATE',1),(146,'portfolio','DELETE_LOANNOTE','LOANNOTE','DELETE',1),(147,'portfolio','CREATE_LOANNOTE_CHECKER','LOANNOTE','CREATE',1),(148,'portfolio','UPDATE_LOANNOTE_CHECKER','LOANNOTE','UPDATE',1),(149,'portfolio','DELETE_LOANNOTE_CHECKER','LOANNOTE','DELETE',1),(150,'portfolio','READ_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','READ',0),(151,'portfolio','CREATE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','CREATE',1),(152,'portfolio','UPDATE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','UPDATE',1),(153,'portfolio','DELETE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','DELETE',1),(154,'portfolio','CREATE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','CREATE',1),(155,'portfolio','UPDATE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','UPDATE',1),(156,'portfolio','DELETE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','DELETE',1),(157,'portfolio','READ_DEPOSITNOTE','DEPOSITNOTE','READ',0),(158,'portfolio','CREATE_DEPOSITNOTE','DEPOSITNOTE','CREATE',1),(159,'portfolio','UPDATE_DEPOSITNOTE','DEPOSITNOTE','UPDATE',1),(160,'portfolio','DELETE_DEPOSITNOTE','DEPOSITNOTE','DELETE',1),(161,'portfolio','CREATE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','CREATE',1),(162,'portfolio','UPDATE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','UPDATE',1),(163,'portfolio','DELETE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','DELETE',1),(164,'portfolio','READ_SAVINGNOTE','SAVINGNOTE','READ',0),(165,'portfolio','CREATE_SAVINGNOTE','SAVINGNOTE','CREATE',1),(166,'portfolio','UPDATE_SAVINGNOTE','SAVINGNOTE','UPDATE',1),(167,'portfolio','DELETE_SAVINGNOTE','SAVINGNOTE','DELETE',1),(168,'portfolio','CREATE_SAVINGNOTE_CHECKER','SAVINGNOTE','CREATE',1),(169,'portfolio','UPDATE_SAVINGNOTE_CHECKER','SAVINGNOTE','UPDATE',1),(170,'portfolio','DELETE_SAVINGNOTE_CHECKER','SAVINGNOTE','DELETE',1),(171,'portfolio','READ_CLIENTIDENTIFIER','CLIENTIDENTIFIER','READ',0),(172,'portfolio','CREATE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','CREATE',1),(173,'portfolio','CREATE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','CREATE',1),(174,'portfolio','UPDATE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','UPDATE',1),(175,'portfolio','UPDATE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','UPDATE',1),(176,'portfolio','DELETE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','DELETE',1),(177,'portfolio','DELETE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','DELETE',1),(178,'portfolio','READ_DOCUMENT','DOCUMENT','READ',0),(179,'portfolio','CREATE_DOCUMENT','DOCUMENT','CREATE',1),(180,'portfolio','CREATE_DOCUMENT_CHECKER','DOCUMENT','CREATE',1),(181,'portfolio','UPDATE_DOCUMENT','DOCUMENT','UPDATE',1),(182,'portfolio','UPDATE_DOCUMENT_CHECKER','DOCUMENT','UPDATE',1),(183,'portfolio','DELETE_DOCUMENT','DOCUMENT','DELETE',1),(184,'portfolio','DELETE_DOCUMENT_CHECKER','DOCUMENT','DELETE',1),(185,'portfolio','READ_GROUP','GROUP','READ',0),(186,'portfolio','CREATE_GROUP','GROUP','CREATE',1),(187,'portfolio','CREATE_GROUP_CHECKER','GROUP','CREATE',1),(188,'portfolio','UPDATE_GROUP','GROUP','UPDATE',1),(189,'portfolio','UPDATE_GROUP_CHECKER','GROUP','UPDATE',1),(190,'portfolio','DELETE_GROUP','GROUP','DELETE',1),(191,'portfolio','DELETE_GROUP_CHECKER','GROUP','DELETE',1),(192,'portfolio','UNASSIGNSTAFF_GROUP','GROUP','UNASSIGNSTAFF',1),(193,'portfolio','UNASSIGNSTAFF_GROUP_CHECKER','GROUP','UNASSIGNSTAFF',1),(194,'portfolio','CREATE_LOANCHARGE','LOANCHARGE','CREATE',1),(195,'portfolio','CREATE_LOANCHARGE_CHECKER','LOANCHARGE','CREATE',1),(196,'portfolio','UPDATE_LOANCHARGE','LOANCHARGE','UPDATE',1),(197,'portfolio','UPDATE_LOANCHARGE_CHECKER','LOANCHARGE','UPDATE',1),(198,'portfolio','DELETE_LOANCHARGE','LOANCHARGE','DELETE',1),(199,'portfolio','DELETE_LOANCHARGE_CHECKER','LOANCHARGE','DELETE',1),(200,'portfolio','WAIVE_LOANCHARGE','LOANCHARGE','WAIVE',1),(201,'portfolio','WAIVE_LOANCHARGE_CHECKER','LOANCHARGE','WAIVE',1),(202,'portfolio','READ_DEPOSITACCOUNT','DEPOSITACCOUNT','READ',0),(203,'portfolio','CREATE_DEPOSITACCOUNT','DEPOSITACCOUNT','CREATE',1),(204,'portfolio','CREATE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','CREATE',1),(205,'portfolio','UPDATE_DEPOSITACCOUNT','DEPOSITACCOUNT','UPDATE',1),(206,'portfolio','UPDATE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','UPDATE',1),(207,'portfolio','DELETE_DEPOSITACCOUNT','DEPOSITACCOUNT','DELETE',1),(208,'portfolio','DELETE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','DELETE',1),(209,'portfolio','READ_SAVINGSACCOUNT','SAVINGSACCOUNT','READ',0),(210,'portfolio','CREATE_SAVINGSACCOUNT','SAVINGSACCOUNT','CREATE',1),(211,'portfolio','CREATE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','CREATE',1),(212,'portfolio','UPDATE_SAVINGSACCOUNT','SAVINGSACCOUNT','UPDATE',1),(213,'portfolio','UPDATE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','UPDATE',1),(214,'portfolio','DELETE_SAVINGSACCOUNT','SAVINGSACCOUNT','DELETE',1),(215,'portfolio','DELETE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','DELETE',1),(216,'portfolio','READ_GUARANTOR','GUARANTOR','READ',0),(217,'portfolio','CREATE_GUARANTOR','GUARANTOR','CREATE',1),(218,'portfolio','CREATE_GUARANTOR_CHECKER','GUARANTOR','CREATE',1),(219,'portfolio','UPDATE_GUARANTOR','GUARANTOR','UPDATE',1),(220,'portfolio','UPDATE_GUARANTOR_CHECKER','GUARANTOR','UPDATE',1),(221,'portfolio','DELETE_GUARANTOR','GUARANTOR','DELETE',1),(222,'portfolio','DELETE_GUARANTOR_CHECKER','GUARANTOR','DELETE',1),(223,'transaction_loan','APPROVE_LOAN','LOAN','APPROVE',1),(224,'transaction_loan','APPROVEINPAST_LOAN','LOAN','APPROVEINPAST',1),(225,'transaction_loan','REJECT_LOAN','LOAN','REJECT',1),(226,'transaction_loan','REJECTINPAST_LOAN','LOAN','REJECTINPAST',1),(227,'transaction_loan','WITHDRAW_LOAN','LOAN','WITHDRAW',1),(228,'transaction_loan','WITHDRAWINPAST_LOAN','LOAN','WITHDRAWINPAST',1),(229,'transaction_loan','APPROVALUNDO_LOAN','LOAN','APPROVALUNDO',1),(230,'transaction_loan','DISBURSE_LOAN','LOAN','DISBURSE',1),(231,'transaction_loan','DISBURSEINPAST_LOAN','LOAN','DISBURSEINPAST',1),(232,'transaction_loan','DISBURSALUNDO_LOAN','LOAN','DISBURSALUNDO',1),(233,'transaction_loan','REPAYMENT_LOAN','LOAN','REPAYMENT',1),(234,'transaction_loan','REPAYMENTINPAST_LOAN','LOAN','REPAYMENTINPAST',1),(235,'transaction_loan','ADJUST_LOAN','LOAN','ADJUST',1),(236,'transaction_loan','WAIVEINTERESTPORTION_LOAN','LOAN','WAIVEINTERESTPORTION',1),(237,'transaction_loan','WRITEOFF_LOAN','LOAN','WRITEOFF',1),(238,'transaction_loan','CLOSE_LOAN','LOAN','CLOSE',1),(239,'transaction_loan','CLOSEASRESCHEDULED_LOAN','LOAN','CLOSEASRESCHEDULED',1),(240,'transaction_loan','UPDATELOANOFFICER_LOAN','LOAN','UPDATELOANOFFICER',1),(241,'transaction_loan','UPDATELOANOFFICER_LOAN_CHECKER','LOAN','UPDATELOANOFFICER',1),(242,'transaction_loan','REMOVELOANOFFICER_LOAN','LOAN','REMOVELOANOFFICER',1),(243,'transaction_loan','REMOVELOANOFFICER_LOAN_CHECKER','LOAN','REMOVELOANOFFICER',1),(244,'transaction_loan','BULKREASSIGN_LOAN','LOAN','BULKREASSIGN',1),(245,'transaction_loan','BULKREASSIGN_LOAN_CHECKER','LOAN','BULKREASSIGN',1),(246,'transaction_loan','APPROVE_LOAN_CHECKER','LOAN','APPROVE',1),(247,'transaction_loan','APPROVEINPAST_LOAN_CHECKER','LOAN','APPROVEINPAST',1),(248,'transaction_loan','REJECT_LOAN_CHECKER','LOAN','REJECT',1),(249,'transaction_loan','REJECTINPAST_LOAN_CHECKER','LOAN','REJECTINPAST',1),(250,'transaction_loan','WITHDRAW_LOAN_CHECKER','LOAN','WITHDRAW',1),(251,'transaction_loan','WITHDRAWINPAST_LOAN_CHECKER','LOAN','WITHDRAWINPAST',1),(252,'transaction_loan','APPROVALUNDO_LOAN_CHECKER','LOAN','APPROVALUNDO',1),(253,'transaction_loan','DISBURSE_LOAN_CHECKER','LOAN','DISBURSE',1),(254,'transaction_loan','DISBURSEINPAST_LOAN_CHECKER','LOAN','DISBURSEINPAST',1),(255,'transaction_loan','DISBURSALUNDO_LOAN_CHECKER','LOAN','DISBURSALUNDO',1),(256,'transaction_loan','REPAYMENT_LOAN_CHECKER','LOAN','REPAYMENT',1),(257,'transaction_loan','REPAYMENTINPAST_LOAN_CHECKER','LOAN','REPAYMENTINPAST',1),(258,'transaction_loan','ADJUST_LOAN_CHECKER','LOAN','ADJUST',1),(259,'transaction_loan','WAIVEINTERESTPORTION_LOAN_CHECKER','LOAN','WAIVEINTERESTPORTION',1),(260,'transaction_loan','WRITEOFF_LOAN_CHECKER','LOAN','WRITEOFF',1),(261,'transaction_loan','CLOSE_LOAN_CHECKER','LOAN','CLOSE',1),(262,'transaction_loan','CLOSEASRESCHEDULED_LOAN_CHECKER','LOAN','CLOSEASRESCHEDULED',1),(263,'transaction_deposit','APPROVE_DEPOSITACCOUNT','DEPOSITACCOUNT','APPROVE',1),(264,'transaction_deposit','REJECT_DEPOSITACCOUNT','DEPOSITACCOUNT','REJECT',1),(265,'transaction_deposit','WITHDRAW_DEPOSITACCOUNT','DEPOSITACCOUNT','WITHDRAW',1),(266,'transaction_deposit','APPROVALUNDO_DEPOSITACCOUNT','DEPOSITACCOUNT','APPROVALUNDO',1),(267,'transaction_deposit','WITHDRAWAL_DEPOSITACCOUNT','DEPOSITACCOUNT','WITHDRAWAL',1),(268,'transaction_deposit','INTEREST_DEPOSITACCOUNT','DEPOSITACCOUNT','INTEREST',1),(269,'transaction_deposit','RENEW_DEPOSITACCOUNT','DEPOSITACCOUNT','RENEW',1),(270,'transaction_deposit','APPROVE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','APPROVE',1),(271,'transaction_deposit','REJECT_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','REJECT',1),(272,'transaction_deposit','WITHDRAW_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','WITHDRAW',1),(273,'transaction_deposit','APPROVALUNDO_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','APPROVALUNDO',1),(274,'transaction_deposit','WITHDRAWAL_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','WITHDRAWAL',1),(275,'transaction_deposit','INTEREST_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','INTEREST',1),(276,'transaction_deposit','RENEW_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','RENEW',1),(277,'accounting','CREATE_GLACCOUNT','GLACCOUNT','CREATE',1),(278,'accounting','UPDATE_GLACCOUNT','GLACCOUNT','UPDATE',1),(279,'accounting','DELETE_GLACCOUNT','GLACCOUNT','DELETE',1),(280,'accounting','CREATE_GLCLOSURE','GLCLOSURE','CREATE',1),(281,'accounting','UPDATE_GLCLOSURE','GLCLOSURE','UPDATE',1),(282,'accounting','DELETE_GLCLOSURE','GLCLOSURE','DELETE',1),(283,'accounting','CREATE_JOURNALENTRY','JOURNALENTRY','CREATE',1),(284,'accounting','REVERSE_JOURNALENTRY','JOURNALENTRY','REVERSE',1),(285,'report','READ_Active Loans - Details','Active Loans - Details','READ',0),(286,'report','READ_Active Loans - Summary','Active Loans - Summary','READ',0),(287,'report','READ_Active Loans by Disbursal Period','Active Loans by Disbursal Period','READ',0),(288,'report','READ_Active Loans in last installment','Active Loans in last installment','READ',0),(289,'report','READ_Active Loans in last installment Summary','Active Loans in last installment Summary','READ',0),(290,'report','READ_Active Loans Passed Final Maturity','Active Loans Passed Final Maturity','READ',0),(291,'report','READ_Active Loans Passed Final Maturity Summary','Active Loans Passed Final Maturity Summary','READ',0),(292,'report','READ_Aging Detail','Aging Detail','READ',0),(293,'report','READ_Aging Summary (Arrears in Months)','Aging Summary (Arrears in Months)','READ',0),(294,'report','READ_Aging Summary (Arrears in Weeks)','Aging Summary (Arrears in Weeks)','READ',0),(295,'report','READ_Balance Sheet','Balance Sheet','READ',0),(296,'report','READ_Branch Expected Cash Flow','Branch Expected Cash Flow','READ',0),(297,'report','READ_Client Listing','Client Listing','READ',0),(298,'report','READ_Client Loans Listing','Client Loans Listing','READ',0),(299,'report','READ_Expected Payments By Date - Basic','Expected Payments By Date - Basic','READ',0),(300,'report','READ_Expected Payments By Date - Formatted','Expected Payments By Date - Formatted','READ',0),(301,'report','READ_Funds Disbursed Between Dates Summary','Funds Disbursed Between Dates Summary','READ',0),(302,'report','READ_Funds Disbursed Between Dates Summary by Office','Funds Disbursed Between Dates Summary by Office','READ',0),(303,'report','READ_Income Statement','Income Statement','READ',0),(304,'report','READ_Loan Account Schedule','Loan Account Schedule','READ',0),(305,'report','READ_Loans Awaiting Disbursal','Loans Awaiting Disbursal','READ',0),(306,'report','READ_Loans Awaiting Disbursal Summary','Loans Awaiting Disbursal Summary','READ',0),(307,'report','READ_Loans Awaiting Disbursal Summary by Month','Loans Awaiting Disbursal Summary by Month','READ',0),(308,'report','READ_Loans Pending Approval','Loans Pending Approval','READ',0),(309,'report','READ_Obligation Met Loans Details','Obligation Met Loans Details','READ',0),(310,'report','READ_Obligation Met Loans Summary','Obligation Met Loans Summary','READ',0),(311,'report','READ_Portfolio at Risk','Portfolio at Risk','READ',0),(312,'report','READ_Portfolio at Risk by Branch','Portfolio at Risk by Branch','READ',0),(313,'report','READ_Rescheduled Loans','Rescheduled Loans','READ',0),(314,'report','READ_Trial Balance','Trial Balance','READ',0),(315,'report','READ_Written-Off Loans','Written-Off Loans','READ',0),(316,'datatable','CREATE_client additional data','client additional data','CREATE',1),(317,'datatable','CREATE_impact measurement','impact measurement','CREATE',1),(318,'datatable','CREATE_loan additional data','loan additional data','CREATE',1),(319,'datatable','READ_client additional data','client additional data','READ',1),(320,'datatable','READ_impact measurement','impact measurement','READ',1),(321,'datatable','READ_loan additional data','loan additional data','READ',1),(322,'datatable','UPDATE_client additional data','client additional data','UPDATE',1),(323,'datatable','UPDATE_impact measurement','impact measurement','UPDATE',1),(324,'datatable','UPDATE_loan additional data','loan additional data','UPDATE',1),(325,'datatable','DELETE_client additional data','client additional data','DELETE',1),(326,'datatable','DELETE_impact measurement','impact measurement','DELETE',1),(327,'datatable','DELETE_loan additional data','loan additional data','DELETE',1); +INSERT INTO `m_permission` VALUES (1,'special','ALL_FUNCTIONS',NULL,NULL,0),(2,'special','ALL_FUNCTIONS_READ',NULL,NULL,0),(3,'special','CHECKER_SUPER_USER',NULL,NULL,0),(4,'special','REPORTING_SUPER_USER',NULL,NULL,0),(5,'authorisation','READ_PERMISSION','PERMISSION','READ',0),(6,'authorisation','PERMISSIONS_ROLE','ROLE','PERMISSIONS',0),(7,'authorisation','CREATE_ROLE','ROLE','CREATE',0),(8,'authorisation','CREATE_ROLE_CHECKER','ROLE','CREATE',0),(9,'authorisation','READ_ROLE','ROLE','READ',0),(10,'authorisation','UPDATE_ROLE','ROLE','UPDATE',0),(11,'authorisation','UPDATE_ROLE_CHECKER','ROLE','UPDATE',0),(12,'authorisation','DELETE_ROLE','ROLE','DELETE',0),(13,'authorisation','DELETE_ROLE_CHECKER','ROLE','DELETE',0),(14,'authorisation','CREATE_USER','USER','CREATE',0),(15,'authorisation','CREATE_USER_CHECKER','USER','CREATE',0),(16,'authorisation','READ_USER','USER','READ',0),(17,'authorisation','UPDATE_USER','USER','UPDATE',0),(18,'authorisation','UPDATE_USER_CHECKER','USER','UPDATE',0),(19,'authorisation','DELETE_USER','USER','DELETE',0),(20,'authorisation','DELETE_USER_CHECKER','USER','DELETE',0),(21,'configuration','READ_CONFIGURATION','CONFIGURATION','READ',0),(22,'configuration','UPDATE_CONFIGURATION','CONFIGURATION','UPDATE',0),(23,'configuration','UPDATE_CONFIGURATION_CHECKER','CONFIGURATION','UPDATE',0),(24,'configuration','READ_CODE','CODE','READ',0),(25,'configuration','CREATE_CODE','CODE','CREATE',0),(26,'configuration','CREATE_CODE_CHECKER','CODE','CREATE',0),(27,'configuration','UPDATE_CODE','CODE','UPDATE',0),(28,'configuration','UPDATE_CODE_CHECKER','CODE','UPDATE',0),(29,'configuration','DELETE_CODE','CODE','DELETE',0),(30,'configuration','DELETE_CODE_CHECKER','CODE','DELETE',0),(31,'configuration','READ_CODEVALUE','CODEVALUE','READ',0),(32,'configuration','CREATE_CODEVALUE','CODEVALUE','CREATE',0),(33,'configuration','CREATE_CODEVALUE_CHECKER','CODEVALUE','CREATE',0),(34,'configuration','UPDATE_CODEVALUE','CODEVALUE','UPDATE',0),(35,'configuration','UPDATE_CODEVALUE_CHECKER','CODEVALUE','UPDATE',0),(36,'configuration','DELETE_CODEVALUE','CODEVALUE','DELETE',0),(37,'configuration','DELETE_CODEVALUE_CHECKER','CODEVALUE','DELETE',0),(38,'configuration','READ_CURRENCY','CURRENCY','READ',0),(39,'configuration','UPDATE_CURRENCY','CURRENCY','UPDATE',0),(40,'configuration','UPDATE_CURRENCY_CHECKER','CURRENCY','UPDATE',0),(41,'configuration','UPDATE_PERMISSION','PERMISSION','UPDATE',0),(42,'configuration','UPDATE_PERMISSION_CHECKER','PERMISSION','UPDATE',0),(43,'configuration','READ_DATATABLE','DATATABLE','READ',0),(44,'configuration','REGISTER_DATATABLE','DATATABLE','REGISTER',0),(45,'configuration','REGISTER_DATATABLE_CHECKER','DATATABLE','REGISTER',0),(46,'configuration','DEREGISTER_DATATABLE','DATATABLE','DEREGISTER',0),(47,'configuration','DEREGISTER_DATATABLE_CHECKER','DATATABLE','DEREGISTER',0),(48,'configuration','READ_AUDIT','AUDIT','READ',0),(49,'configuration','CREATE_CALENDAR','CALENDAR','CREATE',0),(50,'configuration','READ_CALENDAR','CALENDAR','READ',0),(51,'configuration','UPDATE_CALENDAR','CALENDAR','UPDATE',0),(52,'configuration','DELETE_CALENDAR','CALENDAR','DELETE',0),(53,'configuration','CREATE_CALENDAR_CHECKER','CALENDAR','CREATE',0),(54,'configuration','UPDATE_CALENDAR_CHECKER','CALENDAR','UPDATE',0),(55,'configuration','DELETE_CALENDAR_CHECKER','CALENDAR','DELETE',0),(56,'organisation','READ_MAKERCHECKER','MAKERCHECKER','READ',0),(57,'organisation','READ_CHARGE','CHARGE','READ',0),(58,'organisation','CREATE_CHARGE','CHARGE','CREATE',0),(59,'organisation','CREATE_CHARGE_CHECKER','CHARGE','CREATE',0),(60,'organisation','UPDATE_CHARGE','CHARGE','UPDATE',0),(61,'organisation','UPDATE_CHARGE_CHECKER','CHARGE','UPDATE',0),(62,'organisation','DELETE_CHARGE','CHARGE','DELETE',0),(63,'organisation','DELETE_CHARGE_CHECKER','CHARGE','DELETE',0),(64,'organisation','READ_FUND','FUND','READ',0),(65,'organisation','CREATE_FUND','FUND','CREATE',0),(66,'organisation','CREATE_FUND_CHECKER','FUND','CREATE',0),(67,'organisation','UPDATE_FUND','FUND','UPDATE',0),(68,'organisation','UPDATE_FUND_CHECKER','FUND','UPDATE',0),(69,'organisation','DELETE_FUND','FUND','DELETE',0),(70,'organisation','DELETE_FUND_CHECKER','FUND','DELETE',0),(71,'organisation','READ_LOANPRODUCT','LOANPRODUCT','READ',0),(72,'organisation','CREATE_LOANPRODUCT','LOANPRODUCT','CREATE',0),(73,'organisation','CREATE_LOANPRODUCT_CHECKER','LOANPRODUCT','CREATE',0),(74,'organisation','UPDATE_LOANPRODUCT','LOANPRODUCT','UPDATE',0),(75,'organisation','UPDATE_LOANPRODUCT_CHECKER','LOANPRODUCT','UPDATE',0),(76,'organisation','DELETE_LOANPRODUCT','LOANPRODUCT','DELETE',0),(77,'organisation','DELETE_LOANPRODUCT_CHECKER','LOANPRODUCT','DELETE',0),(78,'organisation','READ_OFFICE','OFFICE','READ',0),(79,'organisation','CREATE_OFFICE','OFFICE','CREATE',0),(80,'organisation','CREATE_OFFICE_CHECKER','OFFICE','CREATE',0),(81,'organisation','UPDATE_OFFICE','OFFICE','UPDATE',0),(82,'organisation','UPDATE_OFFICE_CHECKER','OFFICE','UPDATE',0),(83,'organisation','READ_OFFICETRANSACTION','OFFICETRANSACTION','READ',0),(84,'organisation','DELETE_OFFICE_CHECKER','OFFICE','DELETE',0),(85,'organisation','CREATE_OFFICETRANSACTION','OFFICETRANSACTION','CREATE',0),(86,'organisation','CREATE_OFFICETRANSACTION_CHECKER','OFFICETRANSACTION','CREATE',0),(87,'organisation','DELETE_OFFICETRANSACTION','OFFICETRANSACTION','DELETE',0),(88,'organisation','DELETE_OFFICETRANSACTION_CHECKER','OFFICETRANSACTION','DELETE',0),(89,'organisation','READ_STAFF','STAFF','READ',0),(90,'organisation','CREATE_STAFF','STAFF','CREATE',0),(91,'organisation','CREATE_STAFF_CHECKER','STAFF','CREATE',0),(92,'organisation','UPDATE_STAFF','STAFF','UPDATE',0),(93,'organisation','UPDATE_STAFF_CHECKER','STAFF','UPDATE',0),(94,'organisation','DELETE_STAFF','STAFF','DELETE',0),(95,'organisation','DELETE_STAFF_CHECKER','STAFF','DELETE',0),(96,'organisation','READ_SAVINGSPRODUCT','SAVINGSPRODUCT','READ',0),(97,'organisation','CREATE_SAVINGSPRODUCT','SAVINGSPRODUCT','CREATE',0),(98,'organisation','CREATE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','CREATE',0),(99,'organisation','UPDATE_SAVINGSPRODUCT','SAVINGSPRODUCT','UPDATE',0),(100,'organisation','UPDATE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','UPDATE',0),(101,'organisation','DELETE_SAVINGSPRODUCT','SAVINGSPRODUCT','DELETE',0),(102,'organisation','DELETE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','DELETE',0),(103,'organisation','READ_DEPOSITPRODUCT','DEPOSITPRODUCT','READ',0),(104,'organisation','CREATE_DEPOSITPRODUCT','DEPOSITPRODUCT','CREATE',0),(105,'organisation','CREATE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','CREATE',0),(106,'organisation','UPDATE_DEPOSITPRODUCT','DEPOSITPRODUCT','UPDATE',0),(107,'organisation','UPDATE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','UPDATE',0),(108,'organisation','DELETE_DEPOSITPRODUCT','DEPOSITPRODUCT','DELETE',0),(109,'organisation','DELETE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','DELETE',0),(110,'portfolio','READ_LOAN','LOAN','READ',0),(111,'portfolio','CREATE_LOAN','LOAN','CREATE',0),(112,'portfolio','CREATE_LOAN_CHECKER','LOAN','CREATE',0),(113,'portfolio','UPDATE_LOAN','LOAN','UPDATE',0),(114,'portfolio','UPDATE_LOAN_CHECKER','LOAN','UPDATE',0),(115,'portfolio','DELETE_LOAN','LOAN','DELETE',0),(116,'portfolio','DELETE_LOAN_CHECKER','LOAN','DELETE',0),(117,'portfolio','READ_CLIENT','CLIENT','READ',0),(118,'portfolio','CREATE_CLIENT','CLIENT','CREATE',0),(119,'portfolio','CREATE_CLIENT_CHECKER','CLIENT','CREATE',0),(120,'portfolio','UPDATE_CLIENT','CLIENT','UPDATE',0),(121,'portfolio','UPDATE_CLIENT_CHECKER','CLIENT','UPDATE',0),(122,'portfolio','DELETE_CLIENT','CLIENT','DELETE',0),(123,'portfolio','DELETE_CLIENT_CHECKER','CLIENT','DELETE',0),(124,'portfolio','READ_CLIENTIMAGE','CLIENTIMAGE','READ',0),(125,'portfolio','CREATE_CLIENTIMAGE','CLIENTIMAGE','CREATE',0),(126,'portfolio','CREATE_CLIENTIMAGE_CHECKER','CLIENTIMAGE','CREATE',0),(127,'portfolio','DELETE_CLIENTIMAGE','CLIENTIMAGE','DELETE',0),(128,'portfolio','DELETE_CLIENTIMAGE_CHECKER','CLIENTIMAGE','DELETE',0),(129,'portfolio','READ_CLIENTNOTE','CLIENTNOTE','READ',0),(130,'portfolio','CREATE_CLIENTNOTE','CLIENTNOTE','CREATE',0),(131,'portfolio','CREATE_CLIENTNOTE_CHECKER','CLIENTNOTE','CREATE',0),(132,'portfolio','UPDATE_CLIENTNOTE','CLIENTNOTE','UPDATE',0),(133,'portfolio','UPDATE_CLIENTNOTE_CHECKER','CLIENTNOTE','UPDATE',0),(134,'portfolio','DELETE_CLIENTNOTE','CLIENTNOTE','DELETE',0),(135,'portfolio','DELETE_CLIENTNOTE_CHECKER','CLIENTNOTE','DELETE',0),(136,'portfolio','READ_GROUPNOTE','GROUPNOTE','READ',0),(137,'portfolio','CREATE_GROUPNOTE','GROUPNOTE','CREATE',0),(138,'portfolio','UPDATE_GROUPNOTE','GROUPNOTE','UPDATE',0),(139,'portfolio','DELETE_GROUPNOTE','GROUPNOTE','DELETE',0),(140,'portfolio','CREATE_GROUPNOTE_CHECKER','GROUPNOTE','CREATE',0),(141,'portfolio','UPDATE_GROUPNOTE_CHECKER','GROUPNOTE','UPDATE',0),(142,'portfolio','DELETE_GROUPNOTE_CHECKER','GROUPNOTE','DELETE',0),(143,'portfolio','READ_LOANNOTE','LOANNOTE','READ',0),(144,'portfolio','CREATE_LOANNOTE','LOANNOTE','CREATE',0),(145,'portfolio','UPDATE_LOANNOTE','LOANNOTE','UPDATE',0),(146,'portfolio','DELETE_LOANNOTE','LOANNOTE','DELETE',0),(147,'portfolio','CREATE_LOANNOTE_CHECKER','LOANNOTE','CREATE',0),(148,'portfolio','UPDATE_LOANNOTE_CHECKER','LOANNOTE','UPDATE',0),(149,'portfolio','DELETE_LOANNOTE_CHECKER','LOANNOTE','DELETE',0),(150,'portfolio','READ_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','READ',0),(151,'portfolio','CREATE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','CREATE',0),(152,'portfolio','UPDATE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','UPDATE',0),(153,'portfolio','DELETE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','DELETE',0),(154,'portfolio','CREATE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','CREATE',0),(155,'portfolio','UPDATE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','UPDATE',0),(156,'portfolio','DELETE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','DELETE',0),(157,'portfolio','READ_DEPOSITNOTE','DEPOSITNOTE','READ',0),(158,'portfolio','CREATE_DEPOSITNOTE','DEPOSITNOTE','CREATE',0),(159,'portfolio','UPDATE_DEPOSITNOTE','DEPOSITNOTE','UPDATE',0),(160,'portfolio','DELETE_DEPOSITNOTE','DEPOSITNOTE','DELETE',0),(161,'portfolio','CREATE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','CREATE',0),(162,'portfolio','UPDATE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','UPDATE',0),(163,'portfolio','DELETE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','DELETE',0),(164,'portfolio','READ_SAVINGNOTE','SAVINGNOTE','READ',0),(165,'portfolio','CREATE_SAVINGNOTE','SAVINGNOTE','CREATE',0),(166,'portfolio','UPDATE_SAVINGNOTE','SAVINGNOTE','UPDATE',0),(167,'portfolio','DELETE_SAVINGNOTE','SAVINGNOTE','DELETE',0),(168,'portfolio','CREATE_SAVINGNOTE_CHECKER','SAVINGNOTE','CREATE',0),(169,'portfolio','UPDATE_SAVINGNOTE_CHECKER','SAVINGNOTE','UPDATE',0),(170,'portfolio','DELETE_SAVINGNOTE_CHECKER','SAVINGNOTE','DELETE',0),(171,'portfolio','READ_CLIENTIDENTIFIER','CLIENTIDENTIFIER','READ',0),(172,'portfolio','CREATE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','CREATE',0),(173,'portfolio','CREATE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','CREATE',0),(174,'portfolio','UPDATE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','UPDATE',0),(175,'portfolio','UPDATE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','UPDATE',0),(176,'portfolio','DELETE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','DELETE',0),(177,'portfolio','DELETE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','DELETE',0),(178,'portfolio','READ_DOCUMENT','DOCUMENT','READ',0),(179,'portfolio','CREATE_DOCUMENT','DOCUMENT','CREATE',0),(180,'portfolio','CREATE_DOCUMENT_CHECKER','DOCUMENT','CREATE',0),(181,'portfolio','UPDATE_DOCUMENT','DOCUMENT','UPDATE',0),(182,'portfolio','UPDATE_DOCUMENT_CHECKER','DOCUMENT','UPDATE',0),(183,'portfolio','DELETE_DOCUMENT','DOCUMENT','DELETE',0),(184,'portfolio','DELETE_DOCUMENT_CHECKER','DOCUMENT','DELETE',0),(185,'portfolio','READ_GROUP','GROUP','READ',0),(186,'portfolio','CREATE_GROUP','GROUP','CREATE',0),(187,'portfolio','CREATE_GROUP_CHECKER','GROUP','CREATE',0),(188,'portfolio','UPDATE_GROUP','GROUP','UPDATE',0),(189,'portfolio','UPDATE_GROUP_CHECKER','GROUP','UPDATE',0),(190,'portfolio','DELETE_GROUP','GROUP','DELETE',0),(191,'portfolio','DELETE_GROUP_CHECKER','GROUP','DELETE',0),(192,'portfolio','UNASSIGNSTAFF_GROUP','GROUP','UNASSIGNSTAFF',0),(193,'portfolio','UNASSIGNSTAFF_GROUP_CHECKER','GROUP','UNASSIGNSTAFF',0),(194,'portfolio','CREATE_LOANCHARGE','LOANCHARGE','CREATE',0),(195,'portfolio','CREATE_LOANCHARGE_CHECKER','LOANCHARGE','CREATE',0),(196,'portfolio','UPDATE_LOANCHARGE','LOANCHARGE','UPDATE',0),(197,'portfolio','UPDATE_LOANCHARGE_CHECKER','LOANCHARGE','UPDATE',0),(198,'portfolio','DELETE_LOANCHARGE','LOANCHARGE','DELETE',0),(199,'portfolio','DELETE_LOANCHARGE_CHECKER','LOANCHARGE','DELETE',0),(200,'portfolio','WAIVE_LOANCHARGE','LOANCHARGE','WAIVE',0),(201,'portfolio','WAIVE_LOANCHARGE_CHECKER','LOANCHARGE','WAIVE',0),(202,'portfolio','READ_DEPOSITACCOUNT','DEPOSITACCOUNT','READ',0),(203,'portfolio','CREATE_DEPOSITACCOUNT','DEPOSITACCOUNT','CREATE',0),(204,'portfolio','CREATE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','CREATE',0),(205,'portfolio','UPDATE_DEPOSITACCOUNT','DEPOSITACCOUNT','UPDATE',0),(206,'portfolio','UPDATE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','UPDATE',0),(207,'portfolio','DELETE_DEPOSITACCOUNT','DEPOSITACCOUNT','DELETE',0),(208,'portfolio','DELETE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','DELETE',0),(209,'portfolio','READ_SAVINGSACCOUNT','SAVINGSACCOUNT','READ',0),(210,'portfolio','CREATE_SAVINGSACCOUNT','SAVINGSACCOUNT','CREATE',0),(211,'portfolio','CREATE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','CREATE',0),(212,'portfolio','UPDATE_SAVINGSACCOUNT','SAVINGSACCOUNT','UPDATE',0),(213,'portfolio','UPDATE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','UPDATE',0),(214,'portfolio','DELETE_SAVINGSACCOUNT','SAVINGSACCOUNT','DELETE',0),(215,'portfolio','DELETE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','DELETE',0),(216,'portfolio','READ_GUARANTOR','GUARANTOR','READ',0),(217,'portfolio','CREATE_GUARANTOR','GUARANTOR','CREATE',0),(218,'portfolio','CREATE_GUARANTOR_CHECKER','GUARANTOR','CREATE',0),(219,'portfolio','UPDATE_GUARANTOR','GUARANTOR','UPDATE',0),(220,'portfolio','UPDATE_GUARANTOR_CHECKER','GUARANTOR','UPDATE',0),(221,'portfolio','DELETE_GUARANTOR','GUARANTOR','DELETE',0),(222,'portfolio','DELETE_GUARANTOR_CHECKER','GUARANTOR','DELETE',0),(223,'transaction_loan','APPROVE_LOAN','LOAN','APPROVE',0),(224,'transaction_loan','APPROVEINPAST_LOAN','LOAN','APPROVEINPAST',0),(225,'transaction_loan','REJECT_LOAN','LOAN','REJECT',0),(226,'transaction_loan','REJECTINPAST_LOAN','LOAN','REJECTINPAST',0),(227,'transaction_loan','WITHDRAW_LOAN','LOAN','WITHDRAW',0),(228,'transaction_loan','WITHDRAWINPAST_LOAN','LOAN','WITHDRAWINPAST',0),(229,'transaction_loan','APPROVALUNDO_LOAN','LOAN','APPROVALUNDO',0),(230,'transaction_loan','DISBURSE_LOAN','LOAN','DISBURSE',0),(231,'transaction_loan','DISBURSEINPAST_LOAN','LOAN','DISBURSEINPAST',0),(232,'transaction_loan','DISBURSALUNDO_LOAN','LOAN','DISBURSALUNDO',0),(233,'transaction_loan','REPAYMENT_LOAN','LOAN','REPAYMENT',0),(234,'transaction_loan','REPAYMENTINPAST_LOAN','LOAN','REPAYMENTINPAST',0),(235,'transaction_loan','ADJUST_LOAN','LOAN','ADJUST',0),(236,'transaction_loan','WAIVEINTERESTPORTION_LOAN','LOAN','WAIVEINTERESTPORTION',0),(237,'transaction_loan','WRITEOFF_LOAN','LOAN','WRITEOFF',0),(238,'transaction_loan','CLOSE_LOAN','LOAN','CLOSE',0),(239,'transaction_loan','CLOSEASRESCHEDULED_LOAN','LOAN','CLOSEASRESCHEDULED',0),(240,'transaction_loan','UPDATELOANOFFICER_LOAN','LOAN','UPDATELOANOFFICER',0),(241,'transaction_loan','UPDATELOANOFFICER_LOAN_CHECKER','LOAN','UPDATELOANOFFICER',0),(242,'transaction_loan','REMOVELOANOFFICER_LOAN','LOAN','REMOVELOANOFFICER',0),(243,'transaction_loan','REMOVELOANOFFICER_LOAN_CHECKER','LOAN','REMOVELOANOFFICER',0),(244,'transaction_loan','BULKREASSIGN_LOAN','LOAN','BULKREASSIGN',0),(245,'transaction_loan','BULKREASSIGN_LOAN_CHECKER','LOAN','BULKREASSIGN',0),(246,'transaction_loan','APPROVE_LOAN_CHECKER','LOAN','APPROVE',0),(247,'transaction_loan','APPROVEINPAST_LOAN_CHECKER','LOAN','APPROVEINPAST',0),(248,'transaction_loan','REJECT_LOAN_CHECKER','LOAN','REJECT',0),(249,'transaction_loan','REJECTINPAST_LOAN_CHECKER','LOAN','REJECTINPAST',0),(250,'transaction_loan','WITHDRAW_LOAN_CHECKER','LOAN','WITHDRAW',0),(251,'transaction_loan','WITHDRAWINPAST_LOAN_CHECKER','LOAN','WITHDRAWINPAST',0),(252,'transaction_loan','APPROVALUNDO_LOAN_CHECKER','LOAN','APPROVALUNDO',0),(253,'transaction_loan','DISBURSE_LOAN_CHECKER','LOAN','DISBURSE',0),(254,'transaction_loan','DISBURSEINPAST_LOAN_CHECKER','LOAN','DISBURSEINPAST',0),(255,'transaction_loan','DISBURSALUNDO_LOAN_CHECKER','LOAN','DISBURSALUNDO',0),(256,'transaction_loan','REPAYMENT_LOAN_CHECKER','LOAN','REPAYMENT',0),(257,'transaction_loan','REPAYMENTINPAST_LOAN_CHECKER','LOAN','REPAYMENTINPAST',0),(258,'transaction_loan','ADJUST_LOAN_CHECKER','LOAN','ADJUST',0),(259,'transaction_loan','WAIVEINTERESTPORTION_LOAN_CHECKER','LOAN','WAIVEINTERESTPORTION',0),(260,'transaction_loan','WRITEOFF_LOAN_CHECKER','LOAN','WRITEOFF',0),(261,'transaction_loan','CLOSE_LOAN_CHECKER','LOAN','CLOSE',0),(262,'transaction_loan','CLOSEASRESCHEDULED_LOAN_CHECKER','LOAN','CLOSEASRESCHEDULED',0),(263,'transaction_deposit','APPROVE_DEPOSITACCOUNT','DEPOSITACCOUNT','APPROVE',0),(264,'transaction_deposit','REJECT_DEPOSITACCOUNT','DEPOSITACCOUNT','REJECT',0),(265,'transaction_deposit','WITHDRAW_DEPOSITACCOUNT','DEPOSITACCOUNT','WITHDRAW',0),(266,'transaction_deposit','APPROVALUNDO_DEPOSITACCOUNT','DEPOSITACCOUNT','APPROVALUNDO',0),(267,'transaction_deposit','WITHDRAWAL_DEPOSITACCOUNT','DEPOSITACCOUNT','WITHDRAWAL',0),(268,'transaction_deposit','INTEREST_DEPOSITACCOUNT','DEPOSITACCOUNT','INTEREST',0),(269,'transaction_deposit','RENEW_DEPOSITACCOUNT','DEPOSITACCOUNT','RENEW',0),(270,'transaction_deposit','APPROVE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','APPROVE',0),(271,'transaction_deposit','REJECT_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','REJECT',0),(272,'transaction_deposit','WITHDRAW_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','WITHDRAW',0),(273,'transaction_deposit','APPROVALUNDO_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','APPROVALUNDO',0),(274,'transaction_deposit','WITHDRAWAL_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','WITHDRAWAL',0),(275,'transaction_deposit','INTEREST_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','INTEREST',0),(276,'transaction_deposit','RENEW_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','RENEW',0),(277,'accounting','CREATE_GLACCOUNT','GLACCOUNT','CREATE',0),(278,'accounting','UPDATE_GLACCOUNT','GLACCOUNT','UPDATE',0),(279,'accounting','DELETE_GLACCOUNT','GLACCOUNT','DELETE',0),(280,'accounting','CREATE_GLCLOSURE','GLCLOSURE','CREATE',0),(281,'accounting','UPDATE_GLCLOSURE','GLCLOSURE','UPDATE',0),(282,'accounting','DELETE_GLCLOSURE','GLCLOSURE','DELETE',0),(283,'accounting','CREATE_JOURNALENTRY','JOURNALENTRY','CREATE',0),(284,'accounting','REVERSE_JOURNALENTRY','JOURNALENTRY','REVERSE',0),(285,'report','READ_Active Loans - Details','Active Loans - Details','READ',0),(286,'report','READ_Active Loans - Summary','Active Loans - Summary','READ',0),(287,'report','READ_Active Loans by Disbursal Period','Active Loans by Disbursal Period','READ',0),(288,'report','READ_Active Loans in last installment','Active Loans in last installment','READ',0),(289,'report','READ_Active Loans in last installment Summary','Active Loans in last installment Summary','READ',0),(290,'report','READ_Active Loans Passed Final Maturity','Active Loans Passed Final Maturity','READ',0),(291,'report','READ_Active Loans Passed Final Maturity Summary','Active Loans Passed Final Maturity Summary','READ',0),(292,'report','READ_Aging Detail','Aging Detail','READ',0),(293,'report','READ_Aging Summary (Arrears in Months)','Aging Summary (Arrears in Months)','READ',0),(294,'report','READ_Aging Summary (Arrears in Weeks)','Aging Summary (Arrears in Weeks)','READ',0),(295,'report','READ_Balance Sheet','Balance Sheet','READ',0),(296,'report','READ_Branch Expected Cash Flow','Branch Expected Cash Flow','READ',0),(297,'report','READ_Client Listing','Client Listing','READ',0),(298,'report','READ_Client Loans Listing','Client Loans Listing','READ',0),(299,'report','READ_Expected Payments By Date - Basic','Expected Payments By Date - Basic','READ',0),(300,'report','READ_Expected Payments By Date - Formatted','Expected Payments By Date - Formatted','READ',0),(301,'report','READ_Funds Disbursed Between Dates Summary','Funds Disbursed Between Dates Summary','READ',0),(302,'report','READ_Funds Disbursed Between Dates Summary by Office','Funds Disbursed Between Dates Summary by Office','READ',0),(303,'report','READ_Income Statement','Income Statement','READ',0),(304,'report','READ_Loan Account Schedule','Loan Account Schedule','READ',0),(305,'report','READ_Loans Awaiting Disbursal','Loans Awaiting Disbursal','READ',0),(306,'report','READ_Loans Awaiting Disbursal Summary','Loans Awaiting Disbursal Summary','READ',0),(307,'report','READ_Loans Awaiting Disbursal Summary by Month','Loans Awaiting Disbursal Summary by Month','READ',0),(308,'report','READ_Loans Pending Approval','Loans Pending Approval','READ',0),(309,'report','READ_Obligation Met Loans Details','Obligation Met Loans Details','READ',0),(310,'report','READ_Obligation Met Loans Summary','Obligation Met Loans Summary','READ',0),(311,'report','READ_Portfolio at Risk','Portfolio at Risk','READ',0),(312,'report','READ_Portfolio at Risk by Branch','Portfolio at Risk by Branch','READ',0),(313,'report','READ_Rescheduled Loans','Rescheduled Loans','READ',0),(314,'report','READ_Trial Balance','Trial Balance','READ',0),(315,'report','READ_Written-Off Loans','Written-Off Loans','READ',0),(316,'datatable','CREATE_client additional data','client additional data','CREATE',1),(317,'datatable','CREATE_impact measurement','impact measurement','CREATE',1),(318,'datatable','CREATE_loan additional data','loan additional data','CREATE',1),(319,'datatable','READ_client additional data','client additional data','READ',1),(320,'datatable','READ_impact measurement','impact measurement','READ',1),(321,'datatable','READ_loan additional data','loan additional data','READ',1),(322,'datatable','UPDATE_client additional data','client additional data','UPDATE',1),(323,'datatable','UPDATE_impact measurement','impact measurement','UPDATE',1),(324,'datatable','UPDATE_loan additional data','loan additional data','UPDATE',1),(325,'datatable','DELETE_client additional data','client additional data','DELETE',1),(326,'datatable','DELETE_impact measurement','impact measurement','DELETE',1),(327,'datatable','DELETE_loan additional data','loan additional data','DELETE',1); /*!40000 ALTER TABLE `m_permission` ENABLE KEYS */; UNLOCK TABLES; @@ -1809,4 +1809,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2013-03-20 11:59:45 +-- Dump completed on 2013-03-20 18:59:44 diff --git a/mifosng-db/multi-tenant-demo-backups/ceda/bk_core_with_custom_and_coa.sql b/mifosng-db/multi-tenant-demo-backups/ceda/bk_core_with_custom_and_coa.sql index a43ab1a1d..5cacff8de 100644 --- a/mifosng-db/multi-tenant-demo-backups/ceda/bk_core_with_custom_and_coa.sql +++ b/mifosng-db/multi-tenant-demo-backups/ceda/bk_core_with_custom_and_coa.sql @@ -1314,7 +1314,7 @@ CREATE TABLE `m_permission` ( LOCK TABLES `m_permission` WRITE; /*!40000 ALTER TABLE `m_permission` DISABLE KEYS */; -INSERT INTO `m_permission` VALUES (1,'special','ALL_FUNCTIONS',NULL,NULL,0),(2,'special','ALL_FUNCTIONS_READ',NULL,NULL,0),(3,'special','CHECKER_SUPER_USER',NULL,NULL,0),(4,'special','REPORTING_SUPER_USER',NULL,NULL,0),(5,'authorisation','READ_PERMISSION','PERMISSION','READ',0),(6,'authorisation','PERMISSIONS_ROLE','ROLE','PERMISSIONS',1),(7,'authorisation','CREATE_ROLE','ROLE','CREATE',1),(8,'authorisation','CREATE_ROLE_CHECKER','ROLE','CREATE',1),(9,'authorisation','READ_ROLE','ROLE','READ',0),(10,'authorisation','UPDATE_ROLE','ROLE','UPDATE',1),(11,'authorisation','UPDATE_ROLE_CHECKER','ROLE','UPDATE',1),(12,'authorisation','DELETE_ROLE','ROLE','DELETE',1),(13,'authorisation','DELETE_ROLE_CHECKER','ROLE','DELETE',1),(14,'authorisation','CREATE_USER','USER','CREATE',1),(15,'authorisation','CREATE_USER_CHECKER','USER','CREATE',1),(16,'authorisation','READ_USER','USER','READ',0),(17,'authorisation','UPDATE_USER','USER','UPDATE',1),(18,'authorisation','UPDATE_USER_CHECKER','USER','UPDATE',1),(19,'authorisation','DELETE_USER','USER','DELETE',1),(20,'authorisation','DELETE_USER_CHECKER','USER','DELETE',1),(21,'configuration','READ_CONFIGURATION','CONFIGURATION','READ',1),(22,'configuration','UPDATE_CONFIGURATION','CONFIGURATION','UPDATE',1),(23,'configuration','UPDATE_CONFIGURATION_CHECKER','CONFIGURATION','UPDATE',1),(24,'configuration','READ_CODE','CODE','READ',0),(25,'configuration','CREATE_CODE','CODE','CREATE',1),(26,'configuration','CREATE_CODE_CHECKER','CODE','CREATE',1),(27,'configuration','UPDATE_CODE','CODE','UPDATE',1),(28,'configuration','UPDATE_CODE_CHECKER','CODE','UPDATE',1),(29,'configuration','DELETE_CODE','CODE','DELETE',1),(30,'configuration','DELETE_CODE_CHECKER','CODE','DELETE',1),(31,'configuration','READ_CODEVALUE','CODEVALUE','READ',0),(32,'configuration','CREATE_CODEVALUE','CODEVALUE','CREATE',1),(33,'configuration','CREATE_CODEVALUE_CHECKER','CODEVALUE','CREATE',1),(34,'configuration','UPDATE_CODEVALUE','CODEVALUE','UPDATE',1),(35,'configuration','UPDATE_CODEVALUE_CHECKER','CODEVALUE','UPDATE',1),(36,'configuration','DELETE_CODEVALUE','CODEVALUE','DELETE',1),(37,'configuration','DELETE_CODEVALUE_CHECKER','CODEVALUE','DELETE',1),(38,'configuration','READ_CURRENCY','CURRENCY','READ',0),(39,'configuration','UPDATE_CURRENCY','CURRENCY','UPDATE',1),(40,'configuration','UPDATE_CURRENCY_CHECKER','CURRENCY','UPDATE',1),(41,'configuration','UPDATE_PERMISSION','PERMISSION','UPDATE',1),(42,'configuration','UPDATE_PERMISSION_CHECKER','PERMISSION','UPDATE',1),(43,'configuration','READ_DATATABLE','DATATABLE','READ',0),(44,'configuration','REGISTER_DATATABLE','DATATABLE','REGISTER',1),(45,'configuration','REGISTER_DATATABLE_CHECKER','DATATABLE','REGISTER',1),(46,'configuration','DEREGISTER_DATATABLE','DATATABLE','DEREGISTER',1),(47,'configuration','DEREGISTER_DATATABLE_CHECKER','DATATABLE','DEREGISTER',1),(48,'configuration','READ_AUDIT','AUDIT','READ',0),(49,'configuration','CREATE_CALENDAR','CALENDAR','CREATE',1),(50,'configuration','READ_CALENDAR','CALENDAR','READ',0),(51,'configuration','UPDATE_CALENDAR','CALENDAR','UPDATE',1),(52,'configuration','DELETE_CALENDAR','CALENDAR','DELETE',1),(53,'configuration','CREATE_CALENDAR_CHECKER','CALENDAR','CREATE',1),(54,'configuration','UPDATE_CALENDAR_CHECKER','CALENDAR','UPDATE',1),(55,'configuration','DELETE_CALENDAR_CHECKER','CALENDAR','DELETE',1),(56,'organisation','READ_MAKERCHECKER','MAKERCHECKER','READ',0),(57,'organisation','READ_CHARGE','CHARGE','READ',0),(58,'organisation','CREATE_CHARGE','CHARGE','CREATE',1),(59,'organisation','CREATE_CHARGE_CHECKER','CHARGE','CREATE',1),(60,'organisation','UPDATE_CHARGE','CHARGE','UPDATE',1),(61,'organisation','UPDATE_CHARGE_CHECKER','CHARGE','UPDATE',1),(62,'organisation','DELETE_CHARGE','CHARGE','DELETE',1),(63,'organisation','DELETE_CHARGE_CHECKER','CHARGE','DELETE',1),(64,'organisation','READ_FUND','FUND','READ',0),(65,'organisation','CREATE_FUND','FUND','CREATE',1),(66,'organisation','CREATE_FUND_CHECKER','FUND','CREATE',1),(67,'organisation','UPDATE_FUND','FUND','UPDATE',1),(68,'organisation','UPDATE_FUND_CHECKER','FUND','UPDATE',1),(69,'organisation','DELETE_FUND','FUND','DELETE',1),(70,'organisation','DELETE_FUND_CHECKER','FUND','DELETE',1),(71,'organisation','READ_LOANPRODUCT','LOANPRODUCT','READ',0),(72,'organisation','CREATE_LOANPRODUCT','LOANPRODUCT','CREATE',1),(73,'organisation','CREATE_LOANPRODUCT_CHECKER','LOANPRODUCT','CREATE',1),(74,'organisation','UPDATE_LOANPRODUCT','LOANPRODUCT','UPDATE',1),(75,'organisation','UPDATE_LOANPRODUCT_CHECKER','LOANPRODUCT','UPDATE',1),(76,'organisation','DELETE_LOANPRODUCT','LOANPRODUCT','DELETE',1),(77,'organisation','DELETE_LOANPRODUCT_CHECKER','LOANPRODUCT','DELETE',1),(78,'organisation','READ_OFFICE','OFFICE','READ',0),(79,'organisation','CREATE_OFFICE','OFFICE','CREATE',1),(80,'organisation','CREATE_OFFICE_CHECKER','OFFICE','CREATE',1),(81,'organisation','UPDATE_OFFICE','OFFICE','UPDATE',1),(82,'organisation','UPDATE_OFFICE_CHECKER','OFFICE','UPDATE',1),(83,'organisation','READ_OFFICETRANSACTION','OFFICETRANSACTION','READ',0),(84,'organisation','DELETE_OFFICE_CHECKER','OFFICE','DELETE',1),(85,'organisation','CREATE_OFFICETRANSACTION','OFFICETRANSACTION','CREATE',1),(86,'organisation','CREATE_OFFICETRANSACTION_CHECKER','OFFICETRANSACTION','CREATE',1),(87,'organisation','DELETE_OFFICETRANSACTION','OFFICETRANSACTION','DELETE',1),(88,'organisation','DELETE_OFFICETRANSACTION_CHECKER','OFFICETRANSACTION','DELETE',1),(89,'organisation','READ_STAFF','STAFF','READ',0),(90,'organisation','CREATE_STAFF','STAFF','CREATE',1),(91,'organisation','CREATE_STAFF_CHECKER','STAFF','CREATE',1),(92,'organisation','UPDATE_STAFF','STAFF','UPDATE',1),(93,'organisation','UPDATE_STAFF_CHECKER','STAFF','UPDATE',1),(94,'organisation','DELETE_STAFF','STAFF','DELETE',1),(95,'organisation','DELETE_STAFF_CHECKER','STAFF','DELETE',1),(96,'organisation','READ_SAVINGSPRODUCT','SAVINGSPRODUCT','READ',0),(97,'organisation','CREATE_SAVINGSPRODUCT','SAVINGSPRODUCT','CREATE',1),(98,'organisation','CREATE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','CREATE',1),(99,'organisation','UPDATE_SAVINGSPRODUCT','SAVINGSPRODUCT','UPDATE',1),(100,'organisation','UPDATE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','UPDATE',1),(101,'organisation','DELETE_SAVINGSPRODUCT','SAVINGSPRODUCT','DELETE',1),(102,'organisation','DELETE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','DELETE',1),(103,'organisation','READ_DEPOSITPRODUCT','DEPOSITPRODUCT','READ',0),(104,'organisation','CREATE_DEPOSITPRODUCT','DEPOSITPRODUCT','CREATE',1),(105,'organisation','CREATE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','CREATE',1),(106,'organisation','UPDATE_DEPOSITPRODUCT','DEPOSITPRODUCT','UPDATE',1),(107,'organisation','UPDATE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','UPDATE',1),(108,'organisation','DELETE_DEPOSITPRODUCT','DEPOSITPRODUCT','DELETE',1),(109,'organisation','DELETE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','DELETE',1),(110,'portfolio','READ_LOAN','LOAN','READ',0),(111,'portfolio','CREATE_LOAN','LOAN','CREATE',1),(112,'portfolio','CREATE_LOAN_CHECKER','LOAN','CREATE',1),(113,'portfolio','UPDATE_LOAN','LOAN','UPDATE',1),(114,'portfolio','UPDATE_LOAN_CHECKER','LOAN','UPDATE',1),(115,'portfolio','DELETE_LOAN','LOAN','DELETE',1),(116,'portfolio','DELETE_LOAN_CHECKER','LOAN','DELETE',1),(117,'portfolio','READ_CLIENT','CLIENT','READ',0),(118,'portfolio','CREATE_CLIENT','CLIENT','CREATE',1),(119,'portfolio','CREATE_CLIENT_CHECKER','CLIENT','CREATE',1),(120,'portfolio','UPDATE_CLIENT','CLIENT','UPDATE',1),(121,'portfolio','UPDATE_CLIENT_CHECKER','CLIENT','UPDATE',1),(122,'portfolio','DELETE_CLIENT','CLIENT','DELETE',1),(123,'portfolio','DELETE_CLIENT_CHECKER','CLIENT','DELETE',1),(124,'portfolio','READ_CLIENTIMAGE','CLIENTIMAGE','READ',0),(125,'portfolio','CREATE_CLIENTIMAGE','CLIENTIMAGE','CREATE',1),(126,'portfolio','CREATE_CLIENTIMAGE_CHECKER','CLIENTIMAGE','CREATE',1),(127,'portfolio','DELETE_CLIENTIMAGE','CLIENTIMAGE','DELETE',1),(128,'portfolio','DELETE_CLIENTIMAGE_CHECKER','CLIENTIMAGE','DELETE',1),(129,'portfolio','READ_CLIENTNOTE','CLIENTNOTE','READ',0),(130,'portfolio','CREATE_CLIENTNOTE','CLIENTNOTE','CREATE',1),(131,'portfolio','CREATE_CLIENTNOTE_CHECKER','CLIENTNOTE','CREATE',1),(132,'portfolio','UPDATE_CLIENTNOTE','CLIENTNOTE','UPDATE',1),(133,'portfolio','UPDATE_CLIENTNOTE_CHECKER','CLIENTNOTE','UPDATE',1),(134,'portfolio','DELETE_CLIENTNOTE','CLIENTNOTE','DELETE',1),(135,'portfolio','DELETE_CLIENTNOTE_CHECKER','CLIENTNOTE','DELETE',1),(136,'portfolio','READ_GROUPNOTE','GROUPNOTE','READ',0),(137,'portfolio','CREATE_GROUPNOTE','GROUPNOTE','CREATE',1),(138,'portfolio','UPDATE_GROUPNOTE','GROUPNOTE','UPDATE',1),(139,'portfolio','DELETE_GROUPNOTE','GROUPNOTE','DELETE',1),(140,'portfolio','CREATE_GROUPNOTE_CHECKER','GROUPNOTE','CREATE',1),(141,'portfolio','UPDATE_GROUPNOTE_CHECKER','GROUPNOTE','UPDATE',1),(142,'portfolio','DELETE_GROUPNOTE_CHECKER','GROUPNOTE','DELETE',1),(143,'portfolio','READ_LOANNOTE','LOANNOTE','READ',0),(144,'portfolio','CREATE_LOANNOTE','LOANNOTE','CREATE',1),(145,'portfolio','UPDATE_LOANNOTE','LOANNOTE','UPDATE',1),(146,'portfolio','DELETE_LOANNOTE','LOANNOTE','DELETE',1),(147,'portfolio','CREATE_LOANNOTE_CHECKER','LOANNOTE','CREATE',1),(148,'portfolio','UPDATE_LOANNOTE_CHECKER','LOANNOTE','UPDATE',1),(149,'portfolio','DELETE_LOANNOTE_CHECKER','LOANNOTE','DELETE',1),(150,'portfolio','READ_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','READ',0),(151,'portfolio','CREATE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','CREATE',1),(152,'portfolio','UPDATE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','UPDATE',1),(153,'portfolio','DELETE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','DELETE',1),(154,'portfolio','CREATE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','CREATE',1),(155,'portfolio','UPDATE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','UPDATE',1),(156,'portfolio','DELETE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','DELETE',1),(157,'portfolio','READ_DEPOSITNOTE','DEPOSITNOTE','READ',0),(158,'portfolio','CREATE_DEPOSITNOTE','DEPOSITNOTE','CREATE',1),(159,'portfolio','UPDATE_DEPOSITNOTE','DEPOSITNOTE','UPDATE',1),(160,'portfolio','DELETE_DEPOSITNOTE','DEPOSITNOTE','DELETE',1),(161,'portfolio','CREATE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','CREATE',1),(162,'portfolio','UPDATE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','UPDATE',1),(163,'portfolio','DELETE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','DELETE',1),(164,'portfolio','READ_SAVINGNOTE','SAVINGNOTE','READ',0),(165,'portfolio','CREATE_SAVINGNOTE','SAVINGNOTE','CREATE',1),(166,'portfolio','UPDATE_SAVINGNOTE','SAVINGNOTE','UPDATE',1),(167,'portfolio','DELETE_SAVINGNOTE','SAVINGNOTE','DELETE',1),(168,'portfolio','CREATE_SAVINGNOTE_CHECKER','SAVINGNOTE','CREATE',1),(169,'portfolio','UPDATE_SAVINGNOTE_CHECKER','SAVINGNOTE','UPDATE',1),(170,'portfolio','DELETE_SAVINGNOTE_CHECKER','SAVINGNOTE','DELETE',1),(171,'portfolio','READ_CLIENTIDENTIFIER','CLIENTIDENTIFIER','READ',0),(172,'portfolio','CREATE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','CREATE',1),(173,'portfolio','CREATE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','CREATE',1),(174,'portfolio','UPDATE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','UPDATE',1),(175,'portfolio','UPDATE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','UPDATE',1),(176,'portfolio','DELETE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','DELETE',1),(177,'portfolio','DELETE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','DELETE',1),(178,'portfolio','READ_DOCUMENT','DOCUMENT','READ',0),(179,'portfolio','CREATE_DOCUMENT','DOCUMENT','CREATE',1),(180,'portfolio','CREATE_DOCUMENT_CHECKER','DOCUMENT','CREATE',1),(181,'portfolio','UPDATE_DOCUMENT','DOCUMENT','UPDATE',1),(182,'portfolio','UPDATE_DOCUMENT_CHECKER','DOCUMENT','UPDATE',1),(183,'portfolio','DELETE_DOCUMENT','DOCUMENT','DELETE',1),(184,'portfolio','DELETE_DOCUMENT_CHECKER','DOCUMENT','DELETE',1),(185,'portfolio','READ_GROUP','GROUP','READ',0),(186,'portfolio','CREATE_GROUP','GROUP','CREATE',1),(187,'portfolio','CREATE_GROUP_CHECKER','GROUP','CREATE',1),(188,'portfolio','UPDATE_GROUP','GROUP','UPDATE',1),(189,'portfolio','UPDATE_GROUP_CHECKER','GROUP','UPDATE',1),(190,'portfolio','DELETE_GROUP','GROUP','DELETE',1),(191,'portfolio','DELETE_GROUP_CHECKER','GROUP','DELETE',1),(192,'portfolio','UNASSIGNSTAFF_GROUP','GROUP','UNASSIGNSTAFF',1),(193,'portfolio','UNASSIGNSTAFF_GROUP_CHECKER','GROUP','UNASSIGNSTAFF',1),(194,'portfolio','CREATE_LOANCHARGE','LOANCHARGE','CREATE',1),(195,'portfolio','CREATE_LOANCHARGE_CHECKER','LOANCHARGE','CREATE',1),(196,'portfolio','UPDATE_LOANCHARGE','LOANCHARGE','UPDATE',1),(197,'portfolio','UPDATE_LOANCHARGE_CHECKER','LOANCHARGE','UPDATE',1),(198,'portfolio','DELETE_LOANCHARGE','LOANCHARGE','DELETE',1),(199,'portfolio','DELETE_LOANCHARGE_CHECKER','LOANCHARGE','DELETE',1),(200,'portfolio','WAIVE_LOANCHARGE','LOANCHARGE','WAIVE',1),(201,'portfolio','WAIVE_LOANCHARGE_CHECKER','LOANCHARGE','WAIVE',1),(202,'portfolio','READ_DEPOSITACCOUNT','DEPOSITACCOUNT','READ',0),(203,'portfolio','CREATE_DEPOSITACCOUNT','DEPOSITACCOUNT','CREATE',1),(204,'portfolio','CREATE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','CREATE',1),(205,'portfolio','UPDATE_DEPOSITACCOUNT','DEPOSITACCOUNT','UPDATE',1),(206,'portfolio','UPDATE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','UPDATE',1),(207,'portfolio','DELETE_DEPOSITACCOUNT','DEPOSITACCOUNT','DELETE',1),(208,'portfolio','DELETE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','DELETE',1),(209,'portfolio','READ_SAVINGSACCOUNT','SAVINGSACCOUNT','READ',0),(210,'portfolio','CREATE_SAVINGSACCOUNT','SAVINGSACCOUNT','CREATE',1),(211,'portfolio','CREATE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','CREATE',1),(212,'portfolio','UPDATE_SAVINGSACCOUNT','SAVINGSACCOUNT','UPDATE',1),(213,'portfolio','UPDATE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','UPDATE',1),(214,'portfolio','DELETE_SAVINGSACCOUNT','SAVINGSACCOUNT','DELETE',1),(215,'portfolio','DELETE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','DELETE',1),(216,'portfolio','READ_GUARANTOR','GUARANTOR','READ',0),(217,'portfolio','CREATE_GUARANTOR','GUARANTOR','CREATE',1),(218,'portfolio','CREATE_GUARANTOR_CHECKER','GUARANTOR','CREATE',1),(219,'portfolio','UPDATE_GUARANTOR','GUARANTOR','UPDATE',1),(220,'portfolio','UPDATE_GUARANTOR_CHECKER','GUARANTOR','UPDATE',1),(221,'portfolio','DELETE_GUARANTOR','GUARANTOR','DELETE',1),(222,'portfolio','DELETE_GUARANTOR_CHECKER','GUARANTOR','DELETE',1),(223,'transaction_loan','APPROVE_LOAN','LOAN','APPROVE',1),(224,'transaction_loan','APPROVEINPAST_LOAN','LOAN','APPROVEINPAST',1),(225,'transaction_loan','REJECT_LOAN','LOAN','REJECT',1),(226,'transaction_loan','REJECTINPAST_LOAN','LOAN','REJECTINPAST',1),(227,'transaction_loan','WITHDRAW_LOAN','LOAN','WITHDRAW',1),(228,'transaction_loan','WITHDRAWINPAST_LOAN','LOAN','WITHDRAWINPAST',1),(229,'transaction_loan','APPROVALUNDO_LOAN','LOAN','APPROVALUNDO',1),(230,'transaction_loan','DISBURSE_LOAN','LOAN','DISBURSE',1),(231,'transaction_loan','DISBURSEINPAST_LOAN','LOAN','DISBURSEINPAST',1),(232,'transaction_loan','DISBURSALUNDO_LOAN','LOAN','DISBURSALUNDO',1),(233,'transaction_loan','REPAYMENT_LOAN','LOAN','REPAYMENT',1),(234,'transaction_loan','REPAYMENTINPAST_LOAN','LOAN','REPAYMENTINPAST',1),(235,'transaction_loan','ADJUST_LOAN','LOAN','ADJUST',1),(236,'transaction_loan','WAIVEINTERESTPORTION_LOAN','LOAN','WAIVEINTERESTPORTION',1),(237,'transaction_loan','WRITEOFF_LOAN','LOAN','WRITEOFF',1),(238,'transaction_loan','CLOSE_LOAN','LOAN','CLOSE',1),(239,'transaction_loan','CLOSEASRESCHEDULED_LOAN','LOAN','CLOSEASRESCHEDULED',1),(240,'transaction_loan','UPDATELOANOFFICER_LOAN','LOAN','UPDATELOANOFFICER',1),(241,'transaction_loan','UPDATELOANOFFICER_LOAN_CHECKER','LOAN','UPDATELOANOFFICER',1),(242,'transaction_loan','REMOVELOANOFFICER_LOAN','LOAN','REMOVELOANOFFICER',1),(243,'transaction_loan','REMOVELOANOFFICER_LOAN_CHECKER','LOAN','REMOVELOANOFFICER',1),(244,'transaction_loan','BULKREASSIGN_LOAN','LOAN','BULKREASSIGN',1),(245,'transaction_loan','BULKREASSIGN_LOAN_CHECKER','LOAN','BULKREASSIGN',1),(246,'transaction_loan','APPROVE_LOAN_CHECKER','LOAN','APPROVE',1),(247,'transaction_loan','APPROVEINPAST_LOAN_CHECKER','LOAN','APPROVEINPAST',1),(248,'transaction_loan','REJECT_LOAN_CHECKER','LOAN','REJECT',1),(249,'transaction_loan','REJECTINPAST_LOAN_CHECKER','LOAN','REJECTINPAST',1),(250,'transaction_loan','WITHDRAW_LOAN_CHECKER','LOAN','WITHDRAW',1),(251,'transaction_loan','WITHDRAWINPAST_LOAN_CHECKER','LOAN','WITHDRAWINPAST',1),(252,'transaction_loan','APPROVALUNDO_LOAN_CHECKER','LOAN','APPROVALUNDO',1),(253,'transaction_loan','DISBURSE_LOAN_CHECKER','LOAN','DISBURSE',1),(254,'transaction_loan','DISBURSEINPAST_LOAN_CHECKER','LOAN','DISBURSEINPAST',1),(255,'transaction_loan','DISBURSALUNDO_LOAN_CHECKER','LOAN','DISBURSALUNDO',1),(256,'transaction_loan','REPAYMENT_LOAN_CHECKER','LOAN','REPAYMENT',1),(257,'transaction_loan','REPAYMENTINPAST_LOAN_CHECKER','LOAN','REPAYMENTINPAST',1),(258,'transaction_loan','ADJUST_LOAN_CHECKER','LOAN','ADJUST',1),(259,'transaction_loan','WAIVEINTERESTPORTION_LOAN_CHECKER','LOAN','WAIVEINTERESTPORTION',1),(260,'transaction_loan','WRITEOFF_LOAN_CHECKER','LOAN','WRITEOFF',1),(261,'transaction_loan','CLOSE_LOAN_CHECKER','LOAN','CLOSE',1),(262,'transaction_loan','CLOSEASRESCHEDULED_LOAN_CHECKER','LOAN','CLOSEASRESCHEDULED',1),(263,'transaction_deposit','APPROVE_DEPOSITACCOUNT','DEPOSITACCOUNT','APPROVE',1),(264,'transaction_deposit','REJECT_DEPOSITACCOUNT','DEPOSITACCOUNT','REJECT',1),(265,'transaction_deposit','WITHDRAW_DEPOSITACCOUNT','DEPOSITACCOUNT','WITHDRAW',1),(266,'transaction_deposit','APPROVALUNDO_DEPOSITACCOUNT','DEPOSITACCOUNT','APPROVALUNDO',1),(267,'transaction_deposit','WITHDRAWAL_DEPOSITACCOUNT','DEPOSITACCOUNT','WITHDRAWAL',1),(268,'transaction_deposit','INTEREST_DEPOSITACCOUNT','DEPOSITACCOUNT','INTEREST',1),(269,'transaction_deposit','RENEW_DEPOSITACCOUNT','DEPOSITACCOUNT','RENEW',1),(270,'transaction_deposit','APPROVE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','APPROVE',1),(271,'transaction_deposit','REJECT_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','REJECT',1),(272,'transaction_deposit','WITHDRAW_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','WITHDRAW',1),(273,'transaction_deposit','APPROVALUNDO_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','APPROVALUNDO',1),(274,'transaction_deposit','WITHDRAWAL_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','WITHDRAWAL',1),(275,'transaction_deposit','INTEREST_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','INTEREST',1),(276,'transaction_deposit','RENEW_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','RENEW',1),(277,'accounting','CREATE_GLACCOUNT','GLACCOUNT','CREATE',1),(278,'accounting','UPDATE_GLACCOUNT','GLACCOUNT','UPDATE',1),(279,'accounting','DELETE_GLACCOUNT','GLACCOUNT','DELETE',1),(280,'accounting','CREATE_GLCLOSURE','GLCLOSURE','CREATE',1),(281,'accounting','UPDATE_GLCLOSURE','GLCLOSURE','UPDATE',1),(282,'accounting','DELETE_GLCLOSURE','GLCLOSURE','DELETE',1),(283,'accounting','CREATE_JOURNALENTRY','JOURNALENTRY','CREATE',1),(284,'accounting','REVERSE_JOURNALENTRY','JOURNALENTRY','REVERSE',1),(285,'report','READ_Active Loans - Details','Active Loans - Details','READ',0),(286,'report','READ_Active Loans - Summary','Active Loans - Summary','READ',0),(287,'report','READ_Active Loans by Disbursal Period','Active Loans by Disbursal Period','READ',0),(288,'report','READ_Active Loans in last installment','Active Loans in last installment','READ',0),(289,'report','READ_Active Loans in last installment Summary','Active Loans in last installment Summary','READ',0),(290,'report','READ_Active Loans Passed Final Maturity','Active Loans Passed Final Maturity','READ',0),(291,'report','READ_Active Loans Passed Final Maturity Summary','Active Loans Passed Final Maturity Summary','READ',0),(292,'report','READ_Aging Detail','Aging Detail','READ',0),(293,'report','READ_Aging Summary (Arrears in Months)','Aging Summary (Arrears in Months)','READ',0),(294,'report','READ_Aging Summary (Arrears in Weeks)','Aging Summary (Arrears in Weeks)','READ',0),(295,'report','READ_Balance Sheet','Balance Sheet','READ',0),(296,'report','READ_Branch Expected Cash Flow','Branch Expected Cash Flow','READ',0),(297,'report','READ_Client Listing','Client Listing','READ',0),(298,'report','READ_Client Loans Listing','Client Loans Listing','READ',0),(299,'report','READ_Expected Payments By Date - Basic','Expected Payments By Date - Basic','READ',0),(300,'report','READ_Expected Payments By Date - Formatted','Expected Payments By Date - Formatted','READ',0),(301,'report','READ_Funds Disbursed Between Dates Summary','Funds Disbursed Between Dates Summary','READ',0),(302,'report','READ_Funds Disbursed Between Dates Summary by Office','Funds Disbursed Between Dates Summary by Office','READ',0),(303,'report','READ_Income Statement','Income Statement','READ',0),(304,'report','READ_Loan Account Schedule','Loan Account Schedule','READ',0),(305,'report','READ_Loans Awaiting Disbursal','Loans Awaiting Disbursal','READ',0),(306,'report','READ_Loans Awaiting Disbursal Summary','Loans Awaiting Disbursal Summary','READ',0),(307,'report','READ_Loans Awaiting Disbursal Summary by Month','Loans Awaiting Disbursal Summary by Month','READ',0),(308,'report','READ_Loans Pending Approval','Loans Pending Approval','READ',0),(309,'report','READ_Obligation Met Loans Details','Obligation Met Loans Details','READ',0),(310,'report','READ_Obligation Met Loans Summary','Obligation Met Loans Summary','READ',0),(311,'report','READ_Portfolio at Risk','Portfolio at Risk','READ',0),(312,'report','READ_Portfolio at Risk by Branch','Portfolio at Risk by Branch','READ',0),(313,'report','READ_Rescheduled Loans','Rescheduled Loans','READ',0),(314,'report','READ_Trial Balance','Trial Balance','READ',0),(315,'report','READ_Written-Off Loans','Written-Off Loans','READ',0),(316,'datatable','CREATE_client additional data','client additional data','CREATE',1),(317,'datatable','CREATE_impact measurement','impact measurement','CREATE',1),(318,'datatable','CREATE_loan additional data','loan additional data','CREATE',1),(319,'datatable','READ_client additional data','client additional data','READ',1),(320,'datatable','READ_impact measurement','impact measurement','READ',1),(321,'datatable','READ_loan additional data','loan additional data','READ',1),(322,'datatable','UPDATE_client additional data','client additional data','UPDATE',1),(323,'datatable','UPDATE_impact measurement','impact measurement','UPDATE',1),(324,'datatable','UPDATE_loan additional data','loan additional data','UPDATE',1),(325,'datatable','DELETE_client additional data','client additional data','DELETE',1),(326,'datatable','DELETE_impact measurement','impact measurement','DELETE',1),(327,'datatable','DELETE_loan additional data','loan additional data','DELETE',1); +INSERT INTO `m_permission` VALUES (1,'special','ALL_FUNCTIONS',NULL,NULL,0),(2,'special','ALL_FUNCTIONS_READ',NULL,NULL,0),(3,'special','CHECKER_SUPER_USER',NULL,NULL,0),(4,'special','REPORTING_SUPER_USER',NULL,NULL,0),(5,'authorisation','READ_PERMISSION','PERMISSION','READ',0),(6,'authorisation','PERMISSIONS_ROLE','ROLE','PERMISSIONS',0),(7,'authorisation','CREATE_ROLE','ROLE','CREATE',0),(8,'authorisation','CREATE_ROLE_CHECKER','ROLE','CREATE',0),(9,'authorisation','READ_ROLE','ROLE','READ',0),(10,'authorisation','UPDATE_ROLE','ROLE','UPDATE',0),(11,'authorisation','UPDATE_ROLE_CHECKER','ROLE','UPDATE',0),(12,'authorisation','DELETE_ROLE','ROLE','DELETE',0),(13,'authorisation','DELETE_ROLE_CHECKER','ROLE','DELETE',0),(14,'authorisation','CREATE_USER','USER','CREATE',0),(15,'authorisation','CREATE_USER_CHECKER','USER','CREATE',0),(16,'authorisation','READ_USER','USER','READ',0),(17,'authorisation','UPDATE_USER','USER','UPDATE',0),(18,'authorisation','UPDATE_USER_CHECKER','USER','UPDATE',0),(19,'authorisation','DELETE_USER','USER','DELETE',0),(20,'authorisation','DELETE_USER_CHECKER','USER','DELETE',0),(21,'configuration','READ_CONFIGURATION','CONFIGURATION','READ',0),(22,'configuration','UPDATE_CONFIGURATION','CONFIGURATION','UPDATE',0),(23,'configuration','UPDATE_CONFIGURATION_CHECKER','CONFIGURATION','UPDATE',0),(24,'configuration','READ_CODE','CODE','READ',0),(25,'configuration','CREATE_CODE','CODE','CREATE',0),(26,'configuration','CREATE_CODE_CHECKER','CODE','CREATE',0),(27,'configuration','UPDATE_CODE','CODE','UPDATE',0),(28,'configuration','UPDATE_CODE_CHECKER','CODE','UPDATE',0),(29,'configuration','DELETE_CODE','CODE','DELETE',0),(30,'configuration','DELETE_CODE_CHECKER','CODE','DELETE',0),(31,'configuration','READ_CODEVALUE','CODEVALUE','READ',0),(32,'configuration','CREATE_CODEVALUE','CODEVALUE','CREATE',0),(33,'configuration','CREATE_CODEVALUE_CHECKER','CODEVALUE','CREATE',0),(34,'configuration','UPDATE_CODEVALUE','CODEVALUE','UPDATE',0),(35,'configuration','UPDATE_CODEVALUE_CHECKER','CODEVALUE','UPDATE',0),(36,'configuration','DELETE_CODEVALUE','CODEVALUE','DELETE',0),(37,'configuration','DELETE_CODEVALUE_CHECKER','CODEVALUE','DELETE',0),(38,'configuration','READ_CURRENCY','CURRENCY','READ',0),(39,'configuration','UPDATE_CURRENCY','CURRENCY','UPDATE',0),(40,'configuration','UPDATE_CURRENCY_CHECKER','CURRENCY','UPDATE',0),(41,'configuration','UPDATE_PERMISSION','PERMISSION','UPDATE',0),(42,'configuration','UPDATE_PERMISSION_CHECKER','PERMISSION','UPDATE',0),(43,'configuration','READ_DATATABLE','DATATABLE','READ',0),(44,'configuration','REGISTER_DATATABLE','DATATABLE','REGISTER',0),(45,'configuration','REGISTER_DATATABLE_CHECKER','DATATABLE','REGISTER',0),(46,'configuration','DEREGISTER_DATATABLE','DATATABLE','DEREGISTER',0),(47,'configuration','DEREGISTER_DATATABLE_CHECKER','DATATABLE','DEREGISTER',0),(48,'configuration','READ_AUDIT','AUDIT','READ',0),(49,'configuration','CREATE_CALENDAR','CALENDAR','CREATE',0),(50,'configuration','READ_CALENDAR','CALENDAR','READ',0),(51,'configuration','UPDATE_CALENDAR','CALENDAR','UPDATE',0),(52,'configuration','DELETE_CALENDAR','CALENDAR','DELETE',0),(53,'configuration','CREATE_CALENDAR_CHECKER','CALENDAR','CREATE',0),(54,'configuration','UPDATE_CALENDAR_CHECKER','CALENDAR','UPDATE',0),(55,'configuration','DELETE_CALENDAR_CHECKER','CALENDAR','DELETE',0),(56,'organisation','READ_MAKERCHECKER','MAKERCHECKER','READ',0),(57,'organisation','READ_CHARGE','CHARGE','READ',0),(58,'organisation','CREATE_CHARGE','CHARGE','CREATE',0),(59,'organisation','CREATE_CHARGE_CHECKER','CHARGE','CREATE',0),(60,'organisation','UPDATE_CHARGE','CHARGE','UPDATE',0),(61,'organisation','UPDATE_CHARGE_CHECKER','CHARGE','UPDATE',0),(62,'organisation','DELETE_CHARGE','CHARGE','DELETE',0),(63,'organisation','DELETE_CHARGE_CHECKER','CHARGE','DELETE',0),(64,'organisation','READ_FUND','FUND','READ',0),(65,'organisation','CREATE_FUND','FUND','CREATE',0),(66,'organisation','CREATE_FUND_CHECKER','FUND','CREATE',0),(67,'organisation','UPDATE_FUND','FUND','UPDATE',0),(68,'organisation','UPDATE_FUND_CHECKER','FUND','UPDATE',0),(69,'organisation','DELETE_FUND','FUND','DELETE',0),(70,'organisation','DELETE_FUND_CHECKER','FUND','DELETE',0),(71,'organisation','READ_LOANPRODUCT','LOANPRODUCT','READ',0),(72,'organisation','CREATE_LOANPRODUCT','LOANPRODUCT','CREATE',0),(73,'organisation','CREATE_LOANPRODUCT_CHECKER','LOANPRODUCT','CREATE',0),(74,'organisation','UPDATE_LOANPRODUCT','LOANPRODUCT','UPDATE',0),(75,'organisation','UPDATE_LOANPRODUCT_CHECKER','LOANPRODUCT','UPDATE',0),(76,'organisation','DELETE_LOANPRODUCT','LOANPRODUCT','DELETE',0),(77,'organisation','DELETE_LOANPRODUCT_CHECKER','LOANPRODUCT','DELETE',0),(78,'organisation','READ_OFFICE','OFFICE','READ',0),(79,'organisation','CREATE_OFFICE','OFFICE','CREATE',0),(80,'organisation','CREATE_OFFICE_CHECKER','OFFICE','CREATE',0),(81,'organisation','UPDATE_OFFICE','OFFICE','UPDATE',0),(82,'organisation','UPDATE_OFFICE_CHECKER','OFFICE','UPDATE',0),(83,'organisation','READ_OFFICETRANSACTION','OFFICETRANSACTION','READ',0),(84,'organisation','DELETE_OFFICE_CHECKER','OFFICE','DELETE',0),(85,'organisation','CREATE_OFFICETRANSACTION','OFFICETRANSACTION','CREATE',0),(86,'organisation','CREATE_OFFICETRANSACTION_CHECKER','OFFICETRANSACTION','CREATE',0),(87,'organisation','DELETE_OFFICETRANSACTION','OFFICETRANSACTION','DELETE',0),(88,'organisation','DELETE_OFFICETRANSACTION_CHECKER','OFFICETRANSACTION','DELETE',0),(89,'organisation','READ_STAFF','STAFF','READ',0),(90,'organisation','CREATE_STAFF','STAFF','CREATE',0),(91,'organisation','CREATE_STAFF_CHECKER','STAFF','CREATE',0),(92,'organisation','UPDATE_STAFF','STAFF','UPDATE',0),(93,'organisation','UPDATE_STAFF_CHECKER','STAFF','UPDATE',0),(94,'organisation','DELETE_STAFF','STAFF','DELETE',0),(95,'organisation','DELETE_STAFF_CHECKER','STAFF','DELETE',0),(96,'organisation','READ_SAVINGSPRODUCT','SAVINGSPRODUCT','READ',0),(97,'organisation','CREATE_SAVINGSPRODUCT','SAVINGSPRODUCT','CREATE',0),(98,'organisation','CREATE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','CREATE',0),(99,'organisation','UPDATE_SAVINGSPRODUCT','SAVINGSPRODUCT','UPDATE',0),(100,'organisation','UPDATE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','UPDATE',0),(101,'organisation','DELETE_SAVINGSPRODUCT','SAVINGSPRODUCT','DELETE',0),(102,'organisation','DELETE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','DELETE',0),(103,'organisation','READ_DEPOSITPRODUCT','DEPOSITPRODUCT','READ',0),(104,'organisation','CREATE_DEPOSITPRODUCT','DEPOSITPRODUCT','CREATE',0),(105,'organisation','CREATE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','CREATE',0),(106,'organisation','UPDATE_DEPOSITPRODUCT','DEPOSITPRODUCT','UPDATE',0),(107,'organisation','UPDATE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','UPDATE',0),(108,'organisation','DELETE_DEPOSITPRODUCT','DEPOSITPRODUCT','DELETE',0),(109,'organisation','DELETE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','DELETE',0),(110,'portfolio','READ_LOAN','LOAN','READ',0),(111,'portfolio','CREATE_LOAN','LOAN','CREATE',0),(112,'portfolio','CREATE_LOAN_CHECKER','LOAN','CREATE',0),(113,'portfolio','UPDATE_LOAN','LOAN','UPDATE',0),(114,'portfolio','UPDATE_LOAN_CHECKER','LOAN','UPDATE',0),(115,'portfolio','DELETE_LOAN','LOAN','DELETE',0),(116,'portfolio','DELETE_LOAN_CHECKER','LOAN','DELETE',0),(117,'portfolio','READ_CLIENT','CLIENT','READ',0),(118,'portfolio','CREATE_CLIENT','CLIENT','CREATE',0),(119,'portfolio','CREATE_CLIENT_CHECKER','CLIENT','CREATE',0),(120,'portfolio','UPDATE_CLIENT','CLIENT','UPDATE',0),(121,'portfolio','UPDATE_CLIENT_CHECKER','CLIENT','UPDATE',0),(122,'portfolio','DELETE_CLIENT','CLIENT','DELETE',0),(123,'portfolio','DELETE_CLIENT_CHECKER','CLIENT','DELETE',0),(124,'portfolio','READ_CLIENTIMAGE','CLIENTIMAGE','READ',0),(125,'portfolio','CREATE_CLIENTIMAGE','CLIENTIMAGE','CREATE',0),(126,'portfolio','CREATE_CLIENTIMAGE_CHECKER','CLIENTIMAGE','CREATE',0),(127,'portfolio','DELETE_CLIENTIMAGE','CLIENTIMAGE','DELETE',0),(128,'portfolio','DELETE_CLIENTIMAGE_CHECKER','CLIENTIMAGE','DELETE',0),(129,'portfolio','READ_CLIENTNOTE','CLIENTNOTE','READ',0),(130,'portfolio','CREATE_CLIENTNOTE','CLIENTNOTE','CREATE',0),(131,'portfolio','CREATE_CLIENTNOTE_CHECKER','CLIENTNOTE','CREATE',0),(132,'portfolio','UPDATE_CLIENTNOTE','CLIENTNOTE','UPDATE',0),(133,'portfolio','UPDATE_CLIENTNOTE_CHECKER','CLIENTNOTE','UPDATE',0),(134,'portfolio','DELETE_CLIENTNOTE','CLIENTNOTE','DELETE',0),(135,'portfolio','DELETE_CLIENTNOTE_CHECKER','CLIENTNOTE','DELETE',0),(136,'portfolio','READ_GROUPNOTE','GROUPNOTE','READ',0),(137,'portfolio','CREATE_GROUPNOTE','GROUPNOTE','CREATE',0),(138,'portfolio','UPDATE_GROUPNOTE','GROUPNOTE','UPDATE',0),(139,'portfolio','DELETE_GROUPNOTE','GROUPNOTE','DELETE',0),(140,'portfolio','CREATE_GROUPNOTE_CHECKER','GROUPNOTE','CREATE',0),(141,'portfolio','UPDATE_GROUPNOTE_CHECKER','GROUPNOTE','UPDATE',0),(142,'portfolio','DELETE_GROUPNOTE_CHECKER','GROUPNOTE','DELETE',0),(143,'portfolio','READ_LOANNOTE','LOANNOTE','READ',0),(144,'portfolio','CREATE_LOANNOTE','LOANNOTE','CREATE',0),(145,'portfolio','UPDATE_LOANNOTE','LOANNOTE','UPDATE',0),(146,'portfolio','DELETE_LOANNOTE','LOANNOTE','DELETE',0),(147,'portfolio','CREATE_LOANNOTE_CHECKER','LOANNOTE','CREATE',0),(148,'portfolio','UPDATE_LOANNOTE_CHECKER','LOANNOTE','UPDATE',0),(149,'portfolio','DELETE_LOANNOTE_CHECKER','LOANNOTE','DELETE',0),(150,'portfolio','READ_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','READ',0),(151,'portfolio','CREATE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','CREATE',0),(152,'portfolio','UPDATE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','UPDATE',0),(153,'portfolio','DELETE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','DELETE',0),(154,'portfolio','CREATE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','CREATE',0),(155,'portfolio','UPDATE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','UPDATE',0),(156,'portfolio','DELETE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','DELETE',0),(157,'portfolio','READ_DEPOSITNOTE','DEPOSITNOTE','READ',0),(158,'portfolio','CREATE_DEPOSITNOTE','DEPOSITNOTE','CREATE',0),(159,'portfolio','UPDATE_DEPOSITNOTE','DEPOSITNOTE','UPDATE',0),(160,'portfolio','DELETE_DEPOSITNOTE','DEPOSITNOTE','DELETE',0),(161,'portfolio','CREATE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','CREATE',0),(162,'portfolio','UPDATE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','UPDATE',0),(163,'portfolio','DELETE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','DELETE',0),(164,'portfolio','READ_SAVINGNOTE','SAVINGNOTE','READ',0),(165,'portfolio','CREATE_SAVINGNOTE','SAVINGNOTE','CREATE',0),(166,'portfolio','UPDATE_SAVINGNOTE','SAVINGNOTE','UPDATE',0),(167,'portfolio','DELETE_SAVINGNOTE','SAVINGNOTE','DELETE',0),(168,'portfolio','CREATE_SAVINGNOTE_CHECKER','SAVINGNOTE','CREATE',0),(169,'portfolio','UPDATE_SAVINGNOTE_CHECKER','SAVINGNOTE','UPDATE',0),(170,'portfolio','DELETE_SAVINGNOTE_CHECKER','SAVINGNOTE','DELETE',0),(171,'portfolio','READ_CLIENTIDENTIFIER','CLIENTIDENTIFIER','READ',0),(172,'portfolio','CREATE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','CREATE',0),(173,'portfolio','CREATE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','CREATE',0),(174,'portfolio','UPDATE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','UPDATE',0),(175,'portfolio','UPDATE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','UPDATE',0),(176,'portfolio','DELETE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','DELETE',0),(177,'portfolio','DELETE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','DELETE',0),(178,'portfolio','READ_DOCUMENT','DOCUMENT','READ',0),(179,'portfolio','CREATE_DOCUMENT','DOCUMENT','CREATE',0),(180,'portfolio','CREATE_DOCUMENT_CHECKER','DOCUMENT','CREATE',0),(181,'portfolio','UPDATE_DOCUMENT','DOCUMENT','UPDATE',0),(182,'portfolio','UPDATE_DOCUMENT_CHECKER','DOCUMENT','UPDATE',0),(183,'portfolio','DELETE_DOCUMENT','DOCUMENT','DELETE',0),(184,'portfolio','DELETE_DOCUMENT_CHECKER','DOCUMENT','DELETE',0),(185,'portfolio','READ_GROUP','GROUP','READ',0),(186,'portfolio','CREATE_GROUP','GROUP','CREATE',0),(187,'portfolio','CREATE_GROUP_CHECKER','GROUP','CREATE',0),(188,'portfolio','UPDATE_GROUP','GROUP','UPDATE',0),(189,'portfolio','UPDATE_GROUP_CHECKER','GROUP','UPDATE',0),(190,'portfolio','DELETE_GROUP','GROUP','DELETE',0),(191,'portfolio','DELETE_GROUP_CHECKER','GROUP','DELETE',0),(192,'portfolio','UNASSIGNSTAFF_GROUP','GROUP','UNASSIGNSTAFF',0),(193,'portfolio','UNASSIGNSTAFF_GROUP_CHECKER','GROUP','UNASSIGNSTAFF',0),(194,'portfolio','CREATE_LOANCHARGE','LOANCHARGE','CREATE',0),(195,'portfolio','CREATE_LOANCHARGE_CHECKER','LOANCHARGE','CREATE',0),(196,'portfolio','UPDATE_LOANCHARGE','LOANCHARGE','UPDATE',0),(197,'portfolio','UPDATE_LOANCHARGE_CHECKER','LOANCHARGE','UPDATE',0),(198,'portfolio','DELETE_LOANCHARGE','LOANCHARGE','DELETE',0),(199,'portfolio','DELETE_LOANCHARGE_CHECKER','LOANCHARGE','DELETE',0),(200,'portfolio','WAIVE_LOANCHARGE','LOANCHARGE','WAIVE',0),(201,'portfolio','WAIVE_LOANCHARGE_CHECKER','LOANCHARGE','WAIVE',0),(202,'portfolio','READ_DEPOSITACCOUNT','DEPOSITACCOUNT','READ',0),(203,'portfolio','CREATE_DEPOSITACCOUNT','DEPOSITACCOUNT','CREATE',0),(204,'portfolio','CREATE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','CREATE',0),(205,'portfolio','UPDATE_DEPOSITACCOUNT','DEPOSITACCOUNT','UPDATE',0),(206,'portfolio','UPDATE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','UPDATE',0),(207,'portfolio','DELETE_DEPOSITACCOUNT','DEPOSITACCOUNT','DELETE',0),(208,'portfolio','DELETE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','DELETE',0),(209,'portfolio','READ_SAVINGSACCOUNT','SAVINGSACCOUNT','READ',0),(210,'portfolio','CREATE_SAVINGSACCOUNT','SAVINGSACCOUNT','CREATE',0),(211,'portfolio','CREATE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','CREATE',0),(212,'portfolio','UPDATE_SAVINGSACCOUNT','SAVINGSACCOUNT','UPDATE',0),(213,'portfolio','UPDATE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','UPDATE',0),(214,'portfolio','DELETE_SAVINGSACCOUNT','SAVINGSACCOUNT','DELETE',0),(215,'portfolio','DELETE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','DELETE',0),(216,'portfolio','READ_GUARANTOR','GUARANTOR','READ',0),(217,'portfolio','CREATE_GUARANTOR','GUARANTOR','CREATE',0),(218,'portfolio','CREATE_GUARANTOR_CHECKER','GUARANTOR','CREATE',0),(219,'portfolio','UPDATE_GUARANTOR','GUARANTOR','UPDATE',0),(220,'portfolio','UPDATE_GUARANTOR_CHECKER','GUARANTOR','UPDATE',0),(221,'portfolio','DELETE_GUARANTOR','GUARANTOR','DELETE',0),(222,'portfolio','DELETE_GUARANTOR_CHECKER','GUARANTOR','DELETE',0),(223,'transaction_loan','APPROVE_LOAN','LOAN','APPROVE',0),(224,'transaction_loan','APPROVEINPAST_LOAN','LOAN','APPROVEINPAST',0),(225,'transaction_loan','REJECT_LOAN','LOAN','REJECT',0),(226,'transaction_loan','REJECTINPAST_LOAN','LOAN','REJECTINPAST',0),(227,'transaction_loan','WITHDRAW_LOAN','LOAN','WITHDRAW',0),(228,'transaction_loan','WITHDRAWINPAST_LOAN','LOAN','WITHDRAWINPAST',0),(229,'transaction_loan','APPROVALUNDO_LOAN','LOAN','APPROVALUNDO',0),(230,'transaction_loan','DISBURSE_LOAN','LOAN','DISBURSE',0),(231,'transaction_loan','DISBURSEINPAST_LOAN','LOAN','DISBURSEINPAST',0),(232,'transaction_loan','DISBURSALUNDO_LOAN','LOAN','DISBURSALUNDO',0),(233,'transaction_loan','REPAYMENT_LOAN','LOAN','REPAYMENT',0),(234,'transaction_loan','REPAYMENTINPAST_LOAN','LOAN','REPAYMENTINPAST',0),(235,'transaction_loan','ADJUST_LOAN','LOAN','ADJUST',0),(236,'transaction_loan','WAIVEINTERESTPORTION_LOAN','LOAN','WAIVEINTERESTPORTION',0),(237,'transaction_loan','WRITEOFF_LOAN','LOAN','WRITEOFF',0),(238,'transaction_loan','CLOSE_LOAN','LOAN','CLOSE',0),(239,'transaction_loan','CLOSEASRESCHEDULED_LOAN','LOAN','CLOSEASRESCHEDULED',0),(240,'transaction_loan','UPDATELOANOFFICER_LOAN','LOAN','UPDATELOANOFFICER',0),(241,'transaction_loan','UPDATELOANOFFICER_LOAN_CHECKER','LOAN','UPDATELOANOFFICER',0),(242,'transaction_loan','REMOVELOANOFFICER_LOAN','LOAN','REMOVELOANOFFICER',0),(243,'transaction_loan','REMOVELOANOFFICER_LOAN_CHECKER','LOAN','REMOVELOANOFFICER',0),(244,'transaction_loan','BULKREASSIGN_LOAN','LOAN','BULKREASSIGN',0),(245,'transaction_loan','BULKREASSIGN_LOAN_CHECKER','LOAN','BULKREASSIGN',0),(246,'transaction_loan','APPROVE_LOAN_CHECKER','LOAN','APPROVE',0),(247,'transaction_loan','APPROVEINPAST_LOAN_CHECKER','LOAN','APPROVEINPAST',0),(248,'transaction_loan','REJECT_LOAN_CHECKER','LOAN','REJECT',0),(249,'transaction_loan','REJECTINPAST_LOAN_CHECKER','LOAN','REJECTINPAST',0),(250,'transaction_loan','WITHDRAW_LOAN_CHECKER','LOAN','WITHDRAW',0),(251,'transaction_loan','WITHDRAWINPAST_LOAN_CHECKER','LOAN','WITHDRAWINPAST',0),(252,'transaction_loan','APPROVALUNDO_LOAN_CHECKER','LOAN','APPROVALUNDO',0),(253,'transaction_loan','DISBURSE_LOAN_CHECKER','LOAN','DISBURSE',0),(254,'transaction_loan','DISBURSEINPAST_LOAN_CHECKER','LOAN','DISBURSEINPAST',0),(255,'transaction_loan','DISBURSALUNDO_LOAN_CHECKER','LOAN','DISBURSALUNDO',0),(256,'transaction_loan','REPAYMENT_LOAN_CHECKER','LOAN','REPAYMENT',0),(257,'transaction_loan','REPAYMENTINPAST_LOAN_CHECKER','LOAN','REPAYMENTINPAST',0),(258,'transaction_loan','ADJUST_LOAN_CHECKER','LOAN','ADJUST',0),(259,'transaction_loan','WAIVEINTERESTPORTION_LOAN_CHECKER','LOAN','WAIVEINTERESTPORTION',0),(260,'transaction_loan','WRITEOFF_LOAN_CHECKER','LOAN','WRITEOFF',0),(261,'transaction_loan','CLOSE_LOAN_CHECKER','LOAN','CLOSE',0),(262,'transaction_loan','CLOSEASRESCHEDULED_LOAN_CHECKER','LOAN','CLOSEASRESCHEDULED',0),(263,'transaction_deposit','APPROVE_DEPOSITACCOUNT','DEPOSITACCOUNT','APPROVE',0),(264,'transaction_deposit','REJECT_DEPOSITACCOUNT','DEPOSITACCOUNT','REJECT',0),(265,'transaction_deposit','WITHDRAW_DEPOSITACCOUNT','DEPOSITACCOUNT','WITHDRAW',0),(266,'transaction_deposit','APPROVALUNDO_DEPOSITACCOUNT','DEPOSITACCOUNT','APPROVALUNDO',0),(267,'transaction_deposit','WITHDRAWAL_DEPOSITACCOUNT','DEPOSITACCOUNT','WITHDRAWAL',0),(268,'transaction_deposit','INTEREST_DEPOSITACCOUNT','DEPOSITACCOUNT','INTEREST',0),(269,'transaction_deposit','RENEW_DEPOSITACCOUNT','DEPOSITACCOUNT','RENEW',0),(270,'transaction_deposit','APPROVE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','APPROVE',0),(271,'transaction_deposit','REJECT_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','REJECT',0),(272,'transaction_deposit','WITHDRAW_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','WITHDRAW',0),(273,'transaction_deposit','APPROVALUNDO_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','APPROVALUNDO',0),(274,'transaction_deposit','WITHDRAWAL_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','WITHDRAWAL',0),(275,'transaction_deposit','INTEREST_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','INTEREST',0),(276,'transaction_deposit','RENEW_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','RENEW',0),(277,'accounting','CREATE_GLACCOUNT','GLACCOUNT','CREATE',0),(278,'accounting','UPDATE_GLACCOUNT','GLACCOUNT','UPDATE',0),(279,'accounting','DELETE_GLACCOUNT','GLACCOUNT','DELETE',0),(280,'accounting','CREATE_GLCLOSURE','GLCLOSURE','CREATE',0),(281,'accounting','UPDATE_GLCLOSURE','GLCLOSURE','UPDATE',0),(282,'accounting','DELETE_GLCLOSURE','GLCLOSURE','DELETE',0),(283,'accounting','CREATE_JOURNALENTRY','JOURNALENTRY','CREATE',0),(284,'accounting','REVERSE_JOURNALENTRY','JOURNALENTRY','REVERSE',0),(285,'report','READ_Active Loans - Details','Active Loans - Details','READ',0),(286,'report','READ_Active Loans - Summary','Active Loans - Summary','READ',0),(287,'report','READ_Active Loans by Disbursal Period','Active Loans by Disbursal Period','READ',0),(288,'report','READ_Active Loans in last installment','Active Loans in last installment','READ',0),(289,'report','READ_Active Loans in last installment Summary','Active Loans in last installment Summary','READ',0),(290,'report','READ_Active Loans Passed Final Maturity','Active Loans Passed Final Maturity','READ',0),(291,'report','READ_Active Loans Passed Final Maturity Summary','Active Loans Passed Final Maturity Summary','READ',0),(292,'report','READ_Aging Detail','Aging Detail','READ',0),(293,'report','READ_Aging Summary (Arrears in Months)','Aging Summary (Arrears in Months)','READ',0),(294,'report','READ_Aging Summary (Arrears in Weeks)','Aging Summary (Arrears in Weeks)','READ',0),(295,'report','READ_Balance Sheet','Balance Sheet','READ',0),(296,'report','READ_Branch Expected Cash Flow','Branch Expected Cash Flow','READ',0),(297,'report','READ_Client Listing','Client Listing','READ',0),(298,'report','READ_Client Loans Listing','Client Loans Listing','READ',0),(299,'report','READ_Expected Payments By Date - Basic','Expected Payments By Date - Basic','READ',0),(300,'report','READ_Expected Payments By Date - Formatted','Expected Payments By Date - Formatted','READ',0),(301,'report','READ_Funds Disbursed Between Dates Summary','Funds Disbursed Between Dates Summary','READ',0),(302,'report','READ_Funds Disbursed Between Dates Summary by Office','Funds Disbursed Between Dates Summary by Office','READ',0),(303,'report','READ_Income Statement','Income Statement','READ',0),(304,'report','READ_Loan Account Schedule','Loan Account Schedule','READ',0),(305,'report','READ_Loans Awaiting Disbursal','Loans Awaiting Disbursal','READ',0),(306,'report','READ_Loans Awaiting Disbursal Summary','Loans Awaiting Disbursal Summary','READ',0),(307,'report','READ_Loans Awaiting Disbursal Summary by Month','Loans Awaiting Disbursal Summary by Month','READ',0),(308,'report','READ_Loans Pending Approval','Loans Pending Approval','READ',0),(309,'report','READ_Obligation Met Loans Details','Obligation Met Loans Details','READ',0),(310,'report','READ_Obligation Met Loans Summary','Obligation Met Loans Summary','READ',0),(311,'report','READ_Portfolio at Risk','Portfolio at Risk','READ',0),(312,'report','READ_Portfolio at Risk by Branch','Portfolio at Risk by Branch','READ',0),(313,'report','READ_Rescheduled Loans','Rescheduled Loans','READ',0),(314,'report','READ_Trial Balance','Trial Balance','READ',0),(315,'report','READ_Written-Off Loans','Written-Off Loans','READ',0),(316,'datatable','CREATE_client additional data','client additional data','CREATE',1),(317,'datatable','CREATE_impact measurement','impact measurement','CREATE',1),(318,'datatable','CREATE_loan additional data','loan additional data','CREATE',1),(319,'datatable','READ_client additional data','client additional data','READ',1),(320,'datatable','READ_impact measurement','impact measurement','READ',1),(321,'datatable','READ_loan additional data','loan additional data','READ',1),(322,'datatable','UPDATE_client additional data','client additional data','UPDATE',1),(323,'datatable','UPDATE_impact measurement','impact measurement','UPDATE',1),(324,'datatable','UPDATE_loan additional data','loan additional data','UPDATE',1),(325,'datatable','DELETE_client additional data','client additional data','DELETE',1),(326,'datatable','DELETE_impact measurement','impact measurement','DELETE',1),(327,'datatable','DELETE_loan additional data','loan additional data','DELETE',1); /*!40000 ALTER TABLE `m_permission` ENABLE KEYS */; UNLOCK TABLES; @@ -1805,4 +1805,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2013-03-20 11:59:17 +-- Dump completed on 2013-03-20 18:59:24 diff --git a/mifosng-db/multi-tenant-demo-backups/default-demo/bk_mifostenant-default.sql b/mifosng-db/multi-tenant-demo-backups/default-demo/bk_mifostenant-default.sql index 63374acad..bed35d2a6 100644 --- a/mifosng-db/multi-tenant-demo-backups/default-demo/bk_mifostenant-default.sql +++ b/mifosng-db/multi-tenant-demo-backups/default-demo/bk_mifostenant-default.sql @@ -1283,7 +1283,7 @@ CREATE TABLE `m_permission` ( LOCK TABLES `m_permission` WRITE; /*!40000 ALTER TABLE `m_permission` DISABLE KEYS */; -INSERT INTO `m_permission` VALUES (1,'special','ALL_FUNCTIONS',NULL,NULL,0),(2,'special','ALL_FUNCTIONS_READ',NULL,NULL,0),(3,'special','CHECKER_SUPER_USER',NULL,NULL,0),(4,'special','REPORTING_SUPER_USER',NULL,NULL,0),(5,'authorisation','READ_PERMISSION','PERMISSION','READ',0),(6,'authorisation','PERMISSIONS_ROLE','ROLE','PERMISSIONS',1),(7,'authorisation','CREATE_ROLE','ROLE','CREATE',1),(8,'authorisation','CREATE_ROLE_CHECKER','ROLE','CREATE',1),(9,'authorisation','READ_ROLE','ROLE','READ',0),(10,'authorisation','UPDATE_ROLE','ROLE','UPDATE',1),(11,'authorisation','UPDATE_ROLE_CHECKER','ROLE','UPDATE',1),(12,'authorisation','DELETE_ROLE','ROLE','DELETE',1),(13,'authorisation','DELETE_ROLE_CHECKER','ROLE','DELETE',1),(14,'authorisation','CREATE_USER','USER','CREATE',1),(15,'authorisation','CREATE_USER_CHECKER','USER','CREATE',1),(16,'authorisation','READ_USER','USER','READ',0),(17,'authorisation','UPDATE_USER','USER','UPDATE',1),(18,'authorisation','UPDATE_USER_CHECKER','USER','UPDATE',1),(19,'authorisation','DELETE_USER','USER','DELETE',1),(20,'authorisation','DELETE_USER_CHECKER','USER','DELETE',1),(21,'configuration','READ_CONFIGURATION','CONFIGURATION','READ',1),(22,'configuration','UPDATE_CONFIGURATION','CONFIGURATION','UPDATE',1),(23,'configuration','UPDATE_CONFIGURATION_CHECKER','CONFIGURATION','UPDATE',1),(24,'configuration','READ_CODE','CODE','READ',0),(25,'configuration','CREATE_CODE','CODE','CREATE',1),(26,'configuration','CREATE_CODE_CHECKER','CODE','CREATE',1),(27,'configuration','UPDATE_CODE','CODE','UPDATE',1),(28,'configuration','UPDATE_CODE_CHECKER','CODE','UPDATE',1),(29,'configuration','DELETE_CODE','CODE','DELETE',1),(30,'configuration','DELETE_CODE_CHECKER','CODE','DELETE',1),(31,'configuration','READ_CODEVALUE','CODEVALUE','READ',0),(32,'configuration','CREATE_CODEVALUE','CODEVALUE','CREATE',1),(33,'configuration','CREATE_CODEVALUE_CHECKER','CODEVALUE','CREATE',1),(34,'configuration','UPDATE_CODEVALUE','CODEVALUE','UPDATE',1),(35,'configuration','UPDATE_CODEVALUE_CHECKER','CODEVALUE','UPDATE',1),(36,'configuration','DELETE_CODEVALUE','CODEVALUE','DELETE',1),(37,'configuration','DELETE_CODEVALUE_CHECKER','CODEVALUE','DELETE',1),(38,'configuration','READ_CURRENCY','CURRENCY','READ',0),(39,'configuration','UPDATE_CURRENCY','CURRENCY','UPDATE',1),(40,'configuration','UPDATE_CURRENCY_CHECKER','CURRENCY','UPDATE',1),(41,'configuration','UPDATE_PERMISSION','PERMISSION','UPDATE',1),(42,'configuration','UPDATE_PERMISSION_CHECKER','PERMISSION','UPDATE',1),(43,'configuration','READ_DATATABLE','DATATABLE','READ',0),(44,'configuration','REGISTER_DATATABLE','DATATABLE','REGISTER',1),(45,'configuration','REGISTER_DATATABLE_CHECKER','DATATABLE','REGISTER',1),(46,'configuration','DEREGISTER_DATATABLE','DATATABLE','DEREGISTER',1),(47,'configuration','DEREGISTER_DATATABLE_CHECKER','DATATABLE','DEREGISTER',1),(48,'configuration','READ_AUDIT','AUDIT','READ',0),(49,'configuration','CREATE_CALENDAR','CALENDAR','CREATE',1),(50,'configuration','READ_CALENDAR','CALENDAR','READ',0),(51,'configuration','UPDATE_CALENDAR','CALENDAR','UPDATE',1),(52,'configuration','DELETE_CALENDAR','CALENDAR','DELETE',1),(53,'configuration','CREATE_CALENDAR_CHECKER','CALENDAR','CREATE',1),(54,'configuration','UPDATE_CALENDAR_CHECKER','CALENDAR','UPDATE',1),(55,'configuration','DELETE_CALENDAR_CHECKER','CALENDAR','DELETE',1),(56,'organisation','READ_MAKERCHECKER','MAKERCHECKER','READ',0),(57,'organisation','READ_CHARGE','CHARGE','READ',0),(58,'organisation','CREATE_CHARGE','CHARGE','CREATE',1),(59,'organisation','CREATE_CHARGE_CHECKER','CHARGE','CREATE',1),(60,'organisation','UPDATE_CHARGE','CHARGE','UPDATE',1),(61,'organisation','UPDATE_CHARGE_CHECKER','CHARGE','UPDATE',1),(62,'organisation','DELETE_CHARGE','CHARGE','DELETE',1),(63,'organisation','DELETE_CHARGE_CHECKER','CHARGE','DELETE',1),(64,'organisation','READ_FUND','FUND','READ',0),(65,'organisation','CREATE_FUND','FUND','CREATE',1),(66,'organisation','CREATE_FUND_CHECKER','FUND','CREATE',1),(67,'organisation','UPDATE_FUND','FUND','UPDATE',1),(68,'organisation','UPDATE_FUND_CHECKER','FUND','UPDATE',1),(69,'organisation','DELETE_FUND','FUND','DELETE',1),(70,'organisation','DELETE_FUND_CHECKER','FUND','DELETE',1),(71,'organisation','READ_LOANPRODUCT','LOANPRODUCT','READ',0),(72,'organisation','CREATE_LOANPRODUCT','LOANPRODUCT','CREATE',1),(73,'organisation','CREATE_LOANPRODUCT_CHECKER','LOANPRODUCT','CREATE',1),(74,'organisation','UPDATE_LOANPRODUCT','LOANPRODUCT','UPDATE',1),(75,'organisation','UPDATE_LOANPRODUCT_CHECKER','LOANPRODUCT','UPDATE',1),(76,'organisation','DELETE_LOANPRODUCT','LOANPRODUCT','DELETE',1),(77,'organisation','DELETE_LOANPRODUCT_CHECKER','LOANPRODUCT','DELETE',1),(78,'organisation','READ_OFFICE','OFFICE','READ',0),(79,'organisation','CREATE_OFFICE','OFFICE','CREATE',1),(80,'organisation','CREATE_OFFICE_CHECKER','OFFICE','CREATE',1),(81,'organisation','UPDATE_OFFICE','OFFICE','UPDATE',1),(82,'organisation','UPDATE_OFFICE_CHECKER','OFFICE','UPDATE',1),(83,'organisation','READ_OFFICETRANSACTION','OFFICETRANSACTION','READ',0),(84,'organisation','DELETE_OFFICE_CHECKER','OFFICE','DELETE',1),(85,'organisation','CREATE_OFFICETRANSACTION','OFFICETRANSACTION','CREATE',1),(86,'organisation','CREATE_OFFICETRANSACTION_CHECKER','OFFICETRANSACTION','CREATE',1),(87,'organisation','DELETE_OFFICETRANSACTION','OFFICETRANSACTION','DELETE',1),(88,'organisation','DELETE_OFFICETRANSACTION_CHECKER','OFFICETRANSACTION','DELETE',1),(89,'organisation','READ_STAFF','STAFF','READ',0),(90,'organisation','CREATE_STAFF','STAFF','CREATE',1),(91,'organisation','CREATE_STAFF_CHECKER','STAFF','CREATE',1),(92,'organisation','UPDATE_STAFF','STAFF','UPDATE',1),(93,'organisation','UPDATE_STAFF_CHECKER','STAFF','UPDATE',1),(94,'organisation','DELETE_STAFF','STAFF','DELETE',1),(95,'organisation','DELETE_STAFF_CHECKER','STAFF','DELETE',1),(96,'organisation','READ_SAVINGSPRODUCT','SAVINGSPRODUCT','READ',0),(97,'organisation','CREATE_SAVINGSPRODUCT','SAVINGSPRODUCT','CREATE',1),(98,'organisation','CREATE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','CREATE',1),(99,'organisation','UPDATE_SAVINGSPRODUCT','SAVINGSPRODUCT','UPDATE',1),(100,'organisation','UPDATE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','UPDATE',1),(101,'organisation','DELETE_SAVINGSPRODUCT','SAVINGSPRODUCT','DELETE',1),(102,'organisation','DELETE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','DELETE',1),(103,'organisation','READ_DEPOSITPRODUCT','DEPOSITPRODUCT','READ',0),(104,'organisation','CREATE_DEPOSITPRODUCT','DEPOSITPRODUCT','CREATE',1),(105,'organisation','CREATE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','CREATE',1),(106,'organisation','UPDATE_DEPOSITPRODUCT','DEPOSITPRODUCT','UPDATE',1),(107,'organisation','UPDATE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','UPDATE',1),(108,'organisation','DELETE_DEPOSITPRODUCT','DEPOSITPRODUCT','DELETE',1),(109,'organisation','DELETE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','DELETE',1),(110,'portfolio','READ_LOAN','LOAN','READ',0),(111,'portfolio','CREATE_LOAN','LOAN','CREATE',1),(112,'portfolio','CREATE_LOAN_CHECKER','LOAN','CREATE',1),(113,'portfolio','UPDATE_LOAN','LOAN','UPDATE',1),(114,'portfolio','UPDATE_LOAN_CHECKER','LOAN','UPDATE',1),(115,'portfolio','DELETE_LOAN','LOAN','DELETE',1),(116,'portfolio','DELETE_LOAN_CHECKER','LOAN','DELETE',1),(117,'portfolio','READ_CLIENT','CLIENT','READ',0),(118,'portfolio','CREATE_CLIENT','CLIENT','CREATE',1),(119,'portfolio','CREATE_CLIENT_CHECKER','CLIENT','CREATE',1),(120,'portfolio','UPDATE_CLIENT','CLIENT','UPDATE',1),(121,'portfolio','UPDATE_CLIENT_CHECKER','CLIENT','UPDATE',1),(122,'portfolio','DELETE_CLIENT','CLIENT','DELETE',1),(123,'portfolio','DELETE_CLIENT_CHECKER','CLIENT','DELETE',1),(124,'portfolio','READ_CLIENTIMAGE','CLIENTIMAGE','READ',0),(125,'portfolio','CREATE_CLIENTIMAGE','CLIENTIMAGE','CREATE',1),(126,'portfolio','CREATE_CLIENTIMAGE_CHECKER','CLIENTIMAGE','CREATE',1),(127,'portfolio','DELETE_CLIENTIMAGE','CLIENTIMAGE','DELETE',1),(128,'portfolio','DELETE_CLIENTIMAGE_CHECKER','CLIENTIMAGE','DELETE',1),(129,'portfolio','READ_CLIENTNOTE','CLIENTNOTE','READ',0),(130,'portfolio','CREATE_CLIENTNOTE','CLIENTNOTE','CREATE',1),(131,'portfolio','CREATE_CLIENTNOTE_CHECKER','CLIENTNOTE','CREATE',1),(132,'portfolio','UPDATE_CLIENTNOTE','CLIENTNOTE','UPDATE',1),(133,'portfolio','UPDATE_CLIENTNOTE_CHECKER','CLIENTNOTE','UPDATE',1),(134,'portfolio','DELETE_CLIENTNOTE','CLIENTNOTE','DELETE',1),(135,'portfolio','DELETE_CLIENTNOTE_CHECKER','CLIENTNOTE','DELETE',1),(136,'portfolio','READ_GROUPNOTE','GROUPNOTE','READ',0),(137,'portfolio','CREATE_GROUPNOTE','GROUPNOTE','CREATE',1),(138,'portfolio','UPDATE_GROUPNOTE','GROUPNOTE','UPDATE',1),(139,'portfolio','DELETE_GROUPNOTE','GROUPNOTE','DELETE',1),(140,'portfolio','CREATE_GROUPNOTE_CHECKER','GROUPNOTE','CREATE',1),(141,'portfolio','UPDATE_GROUPNOTE_CHECKER','GROUPNOTE','UPDATE',1),(142,'portfolio','DELETE_GROUPNOTE_CHECKER','GROUPNOTE','DELETE',1),(143,'portfolio','READ_LOANNOTE','LOANNOTE','READ',0),(144,'portfolio','CREATE_LOANNOTE','LOANNOTE','CREATE',1),(145,'portfolio','UPDATE_LOANNOTE','LOANNOTE','UPDATE',1),(146,'portfolio','DELETE_LOANNOTE','LOANNOTE','DELETE',1),(147,'portfolio','CREATE_LOANNOTE_CHECKER','LOANNOTE','CREATE',1),(148,'portfolio','UPDATE_LOANNOTE_CHECKER','LOANNOTE','UPDATE',1),(149,'portfolio','DELETE_LOANNOTE_CHECKER','LOANNOTE','DELETE',1),(150,'portfolio','READ_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','READ',0),(151,'portfolio','CREATE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','CREATE',1),(152,'portfolio','UPDATE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','UPDATE',1),(153,'portfolio','DELETE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','DELETE',1),(154,'portfolio','CREATE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','CREATE',1),(155,'portfolio','UPDATE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','UPDATE',1),(156,'portfolio','DELETE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','DELETE',1),(157,'portfolio','READ_DEPOSITNOTE','DEPOSITNOTE','READ',0),(158,'portfolio','CREATE_DEPOSITNOTE','DEPOSITNOTE','CREATE',1),(159,'portfolio','UPDATE_DEPOSITNOTE','DEPOSITNOTE','UPDATE',1),(160,'portfolio','DELETE_DEPOSITNOTE','DEPOSITNOTE','DELETE',1),(161,'portfolio','CREATE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','CREATE',1),(162,'portfolio','UPDATE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','UPDATE',1),(163,'portfolio','DELETE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','DELETE',1),(164,'portfolio','READ_SAVINGNOTE','SAVINGNOTE','READ',0),(165,'portfolio','CREATE_SAVINGNOTE','SAVINGNOTE','CREATE',1),(166,'portfolio','UPDATE_SAVINGNOTE','SAVINGNOTE','UPDATE',1),(167,'portfolio','DELETE_SAVINGNOTE','SAVINGNOTE','DELETE',1),(168,'portfolio','CREATE_SAVINGNOTE_CHECKER','SAVINGNOTE','CREATE',1),(169,'portfolio','UPDATE_SAVINGNOTE_CHECKER','SAVINGNOTE','UPDATE',1),(170,'portfolio','DELETE_SAVINGNOTE_CHECKER','SAVINGNOTE','DELETE',1),(171,'portfolio','READ_CLIENTIDENTIFIER','CLIENTIDENTIFIER','READ',0),(172,'portfolio','CREATE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','CREATE',1),(173,'portfolio','CREATE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','CREATE',1),(174,'portfolio','UPDATE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','UPDATE',1),(175,'portfolio','UPDATE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','UPDATE',1),(176,'portfolio','DELETE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','DELETE',1),(177,'portfolio','DELETE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','DELETE',1),(178,'portfolio','READ_DOCUMENT','DOCUMENT','READ',0),(179,'portfolio','CREATE_DOCUMENT','DOCUMENT','CREATE',1),(180,'portfolio','CREATE_DOCUMENT_CHECKER','DOCUMENT','CREATE',1),(181,'portfolio','UPDATE_DOCUMENT','DOCUMENT','UPDATE',1),(182,'portfolio','UPDATE_DOCUMENT_CHECKER','DOCUMENT','UPDATE',1),(183,'portfolio','DELETE_DOCUMENT','DOCUMENT','DELETE',1),(184,'portfolio','DELETE_DOCUMENT_CHECKER','DOCUMENT','DELETE',1),(185,'portfolio','READ_GROUP','GROUP','READ',0),(186,'portfolio','CREATE_GROUP','GROUP','CREATE',1),(187,'portfolio','CREATE_GROUP_CHECKER','GROUP','CREATE',1),(188,'portfolio','UPDATE_GROUP','GROUP','UPDATE',1),(189,'portfolio','UPDATE_GROUP_CHECKER','GROUP','UPDATE',1),(190,'portfolio','DELETE_GROUP','GROUP','DELETE',1),(191,'portfolio','DELETE_GROUP_CHECKER','GROUP','DELETE',1),(192,'portfolio','UNASSIGNSTAFF_GROUP','GROUP','UNASSIGNSTAFF',1),(193,'portfolio','UNASSIGNSTAFF_GROUP_CHECKER','GROUP','UNASSIGNSTAFF',1),(194,'portfolio','CREATE_LOANCHARGE','LOANCHARGE','CREATE',1),(195,'portfolio','CREATE_LOANCHARGE_CHECKER','LOANCHARGE','CREATE',1),(196,'portfolio','UPDATE_LOANCHARGE','LOANCHARGE','UPDATE',1),(197,'portfolio','UPDATE_LOANCHARGE_CHECKER','LOANCHARGE','UPDATE',1),(198,'portfolio','DELETE_LOANCHARGE','LOANCHARGE','DELETE',1),(199,'portfolio','DELETE_LOANCHARGE_CHECKER','LOANCHARGE','DELETE',1),(200,'portfolio','WAIVE_LOANCHARGE','LOANCHARGE','WAIVE',1),(201,'portfolio','WAIVE_LOANCHARGE_CHECKER','LOANCHARGE','WAIVE',1),(202,'portfolio','READ_DEPOSITACCOUNT','DEPOSITACCOUNT','READ',0),(203,'portfolio','CREATE_DEPOSITACCOUNT','DEPOSITACCOUNT','CREATE',1),(204,'portfolio','CREATE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','CREATE',1),(205,'portfolio','UPDATE_DEPOSITACCOUNT','DEPOSITACCOUNT','UPDATE',1),(206,'portfolio','UPDATE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','UPDATE',1),(207,'portfolio','DELETE_DEPOSITACCOUNT','DEPOSITACCOUNT','DELETE',1),(208,'portfolio','DELETE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','DELETE',1),(209,'portfolio','READ_SAVINGSACCOUNT','SAVINGSACCOUNT','READ',0),(210,'portfolio','CREATE_SAVINGSACCOUNT','SAVINGSACCOUNT','CREATE',1),(211,'portfolio','CREATE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','CREATE',1),(212,'portfolio','UPDATE_SAVINGSACCOUNT','SAVINGSACCOUNT','UPDATE',1),(213,'portfolio','UPDATE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','UPDATE',1),(214,'portfolio','DELETE_SAVINGSACCOUNT','SAVINGSACCOUNT','DELETE',1),(215,'portfolio','DELETE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','DELETE',1),(216,'portfolio','READ_GUARANTOR','GUARANTOR','READ',0),(217,'portfolio','CREATE_GUARANTOR','GUARANTOR','CREATE',1),(218,'portfolio','CREATE_GUARANTOR_CHECKER','GUARANTOR','CREATE',1),(219,'portfolio','UPDATE_GUARANTOR','GUARANTOR','UPDATE',1),(220,'portfolio','UPDATE_GUARANTOR_CHECKER','GUARANTOR','UPDATE',1),(221,'portfolio','DELETE_GUARANTOR','GUARANTOR','DELETE',1),(222,'portfolio','DELETE_GUARANTOR_CHECKER','GUARANTOR','DELETE',1),(223,'transaction_loan','APPROVE_LOAN','LOAN','APPROVE',1),(224,'transaction_loan','APPROVEINPAST_LOAN','LOAN','APPROVEINPAST',1),(225,'transaction_loan','REJECT_LOAN','LOAN','REJECT',1),(226,'transaction_loan','REJECTINPAST_LOAN','LOAN','REJECTINPAST',1),(227,'transaction_loan','WITHDRAW_LOAN','LOAN','WITHDRAW',1),(228,'transaction_loan','WITHDRAWINPAST_LOAN','LOAN','WITHDRAWINPAST',1),(229,'transaction_loan','APPROVALUNDO_LOAN','LOAN','APPROVALUNDO',1),(230,'transaction_loan','DISBURSE_LOAN','LOAN','DISBURSE',1),(231,'transaction_loan','DISBURSEINPAST_LOAN','LOAN','DISBURSEINPAST',1),(232,'transaction_loan','DISBURSALUNDO_LOAN','LOAN','DISBURSALUNDO',1),(233,'transaction_loan','REPAYMENT_LOAN','LOAN','REPAYMENT',1),(234,'transaction_loan','REPAYMENTINPAST_LOAN','LOAN','REPAYMENTINPAST',1),(235,'transaction_loan','ADJUST_LOAN','LOAN','ADJUST',1),(236,'transaction_loan','WAIVEINTERESTPORTION_LOAN','LOAN','WAIVEINTERESTPORTION',1),(237,'transaction_loan','WRITEOFF_LOAN','LOAN','WRITEOFF',1),(238,'transaction_loan','CLOSE_LOAN','LOAN','CLOSE',1),(239,'transaction_loan','CLOSEASRESCHEDULED_LOAN','LOAN','CLOSEASRESCHEDULED',1),(240,'transaction_loan','UPDATELOANOFFICER_LOAN','LOAN','UPDATELOANOFFICER',1),(241,'transaction_loan','UPDATELOANOFFICER_LOAN_CHECKER','LOAN','UPDATELOANOFFICER',1),(242,'transaction_loan','REMOVELOANOFFICER_LOAN','LOAN','REMOVELOANOFFICER',1),(243,'transaction_loan','REMOVELOANOFFICER_LOAN_CHECKER','LOAN','REMOVELOANOFFICER',1),(244,'transaction_loan','BULKREASSIGN_LOAN','LOAN','BULKREASSIGN',1),(245,'transaction_loan','BULKREASSIGN_LOAN_CHECKER','LOAN','BULKREASSIGN',1),(246,'transaction_loan','APPROVE_LOAN_CHECKER','LOAN','APPROVE',1),(247,'transaction_loan','APPROVEINPAST_LOAN_CHECKER','LOAN','APPROVEINPAST',1),(248,'transaction_loan','REJECT_LOAN_CHECKER','LOAN','REJECT',1),(249,'transaction_loan','REJECTINPAST_LOAN_CHECKER','LOAN','REJECTINPAST',1),(250,'transaction_loan','WITHDRAW_LOAN_CHECKER','LOAN','WITHDRAW',1),(251,'transaction_loan','WITHDRAWINPAST_LOAN_CHECKER','LOAN','WITHDRAWINPAST',1),(252,'transaction_loan','APPROVALUNDO_LOAN_CHECKER','LOAN','APPROVALUNDO',1),(253,'transaction_loan','DISBURSE_LOAN_CHECKER','LOAN','DISBURSE',1),(254,'transaction_loan','DISBURSEINPAST_LOAN_CHECKER','LOAN','DISBURSEINPAST',1),(255,'transaction_loan','DISBURSALUNDO_LOAN_CHECKER','LOAN','DISBURSALUNDO',1),(256,'transaction_loan','REPAYMENT_LOAN_CHECKER','LOAN','REPAYMENT',1),(257,'transaction_loan','REPAYMENTINPAST_LOAN_CHECKER','LOAN','REPAYMENTINPAST',1),(258,'transaction_loan','ADJUST_LOAN_CHECKER','LOAN','ADJUST',1),(259,'transaction_loan','WAIVEINTERESTPORTION_LOAN_CHECKER','LOAN','WAIVEINTERESTPORTION',1),(260,'transaction_loan','WRITEOFF_LOAN_CHECKER','LOAN','WRITEOFF',1),(261,'transaction_loan','CLOSE_LOAN_CHECKER','LOAN','CLOSE',1),(262,'transaction_loan','CLOSEASRESCHEDULED_LOAN_CHECKER','LOAN','CLOSEASRESCHEDULED',1),(263,'transaction_deposit','APPROVE_DEPOSITACCOUNT','DEPOSITACCOUNT','APPROVE',1),(264,'transaction_deposit','REJECT_DEPOSITACCOUNT','DEPOSITACCOUNT','REJECT',1),(265,'transaction_deposit','WITHDRAW_DEPOSITACCOUNT','DEPOSITACCOUNT','WITHDRAW',1),(266,'transaction_deposit','APPROVALUNDO_DEPOSITACCOUNT','DEPOSITACCOUNT','APPROVALUNDO',1),(267,'transaction_deposit','WITHDRAWAL_DEPOSITACCOUNT','DEPOSITACCOUNT','WITHDRAWAL',1),(268,'transaction_deposit','INTEREST_DEPOSITACCOUNT','DEPOSITACCOUNT','INTEREST',1),(269,'transaction_deposit','RENEW_DEPOSITACCOUNT','DEPOSITACCOUNT','RENEW',1),(270,'transaction_deposit','APPROVE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','APPROVE',1),(271,'transaction_deposit','REJECT_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','REJECT',1),(272,'transaction_deposit','WITHDRAW_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','WITHDRAW',1),(273,'transaction_deposit','APPROVALUNDO_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','APPROVALUNDO',1),(274,'transaction_deposit','WITHDRAWAL_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','WITHDRAWAL',1),(275,'transaction_deposit','INTEREST_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','INTEREST',1),(276,'transaction_deposit','RENEW_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','RENEW',1),(277,'accounting','CREATE_GLACCOUNT','GLACCOUNT','CREATE',1),(278,'accounting','UPDATE_GLACCOUNT','GLACCOUNT','UPDATE',1),(279,'accounting','DELETE_GLACCOUNT','GLACCOUNT','DELETE',1),(280,'accounting','CREATE_GLCLOSURE','GLCLOSURE','CREATE',1),(281,'accounting','UPDATE_GLCLOSURE','GLCLOSURE','UPDATE',1),(282,'accounting','DELETE_GLCLOSURE','GLCLOSURE','DELETE',1),(283,'accounting','CREATE_JOURNALENTRY','JOURNALENTRY','CREATE',1),(284,'accounting','REVERSE_JOURNALENTRY','JOURNALENTRY','REVERSE',1),(285,'report','READ_Active Loans - Details','Active Loans - Details','READ',0),(286,'report','READ_Active Loans - Summary','Active Loans - Summary','READ',0),(287,'report','READ_Active Loans by Disbursal Period','Active Loans by Disbursal Period','READ',0),(288,'report','READ_Active Loans in last installment','Active Loans in last installment','READ',0),(289,'report','READ_Active Loans in last installment Summary','Active Loans in last installment Summary','READ',0),(290,'report','READ_Active Loans Passed Final Maturity','Active Loans Passed Final Maturity','READ',0),(291,'report','READ_Active Loans Passed Final Maturity Summary','Active Loans Passed Final Maturity Summary','READ',0),(292,'report','READ_Aging Detail','Aging Detail','READ',0),(293,'report','READ_Aging Summary (Arrears in Months)','Aging Summary (Arrears in Months)','READ',0),(294,'report','READ_Aging Summary (Arrears in Weeks)','Aging Summary (Arrears in Weeks)','READ',0),(295,'report','READ_Balance Sheet','Balance Sheet','READ',0),(296,'report','READ_Branch Expected Cash Flow','Branch Expected Cash Flow','READ',0),(297,'report','READ_Client Listing','Client Listing','READ',0),(298,'report','READ_Client Loans Listing','Client Loans Listing','READ',0),(299,'report','READ_Expected Payments By Date - Basic','Expected Payments By Date - Basic','READ',0),(300,'report','READ_Expected Payments By Date - Formatted','Expected Payments By Date - Formatted','READ',0),(301,'report','READ_Funds Disbursed Between Dates Summary','Funds Disbursed Between Dates Summary','READ',0),(302,'report','READ_Funds Disbursed Between Dates Summary by Office','Funds Disbursed Between Dates Summary by Office','READ',0),(303,'report','READ_Income Statement','Income Statement','READ',0),(304,'report','READ_Loan Account Schedule','Loan Account Schedule','READ',0),(305,'report','READ_Loans Awaiting Disbursal','Loans Awaiting Disbursal','READ',0),(306,'report','READ_Loans Awaiting Disbursal Summary','Loans Awaiting Disbursal Summary','READ',0),(307,'report','READ_Loans Awaiting Disbursal Summary by Month','Loans Awaiting Disbursal Summary by Month','READ',0),(308,'report','READ_Loans Pending Approval','Loans Pending Approval','READ',0),(309,'report','READ_Obligation Met Loans Details','Obligation Met Loans Details','READ',0),(310,'report','READ_Obligation Met Loans Summary','Obligation Met Loans Summary','READ',0),(311,'report','READ_Portfolio at Risk','Portfolio at Risk','READ',0),(312,'report','READ_Portfolio at Risk by Branch','Portfolio at Risk by Branch','READ',0),(313,'report','READ_Rescheduled Loans','Rescheduled Loans','READ',0),(314,'report','READ_Trial Balance','Trial Balance','READ',0),(315,'report','READ_Written-Off Loans','Written-Off Loans','READ',0),(316,'datatable','CREATE_extra_client_details','extra_client_details','CREATE',1),(317,'datatable','CREATE_extra_family_details','extra_family_details','CREATE',1),(318,'datatable','CREATE_extra_loan_details','extra_loan_details','CREATE',1),(319,'datatable','READ_extra_client_details','extra_client_details','READ',1),(320,'datatable','READ_extra_family_details','extra_family_details','READ',1),(321,'datatable','READ_extra_loan_details','extra_loan_details','READ',1),(322,'datatable','UPDATE_extra_client_details','extra_client_details','UPDATE',1),(323,'datatable','UPDATE_extra_family_details','extra_family_details','UPDATE',1),(324,'datatable','UPDATE_extra_loan_details','extra_loan_details','UPDATE',1),(325,'datatable','DELETE_extra_client_details','extra_client_details','DELETE',1),(326,'datatable','DELETE_extra_family_details','extra_family_details','DELETE',1),(327,'datatable','DELETE_extra_loan_details','extra_loan_details','DELETE',1); +INSERT INTO `m_permission` VALUES (1,'special','ALL_FUNCTIONS',NULL,NULL,0),(2,'special','ALL_FUNCTIONS_READ',NULL,NULL,0),(3,'special','CHECKER_SUPER_USER',NULL,NULL,0),(4,'special','REPORTING_SUPER_USER',NULL,NULL,0),(5,'authorisation','READ_PERMISSION','PERMISSION','READ',0),(6,'authorisation','PERMISSIONS_ROLE','ROLE','PERMISSIONS',0),(7,'authorisation','CREATE_ROLE','ROLE','CREATE',0),(8,'authorisation','CREATE_ROLE_CHECKER','ROLE','CREATE',0),(9,'authorisation','READ_ROLE','ROLE','READ',0),(10,'authorisation','UPDATE_ROLE','ROLE','UPDATE',0),(11,'authorisation','UPDATE_ROLE_CHECKER','ROLE','UPDATE',0),(12,'authorisation','DELETE_ROLE','ROLE','DELETE',0),(13,'authorisation','DELETE_ROLE_CHECKER','ROLE','DELETE',0),(14,'authorisation','CREATE_USER','USER','CREATE',0),(15,'authorisation','CREATE_USER_CHECKER','USER','CREATE',0),(16,'authorisation','READ_USER','USER','READ',0),(17,'authorisation','UPDATE_USER','USER','UPDATE',0),(18,'authorisation','UPDATE_USER_CHECKER','USER','UPDATE',0),(19,'authorisation','DELETE_USER','USER','DELETE',0),(20,'authorisation','DELETE_USER_CHECKER','USER','DELETE',0),(21,'configuration','READ_CONFIGURATION','CONFIGURATION','READ',0),(22,'configuration','UPDATE_CONFIGURATION','CONFIGURATION','UPDATE',0),(23,'configuration','UPDATE_CONFIGURATION_CHECKER','CONFIGURATION','UPDATE',0),(24,'configuration','READ_CODE','CODE','READ',0),(25,'configuration','CREATE_CODE','CODE','CREATE',0),(26,'configuration','CREATE_CODE_CHECKER','CODE','CREATE',0),(27,'configuration','UPDATE_CODE','CODE','UPDATE',0),(28,'configuration','UPDATE_CODE_CHECKER','CODE','UPDATE',0),(29,'configuration','DELETE_CODE','CODE','DELETE',0),(30,'configuration','DELETE_CODE_CHECKER','CODE','DELETE',0),(31,'configuration','READ_CODEVALUE','CODEVALUE','READ',0),(32,'configuration','CREATE_CODEVALUE','CODEVALUE','CREATE',0),(33,'configuration','CREATE_CODEVALUE_CHECKER','CODEVALUE','CREATE',0),(34,'configuration','UPDATE_CODEVALUE','CODEVALUE','UPDATE',0),(35,'configuration','UPDATE_CODEVALUE_CHECKER','CODEVALUE','UPDATE',0),(36,'configuration','DELETE_CODEVALUE','CODEVALUE','DELETE',0),(37,'configuration','DELETE_CODEVALUE_CHECKER','CODEVALUE','DELETE',0),(38,'configuration','READ_CURRENCY','CURRENCY','READ',0),(39,'configuration','UPDATE_CURRENCY','CURRENCY','UPDATE',0),(40,'configuration','UPDATE_CURRENCY_CHECKER','CURRENCY','UPDATE',0),(41,'configuration','UPDATE_PERMISSION','PERMISSION','UPDATE',0),(42,'configuration','UPDATE_PERMISSION_CHECKER','PERMISSION','UPDATE',0),(43,'configuration','READ_DATATABLE','DATATABLE','READ',0),(44,'configuration','REGISTER_DATATABLE','DATATABLE','REGISTER',0),(45,'configuration','REGISTER_DATATABLE_CHECKER','DATATABLE','REGISTER',0),(46,'configuration','DEREGISTER_DATATABLE','DATATABLE','DEREGISTER',0),(47,'configuration','DEREGISTER_DATATABLE_CHECKER','DATATABLE','DEREGISTER',0),(48,'configuration','READ_AUDIT','AUDIT','READ',0),(49,'configuration','CREATE_CALENDAR','CALENDAR','CREATE',0),(50,'configuration','READ_CALENDAR','CALENDAR','READ',0),(51,'configuration','UPDATE_CALENDAR','CALENDAR','UPDATE',0),(52,'configuration','DELETE_CALENDAR','CALENDAR','DELETE',0),(53,'configuration','CREATE_CALENDAR_CHECKER','CALENDAR','CREATE',0),(54,'configuration','UPDATE_CALENDAR_CHECKER','CALENDAR','UPDATE',0),(55,'configuration','DELETE_CALENDAR_CHECKER','CALENDAR','DELETE',0),(56,'organisation','READ_MAKERCHECKER','MAKERCHECKER','READ',0),(57,'organisation','READ_CHARGE','CHARGE','READ',0),(58,'organisation','CREATE_CHARGE','CHARGE','CREATE',0),(59,'organisation','CREATE_CHARGE_CHECKER','CHARGE','CREATE',0),(60,'organisation','UPDATE_CHARGE','CHARGE','UPDATE',0),(61,'organisation','UPDATE_CHARGE_CHECKER','CHARGE','UPDATE',0),(62,'organisation','DELETE_CHARGE','CHARGE','DELETE',0),(63,'organisation','DELETE_CHARGE_CHECKER','CHARGE','DELETE',0),(64,'organisation','READ_FUND','FUND','READ',0),(65,'organisation','CREATE_FUND','FUND','CREATE',0),(66,'organisation','CREATE_FUND_CHECKER','FUND','CREATE',0),(67,'organisation','UPDATE_FUND','FUND','UPDATE',0),(68,'organisation','UPDATE_FUND_CHECKER','FUND','UPDATE',0),(69,'organisation','DELETE_FUND','FUND','DELETE',0),(70,'organisation','DELETE_FUND_CHECKER','FUND','DELETE',0),(71,'organisation','READ_LOANPRODUCT','LOANPRODUCT','READ',0),(72,'organisation','CREATE_LOANPRODUCT','LOANPRODUCT','CREATE',0),(73,'organisation','CREATE_LOANPRODUCT_CHECKER','LOANPRODUCT','CREATE',0),(74,'organisation','UPDATE_LOANPRODUCT','LOANPRODUCT','UPDATE',0),(75,'organisation','UPDATE_LOANPRODUCT_CHECKER','LOANPRODUCT','UPDATE',0),(76,'organisation','DELETE_LOANPRODUCT','LOANPRODUCT','DELETE',0),(77,'organisation','DELETE_LOANPRODUCT_CHECKER','LOANPRODUCT','DELETE',0),(78,'organisation','READ_OFFICE','OFFICE','READ',0),(79,'organisation','CREATE_OFFICE','OFFICE','CREATE',0),(80,'organisation','CREATE_OFFICE_CHECKER','OFFICE','CREATE',0),(81,'organisation','UPDATE_OFFICE','OFFICE','UPDATE',0),(82,'organisation','UPDATE_OFFICE_CHECKER','OFFICE','UPDATE',0),(83,'organisation','READ_OFFICETRANSACTION','OFFICETRANSACTION','READ',0),(84,'organisation','DELETE_OFFICE_CHECKER','OFFICE','DELETE',0),(85,'organisation','CREATE_OFFICETRANSACTION','OFFICETRANSACTION','CREATE',0),(86,'organisation','CREATE_OFFICETRANSACTION_CHECKER','OFFICETRANSACTION','CREATE',0),(87,'organisation','DELETE_OFFICETRANSACTION','OFFICETRANSACTION','DELETE',0),(88,'organisation','DELETE_OFFICETRANSACTION_CHECKER','OFFICETRANSACTION','DELETE',0),(89,'organisation','READ_STAFF','STAFF','READ',0),(90,'organisation','CREATE_STAFF','STAFF','CREATE',0),(91,'organisation','CREATE_STAFF_CHECKER','STAFF','CREATE',0),(92,'organisation','UPDATE_STAFF','STAFF','UPDATE',0),(93,'organisation','UPDATE_STAFF_CHECKER','STAFF','UPDATE',0),(94,'organisation','DELETE_STAFF','STAFF','DELETE',0),(95,'organisation','DELETE_STAFF_CHECKER','STAFF','DELETE',0),(96,'organisation','READ_SAVINGSPRODUCT','SAVINGSPRODUCT','READ',0),(97,'organisation','CREATE_SAVINGSPRODUCT','SAVINGSPRODUCT','CREATE',0),(98,'organisation','CREATE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','CREATE',0),(99,'organisation','UPDATE_SAVINGSPRODUCT','SAVINGSPRODUCT','UPDATE',0),(100,'organisation','UPDATE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','UPDATE',0),(101,'organisation','DELETE_SAVINGSPRODUCT','SAVINGSPRODUCT','DELETE',0),(102,'organisation','DELETE_SAVINGSPRODUCT_CHECKER','SAVINGSPRODUCT','DELETE',0),(103,'organisation','READ_DEPOSITPRODUCT','DEPOSITPRODUCT','READ',0),(104,'organisation','CREATE_DEPOSITPRODUCT','DEPOSITPRODUCT','CREATE',0),(105,'organisation','CREATE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','CREATE',0),(106,'organisation','UPDATE_DEPOSITPRODUCT','DEPOSITPRODUCT','UPDATE',0),(107,'organisation','UPDATE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','UPDATE',0),(108,'organisation','DELETE_DEPOSITPRODUCT','DEPOSITPRODUCT','DELETE',0),(109,'organisation','DELETE_DEPOSITPRODUCT_CHECKER','DEPOSITPRODUCT','DELETE',0),(110,'portfolio','READ_LOAN','LOAN','READ',0),(111,'portfolio','CREATE_LOAN','LOAN','CREATE',0),(112,'portfolio','CREATE_LOAN_CHECKER','LOAN','CREATE',0),(113,'portfolio','UPDATE_LOAN','LOAN','UPDATE',0),(114,'portfolio','UPDATE_LOAN_CHECKER','LOAN','UPDATE',0),(115,'portfolio','DELETE_LOAN','LOAN','DELETE',0),(116,'portfolio','DELETE_LOAN_CHECKER','LOAN','DELETE',0),(117,'portfolio','READ_CLIENT','CLIENT','READ',0),(118,'portfolio','CREATE_CLIENT','CLIENT','CREATE',0),(119,'portfolio','CREATE_CLIENT_CHECKER','CLIENT','CREATE',0),(120,'portfolio','UPDATE_CLIENT','CLIENT','UPDATE',0),(121,'portfolio','UPDATE_CLIENT_CHECKER','CLIENT','UPDATE',0),(122,'portfolio','DELETE_CLIENT','CLIENT','DELETE',0),(123,'portfolio','DELETE_CLIENT_CHECKER','CLIENT','DELETE',0),(124,'portfolio','READ_CLIENTIMAGE','CLIENTIMAGE','READ',0),(125,'portfolio','CREATE_CLIENTIMAGE','CLIENTIMAGE','CREATE',0),(126,'portfolio','CREATE_CLIENTIMAGE_CHECKER','CLIENTIMAGE','CREATE',0),(127,'portfolio','DELETE_CLIENTIMAGE','CLIENTIMAGE','DELETE',0),(128,'portfolio','DELETE_CLIENTIMAGE_CHECKER','CLIENTIMAGE','DELETE',0),(129,'portfolio','READ_CLIENTNOTE','CLIENTNOTE','READ',0),(130,'portfolio','CREATE_CLIENTNOTE','CLIENTNOTE','CREATE',0),(131,'portfolio','CREATE_CLIENTNOTE_CHECKER','CLIENTNOTE','CREATE',0),(132,'portfolio','UPDATE_CLIENTNOTE','CLIENTNOTE','UPDATE',0),(133,'portfolio','UPDATE_CLIENTNOTE_CHECKER','CLIENTNOTE','UPDATE',0),(134,'portfolio','DELETE_CLIENTNOTE','CLIENTNOTE','DELETE',0),(135,'portfolio','DELETE_CLIENTNOTE_CHECKER','CLIENTNOTE','DELETE',0),(136,'portfolio','READ_GROUPNOTE','GROUPNOTE','READ',0),(137,'portfolio','CREATE_GROUPNOTE','GROUPNOTE','CREATE',0),(138,'portfolio','UPDATE_GROUPNOTE','GROUPNOTE','UPDATE',0),(139,'portfolio','DELETE_GROUPNOTE','GROUPNOTE','DELETE',0),(140,'portfolio','CREATE_GROUPNOTE_CHECKER','GROUPNOTE','CREATE',0),(141,'portfolio','UPDATE_GROUPNOTE_CHECKER','GROUPNOTE','UPDATE',0),(142,'portfolio','DELETE_GROUPNOTE_CHECKER','GROUPNOTE','DELETE',0),(143,'portfolio','READ_LOANNOTE','LOANNOTE','READ',0),(144,'portfolio','CREATE_LOANNOTE','LOANNOTE','CREATE',0),(145,'portfolio','UPDATE_LOANNOTE','LOANNOTE','UPDATE',0),(146,'portfolio','DELETE_LOANNOTE','LOANNOTE','DELETE',0),(147,'portfolio','CREATE_LOANNOTE_CHECKER','LOANNOTE','CREATE',0),(148,'portfolio','UPDATE_LOANNOTE_CHECKER','LOANNOTE','UPDATE',0),(149,'portfolio','DELETE_LOANNOTE_CHECKER','LOANNOTE','DELETE',0),(150,'portfolio','READ_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','READ',0),(151,'portfolio','CREATE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','CREATE',0),(152,'portfolio','UPDATE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','UPDATE',0),(153,'portfolio','DELETE_LOANTRANSACTIONNOTE','LOANTRANSACTIONNOTE','DELETE',0),(154,'portfolio','CREATE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','CREATE',0),(155,'portfolio','UPDATE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','UPDATE',0),(156,'portfolio','DELETE_LOANTRANSACTIONNOTE_CHECKER','LOANTRANSACTIONNOTE','DELETE',0),(157,'portfolio','READ_DEPOSITNOTE','DEPOSITNOTE','READ',0),(158,'portfolio','CREATE_DEPOSITNOTE','DEPOSITNOTE','CREATE',0),(159,'portfolio','UPDATE_DEPOSITNOTE','DEPOSITNOTE','UPDATE',0),(160,'portfolio','DELETE_DEPOSITNOTE','DEPOSITNOTE','DELETE',0),(161,'portfolio','CREATE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','CREATE',0),(162,'portfolio','UPDATE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','UPDATE',0),(163,'portfolio','DELETE_DEPOSITNOTE_CHECKER','DEPOSITNOTE','DELETE',0),(164,'portfolio','READ_SAVINGNOTE','SAVINGNOTE','READ',0),(165,'portfolio','CREATE_SAVINGNOTE','SAVINGNOTE','CREATE',0),(166,'portfolio','UPDATE_SAVINGNOTE','SAVINGNOTE','UPDATE',0),(167,'portfolio','DELETE_SAVINGNOTE','SAVINGNOTE','DELETE',0),(168,'portfolio','CREATE_SAVINGNOTE_CHECKER','SAVINGNOTE','CREATE',0),(169,'portfolio','UPDATE_SAVINGNOTE_CHECKER','SAVINGNOTE','UPDATE',0),(170,'portfolio','DELETE_SAVINGNOTE_CHECKER','SAVINGNOTE','DELETE',0),(171,'portfolio','READ_CLIENTIDENTIFIER','CLIENTIDENTIFIER','READ',0),(172,'portfolio','CREATE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','CREATE',0),(173,'portfolio','CREATE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','CREATE',0),(174,'portfolio','UPDATE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','UPDATE',0),(175,'portfolio','UPDATE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','UPDATE',0),(176,'portfolio','DELETE_CLIENTIDENTIFIER','CLIENTIDENTIFIER','DELETE',0),(177,'portfolio','DELETE_CLIENTIDENTIFIER_CHECKER','CLIENTIDENTIFIER','DELETE',0),(178,'portfolio','READ_DOCUMENT','DOCUMENT','READ',0),(179,'portfolio','CREATE_DOCUMENT','DOCUMENT','CREATE',0),(180,'portfolio','CREATE_DOCUMENT_CHECKER','DOCUMENT','CREATE',0),(181,'portfolio','UPDATE_DOCUMENT','DOCUMENT','UPDATE',0),(182,'portfolio','UPDATE_DOCUMENT_CHECKER','DOCUMENT','UPDATE',0),(183,'portfolio','DELETE_DOCUMENT','DOCUMENT','DELETE',0),(184,'portfolio','DELETE_DOCUMENT_CHECKER','DOCUMENT','DELETE',0),(185,'portfolio','READ_GROUP','GROUP','READ',0),(186,'portfolio','CREATE_GROUP','GROUP','CREATE',0),(187,'portfolio','CREATE_GROUP_CHECKER','GROUP','CREATE',0),(188,'portfolio','UPDATE_GROUP','GROUP','UPDATE',0),(189,'portfolio','UPDATE_GROUP_CHECKER','GROUP','UPDATE',0),(190,'portfolio','DELETE_GROUP','GROUP','DELETE',0),(191,'portfolio','DELETE_GROUP_CHECKER','GROUP','DELETE',0),(192,'portfolio','UNASSIGNSTAFF_GROUP','GROUP','UNASSIGNSTAFF',0),(193,'portfolio','UNASSIGNSTAFF_GROUP_CHECKER','GROUP','UNASSIGNSTAFF',0),(194,'portfolio','CREATE_LOANCHARGE','LOANCHARGE','CREATE',0),(195,'portfolio','CREATE_LOANCHARGE_CHECKER','LOANCHARGE','CREATE',0),(196,'portfolio','UPDATE_LOANCHARGE','LOANCHARGE','UPDATE',0),(197,'portfolio','UPDATE_LOANCHARGE_CHECKER','LOANCHARGE','UPDATE',0),(198,'portfolio','DELETE_LOANCHARGE','LOANCHARGE','DELETE',0),(199,'portfolio','DELETE_LOANCHARGE_CHECKER','LOANCHARGE','DELETE',0),(200,'portfolio','WAIVE_LOANCHARGE','LOANCHARGE','WAIVE',0),(201,'portfolio','WAIVE_LOANCHARGE_CHECKER','LOANCHARGE','WAIVE',0),(202,'portfolio','READ_DEPOSITACCOUNT','DEPOSITACCOUNT','READ',0),(203,'portfolio','CREATE_DEPOSITACCOUNT','DEPOSITACCOUNT','CREATE',0),(204,'portfolio','CREATE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','CREATE',0),(205,'portfolio','UPDATE_DEPOSITACCOUNT','DEPOSITACCOUNT','UPDATE',0),(206,'portfolio','UPDATE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','UPDATE',0),(207,'portfolio','DELETE_DEPOSITACCOUNT','DEPOSITACCOUNT','DELETE',0),(208,'portfolio','DELETE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','DELETE',0),(209,'portfolio','READ_SAVINGSACCOUNT','SAVINGSACCOUNT','READ',0),(210,'portfolio','CREATE_SAVINGSACCOUNT','SAVINGSACCOUNT','CREATE',0),(211,'portfolio','CREATE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','CREATE',0),(212,'portfolio','UPDATE_SAVINGSACCOUNT','SAVINGSACCOUNT','UPDATE',0),(213,'portfolio','UPDATE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','UPDATE',0),(214,'portfolio','DELETE_SAVINGSACCOUNT','SAVINGSACCOUNT','DELETE',0),(215,'portfolio','DELETE_SAVINGSACCOUNT_CHECKER','SAVINGSACCOUNT','DELETE',0),(216,'portfolio','READ_GUARANTOR','GUARANTOR','READ',0),(217,'portfolio','CREATE_GUARANTOR','GUARANTOR','CREATE',0),(218,'portfolio','CREATE_GUARANTOR_CHECKER','GUARANTOR','CREATE',0),(219,'portfolio','UPDATE_GUARANTOR','GUARANTOR','UPDATE',0),(220,'portfolio','UPDATE_GUARANTOR_CHECKER','GUARANTOR','UPDATE',0),(221,'portfolio','DELETE_GUARANTOR','GUARANTOR','DELETE',0),(222,'portfolio','DELETE_GUARANTOR_CHECKER','GUARANTOR','DELETE',0),(223,'transaction_loan','APPROVE_LOAN','LOAN','APPROVE',0),(224,'transaction_loan','APPROVEINPAST_LOAN','LOAN','APPROVEINPAST',0),(225,'transaction_loan','REJECT_LOAN','LOAN','REJECT',0),(226,'transaction_loan','REJECTINPAST_LOAN','LOAN','REJECTINPAST',0),(227,'transaction_loan','WITHDRAW_LOAN','LOAN','WITHDRAW',0),(228,'transaction_loan','WITHDRAWINPAST_LOAN','LOAN','WITHDRAWINPAST',0),(229,'transaction_loan','APPROVALUNDO_LOAN','LOAN','APPROVALUNDO',0),(230,'transaction_loan','DISBURSE_LOAN','LOAN','DISBURSE',0),(231,'transaction_loan','DISBURSEINPAST_LOAN','LOAN','DISBURSEINPAST',0),(232,'transaction_loan','DISBURSALUNDO_LOAN','LOAN','DISBURSALUNDO',0),(233,'transaction_loan','REPAYMENT_LOAN','LOAN','REPAYMENT',0),(234,'transaction_loan','REPAYMENTINPAST_LOAN','LOAN','REPAYMENTINPAST',0),(235,'transaction_loan','ADJUST_LOAN','LOAN','ADJUST',0),(236,'transaction_loan','WAIVEINTERESTPORTION_LOAN','LOAN','WAIVEINTERESTPORTION',0),(237,'transaction_loan','WRITEOFF_LOAN','LOAN','WRITEOFF',0),(238,'transaction_loan','CLOSE_LOAN','LOAN','CLOSE',0),(239,'transaction_loan','CLOSEASRESCHEDULED_LOAN','LOAN','CLOSEASRESCHEDULED',0),(240,'transaction_loan','UPDATELOANOFFICER_LOAN','LOAN','UPDATELOANOFFICER',0),(241,'transaction_loan','UPDATELOANOFFICER_LOAN_CHECKER','LOAN','UPDATELOANOFFICER',0),(242,'transaction_loan','REMOVELOANOFFICER_LOAN','LOAN','REMOVELOANOFFICER',0),(243,'transaction_loan','REMOVELOANOFFICER_LOAN_CHECKER','LOAN','REMOVELOANOFFICER',0),(244,'transaction_loan','BULKREASSIGN_LOAN','LOAN','BULKREASSIGN',0),(245,'transaction_loan','BULKREASSIGN_LOAN_CHECKER','LOAN','BULKREASSIGN',0),(246,'transaction_loan','APPROVE_LOAN_CHECKER','LOAN','APPROVE',0),(247,'transaction_loan','APPROVEINPAST_LOAN_CHECKER','LOAN','APPROVEINPAST',0),(248,'transaction_loan','REJECT_LOAN_CHECKER','LOAN','REJECT',0),(249,'transaction_loan','REJECTINPAST_LOAN_CHECKER','LOAN','REJECTINPAST',0),(250,'transaction_loan','WITHDRAW_LOAN_CHECKER','LOAN','WITHDRAW',0),(251,'transaction_loan','WITHDRAWINPAST_LOAN_CHECKER','LOAN','WITHDRAWINPAST',0),(252,'transaction_loan','APPROVALUNDO_LOAN_CHECKER','LOAN','APPROVALUNDO',0),(253,'transaction_loan','DISBURSE_LOAN_CHECKER','LOAN','DISBURSE',0),(254,'transaction_loan','DISBURSEINPAST_LOAN_CHECKER','LOAN','DISBURSEINPAST',0),(255,'transaction_loan','DISBURSALUNDO_LOAN_CHECKER','LOAN','DISBURSALUNDO',0),(256,'transaction_loan','REPAYMENT_LOAN_CHECKER','LOAN','REPAYMENT',0),(257,'transaction_loan','REPAYMENTINPAST_LOAN_CHECKER','LOAN','REPAYMENTINPAST',0),(258,'transaction_loan','ADJUST_LOAN_CHECKER','LOAN','ADJUST',0),(259,'transaction_loan','WAIVEINTERESTPORTION_LOAN_CHECKER','LOAN','WAIVEINTERESTPORTION',0),(260,'transaction_loan','WRITEOFF_LOAN_CHECKER','LOAN','WRITEOFF',0),(261,'transaction_loan','CLOSE_LOAN_CHECKER','LOAN','CLOSE',0),(262,'transaction_loan','CLOSEASRESCHEDULED_LOAN_CHECKER','LOAN','CLOSEASRESCHEDULED',0),(263,'transaction_deposit','APPROVE_DEPOSITACCOUNT','DEPOSITACCOUNT','APPROVE',0),(264,'transaction_deposit','REJECT_DEPOSITACCOUNT','DEPOSITACCOUNT','REJECT',0),(265,'transaction_deposit','WITHDRAW_DEPOSITACCOUNT','DEPOSITACCOUNT','WITHDRAW',0),(266,'transaction_deposit','APPROVALUNDO_DEPOSITACCOUNT','DEPOSITACCOUNT','APPROVALUNDO',0),(267,'transaction_deposit','WITHDRAWAL_DEPOSITACCOUNT','DEPOSITACCOUNT','WITHDRAWAL',0),(268,'transaction_deposit','INTEREST_DEPOSITACCOUNT','DEPOSITACCOUNT','INTEREST',0),(269,'transaction_deposit','RENEW_DEPOSITACCOUNT','DEPOSITACCOUNT','RENEW',0),(270,'transaction_deposit','APPROVE_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','APPROVE',0),(271,'transaction_deposit','REJECT_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','REJECT',0),(272,'transaction_deposit','WITHDRAW_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','WITHDRAW',0),(273,'transaction_deposit','APPROVALUNDO_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','APPROVALUNDO',0),(274,'transaction_deposit','WITHDRAWAL_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','WITHDRAWAL',0),(275,'transaction_deposit','INTEREST_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','INTEREST',0),(276,'transaction_deposit','RENEW_DEPOSITACCOUNT_CHECKER','DEPOSITACCOUNT','RENEW',0),(277,'accounting','CREATE_GLACCOUNT','GLACCOUNT','CREATE',0),(278,'accounting','UPDATE_GLACCOUNT','GLACCOUNT','UPDATE',0),(279,'accounting','DELETE_GLACCOUNT','GLACCOUNT','DELETE',0),(280,'accounting','CREATE_GLCLOSURE','GLCLOSURE','CREATE',0),(281,'accounting','UPDATE_GLCLOSURE','GLCLOSURE','UPDATE',0),(282,'accounting','DELETE_GLCLOSURE','GLCLOSURE','DELETE',0),(283,'accounting','CREATE_JOURNALENTRY','JOURNALENTRY','CREATE',0),(284,'accounting','REVERSE_JOURNALENTRY','JOURNALENTRY','REVERSE',0),(285,'report','READ_Active Loans - Details','Active Loans - Details','READ',0),(286,'report','READ_Active Loans - Summary','Active Loans - Summary','READ',0),(287,'report','READ_Active Loans by Disbursal Period','Active Loans by Disbursal Period','READ',0),(288,'report','READ_Active Loans in last installment','Active Loans in last installment','READ',0),(289,'report','READ_Active Loans in last installment Summary','Active Loans in last installment Summary','READ',0),(290,'report','READ_Active Loans Passed Final Maturity','Active Loans Passed Final Maturity','READ',0),(291,'report','READ_Active Loans Passed Final Maturity Summary','Active Loans Passed Final Maturity Summary','READ',0),(292,'report','READ_Aging Detail','Aging Detail','READ',0),(293,'report','READ_Aging Summary (Arrears in Months)','Aging Summary (Arrears in Months)','READ',0),(294,'report','READ_Aging Summary (Arrears in Weeks)','Aging Summary (Arrears in Weeks)','READ',0),(295,'report','READ_Balance Sheet','Balance Sheet','READ',0),(296,'report','READ_Branch Expected Cash Flow','Branch Expected Cash Flow','READ',0),(297,'report','READ_Client Listing','Client Listing','READ',0),(298,'report','READ_Client Loans Listing','Client Loans Listing','READ',0),(299,'report','READ_Expected Payments By Date - Basic','Expected Payments By Date - Basic','READ',0),(300,'report','READ_Expected Payments By Date - Formatted','Expected Payments By Date - Formatted','READ',0),(301,'report','READ_Funds Disbursed Between Dates Summary','Funds Disbursed Between Dates Summary','READ',0),(302,'report','READ_Funds Disbursed Between Dates Summary by Office','Funds Disbursed Between Dates Summary by Office','READ',0),(303,'report','READ_Income Statement','Income Statement','READ',0),(304,'report','READ_Loan Account Schedule','Loan Account Schedule','READ',0),(305,'report','READ_Loans Awaiting Disbursal','Loans Awaiting Disbursal','READ',0),(306,'report','READ_Loans Awaiting Disbursal Summary','Loans Awaiting Disbursal Summary','READ',0),(307,'report','READ_Loans Awaiting Disbursal Summary by Month','Loans Awaiting Disbursal Summary by Month','READ',0),(308,'report','READ_Loans Pending Approval','Loans Pending Approval','READ',0),(309,'report','READ_Obligation Met Loans Details','Obligation Met Loans Details','READ',0),(310,'report','READ_Obligation Met Loans Summary','Obligation Met Loans Summary','READ',0),(311,'report','READ_Portfolio at Risk','Portfolio at Risk','READ',0),(312,'report','READ_Portfolio at Risk by Branch','Portfolio at Risk by Branch','READ',0),(313,'report','READ_Rescheduled Loans','Rescheduled Loans','READ',0),(314,'report','READ_Trial Balance','Trial Balance','READ',0),(315,'report','READ_Written-Off Loans','Written-Off Loans','READ',0),(316,'datatable','CREATE_extra_client_details','extra_client_details','CREATE',1),(317,'datatable','CREATE_extra_family_details','extra_family_details','CREATE',1),(318,'datatable','CREATE_extra_loan_details','extra_loan_details','CREATE',1),(319,'datatable','READ_extra_client_details','extra_client_details','READ',1),(320,'datatable','READ_extra_family_details','extra_family_details','READ',1),(321,'datatable','READ_extra_loan_details','extra_loan_details','READ',1),(322,'datatable','UPDATE_extra_client_details','extra_client_details','UPDATE',1),(323,'datatable','UPDATE_extra_family_details','extra_family_details','UPDATE',1),(324,'datatable','UPDATE_extra_loan_details','extra_loan_details','UPDATE',1),(325,'datatable','DELETE_extra_client_details','extra_client_details','DELETE',1),(326,'datatable','DELETE_extra_family_details','extra_family_details','DELETE',1),(327,'datatable','DELETE_extra_loan_details','extra_loan_details','DELETE',1); /*!40000 ALTER TABLE `m_permission` ENABLE KEYS */; UNLOCK TABLES; @@ -1774,4 +1774,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2013-03-20 11:54:31 +-- Dump completed on 2013-03-20 18:57:24 diff --git a/mifosng-db/patches/6-basic-savings-with-deposit-and-withdrawal.sql b/mifosng-db/patches/6-basic-savings-with-deposit-and-withdrawal.sql new file mode 100644 index 000000000..bd39c142a --- /dev/null +++ b/mifosng-db/patches/6-basic-savings-with-deposit-and-withdrawal.sql @@ -0,0 +1,51 @@ +INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) +VALUES +('transaction_savings', 'DEPOSIT_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'DEPOSIT', '1'), +('transaction_savings', 'DEPOSIT_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'DEPOSIT', '0'), +('transaction_savings', 'WITHDRAWAL_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'WITHDRAWAL', '1'), +('transaction_savings', 'WITHDRAWAL_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'WITHDRAWAL', '0'); + +DROP TABLE IF EXISTS `m_savings_account_transaction`; +DROP TABLE IF EXISTS `m_savings_account`; + +CREATE TABLE `m_savings_account` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `account_no` varchar(20) NOT NULL, + `external_id` varchar(100) DEFAULT NULL, + `client_id` bigint(20) DEFAULT NULL, + `group_id` bigint(20) DEFAULT NULL, + `product_id` bigint(20) DEFAULT NULL, + `currency_code` varchar(3) NOT NULL, + `currency_digits` smallint(5) NOT NULL, + `nominal_interest_rate_per_period` decimal(19,6) NOT NULL, + `nominal_interest_rate_period_frequency_enum` smallint(5) NOT NULL, + `annual_nominal_interest_rate` decimal(19,6) NOT NULL, + `min_required_opening_balance` decimal(19,6) DEFAULT NULL, + `lockin_period_frequency` decimal(19,6) DEFAULT NULL, + `lockin_period_frequency_enum` smallint(5) DEFAULT NULL, + `total_deposits_derived` decimal(19,6) DEFAULT NULL, + `total_withdrawals_derived` decimal(19,6) DEFAULT NULL, + `total_interest_posted_derived` decimal(19,6) DEFAULT NULL, + `account_balance_derived` decimal(19,6) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY `sa_account_no_UNIQUE` (`account_no`), + UNIQUE KEY `sa_externalid_UNIQUE` (`external_id`), + KEY `FKSA00000000000001` (`client_id`), + KEY `FKSA00000000000002` (`group_id`), + KEY `FKSA00000000000003` (`product_id`), + CONSTRAINT `FKSA00000000000001` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), + CONSTRAINT `FKSA00000000000002` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`), + CONSTRAINT `FKSA00000000000003` FOREIGN KEY (`product_id`) REFERENCES `m_savings_product` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE `m_savings_account_transaction` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `savings_account_id` bigint(20) NOT NULL, + `transaction_type_enum` smallint(5) NOT NULL, + `transaction_date` date NOT NULL, + `amount` decimal(19,6) NOT NULL, + `is_reversed` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + KEY `FKSAT0000000001` (`savings_account_id`), + CONSTRAINT `FKSAT0000000001` FOREIGN KEY (`savings_account_id`) REFERENCES `m_savings_account` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/commands/domain/CommandWrapper.java b/mifosng-provider/src/main/java/org/mifosplatform/commands/domain/CommandWrapper.java index 5e2e66537..0c773fc24 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/commands/domain/CommandWrapper.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/commands/domain/CommandWrapper.java @@ -13,6 +13,7 @@ public class CommandWrapper { private final Long groupId; private final Long clientId; private final Long loanId; + private final Long savingsId; private final String actionName; private final String entityName; private final String taskPermissionName; @@ -41,6 +42,7 @@ public class CommandWrapper { this.groupId = null; this.clientId = null; this.loanId = null; + this.savingsId = null; this.actionName = actionName; this.entityName = entityName; this.taskPermissionName = actionName + "_" + entityName; @@ -55,14 +57,16 @@ public class CommandWrapper { } - public CommandWrapper(final Long officeId, final Long groupId, final Long clientId, final Long loanId, final String actionName, - final String entityName, final Long entityId, final Long subentityId, final Long codeId, - final String supportedEntityType, final Long supportedEntityId, final String href, final String json, final String transactionId) { + public CommandWrapper(final Long officeId, final Long groupId, final Long clientId, final Long loanId, final Long savingsId, + final String actionName, final String entityName, final Long entityId, final Long subentityId, + final Long codeId, final String supportedEntityType, final Long supportedEntityId, final String href, final String json, + final String transactionId) { this.commandId = null; this.officeId = officeId; this.groupId = groupId; this.clientId = clientId; this.loanId = loanId; + this.savingsId = savingsId; this.actionName = actionName; this.entityName = entityName; this.taskPermissionName = actionName + "_" + entityName; @@ -107,11 +111,11 @@ public class CommandWrapper { public String getTaskPermissionName() { return this.taskPermissionName; } - - public Long getCodeId(){ + + public Long getCodeId() { return this.codeId; } - + public String getHref() { return this.href; } @@ -119,7 +123,7 @@ public class CommandWrapper { public String getJson() { return this.json; } - + public String getTransactionId() { return this.transactionId; } @@ -148,6 +152,10 @@ public class CommandWrapper { return this.loanId; } + public Long getSavingsId() { + return this.savingsId; + } + public Long getSupportedEntityId() { return this.supportedEntityId; } @@ -177,7 +185,7 @@ public class CommandWrapper { public boolean isUpdateRolePermissions() { return this.actionName.equalsIgnoreCase("PERMISSIONS") && this.entityId != null; } - + public boolean isConfigurationResource() { return this.entityName.equalsIgnoreCase("CONFIGURATION"); } @@ -205,27 +213,27 @@ public class CommandWrapper { public boolean isCodeValueResource() { return this.entityName.equalsIgnoreCase("CODEVALUE"); } - + public boolean isStaffResource() { return this.entityName.equalsIgnoreCase("STAFF"); } - + public boolean isGuarantorResource() { return this.entityName.equalsIgnoreCase("GUARANTOR"); } - + public boolean isGLAccountResource() { return this.entityName.equalsIgnoreCase("GLACCOUNT"); } - + public boolean isGLClosureResource() { return this.entityName.equalsIgnoreCase("GLCLOSURE"); } - + public boolean isJournalEntryResource() { return this.entityName.equalsIgnoreCase("JOURNALENTRY"); } - + public boolean isRevertJournalEntry() { return this.actionName.equalsIgnoreCase("REVERSE") && this.entityName.equalsIgnoreCase("JOURNALENTRY"); } @@ -265,7 +273,7 @@ public class CommandWrapper { public boolean isLoanResource() { return this.entityName.equalsIgnoreCase("LOAN"); } - + public boolean isLoanChargeResource() { return this.entityName.equalsIgnoreCase("LOANCHARGE"); } @@ -341,7 +349,7 @@ public class CommandWrapper { public boolean isRemoveLoanOfficer() { return this.actionName.equalsIgnoreCase("REMOVELOANOFFICER") && this.entityName.equalsIgnoreCase("LOAN"); } - + public boolean isBulkUpdateLoanOfficer() { return this.actionName.equalsIgnoreCase("BULKREASSIGN") && this.entityName.equalsIgnoreCase("LOAN"); } @@ -354,7 +362,7 @@ public class CommandWrapper { /* also covers case of deleting all of a one to many*/ return isDatatableResource() && isDeleteOperation() && this.subentityId == null; } - + public boolean isDeleteMultiple() { return isDatatableResource() && isDeleteOperation() && this.subentityId != null; } @@ -362,7 +370,7 @@ public class CommandWrapper { public boolean isUpdateOneToOne() { return isDatatableResource() && isUpdateOperation() && this.subentityId == null; } - + public boolean isUpdateMultiple() { return isDatatableResource() && isUpdateOperation() && this.subentityId != null; } @@ -370,7 +378,7 @@ public class CommandWrapper { public boolean isUnassignStaff() { return this.actionName.equalsIgnoreCase("UNASSIGNSTAFF") && this.entityName.equalsIgnoreCase("GROUP"); } - + public String commandName() { return this.actionName + "_" + this.entityName; } @@ -379,96 +387,74 @@ public class CommandWrapper { return this.isUserResource() && isUpdate() && loggedInUserId.equals(this.entityId); } - public boolean isDepositProductResource() { - return this.entityName.equalsIgnoreCase("DEPOSITPRODUCT"); - } + public boolean isDepositProductResource() { + return this.entityName.equalsIgnoreCase("DEPOSITPRODUCT"); + } - public boolean isDepositAccountResource() { - return this.entityName.equalsIgnoreCase("DEPOSITACCOUNT"); - } + public boolean isDepositAccountResource() { + return this.entityName.equalsIgnoreCase("DEPOSITACCOUNT"); + } - public boolean isApprovalOfDeposit() { - return this.actionName.equalsIgnoreCase("APPROVE") && this.entityName.equalsIgnoreCase("DEPOSITACCOUNT"); - } + public boolean isApprovalOfDeposit() { + return this.actionName.equalsIgnoreCase("APPROVE") && this.entityName.equalsIgnoreCase("DEPOSITACCOUNT"); + } - public boolean isWithdrawDepositAmount() { - return this.actionName.equalsIgnoreCase("WITHDRAWAL") && this.entityName.equalsIgnoreCase("DEPOSITACCOUNT"); - } + public boolean isWithdrawDepositAmount() { + return this.actionName.equalsIgnoreCase("WITHDRAWAL") && this.entityName.equalsIgnoreCase("DEPOSITACCOUNT"); + } - public boolean isWithdrawInterest() { - return this.actionName.equalsIgnoreCase("INTEREST") && this.entityName.equalsIgnoreCase("DEPOSITACCOUNT"); - } + public boolean isWithdrawInterest() { + return this.actionName.equalsIgnoreCase("INTEREST") && this.entityName.equalsIgnoreCase("DEPOSITACCOUNT"); + } - public boolean isRenewOfDepositApplicaion() { - return this.actionName.equalsIgnoreCase("RENEW") && this.entityName.equalsIgnoreCase("DEPOSITACCOUNT"); - } + public boolean isRenewOfDepositApplicaion() { + return this.actionName.equalsIgnoreCase("RENEW") && this.entityName.equalsIgnoreCase("DEPOSITACCOUNT"); + } - public boolean isRejectionOfDepositApplicaion() { - return this.actionName.equalsIgnoreCase("REJECT") && this.entityName.equalsIgnoreCase("DEPOSITACCOUNT"); - } + public boolean isRejectionOfDepositApplicaion() { + return this.actionName.equalsIgnoreCase("REJECT") && this.entityName.equalsIgnoreCase("DEPOSITACCOUNT"); + } - public boolean isWithdrawByApplicant() { - return this.actionName.equalsIgnoreCase("WITHDRAW") && this.entityName.equalsIgnoreCase("DEPOSITACCOUNT"); - } + public boolean isWithdrawByApplicant() { + return this.actionName.equalsIgnoreCase("WITHDRAW") && this.entityName.equalsIgnoreCase("DEPOSITACCOUNT"); + } - public boolean isUndoApprovalOfDepositApplication() { - return this.actionName.equalsIgnoreCase("APPROVALUNDO") && this.entityName.equalsIgnoreCase("DEPOSITACCOUNT"); - } + public boolean isUndoApprovalOfDepositApplication() { + return this.actionName.equalsIgnoreCase("APPROVALUNDO") && this.entityName.equalsIgnoreCase("DEPOSITACCOUNT"); + } - public boolean isSavingProductResource() { - return this.entityName.equalsIgnoreCase("SAVINGSPRODUCT"); - } + public boolean isSavingsProductResource() { + return this.entityName.equalsIgnoreCase("SAVINGSPRODUCT"); + } - public boolean isSavingAccountResource() { - return this.entityName.equalsIgnoreCase("SAVINGSACCOUNT"); - } + public boolean isSavingsAccountResource() { + return this.entityName.equalsIgnoreCase("SAVINGSACCOUNT"); + } - public boolean isApprovalOfSaving() { - return this.actionName.equalsIgnoreCase("APPROVE") && this.entityName.equalsIgnoreCase("SAVINGSACCOUNT"); - } + public boolean isSavingsAccountDeposit() { + return this.actionName.equalsIgnoreCase("DEPOSIT") && this.entityName.equalsIgnoreCase("SAVINGSACCOUNT"); + } - public boolean isSavingAccountDeposit() { - return this.actionName.equalsIgnoreCase("DEPOSIT") && this.entityName.equalsIgnoreCase("SAVINGSACCOUNT"); - } + public boolean isSavingsAccountWithdrawal() { + return this.actionName.equalsIgnoreCase("WITHDRAWAL") && this.entityName.equalsIgnoreCase("SAVINGSACCOUNT"); + } - public boolean isRejectOfSavingAccount() { - return this.actionName.equalsIgnoreCase("REJECT") && this.entityName.equalsIgnoreCase("SAVINGSACCOUNT"); - } - - public boolean isWithdrawSavingAmount() { - return this.actionName.equalsIgnoreCase("WITHDRAWAL") && this.entityName.equalsIgnoreCase("SAVINGSACCOUNT"); - } - - public boolean isWithdrawOfSavingApplicatin() { - return this.actionName.equalsIgnoreCase("WITHDRAW") && this.entityName.equalsIgnoreCase("SAVINGSACCOUNT"); - } - - public boolean isUndoApprovalOfSavingAccount() { - return this.actionName.equalsIgnoreCase("APPROVALUNDO") && this.entityName.equalsIgnoreCase("SAVINGSACCOUNT"); - } - - - public boolean isCalendarResource() { return this.entityName.equalsIgnoreCase("CALENDAR"); } - + public boolean isNoteResource() { boolean isnoteResource = false; - if(this.entityName.equalsIgnoreCase("CLIENTNOTE") || - this.entityName.equalsIgnoreCase("LOANNOTE") || - this.entityName.equalsIgnoreCase("LOANTRANSACTIONNOTE") || - this.entityName.equalsIgnoreCase("DEPOSITNOTE") || - this.entityName.equalsIgnoreCase("SAVINGNOTE") || - this.entityName.equalsIgnoreCase("GROUPNOTE")){ + if (this.entityName.equalsIgnoreCase("CLIENTNOTE") || this.entityName.equalsIgnoreCase("LOANNOTE") + || this.entityName.equalsIgnoreCase("LOANTRANSACTIONNOTE") || this.entityName.equalsIgnoreCase("DEPOSITNOTE") + || this.entityName.equalsIgnoreCase("SAVINGNOTE") || this.entityName.equalsIgnoreCase("GROUPNOTE")) { isnoteResource = true; } return isnoteResource; } - + public boolean isGroupResource() { return this.entityName.equalsIgnoreCase("GROUP"); } - } \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/commands/service/CommandWrapperBuilder.java b/mifosng-provider/src/main/java/org/mifosplatform/commands/service/CommandWrapperBuilder.java index 8c0d66b4a..86890da1e 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/commands/service/CommandWrapperBuilder.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/commands/service/CommandWrapperBuilder.java @@ -13,6 +13,7 @@ public class CommandWrapperBuilder { private Long groupId; private Long clientId; private Long loanId; + private Long savingsId; private String actionName; private String entityName; private Long entityId; @@ -25,16 +26,11 @@ public class CommandWrapperBuilder { private Long supportedEntityId; public CommandWrapper build() { - return new CommandWrapper(this.officeId, this.groupId, this.clientId, this.loanId, this.actionName, this.entityName, this.entityId, this.subentityId, - this.codeId, this.supportedEntityType, this.supportedEntityId, this.href, this.json, - this.transactionId); + return new CommandWrapper(this.officeId, this.groupId, this.clientId, this.loanId, this.savingsId, this.actionName, + this.entityName, this.entityId, this.subentityId, this.codeId, this.supportedEntityType, this.supportedEntityId, this.href, + this.json, this.transactionId); } - // public CommandWrapperBuilder withEntityId(final Long withId) { - // this.entityId = withId; - // return this; - // } - public CommandWrapperBuilder withLoanId(final Long withLoanId) { this.loanId = withLoanId; return this; @@ -325,7 +321,7 @@ public class CommandWrapperBuilder { return this; } - public CommandWrapperBuilder createDatatable(final String datatable, final Long apptableId, final Long datatableId) { + public CommandWrapperBuilder createDatatable(final String datatable, final Long apptableId, final Long datatableId) { this.actionName = "CREATE"; commonDatatableSettings(datatable, apptableId, datatableId); return this; @@ -343,9 +339,8 @@ public class CommandWrapperBuilder { return this; } - private void commonDatatableSettings(final String datatable, final Long apptableId, final Long datatableId) { - + this.entityName = datatable; this.entityId = apptableId; this.subentityId = datatableId; @@ -355,8 +350,7 @@ public class CommandWrapperBuilder { this.href = "/datatables/" + datatable + "/" + apptableId + "/" + datatableId; } } - - + public CommandWrapperBuilder createLoanCharge(final Long loanId) { this.actionName = "CREATE"; this.entityName = "LOANCHARGE"; @@ -644,110 +638,6 @@ public class CommandWrapperBuilder { return this; } - public CommandWrapperBuilder createDepositProduct() { - this.actionName = "CREATE"; - this.entityName = "DEPOSITPRODUCT"; - this.entityId = null; - this.href = "/depositproducts/template"; - return this; - } - - public CommandWrapperBuilder updateDepositProduct(final Long productId) { - this.actionName = "UPDATE"; - this.entityName = "DEPOSITPRODUCT"; - this.entityId = productId; - this.href = "/depositproducts/" + productId; - return this; - } - - public CommandWrapperBuilder deleteDepositProduct(final Long productId) { - this.actionName = "DELETE"; - this.entityName = "DEPOSITPRODUCT"; - this.entityId = productId; - this.href = "/depositproducts/" + productId; - return this; - } - - public CommandWrapperBuilder createDepositAccount() { - this.actionName = "CREATE"; - this.entityName = "DEPOSITACCOUNT"; - this.entityId = null; - this.href = "/depositaccounts/template"; - return this; - } - - public CommandWrapperBuilder updateDepositAccount(final Long accountId) { - this.actionName = "UPDATE"; - this.entityName = "DEPOSITACCOUNT"; - this.entityId = accountId; - this.href = "/depositaccounts/" + accountId; - return this; - } - - public CommandWrapperBuilder deleteDepositAccount(final Long accountId) { - this.actionName = "DELETE"; - this.entityName = "DEPOSITACCOUNT"; - this.entityId = accountId; - this.href = "/depositaccounts/" + accountId; - return this; - } - - public CommandWrapperBuilder approveDepositApplication(final Long accountId) { - this.actionName = "APPROVE"; - this.entityName = "DEPOSITACCOUNT"; - this.entityId = accountId; - this.href = "/depositaccounts/" + accountId; - return this; - } - - public CommandWrapperBuilder withdrawDepositAmount(final Long accountId) { - this.actionName = "WITHDRAWAL"; - this.entityName = "DEPOSITACCOUNT"; - this.entityId = accountId; - this.href = "/depositaccounts/" + accountId; - return this; - } - - public CommandWrapperBuilder withdrawInterestDepositAmount(final Long accountId) { - this.actionName = "INTEREST"; - this.entityName = "DEPOSITACCOUNT"; - this.entityId = accountId; - this.href = "/depositaccounts/" + accountId; - return this; - } - - public CommandWrapperBuilder renewDepositAccount(final Long accountId) { - this.actionName = "RENEW"; - this.entityName = "DEPOSITACCOUNT"; - this.entityId = accountId; - this.href = "/depositaccounts/" + accountId; - return this; - } - - public CommandWrapperBuilder rejectDepositAccount(final Long accountId) { - this.actionName = "REJECT"; - this.entityName = "DEPOSITACCOUNT"; - this.entityId = accountId; - this.href = "/depositaccounts/" + accountId; - return this; - } - - public CommandWrapperBuilder withdrawDepositApplication(final Long accountId) { - this.actionName = "WITHDRAW"; - this.entityName = "DEPOSITACCOUNT"; - this.entityId = accountId; - this.href = "/depositaccounts/" + accountId; - return this; - } - - public CommandWrapperBuilder undoDepositApplicationApproval(final Long accountId) { - this.actionName = "APPROVALUNDO"; - this.entityName = "DEPOSITACCOUNT"; - this.entityId = accountId; - this.href = "/depositaccounts/" + accountId; - return this; - } - public CommandWrapperBuilder createSavingProduct() { this.actionName = "CREATE"; this.entityName = "SAVINGSPRODUCT"; @@ -796,19 +686,21 @@ public class CommandWrapperBuilder { return this; } - public CommandWrapperBuilder depositOfSavingAmount(final Long accountId) { + public CommandWrapperBuilder savingsAccountDeposit(final Long accountId) { this.actionName = "DEPOSIT"; this.entityName = "SAVINGSACCOUNT"; - this.entityId = accountId; - this.href = "/savingsaccounts/" + accountId; + this.loanId = accountId; + this.entityId = null; + this.href = "/savingsaccounts/" + accountId + "/transactions"; return this; } - public CommandWrapperBuilder withdrawSavingAmount(final Long accountId) { + public CommandWrapperBuilder savingsAccountWithdrawal(final Long accountId) { this.actionName = "WITHDRAWAL"; this.entityName = "SAVINGSACCOUNT"; - this.entityId = accountId; - this.href = "/savingsaccounts/" + accountId; + this.loanId = accountId; + this.entityId = null; + this.href = "/savingsaccounts/" + accountId + "/transactions"; return this; } diff --git a/mifosng-provider/src/main/java/org/mifosplatform/commands/service/PortfolioCommandSourceWritePlatformServiceImpl.java b/mifosng-provider/src/main/java/org/mifosplatform/commands/service/PortfolioCommandSourceWritePlatformServiceImpl.java index c4d559d29..a537db975 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/commands/service/PortfolioCommandSourceWritePlatformServiceImpl.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/commands/service/PortfolioCommandSourceWritePlatformServiceImpl.java @@ -40,15 +40,18 @@ public class PortfolioCommandSourceWritePlatformServiceImpl implements Portfolio @Override public CommandProcessingResult logCommandSource(final CommandWrapper wrapper) { - + boolean isApprovedByChecker = false; // check if is update of own account details if (wrapper.isUpdateOfOwnUserDetails(context.authenticatedUser().getId())) { // then allow this operation to proceed. // maker checker doesnt mean anything here. - isApprovedByChecker = true; // set to true in case permissions have been maker-checker enabled by accident. + isApprovedByChecker = true; // set to true in case permissions have + // been maker-checker enabled by + // accident. } else { - // if not user changing their own details - check user has permission to perform specific task. + // if not user changing their own details - check user has + // permission to perform specific task. context.authenticatedUser().validateHasPermissionTo(wrapper.getTaskPermissionName()); } @@ -57,7 +60,9 @@ public class PortfolioCommandSourceWritePlatformServiceImpl implements Portfolio try { final JsonElement parsedCommand = this.fromApiJsonHelper.parse(json); final JsonCommand command = JsonCommand.from(json, parsedCommand, this.fromApiJsonHelper, wrapper.getEntityName(), - wrapper.getEntityId(), wrapper.getSubentityId(), wrapper.getGroupId(), wrapper.getClientId(), wrapper.getLoanId(), wrapper.getCodeId(), wrapper.getSupportedEntityType(), wrapper.getSupportedEntityId(), wrapper.getTransactionId()); + wrapper.getEntityId(), wrapper.getSubentityId(), wrapper.getGroupId(), wrapper.getClientId(), wrapper.getLoanId(), + wrapper.getSavingsId(), wrapper.getCodeId(), wrapper.getSupportedEntityType(), wrapper.getSupportedEntityId(), + wrapper.getTransactionId()); result = this.processAndLogCommandService.processAndLogCommand(wrapper, command, isApprovedByChecker); } catch (RollbackTransactionAsCommandIsNotApprovedByCheckerException e) { @@ -67,7 +72,9 @@ public class PortfolioCommandSourceWritePlatformServiceImpl implements Portfolio final JsonElement parsedCommand = this.fromApiJsonHelper.parse(jsonToUse); final JsonCommand command = JsonCommand.from(jsonToUse, parsedCommand, this.fromApiJsonHelper, wrapper.getEntityName(), - wrapper.getEntityId(), wrapper.getSubentityId(), wrapper.getGroupId(), wrapper.getClientId(), wrapper.getLoanId(), wrapper.getCodeId(), wrapper.getSupportedEntityType(), wrapper.getSupportedEntityId(), wrapper.getTransactionId()); + wrapper.getEntityId(), wrapper.getSubentityId(), wrapper.getGroupId(), wrapper.getClientId(), wrapper.getLoanId(), + wrapper.getSavingsId(), wrapper.getCodeId(), wrapper.getSupportedEntityType(), wrapper.getSupportedEntityId(), + wrapper.getTransactionId()); result = this.processAndLogCommandService.logCommand(wrapper, command); } @@ -83,11 +90,13 @@ public class PortfolioCommandSourceWritePlatformServiceImpl implements Portfolio context.authenticatedUser().validateHasCheckerPermissionTo(commandSourceInput.getPermissionCode()); final CommandWrapper wrapper = CommandWrapper.fromExistingCommand(commandId, commandSourceInput.getActionName(), - commandSourceInput.getEntityName(), commandSourceInput.resourceId(), commandSourceInput.subresourceId(), commandSourceInput.getResourceGetUrl()); + commandSourceInput.getEntityName(), commandSourceInput.resourceId(), commandSourceInput.subresourceId(), + commandSourceInput.getResourceGetUrl()); final JsonElement parsedCommand = this.fromApiJsonHelper.parse(commandSourceInput.json()); final JsonCommand command = JsonCommand.fromExistingCommand(commandId, commandSourceInput.json(), parsedCommand, - this.fromApiJsonHelper, commandSourceInput.getEntityName(), commandSourceInput.resourceId(), commandSourceInput.subresourceId()); + this.fromApiJsonHelper, commandSourceInput.getEntityName(), commandSourceInput.resourceId(), + commandSourceInput.subresourceId()); final boolean makerCheckerApproval = true; return this.processAndLogCommandService.processAndLogCommand(wrapper, command, makerCheckerApproval); diff --git a/mifosng-provider/src/main/java/org/mifosplatform/commands/service/SynchronousCommandProcessingService.java b/mifosng-provider/src/main/java/org/mifosplatform/commands/service/SynchronousCommandProcessingService.java index 1f5af54a9..e3d4af282 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/commands/service/SynchronousCommandProcessingService.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/commands/service/SynchronousCommandProcessingService.java @@ -338,43 +338,9 @@ public class SynchronousCommandProcessingService implements CommandProcessingSer handler = applicationContext.getBean("reverseJournalEntryCommandHandler", NewCommandSourceHandler.class); } else { throw new UnsupportedCommandException(wrapper.commandName()); - } - } else if (wrapper.isDepositProductResource()) { - if (wrapper.isCreate()) { - handler = applicationContext.getBean("createDepositProductCommandHandler", NewCommandSourceHandler.class); - } else if (wrapper.isUpdate()) { - handler = applicationContext.getBean("updateDepositProductCommandHandler", NewCommandSourceHandler.class); - } else if (wrapper.isDelete()) { - handler = applicationContext.getBean("deleteDepositProductCommandHandler", NewCommandSourceHandler.class); - } else { - throw new UnsupportedCommandException(wrapper.commandName()); } - } else if (wrapper.isDepositAccountResource()) { - if (wrapper.isCreate()) { - handler = applicationContext.getBean("createDepositAccountCommandHandler", NewCommandSourceHandler.class); - } else if (wrapper.isUpdate()) { - handler = applicationContext.getBean("updateDepositAccountCommandHandler", NewCommandSourceHandler.class); - } else if (wrapper.isDelete()) { - handler = applicationContext.getBean("deleteDepositAccountCommandHandler", NewCommandSourceHandler.class); - } else if (wrapper.isApprovalOfDeposit()) { - handler = applicationContext.getBean("approveDepositAccountCommandHandler", NewCommandSourceHandler.class); - } else if (wrapper.isWithdrawDepositAmount()) { - handler = applicationContext.getBean("withdrawDepositAccountAmountCommandHandler", NewCommandSourceHandler.class); - } else if (wrapper.isWithdrawInterest()) { - handler = applicationContext.getBean("withdrawInterestDepositAccountAmountCommandHandler", NewCommandSourceHandler.class); - } else if (wrapper.isRenewOfDepositApplicaion()) { - handler = applicationContext.getBean("renewDepositAccountCommandHandler", NewCommandSourceHandler.class); - } else if (wrapper.isRejectionOfDepositApplicaion()) { - handler = applicationContext.getBean("rejectDepositAccountCommandHandler", NewCommandSourceHandler.class); - } else if (wrapper.isWithdrawByApplicant()) { - handler = applicationContext.getBean("withDrawByApplicantDepositAccountCommandHandler", NewCommandSourceHandler.class); - } else if (wrapper.isUndoApprovalOfDepositApplication()) { - handler = applicationContext.getBean("undoApprovalDepositAccountCommandHandler", NewCommandSourceHandler.class); - } else { - throw new UnsupportedCommandException(wrapper.commandName()); - } - } else if (wrapper.isSavingProductResource()) { - if (wrapper.isCreate()) { + } else if (wrapper.isSavingsProductResource()) { + if (wrapper.isCreate()) { handler = applicationContext.getBean("createSavingsProductCommandHandler", NewCommandSourceHandler.class); } else if (wrapper.isUpdate()) { handler = applicationContext.getBean("updateSavingsProductCommandHandler", NewCommandSourceHandler.class); @@ -383,13 +349,17 @@ public class SynchronousCommandProcessingService implements CommandProcessingSer } else { throw new UnsupportedCommandException(wrapper.commandName()); } - } else if (wrapper.isSavingAccountResource()) { - if (wrapper.isCreate()) { + } else if (wrapper.isSavingsAccountResource()) { + if (wrapper.isCreate()) { handler = applicationContext.getBean("createSavingsAccountCommandHandler", NewCommandSourceHandler.class); } else if (wrapper.isUpdate()) { handler = applicationContext.getBean("updateSavingsAccountCommandHandler", NewCommandSourceHandler.class); } else if (wrapper.isDelete()) { handler = applicationContext.getBean("deleteSavingsAccountCommandHandler", NewCommandSourceHandler.class); + } else if (wrapper.isSavingsAccountDeposit()) { + handler = applicationContext.getBean("depositSavingsAccountCommandHandler", NewCommandSourceHandler.class); + } else if (wrapper.isSavingsAccountWithdrawal()) { + handler = applicationContext.getBean("withdrawSavingsAccountCommandHandler", NewCommandSourceHandler.class); } else { throw new UnsupportedCommandException(wrapper.commandName()); } @@ -415,7 +385,7 @@ public class SynchronousCommandProcessingService implements CommandProcessingSer } else { throw new UnsupportedCommandException(wrapper.commandName()); } - + } else { throw new UnsupportedCommandException(wrapper.commandName()); } diff --git a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/api/JsonCommand.java b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/api/JsonCommand.java index 34096fc97..4c83e8d65 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/api/JsonCommand.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/api/JsonCommand.java @@ -37,6 +37,7 @@ public final class JsonCommand { private final Long groupId; private final Long clientId; private final Long loanId; + private final Long savingsId; private final String entityName; private final Long codeId; private final String supportedEntityType; @@ -44,22 +45,22 @@ public final class JsonCommand { private final String transactionId; public static JsonCommand from(final String jsonCommand, final JsonElement parsedCommand, final FromJsonHelper fromApiJsonHelper, - final String entityName, final Long resourceId, final Long subresourceId, final Long groupId, final Long clientId, final Long loanId, - final Long codeId, final String supportedEntityType, - final Long supportedEntityId, final String transactionId) { - return new JsonCommand(null, jsonCommand, parsedCommand, fromApiJsonHelper, entityName, resourceId, subresourceId, groupId, clientId, loanId, - codeId, supportedEntityType, supportedEntityId, transactionId); + final String entityName, final Long resourceId, final Long subresourceId, final Long groupId, final Long clientId, + final Long loanId, final Long savingsId, final Long codeId, final String supportedEntityType, final Long supportedEntityId, + final String transactionId) { + return new JsonCommand(null, jsonCommand, parsedCommand, fromApiJsonHelper, entityName, resourceId, subresourceId, groupId, + clientId, loanId, savingsId, codeId, supportedEntityType, supportedEntityId, transactionId); } public static JsonCommand fromExistingCommand(final Long commandId, final String jsonCommand, final JsonElement parsedCommand, final FromJsonHelper fromApiJsonHelper, final String entityName, final Long resourceId, final Long subresourceId) { - return new JsonCommand(commandId, jsonCommand, parsedCommand, fromApiJsonHelper, entityName, resourceId, subresourceId, null, null, null, null, - null, null, null); + return new JsonCommand(commandId, jsonCommand, parsedCommand, fromApiJsonHelper, entityName, resourceId, subresourceId, null, null, + null, null, null, null, null, null); } public JsonCommand(final Long commandId, final String jsonCommand, final JsonElement parsedCommand, - final FromJsonHelper fromApiJsonHelper, final String entityName, final Long resourceId, final Long subresourceId, final Long groupId, - final Long clientId, final Long loanId, final Long codeId, + final FromJsonHelper fromApiJsonHelper, final String entityName, final Long resourceId, final Long subresourceId, + final Long groupId, final Long clientId, final Long loanId, final Long savingsId, final Long codeId, final String supportedEntityType, final Long supportedEntityId, final String transactionId) { this.commandId = commandId; this.jsonCommand = jsonCommand; @@ -71,6 +72,7 @@ public final class JsonCommand { this.groupId = groupId; this.clientId = clientId; this.loanId = loanId; + this.savingsId = savingsId; this.codeId = codeId; this.supportedEntityType = supportedEntityType; this.supportedEntityId = supportedEntityId; @@ -105,7 +107,7 @@ public final class JsonCommand { public Long entityId() { return this.resourceId; } - + public Long subentityId() { return this.subresourceId; } @@ -122,6 +124,10 @@ public final class JsonCommand { return this.loanId; } + public Long getSavingsId() { + return this.savingsId; + } + public Long getCodeId() { return this.codeId; } diff --git a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/data/CommandProcessingResult.java b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/data/CommandProcessingResult.java index c47864cae..c0a1bcc60 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/data/CommandProcessingResult.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/data/CommandProcessingResult.java @@ -19,6 +19,7 @@ public class CommandProcessingResult { private final Long groupId; private final Long clientId; private final Long loanId; + private final Long savingsId; private final Long resourceId; private final String transactionId; private final Map changes; @@ -26,10 +27,10 @@ public class CommandProcessingResult { private final String resourceIdentifier; public static CommandProcessingResult fromDetails(final Long commandId, final Long officeId, final Long groupId, final Long clientId, - final Long loanId, final String resourceIdentifier, final Long entityId, final String transactionId, + final Long loanId, final Long savingsId, final String resourceIdentifier, final Long entityId, final String transactionId, final Map changes) { - return new CommandProcessingResult(commandId, officeId, groupId, clientId, loanId, resourceIdentifier, entityId, transactionId, - changes); + return new CommandProcessingResult(commandId, officeId, groupId, clientId, loanId, savingsId, resourceIdentifier, entityId, + transactionId, changes); } public static CommandProcessingResult commandOnlyResult(final Long commandId) { @@ -75,17 +76,20 @@ public class CommandProcessingResult { this.groupId = null; this.clientId = null; this.loanId = null; + this.savingsId = null; this.transactionId = null; this.changes = new HashMap(); } private CommandProcessingResult(final Long commandId, final Long officeId, final Long groupId, final Long clientId, final Long loanId, - final String resourceIdentifier, final Long resourceId, final String transactionId, final Map changesOnly) { + final Long savingsId, final String resourceIdentifier, final Long resourceId, final String transactionId, + final Map changesOnly) { this.commandId = commandId; this.officeId = officeId; this.groupId = groupId; this.clientId = clientId; this.loanId = loanId; + this.savingsId = savingsId; this.resourceIdentifier = resourceIdentifier; this.resourceId = resourceId; this.changes = changesOnly; @@ -103,6 +107,7 @@ public class CommandProcessingResult { this.groupId = null; this.clientId = null; this.loanId = null; + this.savingsId = null; this.transactionId = null; this.commandId = commandId; this.changes = changesOnly; @@ -136,6 +141,10 @@ public class CommandProcessingResult { return this.loanId; } + public Long getSavingsId() { + return this.savingsId; + } + public String getTransactionId() { return this.transactionId; } diff --git a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/data/CommandProcessingResultBuilder.java b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/data/CommandProcessingResultBuilder.java index 227e425ac..f55f44325 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/data/CommandProcessingResultBuilder.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/data/CommandProcessingResultBuilder.java @@ -18,13 +18,14 @@ public class CommandProcessingResultBuilder { private Long groupId; private Long clientId; private Long loanId; + private Long savingsId; private String resourceIdentifier; private Long entityId; private String transactionId; private Map changes; public CommandProcessingResult build() { - return CommandProcessingResult.fromDetails(commandId, officeId, groupId, clientId, loanId, resourceIdentifier, entityId, + return CommandProcessingResult.fromDetails(commandId, officeId, groupId, clientId, loanId, savingsId, resourceIdentifier, entityId, transactionId, changes); } @@ -68,6 +69,11 @@ public class CommandProcessingResultBuilder { return this; } + public CommandProcessingResultBuilder withSavingsId(final Long withSavingsId) { + this.savingsId = withSavingsId; + return this; + } + public CommandProcessingResultBuilder withTransactionId(final String withTransactionId) { this.transactionId = withTransactionId; return this; diff --git a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/domain/JdbcSupport.java b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/domain/JdbcSupport.java index 6ecc4d2aa..ca8e203a2 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/domain/JdbcSupport.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/domain/JdbcSupport.java @@ -67,7 +67,7 @@ public class JdbcSupport { private static BigDecimal defaultToNullIfZero(final BigDecimal value) { BigDecimal result = value; - if (BigDecimal.ZERO.compareTo(value) == 0) { + if (value != null && BigDecimal.ZERO.compareTo(value) == 0) { result = null; } return result; diff --git a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/exception/AbstractPlatformDomainRuleException.java b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/exception/AbstractPlatformDomainRuleException.java index e47af7ce6..0277831cf 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/exception/AbstractPlatformDomainRuleException.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/exception/AbstractPlatformDomainRuleException.java @@ -15,7 +15,7 @@ public abstract class AbstractPlatformDomainRuleException extends RuntimeExcepti private final String defaultUserMessage; private final Object[] defaultUserMessageArgs; - public AbstractPlatformDomainRuleException(String globalisationMessageCode, String defaultUserMessage, Object... defaultUserMessageArgs) { + public AbstractPlatformDomainRuleException(final String globalisationMessageCode, final String defaultUserMessage, final Object... defaultUserMessageArgs) { this.globalisationMessageCode = globalisationMessageCode; this.defaultUserMessage = defaultUserMessage; this.defaultUserMessageArgs = defaultUserMessageArgs; diff --git a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/exception/UnrecognizedQueryParamException.java b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/exception/UnrecognizedQueryParamException.java index 1d227bef5..c2e05b549 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/exception/UnrecognizedQueryParamException.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/exception/UnrecognizedQueryParamException.java @@ -10,7 +10,7 @@ public class UnrecognizedQueryParamException extends RuntimeException { private final String queryParamKey; private final String queryParamValue; - public UnrecognizedQueryParamException(String queryParamKey, String queryParamValue) { + public UnrecognizedQueryParamException(final String queryParamKey, final String queryParamValue) { this.queryParamKey = queryParamKey; this.queryParamValue = queryParamValue; } diff --git a/mifosng-provider/src/main/java/org/mifosplatform/organisation/monetary/domain/Money.java b/mifosng-provider/src/main/java/org/mifosplatform/organisation/monetary/domain/Money.java index 764ce3fd3..9a66837ee 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/organisation/monetary/domain/Money.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/organisation/monetary/domain/Money.java @@ -93,8 +93,8 @@ public class Money implements Comparable { } public Money plus(final BigDecimal amountToAdd) { - if (amountToAdd.compareTo(BigDecimal.ZERO) == 0) { return this; } - BigDecimal newAmount = this.amount.add(amountToAdd); + if (amountToAdd == null || amountToAdd.compareTo(BigDecimal.ZERO) == 0) { return this; } + final BigDecimal newAmount = this.amount.add(amountToAdd); return Money.of(monetaryCurrency(), newAmount); } @@ -110,8 +110,8 @@ public class Money implements Comparable { } public Money minus(final BigDecimal amountToSubtract) { - if (amountToSubtract.compareTo(BigDecimal.ZERO) == 0) { return this; } - BigDecimal newAmount = this.amount.subtract(amountToSubtract); + if (amountToSubtract == null || amountToSubtract.compareTo(BigDecimal.ZERO) == 0) { return this; } + final BigDecimal newAmount = this.amount.subtract(amountToSubtract); return Money.of(monetaryCurrency(), newAmount); } @@ -223,6 +223,18 @@ public class Money implements Comparable { return this.amount; } + public BigDecimal getAmountDefaultedToNullIfZero() { + return defaultToNullIfZero(this.amount); + } + + private static BigDecimal defaultToNullIfZero(final BigDecimal value) { + BigDecimal result = value; + if (value != null && BigDecimal.ZERO.compareTo(value) == 0) { + result = null; + } + return result; + } + @Override public String toString() { return new StringBuilder().append(this.currencyCode).append(' ').append(this.amount.toPlainString()).toString(); diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/client/data/ClientAccountSummaryCollectionData.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/client/data/ClientAccountSummaryCollectionData.java index c5da2801d..424f3662c 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/client/data/ClientAccountSummaryCollectionData.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/client/data/ClientAccountSummaryCollectionData.java @@ -114,19 +114,6 @@ public class ClientAccountSummaryCollectionData { this.anyLoanCount = countOf(this.pendingApprovalLoanCount, this.awaitingDisbursalLoanCount, this.activeLoanCount, this.closedLoanCount); - // - // , this.pendingApprovalDepositAccountsCount, - // this.approvedDepositAccountsCount - // , this.withdrawnByClientDepositAccountsCount, - // this.closedDepositAccountsCount, this.rejectedDepositAccountsCount - // , this.preclosedDepositAccountsCount, - // this.maturedDepositAccountsCount, - // this.pendingApprovalSavingAccountsCount - // , this.approvedSavingAccountsCount, - // this.withdrawnByClientSavingAccountsCount, - // this.rejectedSavingAccountsCount - // , this.closedSavingAccountsCount); - } private Integer countOf(final Integer... objects) { diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/client/service/ClientReadPlatformServiceImpl.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/client/service/ClientReadPlatformServiceImpl.java index 1f89c986c..b6e1330a8 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/client/service/ClientReadPlatformServiceImpl.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/client/service/ClientReadPlatformServiceImpl.java @@ -240,71 +240,24 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService List preclosedDepositAccounts = new ArrayList(); List maturedDepositAccounts = new ArrayList(); - // ClientDespoitAccountSummaryDataMapper depositAccountMapper = new - // ClientDespoitAccountSummaryDataMapper(); - // - // String depositAccountsSql = "select " + - // depositAccountMapper.schema() + - // " where da.client_id = ? and da.is_deleted=0"; - // List depositAccountResults = - // this.jdbcTemplate.query(depositAccountsSql, depositAccountMapper, - // new Object[] { clientId }); - // if (depositAccountResults != null) { - // for (ClientAccountSummaryData row : depositAccountResults) { - // - // if (row.accountStatusId() == 100) { - // pendingApprovalDepositAccounts.add(row); - // } else if (row.accountStatusId() == 300) { - // approvedDepositAccounts.add(row); - // } else if (row.accountStatusId() == 400) { - // withdrawnByClientDespositAccounts.add(row); - // } else if (row.accountStatusId() == 500) { - // rejectedDepositAccounts.add(row); - // } else if (row.accountStatusId() == 600) { - // closedDepositAccounts.add(row); - // } else if (row.accountStatusId() == 700) { - // maturedDepositAccounts.add(row); - // } else if (row.accountStatusId() == 800) { - // preclosedDepositAccounts.add(row); - // } - // } - // } - List pendingApprovalSavingAccounts = new ArrayList(); List approvedSavingAccounts = new ArrayList(); List withdrawnByClientSavingAccounts = new ArrayList(); List rejectedSavingAccounts = new ArrayList(); List closedSavingAccounts = new ArrayList(); - // ClientSavingAccountSummaryDataMapper - // clientSavingAccountSummaryDataMapper = new - // ClientSavingAccountSummaryDataMapper(); - // String savingAccountsSql = "select " + - // clientSavingAccountSummaryDataMapper.schema() - // + " where sa.client_id=? and sa.is_deleted=0"; - // List savingAccountsResults = - // this.jdbcTemplate.query(savingAccountsSql, - // clientSavingAccountSummaryDataMapper, new Object[] { clientId }); - // - // if (savingAccountsResults != null) { - // for (ClientAccountSummaryData account : savingAccountsResults) { - // if (account.accountStatusId() == 100) - // pendingApprovalSavingAccounts.add(account); - // else if (account.accountStatusId() == 300) - // approvedSavingAccounts.add(account); - // else if (account.accountStatusId() == 400) - // withdrawnByClientSavingAccounts.add(account); - // else if (account.accountStatusId() == 500) - // rejectedSavingAccounts.add(account); - // else if (account.accountStatusId() == 600) - // closedSavingAccounts.add(account); - // } - // } + final ClientSavingsAccountSummaryDataMapper savingsAccountSummaryDataMapper = new ClientSavingsAccountSummaryDataMapper(); + final String savingsSql = "select " + savingsAccountSummaryDataMapper.schema() + " where sa.client_id = ?"; + final List savingsAccounts = this.jdbcTemplate.query(savingsSql, savingsAccountSummaryDataMapper, + new Object[] { clientId }); + + approvedSavingAccounts.addAll(savingsAccounts); return new ClientAccountSummaryCollectionData(pendingApprovalLoans, awaitingDisbursalLoans, openLoans, closedLoans, pendingApprovalDepositAccounts, approvedDepositAccounts, withdrawnByClientDespositAccounts, rejectedDepositAccounts, closedDepositAccounts, preclosedDepositAccounts, maturedDepositAccounts, pendingApprovalSavingAccounts, approvedSavingAccounts, withdrawnByClientSavingAccounts, rejectedSavingAccounts, closedSavingAccounts); + } catch (EmptyResultDataAccessException e) { throw new ClientNotFoundException(clientId); } @@ -327,6 +280,38 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService return loanAccounts; } + private static final class ClientSavingsAccountSummaryDataMapper implements RowMapper { + + final String schemaSql; + + public ClientSavingsAccountSummaryDataMapper() { + StringBuilder accountsSummary = new StringBuilder(); + accountsSummary.append("sa.id as id, sa.account_no as accountNo, sa.external_id as externalId,"); + accountsSummary.append("sa.product_id as productId, p.name as productName "); + accountsSummary.append("from m_savings_account sa "); + accountsSummary.append("join m_savings_product as p on p.id = sa.product_id "); + + this.schemaSql = accountsSummary.toString(); + } + + public String schema() { + return this.schemaSql; + } + + @Override + public ClientAccountSummaryData mapRow(final ResultSet rs, @SuppressWarnings("unused") final int rowNum) throws SQLException { + + final Long id = JdbcSupport.getLong(rs, "id"); + final String accountNo = rs.getString("accountNo"); + final String externalId = rs.getString("externalId"); + final Long productId = JdbcSupport.getLong(rs, "productId"); + final String loanProductName = rs.getString("productName"); + final LoanStatusEnumData loanStatus = null; + + return new ClientAccountSummaryData(id, accountNo, externalId, productId, loanProductName, loanStatus); + } + } + private static final class ClientLoanAccountSummaryDataMapper implements RowMapper { public String loanAccountSummarySchema() { diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/api/SavingsAccountTransactionsApiResource.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/api/SavingsAccountTransactionsApiResource.java new file mode 100644 index 000000000..3c899d02a --- /dev/null +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/api/SavingsAccountTransactionsApiResource.java @@ -0,0 +1,103 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + */ +package org.mifosplatform.portfolio.savings.api; + +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; + +import org.apache.commons.lang.StringUtils; +import org.mifosplatform.commands.domain.CommandWrapper; +import org.mifosplatform.commands.service.CommandWrapperBuilder; +import org.mifosplatform.commands.service.PortfolioCommandSourceWritePlatformService; +import org.mifosplatform.infrastructure.core.api.ApiRequestParameterHelper; +import org.mifosplatform.infrastructure.core.data.CommandProcessingResult; +import org.mifosplatform.infrastructure.core.exception.UnrecognizedQueryParamException; +import org.mifosplatform.infrastructure.core.serialization.ApiRequestJsonSerializationSettings; +import org.mifosplatform.infrastructure.core.serialization.DefaultToApiJsonSerializer; +import org.mifosplatform.infrastructure.security.service.PlatformSecurityContext; +import org.mifosplatform.portfolio.savings.data.SavingsAccountTransactionData; +import org.mifosplatform.portfolio.savings.service.SavingsAccountReadPlatformService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Component; + +@Path("/savingsaccounts/{savingsId}/transactions") +@Component +@Scope("singleton") +public class SavingsAccountTransactionsApiResource { + + private final PlatformSecurityContext context; + private final DefaultToApiJsonSerializer toApiJsonSerializer; + private final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService; + private final ApiRequestParameterHelper apiRequestParameterHelper; + private final SavingsAccountReadPlatformService savingsAccountReadPlatformService; + + @Autowired + public SavingsAccountTransactionsApiResource(final PlatformSecurityContext context, + final DefaultToApiJsonSerializer toApiJsonSerializer, + final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService, + final ApiRequestParameterHelper apiRequestParameterHelper, + final SavingsAccountReadPlatformService savingsAccountReadPlatformService) { + this.context = context; + this.toApiJsonSerializer = toApiJsonSerializer; + this.commandsSourceWritePlatformService = commandsSourceWritePlatformService; + this.apiRequestParameterHelper = apiRequestParameterHelper; + this.savingsAccountReadPlatformService = savingsAccountReadPlatformService; + } + + private boolean is(final String commandParam, final String commandValue) { + return StringUtils.isNotBlank(commandParam) && commandParam.trim().equalsIgnoreCase(commandValue); + } + + @GET + @Path("template") + @Consumes({ MediaType.APPLICATION_JSON }) + @Produces({ MediaType.APPLICATION_JSON }) + public String retrieveTemplate(@PathParam("savingsId") final Long savingsId, @QueryParam("command") final String commandParam, + @Context final UriInfo uriInfo) { + + context.authenticatedUser().validateHasReadPermission(SavingsApiConstants.SAVINGS_ACCOUNT_RESOURCE_NAME); + + // FIXME - KW - for now just send back generic default information for + // both deposit/withdrawal templates + final SavingsAccountTransactionData savingsAccount = this.savingsAccountReadPlatformService + .retrieveDepositTransactionTemplate(savingsId); + + final ApiRequestJsonSerializationSettings settings = apiRequestParameterHelper.process(uriInfo.getQueryParameters()); + return this.toApiJsonSerializer.serialize(settings, savingsAccount, + SavingsApiConstants.SAVINGS_TRANSACTION_RESPONSE_DATA_PARAMETERS); + } + + @POST + @Consumes({ MediaType.APPLICATION_JSON }) + @Produces({ MediaType.APPLICATION_JSON }) + public String transaction(@PathParam("savingsId") final Long savingsId, @QueryParam("command") final String commandParam, + final String apiRequestBodyAsJson) { + + final CommandWrapperBuilder builder = new CommandWrapperBuilder().withJson(apiRequestBodyAsJson); + + CommandProcessingResult result = null; + if (is(commandParam, "deposit")) { + final CommandWrapper commandRequest = builder.savingsAccountDeposit(savingsId).build(); + result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); + } else if (is(commandParam, "withdrawal")) { + final CommandWrapper commandRequest = builder.savingsAccountWithdrawal(savingsId).build(); + result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); + } + + if (result == null) { throw new UnrecognizedQueryParamException("command", commandParam); } + + return this.toApiJsonSerializer.serialize(result); + } +} \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/api/SavingsAccountsApiResource.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/api/SavingsAccountsApiResource.java index 358af459a..e08bc23f7 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/api/SavingsAccountsApiResource.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/api/SavingsAccountsApiResource.java @@ -5,7 +5,10 @@ */ package org.mifosplatform.portfolio.savings.api; +import java.util.Arrays; import java.util.Collection; +import java.util.HashSet; +import java.util.Set; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; @@ -23,6 +26,7 @@ import javax.ws.rs.core.UriInfo; import org.mifosplatform.commands.domain.CommandWrapper; import org.mifosplatform.commands.service.CommandWrapperBuilder; import org.mifosplatform.commands.service.PortfolioCommandSourceWritePlatformService; +import org.mifosplatform.infrastructure.core.api.ApiParameterHelper; import org.mifosplatform.infrastructure.core.api.ApiRequestParameterHelper; import org.mifosplatform.infrastructure.core.data.CommandProcessingResult; import org.mifosplatform.infrastructure.core.data.EnumOptionData; @@ -30,6 +34,7 @@ import org.mifosplatform.infrastructure.core.serialization.ApiRequestJsonSeriali import org.mifosplatform.infrastructure.core.serialization.DefaultToApiJsonSerializer; import org.mifosplatform.infrastructure.security.service.PlatformSecurityContext; import org.mifosplatform.portfolio.savings.data.SavingsAccountData; +import org.mifosplatform.portfolio.savings.data.SavingsAccountTransactionData; import org.mifosplatform.portfolio.savings.data.SavingsProductData; import org.mifosplatform.portfolio.savings.service.SavingsAccountReadPlatformService; import org.mifosplatform.portfolio.savings.service.SavingsDropdownReadPlatformService; @@ -37,6 +42,7 @@ import org.mifosplatform.portfolio.savings.service.SavingsProductReadPlatformSer import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; @Path("/savingsaccounts") @Component @@ -67,77 +73,6 @@ public class SavingsAccountsApiResource { this.apiRequestParameterHelper = apiRequestParameterHelper; } - @POST - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) - public String create(final String apiRequestBodyAsJson) { - - final CommandWrapper commandRequest = new CommandWrapperBuilder().createSavingsAccount().withJson(apiRequestBodyAsJson).build(); - - final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); - - return this.toApiJsonSerializer.serialize(result); - } - - @PUT - @Path("{accountId}") - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) - public String update(@PathParam("accountId") final Long accountId, final String apiRequestBodyAsJson) { - - final CommandWrapper commandRequest = new CommandWrapperBuilder().updateSavingsAccount(accountId).withJson(apiRequestBodyAsJson) - .build(); - - final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); - - return this.toApiJsonSerializer.serialize(result); - - } - - @GET - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAll(@Context final UriInfo uriInfo) { - - context.authenticatedUser().validateHasReadPermission(SavingsApiConstants.SAVINGS_ACCOUNT_RESOURCE_NAME); - - final Collection products = this.savingsAccountReadPlatformService.retrieveAll(); - - final ApiRequestJsonSerializationSettings settings = apiRequestParameterHelper.process(uriInfo.getQueryParameters()); - return this.toApiJsonSerializer.serialize(settings, products, SavingsApiConstants.SAVINGS_ACCOUNT_RESPONSE_DATA_PARAMETERS); - } - - @GET - @Path("{accountId}") - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveOne(@PathParam("accountId") final Long accountId, @Context final UriInfo uriInfo) { - - context.authenticatedUser().validateHasReadPermission(SavingsApiConstants.SAVINGS_ACCOUNT_RESOURCE_NAME); - - SavingsAccountData savingsAccount = this.savingsAccountReadPlatformService.retrieveOne(accountId); - - final ApiRequestJsonSerializationSettings settings = apiRequestParameterHelper.process(uriInfo.getQueryParameters()); - - if (settings.isTemplate()) { - savingsAccount = populateTemplateOptions(savingsAccount); - } - - return this.toApiJsonSerializer.serialize(settings, savingsAccount, SavingsApiConstants.SAVINGS_ACCOUNT_RESPONSE_DATA_PARAMETERS); - } - - private SavingsAccountData populateTemplateOptions(final SavingsAccountData savingsAccount) { - - final Collection productOptions = this.savingsProductReadPlatformService.retrieveAllForLookup(); - final Collection interestRatePeriodFrequencyTypeOptions = this.dropdownReadPlatformService - .retrieveInterestRatePeriodFrequencyTypeOptions(); - final Collection lockinPeriodFrequencyTypeOptions = this.dropdownReadPlatformService - .retrieveLockinPeriodFrequencyTypeOptions(); - - return SavingsAccountData.withTemplateOptions(savingsAccount, productOptions, interestRatePeriodFrequencyTypeOptions, - lockinPeriodFrequencyTypeOptions); - } - @GET @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @@ -153,6 +88,101 @@ public class SavingsAccountsApiResource { return this.toApiJsonSerializer.serialize(settings, savingsAccount, SavingsApiConstants.SAVINGS_ACCOUNT_RESPONSE_DATA_PARAMETERS); } + @GET + @Consumes({ MediaType.APPLICATION_JSON }) + @Produces({ MediaType.APPLICATION_JSON }) + public String retrieveAll(@Context final UriInfo uriInfo) { + + context.authenticatedUser().validateHasReadPermission(SavingsApiConstants.SAVINGS_ACCOUNT_RESOURCE_NAME); + + final Collection products = this.savingsAccountReadPlatformService.retrieveAll(); + + final ApiRequestJsonSerializationSettings settings = apiRequestParameterHelper.process(uriInfo.getQueryParameters()); + return this.toApiJsonSerializer.serialize(settings, products, SavingsApiConstants.SAVINGS_ACCOUNT_RESPONSE_DATA_PARAMETERS); + } + + @POST + @Consumes({ MediaType.APPLICATION_JSON }) + @Produces({ MediaType.APPLICATION_JSON }) + public String create(final String apiRequestBodyAsJson) { + + final CommandWrapper commandRequest = new CommandWrapperBuilder().createSavingsAccount().withJson(apiRequestBodyAsJson).build(); + + final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); + + return this.toApiJsonSerializer.serialize(result); + } + + @GET + @Path("{accountId}") + @Consumes({ MediaType.APPLICATION_JSON }) + @Produces({ MediaType.APPLICATION_JSON }) + public String retrieveOne(@PathParam("accountId") final Long accountId, @Context final UriInfo uriInfo) { + + context.authenticatedUser().validateHasReadPermission(SavingsApiConstants.SAVINGS_ACCOUNT_RESOURCE_NAME); + + final SavingsAccountData savingsAccount = this.savingsAccountReadPlatformService.retrieveOne(accountId); + + final Set mandatoryResponseParameters = new HashSet(); + SavingsAccountData savingsAccountTemplate = populateTemplateAndAssociations(accountId, savingsAccount, uriInfo, + mandatoryResponseParameters); + + final ApiRequestJsonSerializationSettings settings = apiRequestParameterHelper.process(uriInfo.getQueryParameters(), + mandatoryResponseParameters); + return this.toApiJsonSerializer.serialize(settings, savingsAccountTemplate, + SavingsApiConstants.SAVINGS_ACCOUNT_RESPONSE_DATA_PARAMETERS); + } + + private SavingsAccountData populateTemplateAndAssociations(final Long accountId, final SavingsAccountData savingsAccount, + final UriInfo uriInfo, final Set mandatoryResponseParameters) { + + Collection transactions = null; + Collection productOptions = null; + Collection interestRatePeriodFrequencyTypeOptions = null; + Collection lockinPeriodFrequencyTypeOptions = null; + + final Set associationParameters = ApiParameterHelper.extractAssociationsForResponseIfProvided(uriInfo.getQueryParameters()); + if (!associationParameters.isEmpty()) { + + if (associationParameters.contains("all")) { + associationParameters.addAll(Arrays.asList("transactions")); + } + + if (associationParameters.contains("transactions")) { + mandatoryResponseParameters.add("transactions"); + final Collection currentTransactions = this.savingsAccountReadPlatformService + .retrieveAllTransactions(accountId); + if (!CollectionUtils.isEmpty(currentTransactions)) { + transactions = currentTransactions; + } + } + } + + final ApiRequestJsonSerializationSettings settings = apiRequestParameterHelper.process(uriInfo.getQueryParameters()); + if (settings.isTemplate()) { + productOptions = this.savingsProductReadPlatformService.retrieveAllForLookup(); + interestRatePeriodFrequencyTypeOptions = this.dropdownReadPlatformService.retrieveInterestRatePeriodFrequencyTypeOptions(); + lockinPeriodFrequencyTypeOptions = this.dropdownReadPlatformService.retrieveLockinPeriodFrequencyTypeOptions(); + } + + return SavingsAccountData.withTemplateOptions(savingsAccount, productOptions, interestRatePeriodFrequencyTypeOptions, + lockinPeriodFrequencyTypeOptions, transactions); + } + + @PUT + @Path("{accountId}") + @Consumes({ MediaType.APPLICATION_JSON }) + @Produces({ MediaType.APPLICATION_JSON }) + public String update(@PathParam("accountId") final Long accountId, final String apiRequestBodyAsJson) { + + final CommandWrapper commandRequest = new CommandWrapperBuilder().updateSavingsAccount(accountId).withJson(apiRequestBodyAsJson) + .build(); + + final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); + + return this.toApiJsonSerializer.serialize(result); + } + @DELETE @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/api/SavingsApiConstants.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/api/SavingsApiConstants.java index 0f8b0b384..7002b006a 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/api/SavingsApiConstants.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/api/SavingsApiConstants.java @@ -11,8 +11,13 @@ public class SavingsApiConstants { public static final String SAVINGS_PRODUCT_RESOURCE_NAME = "savingsproduct"; public static final String SAVINGS_ACCOUNT_RESOURCE_NAME = "savingsaccount"; + public static final String SAVINGS_ACCOUNT_TRANSACTION_RESOURCE_NAME = "savingsaccount.transaction"; + // general public static final String localeParamName = "locale"; + public static final String dateFormatParamName = "dateFormat"; + + // savings product and account parameters public static final String idParamName = "id"; public static final String accountNoParamName = "accountNo"; public static final String externalIdParamName = "externalId"; @@ -29,6 +34,10 @@ public class SavingsApiConstants { public static final String lockinPeriodFrequencyParamName = "lockinPeriodFrequency"; public static final String lockinPeriodFrequencyTypeParamName = "lockinPeriodFrequencyType"; + // transaction parameters + public static final String transactionDateParamName = "transactionDate"; + public static final String transactionAmountParamName = "transactionAmount"; + public static final Set SAVINGS_PRODUCT_REQUEST_DATA_PARAMETERS = new HashSet(Arrays.asList(localeParamName, nameParamName, descriptionParamName, currencyCodeParamName, digitsAfterDecimalParamName, interestRateParamName, interestRatePeriodFrequencyTypeParamName, minRequiredOpeningBalanceParamName, lockinPeriodFrequencyParamName, @@ -60,4 +69,10 @@ public class SavingsApiConstants { "savingsProductName", "currency", interestRateParamName, interestRatePeriodFrequencyTypeParamName, "annualInterestRate", minRequiredOpeningBalanceParamName, lockinPeriodFrequencyParamName, lockinPeriodFrequencyTypeParamName, "productOptions", "interestRatePeriodFrequencyTypeOptions", "lockinPeriodFrequencyTypeOptions")); + + public static final Set SAVINGS_ACCOUNT_TRANSACTION_REQUEST_DATA_PARAMETERS = new HashSet(Arrays.asList( + localeParamName, dateFormatParamName, transactionDateParamName, transactionAmountParamName)); + + public static final Set SAVINGS_TRANSACTION_RESPONSE_DATA_PARAMETERS = new HashSet(Arrays.asList(idParamName, + "accountId", accountNoParamName, "currency", "amount")); } \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/data/SavingsAccountData.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/data/SavingsAccountData.java index 6ccfd7368..9471cbaa7 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/data/SavingsAccountData.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/data/SavingsAccountData.java @@ -34,6 +34,10 @@ public class SavingsAccountData { private final Integer lockinPeriodFrequency; private final EnumOptionData lockinPeriodFrequencyType; + // associations + private final SavingsAccountSummaryData summary; + private final Collection transactions; + // template private final Collection productOptions; private final Collection interestRatePeriodFrequencyTypeOptions; @@ -43,27 +47,28 @@ public class SavingsAccountData { final String groupName, final Long clientId, final String clientName, final Long productId, final String productName, final CurrencyData currency, final BigDecimal interestRate, final EnumOptionData interestRatePeriodFrequencyType, final BigDecimal annualInterestRate, final BigDecimal minRequiredOpeningBalance, final Integer lockinPeriodFrequency, - final EnumOptionData lockinPeriodFrequencyType) { + final EnumOptionData lockinPeriodFrequencyType, final SavingsAccountSummaryData summary) { final Collection productOptions = null; final Collection interestRatePeriodFrequencyTypeOptions = null; final Collection lockinPeriodFrequencyTypeOptions = null; + final Collection transactions = null; return new SavingsAccountData(id, accountNo, externalId, groupId, groupName, clientId, clientName, productId, productName, currency, interestRate, interestRatePeriodFrequencyType, annualInterestRate, minRequiredOpeningBalance, - lockinPeriodFrequency, lockinPeriodFrequencyType, productOptions, interestRatePeriodFrequencyTypeOptions, - lockinPeriodFrequencyTypeOptions); + lockinPeriodFrequency, lockinPeriodFrequencyType, summary, productOptions, interestRatePeriodFrequencyTypeOptions, + lockinPeriodFrequencyTypeOptions, transactions); } public static SavingsAccountData withTemplateOptions(final SavingsAccountData account, final Collection productOptions, final Collection interestRatePeriodFrequencyTypeOptions, - final Collection lockinPeriodFrequencyTypeOptions) { + final Collection lockinPeriodFrequencyTypeOptions, final Collection transactions) { return new SavingsAccountData(account.id, account.accountNo, account.externalId, account.groupId, account.groupName, account.clientId, account.clientName, account.savingsProductId, account.savingsProductName, account.currency, account.interestRate, account.interestRatePeriodFrequencyType, account.annualInterestRate, - account.minRequiredOpeningBalance, account.lockinPeriodFrequency, account.lockinPeriodFrequencyType, productOptions, - interestRatePeriodFrequencyTypeOptions, lockinPeriodFrequencyTypeOptions); + account.minRequiredOpeningBalance, account.lockinPeriodFrequency, account.lockinPeriodFrequencyType, account.summary, + productOptions, interestRatePeriodFrequencyTypeOptions, lockinPeriodFrequencyTypeOptions, transactions); } public static SavingsAccountData withClientTemplate(final Long clientId, final String clientName, final Long groupId, @@ -81,24 +86,26 @@ public class SavingsAccountData { final BigDecimal minRequiredOpeningBalance = null; final Integer lockinPeriodFrequency = null; final EnumOptionData lockinPeriodFrequencyType = null; + final SavingsAccountSummaryData summary = null; final Collection productOptions = null; final Collection currencyOptions = null; final Collection interestRatePeriodFrequencyTypeOptions = null; final Collection lockinPeriodFrequencyTypeOptions = null; + final Collection transactions = null; return new SavingsAccountData(id, accountNo, externalId, groupId, groupName, clientId, clientName, productId, productName, currency, interestRate, interestRatePeriodFrequencyType, annualInterestRate, minRequiredOpeningBalance, - lockinPeriodFrequency, lockinPeriodFrequencyType, productOptions, interestRatePeriodFrequencyTypeOptions, - lockinPeriodFrequencyTypeOptions); + lockinPeriodFrequency, lockinPeriodFrequencyType, summary, productOptions, interestRatePeriodFrequencyTypeOptions, + lockinPeriodFrequencyTypeOptions, transactions); } private SavingsAccountData(final Long id, final String accountNo, final String externalId, final Long groupId, final String groupName, final Long clientId, final String clientName, final Long productId, final String productName, final CurrencyData currency, final BigDecimal interestRate, final EnumOptionData interestRatePeriodFrequencyType, final BigDecimal annualInterestRate, final BigDecimal minRequiredOpeningBalance, final Integer lockinPeriodFrequency, - final EnumOptionData lockinPeriodFrequencyType, final Collection productOptions, - final Collection interestRatePeriodFrequencyTypeOptions, - final Collection lockinPeriodFrequencyTypeOptions) { + final EnumOptionData lockinPeriodFrequencyType, final SavingsAccountSummaryData summary, + final Collection productOptions, final Collection interestRatePeriodFrequencyTypeOptions, + final Collection lockinPeriodFrequencyTypeOptions, final Collection transactions) { this.id = id; this.accountNo = accountNo; this.externalId = externalId; @@ -115,9 +122,11 @@ public class SavingsAccountData { this.minRequiredOpeningBalance = minRequiredOpeningBalance; this.lockinPeriodFrequency = lockinPeriodFrequency; this.lockinPeriodFrequencyType = lockinPeriodFrequencyType; + this.summary = summary; this.productOptions = productOptions; this.interestRatePeriodFrequencyTypeOptions = interestRatePeriodFrequencyTypeOptions; this.lockinPeriodFrequencyTypeOptions = lockinPeriodFrequencyTypeOptions; + this.transactions = transactions; } } \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/data/SavingsAccountSummaryData.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/data/SavingsAccountSummaryData.java new file mode 100644 index 000000000..eb4bc93d5 --- /dev/null +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/data/SavingsAccountSummaryData.java @@ -0,0 +1,32 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + */ +package org.mifosplatform.portfolio.savings.data; + +import java.math.BigDecimal; + +import org.mifosplatform.organisation.monetary.data.CurrencyData; + +/** + * Immutable data object representing loan summary information. + */ +@SuppressWarnings("unused") +public class SavingsAccountSummaryData { + + private final CurrencyData currency; + private final BigDecimal totalDeposits; + private final BigDecimal totalWithdrawals; + private final BigDecimal totalInterestPosted; + private final BigDecimal accountBalance; + + public SavingsAccountSummaryData(final CurrencyData currency, final BigDecimal totalDeposits, final BigDecimal totalWithdrawals, + final BigDecimal totalInterestPosted, final BigDecimal accountBalance) { + this.currency = currency; + this.totalDeposits = totalDeposits; + this.totalWithdrawals = totalWithdrawals; + this.totalInterestPosted = totalInterestPosted; + this.accountBalance = accountBalance; + } +} \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/data/SavingsAccountTransactionData.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/data/SavingsAccountTransactionData.java new file mode 100644 index 000000000..b5afea6d5 --- /dev/null +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/data/SavingsAccountTransactionData.java @@ -0,0 +1,50 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + */ +package org.mifosplatform.portfolio.savings.data; + +import java.math.BigDecimal; + +import org.joda.time.LocalDate; +import org.mifosplatform.organisation.monetary.data.CurrencyData; + +/** + * Immutable data object representing a savings account transaction. + */ +@SuppressWarnings("unused") +public class SavingsAccountTransactionData { + + private final Long id; + private final SavingsAccountTransactionEnumData transactionType; + private final Long accountId; + private final String accountNo; + private final LocalDate date; + private final CurrencyData currency; + private final BigDecimal amount; + + public static SavingsAccountTransactionData create(final Long id, final SavingsAccountTransactionEnumData transactionType, + final Long savingsId, final String savingsAccountNo, final LocalDate date, final CurrencyData currency, final BigDecimal amount) { + return new SavingsAccountTransactionData(id, transactionType, savingsId, savingsAccountNo, date, currency, amount); + } + + public static SavingsAccountTransactionData template(final Long savingsId, final String savingsAccountNo, + final LocalDate defaultLocalDate, final CurrencyData currency) { + final Long id = null; + final SavingsAccountTransactionEnumData transactionType = null; + final BigDecimal amount = null; + return new SavingsAccountTransactionData(id, transactionType, savingsId, savingsAccountNo, defaultLocalDate, currency, amount); + } + + private SavingsAccountTransactionData(final Long id, final SavingsAccountTransactionEnumData transactionType, final Long savingsId, + final String savingsAccountNo, final LocalDate date, final CurrencyData currency, final BigDecimal amount) { + this.id = id; + this.transactionType = transactionType; + this.accountId = savingsId; + this.accountNo = savingsAccountNo; + this.date = date; + this.currency = currency; + this.amount = amount; + } +} \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/data/SavingsAccountTransactionDataValidator.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/data/SavingsAccountTransactionDataValidator.java new file mode 100644 index 000000000..d5c955f9f --- /dev/null +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/data/SavingsAccountTransactionDataValidator.java @@ -0,0 +1,66 @@ +package org.mifosplatform.portfolio.savings.data; + +import static org.mifosplatform.portfolio.savings.api.SavingsApiConstants.transactionAmountParamName; +import static org.mifosplatform.portfolio.savings.api.SavingsApiConstants.transactionDateParamName; + +import java.lang.reflect.Type; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang.StringUtils; +import org.joda.time.LocalDate; +import org.mifosplatform.infrastructure.core.api.JsonCommand; +import org.mifosplatform.infrastructure.core.data.ApiParameterError; +import org.mifosplatform.infrastructure.core.data.DataValidatorBuilder; +import org.mifosplatform.infrastructure.core.exception.InvalidJsonException; +import org.mifosplatform.infrastructure.core.exception.PlatformApiDataValidationException; +import org.mifosplatform.infrastructure.core.serialization.FromJsonHelper; +import org.mifosplatform.portfolio.savings.api.SavingsApiConstants; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.google.gson.JsonElement; +import com.google.gson.reflect.TypeToken; + +@Component +public class SavingsAccountTransactionDataValidator { + + private final FromJsonHelper fromApiJsonHelper; + + @Autowired + public SavingsAccountTransactionDataValidator(final FromJsonHelper fromApiJsonHelper) { + this.fromApiJsonHelper = fromApiJsonHelper; + } + + public void validate(final JsonCommand command) { + + final String json = command.json(); + + if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); } + + final Type typeOfMap = new TypeToken>() {}.getType(); + fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, + SavingsApiConstants.SAVINGS_ACCOUNT_TRANSACTION_REQUEST_DATA_PARAMETERS); + + final List dataValidationErrors = new ArrayList(); + final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors) + .resource(SavingsApiConstants.SAVINGS_ACCOUNT_TRANSACTION_RESOURCE_NAME); + + final JsonElement element = command.parsedJson(); + + final LocalDate transactionDate = fromApiJsonHelper.extractLocalDateNamed(transactionDateParamName, element); + baseDataValidator.reset().parameter(transactionDateParamName).value(transactionDate).notNull(); + + final BigDecimal transactionAmount = fromApiJsonHelper.extractBigDecimalWithLocaleNamed(transactionAmountParamName, element); + baseDataValidator.reset().parameter(transactionAmountParamName).value(transactionAmount).notNull().zeroOrPositiveAmount(); + + throwExceptionIfValidationWarningsExist(dataValidationErrors); + } + + private void throwExceptionIfValidationWarningsExist(final List dataValidationErrors) { + if (!dataValidationErrors.isEmpty()) { throw new PlatformApiDataValidationException("validation.msg.validation.errors.exist", + "Validation errors exist.", dataValidationErrors); } + } +} \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/data/SavingsAccountTransactionEnumData.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/data/SavingsAccountTransactionEnumData.java new file mode 100644 index 000000000..8dbee6be2 --- /dev/null +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/data/SavingsAccountTransactionEnumData.java @@ -0,0 +1,24 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + */ +package org.mifosplatform.portfolio.savings.data; + +/** + * Immutable data object represent savings account transaction type + * enumerations. + */ +@SuppressWarnings("unused") +public class SavingsAccountTransactionEnumData { + + private final Long id; + private final String code; + private final String value; + + public SavingsAccountTransactionEnumData(final Long id, final String code, final String value) { + this.id = id; + this.code = code; + this.value = value; + } +} \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccount.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccount.java index c1d4cc605..a8025aef5 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccount.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccount.java @@ -6,19 +6,28 @@ package org.mifosplatform.portfolio.savings.domain; import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; import java.util.Map; +import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Embedded; import javax.persistence.Entity; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.OrderBy; import javax.persistence.Table; import javax.persistence.Transient; import javax.persistence.UniqueConstraint; import org.apache.commons.lang.StringUtils; +import org.hibernate.annotations.LazyCollection; +import org.hibernate.annotations.LazyCollectionOption; +import org.joda.time.LocalDate; import org.mifosplatform.infrastructure.core.api.JsonCommand; +import org.mifosplatform.infrastructure.core.service.DateUtils; import org.mifosplatform.infrastructure.security.service.RandomPasswordGenerator; import org.mifosplatform.organisation.monetary.domain.MonetaryCurrency; import org.mifosplatform.organisation.monetary.domain.Money; @@ -26,6 +35,8 @@ import org.mifosplatform.portfolio.client.domain.Client; import org.mifosplatform.portfolio.group.domain.Group; import org.mifosplatform.portfolio.loanproduct.domain.PeriodFrequencyType; import org.mifosplatform.portfolio.savings.api.SavingsApiConstants; +import org.mifosplatform.portfolio.savings.exception.InsufficientAccountBalanceException; +import org.mifosplatform.portfolio.savings.exception.InvalidSavingsAccountTransactionException; import org.springframework.data.jpa.domain.AbstractPersistable; @Entity @@ -73,8 +84,18 @@ public class SavingsAccount extends AbstractPersistable { @Column(name = "lockin_period_frequency_enum", nullable = false) private Integer lockinPeriodFrequencyType; + @Embedded + private SavingsAccountSummary summary; + + @OrderBy(value = "dateOf, id") + @LazyCollection(LazyCollectionOption.FALSE) + @OneToMany(cascade = CascadeType.ALL, mappedBy = "savingsAccount", orphanRemoval = true) + private final List transactions = new ArrayList(); + @Transient private boolean accountNumberRequiresAutoGeneration = false; + @Transient + private SavingsAccountTransactionSummaryWrapper savingsAccountTransactionSummaryWrapper; protected SavingsAccount() { // @@ -113,6 +134,73 @@ public class SavingsAccount extends AbstractPersistable { if (lockinPeriodFrequencyType != null) { this.lockinPeriodFrequencyType = lockinPeriodFrequencyType.getValue(); } + this.summary = new SavingsAccountSummary(); + } + + /** + * Used after fetching/hydrating a {@link SavingsAccount} object to inject + * helper services/components used for update summary details after + * events/transactions on a loan. + */ + public void setHelpers(final SavingsAccountTransactionSummaryWrapper savingsAccountTransactionSummaryWrapper) { + this.savingsAccountTransactionSummaryWrapper = savingsAccountTransactionSummaryWrapper; + } + + public SavingsAccountTransaction deposit(final LocalDate transactionDate, final BigDecimal transactionAmount) { + + final Money amount = Money.of(this.currency, transactionAmount); + + // FIXME - kw - check transactionDate is not before savings account + // activation date. + + if (isTransactionInTheFuture(transactionDate)) { + final String defaultUserMessage = "Transaction date cannot be in the future."; + throw new InvalidSavingsAccountTransactionException("in.the.future", defaultUserMessage, "transactionDate", transactionDate); + } + + final SavingsAccountTransaction transaction = SavingsAccountTransaction.deposit(this, transactionDate, amount); + this.transactions.add(transaction); + + this.summary.updateSummary(this.currency, this.savingsAccountTransactionSummaryWrapper, this.transactions); + + return transaction; + } + + public SavingsAccountTransaction withdrawal(final LocalDate transactionDate, final BigDecimal transactionAmount) { + + final Money amount = Money.of(this.currency, transactionAmount); + + // FIXME - kw - check transactionDate is not before savings account + // activation date. + + if (isTransactionInTheFuture(transactionDate)) { + final String defaultUserMessage = "Transaction date cannot be in the future."; + throw new InvalidSavingsAccountTransactionException("in.the.future", defaultUserMessage, "transactionDate", transactionDate); + } + + if (isNotAllowedToWithdraw(amount)) { + // + throw new InsufficientAccountBalanceException("transactionAmount", getAccountBalance(), transactionAmount); + } + + final SavingsAccountTransaction transaction = SavingsAccountTransaction.withdrawal(this, transactionDate, amount); + this.transactions.add(transaction); + + this.summary.updateSummary(this.currency, this.savingsAccountTransactionSummaryWrapper, this.transactions); + + return transaction; + } + + private boolean isTransactionInTheFuture(final LocalDate transactionDate) { + return transactionDate.isAfter(DateUtils.getLocalDateOfTenant()); + } + + private BigDecimal getAccountBalance() { + return this.summary.getAccountBalance(this.currency).getAmount(); + } + + private boolean isNotAllowedToWithdraw(final Money amount) { + return this.summary.isLessThanOrEqualToAccountBalance(amount); } public void update(final JsonCommand command, final Map actualChanges) { diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountAssembler.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountAssembler.java index c83482883..f018ad745 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountAssembler.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountAssembler.java @@ -32,6 +32,7 @@ import com.google.gson.JsonElement; @Service public class SavingsAccountAssembler { + private final SavingsAccountTransactionSummaryWrapper savingsAccountTransactionSummaryWrapper; private final ClientRepository clientRepository; private final GroupRepository groupRepository; private final SavingsProductRepository savingProductRepository; @@ -39,9 +40,11 @@ public class SavingsAccountAssembler { private final AprCalculator aprCalculator; @Autowired - public SavingsAccountAssembler(final ClientRepository clientRepository, final GroupRepository groupRepository, + public SavingsAccountAssembler(final SavingsAccountTransactionSummaryWrapper savingsAccountTransactionSummaryWrapper, + final ClientRepository clientRepository, final GroupRepository groupRepository, final SavingsProductRepository savingProductRepository, final AprCalculator aprCalculator, final FromJsonHelper fromApiJsonHelper) { + this.savingsAccountTransactionSummaryWrapper = savingsAccountTransactionSummaryWrapper; this.clientRepository = clientRepository; this.groupRepository = groupRepository; this.savingProductRepository = savingProductRepository; @@ -106,7 +109,7 @@ public class SavingsAccountAssembler { } else { minRequiredOpeningBalance = product.minRequiredOpeningBalance(); } - + Integer lockinPeriodFrequency = null; if (command.parameterExists(lockinPeriodFrequencyParamName)) { lockinPeriodFrequency = command.integerValueOfParameterNamed(lockinPeriodFrequencyParamName); @@ -125,8 +128,11 @@ public class SavingsAccountAssembler { lockinPeriodFrequencyType = product.lockinPeriodFrequencyType(); } - return SavingsAccount.createNewAccount(client, group, product, accountNo, externalId, interestRate, + final SavingsAccount account = SavingsAccount.createNewAccount(client, group, product, accountNo, externalId, interestRate, interestRatePeriodFrequencyType, annualInterestRate, minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType); + account.setHelpers(this.savingsAccountTransactionSummaryWrapper); + + return account; } } \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountRepositoryWrapper.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountRepositoryWrapper.java new file mode 100644 index 000000000..711ca69a9 --- /dev/null +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountRepositoryWrapper.java @@ -0,0 +1,57 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + */ +package org.mifosplatform.portfolio.savings.domain; + +import org.mifosplatform.portfolio.savings.exception.SavingsAccountNotFoundException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + *

+ * Wrapper for {@link SavingsAccountRepository} that is responsible for checking + * if {@link SavingsAccount} is returned when using findOne + * repository method and throwing an appropriate not found exception. + *

+ * + *

+ * This is to avoid need for checking and throwing in multiple areas of code + * base where {@link SavingsAccountRepository} is required. + *

+ */ +@Service +public class SavingsAccountRepositoryWrapper { + + private final SavingsAccountRepository repository; + private final SavingsAccountTransactionSummaryWrapper savingsAccountTransactionSummaryWrapper; + + @Autowired + public SavingsAccountRepositoryWrapper(final SavingsAccountRepository repository, + final SavingsAccountTransactionSummaryWrapper savingsAccountTransactionSummaryWrapper) { + this.repository = repository; + this.savingsAccountTransactionSummaryWrapper = savingsAccountTransactionSummaryWrapper; + } + + public SavingsAccount findOneWithNotFoundDetection(final Long savingsId) { + final SavingsAccount account = this.repository.findOne(savingsId); + if (account == null) { throw new SavingsAccountNotFoundException(savingsId); } + + account.setHelpers(this.savingsAccountTransactionSummaryWrapper); + + return account; + } + + public void save(final SavingsAccount account) { + this.repository.save(account); + } + + public void delete(final SavingsAccount account) { + this.repository.delete(account); + } + + public void saveAndFlush(final SavingsAccount account) { + this.repository.saveAndFlush(account); + } +} \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountSummary.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountSummary.java new file mode 100644 index 000000000..1c57b6448 --- /dev/null +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountSummary.java @@ -0,0 +1,54 @@ +package org.mifosplatform.portfolio.savings.domain; + +import java.math.BigDecimal; +import java.util.List; + +import javax.persistence.Column; +import javax.persistence.Embeddable; + +import org.mifosplatform.organisation.monetary.domain.MonetaryCurrency; +import org.mifosplatform.organisation.monetary.domain.Money; + +/** + * {@link SavingsAccountSummary} encapsulates all the summary details of a + * {@link SavingsAccount}. + */ +@Embeddable +public final class SavingsAccountSummary { + + @Column(name = "total_deposits_derived", scale = 6, precision = 19) + private BigDecimal totalDeposits; + + @Column(name = "total_withdrawals_derived", scale = 6, precision = 19) + private BigDecimal totalWithdrawals; + + @Column(name = "total_interest_posted_derived", scale = 6, precision = 19) + private BigDecimal totalInterestPosted; + + @Column(name = "account_balance_derived", scale = 6, precision = 19) + private BigDecimal accountBalance = BigDecimal.ZERO; + + protected SavingsAccountSummary() { + // + } + + public void updateSummary(final MonetaryCurrency currency, final SavingsAccountTransactionSummaryWrapper wrapper, + final List transactions) { + + this.totalDeposits = wrapper.calculateTotalDeposits(currency, transactions); + this.totalWithdrawals = wrapper.calculateTotalWithdrawals(currency, transactions); + this.totalInterestPosted = wrapper.calculateTotalInterestPosted(currency, transactions); + + this.accountBalance = Money.of(currency, this.totalDeposits).plus(this.totalInterestPosted).minus(this.totalWithdrawals) + .getAmount(); + } + + public boolean isLessThanOrEqualToAccountBalance(final Money amount) { + final Money accountBalance = getAccountBalance(amount.getCurrency()); + return accountBalance.isGreaterThanOrEqualTo(accountBalance); + } + + public Money getAccountBalance(final MonetaryCurrency currency) { + return Money.of(currency, this.accountBalance); + } +} \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountTransaction.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountTransaction.java new file mode 100644 index 000000000..48362f53c --- /dev/null +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountTransaction.java @@ -0,0 +1,102 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + */ +package org.mifosplatform.portfolio.savings.domain; + +import java.math.BigDecimal; +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import org.joda.time.LocalDate; +import org.mifosplatform.organisation.monetary.domain.MonetaryCurrency; +import org.mifosplatform.organisation.monetary.domain.Money; +import org.springframework.data.jpa.domain.AbstractPersistable; + +/** + * All monetary transactions against a savings account are modelled through this + * entity. + */ +@Entity +@Table(name = "m_savings_account_transaction") +public final class SavingsAccountTransaction extends AbstractPersistable { + + @SuppressWarnings("unused") + @ManyToOne(optional = false) + @JoinColumn(name = "savings_account_id", nullable = false) + private SavingsAccount savingsAccount; + + @Column(name = "transaction_type_enum", nullable = false) + private final Integer typeOf; + + @SuppressWarnings("unused") + @Temporal(TemporalType.DATE) + @Column(name = "transaction_date", nullable = false) + private final Date dateOf; + + @Column(name = "amount", scale = 6, precision = 19, nullable = false) + private BigDecimal amount; + + @Column(name = "is_reversed", nullable = false) + private boolean reversed; + + protected SavingsAccountTransaction() { + this.dateOf = null; + this.typeOf = null; + } + + public static SavingsAccountTransaction deposit(final SavingsAccount savingsAccount, final LocalDate date, final Money amount) { + final boolean isReversed = false; + return new SavingsAccountTransaction(savingsAccount, SavingsAccountTransactionType.DEPOSIT.getValue(), date, amount, isReversed); + } + + public static SavingsAccountTransaction withdrawal(final SavingsAccount savingsAccount, final LocalDate date, final Money amount) { + final boolean isReversed = false; + return new SavingsAccountTransaction(savingsAccount, SavingsAccountTransactionType.WITHDRAWAL.getValue(), date, amount, isReversed); + } + + private SavingsAccountTransaction(final SavingsAccount savingsAccount, final Integer typeOf, final LocalDate dateOf, + final Money amount, final boolean isReversed) { + this.savingsAccount = savingsAccount; + this.typeOf = typeOf; + this.dateOf = dateOf.toDate(); + this.amount = amount.getAmount(); + this.reversed = isReversed; + } + + public void reverse() { + this.reversed = true; + } + + public Money getAmount(final MonetaryCurrency currency) { + return Money.of(currency, this.amount); + } + + public boolean isDeposit() { + return SavingsAccountTransactionType.fromInt(this.typeOf).isDeposit(); + } + + public boolean isWithdrawal() { + return SavingsAccountTransactionType.fromInt(this.typeOf).isWithdrawal(); + } + + public boolean isInterestPosting() { + return SavingsAccountTransactionType.fromInt(this.typeOf).isInterestPosting(); + } + + public boolean isNotReversed() { + return !isReversed(); + } + + public boolean isReversed() { + return this.reversed; + } +} \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountTransactionRepository.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountTransactionRepository.java new file mode 100644 index 000000000..edd2f8a58 --- /dev/null +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountTransactionRepository.java @@ -0,0 +1,14 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + */ +package org.mifosplatform.portfolio.savings.domain; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; + +public interface SavingsAccountTransactionRepository extends JpaRepository, + JpaSpecificationExecutor { + +} \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountTransactionSummaryWrapper.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountTransactionSummaryWrapper.java new file mode 100644 index 000000000..1f7d9e45a --- /dev/null +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountTransactionSummaryWrapper.java @@ -0,0 +1,46 @@ +package org.mifosplatform.portfolio.savings.domain; + +import java.math.BigDecimal; +import java.util.List; + +import org.mifosplatform.organisation.monetary.domain.MonetaryCurrency; +import org.mifosplatform.organisation.monetary.domain.Money; +import org.springframework.stereotype.Component; + +/** + * A wrapper for dealing with side-effect free functionality related to a + * {@link SavingsAccount}'s {@link SavingsAccountTransaction}'s. + */ +@Component +public final class SavingsAccountTransactionSummaryWrapper { + + public BigDecimal calculateTotalDeposits(final MonetaryCurrency currency, final List transactions) { + Money total = Money.zero(currency); + for (SavingsAccountTransaction transaction : transactions) { + if (transaction.isDeposit() && transaction.isNotReversed()) { + total = total.plus(transaction.getAmount(currency)); + } + } + return total.getAmountDefaultedToNullIfZero(); + } + + public BigDecimal calculateTotalWithdrawals(final MonetaryCurrency currency, final List transactions) { + Money total = Money.zero(currency); + for (SavingsAccountTransaction transaction : transactions) { + if (transaction.isWithdrawal() && transaction.isNotReversed()) { + total = total.plus(transaction.getAmount(currency)); + } + } + return total.getAmountDefaultedToNullIfZero(); + } + + public BigDecimal calculateTotalInterestPosted(final MonetaryCurrency currency, final List transactions) { + Money total = Money.zero(currency); + for (SavingsAccountTransaction transaction : transactions) { + if (transaction.isInterestPosting() && transaction.isNotReversed()) { + total = total.plus(transaction.getAmount(currency)); + } + } + return total.getAmountDefaultedToNullIfZero(); + } +} \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountTransactionType.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountTransactionType.java new file mode 100644 index 000000000..5a207fec7 --- /dev/null +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccountTransactionType.java @@ -0,0 +1,65 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + */ +package org.mifosplatform.portfolio.savings.domain; + +/** + * An enumeration of different transactions that can occur on a + * {@link SavingsAccount}. + */ +public enum SavingsAccountTransactionType { + + INVALID(0, "savingsAccountTransactionType.invalid"), // + DEPOSIT(1, "savingsAccountTransactionType.deposit"), // + WITHDRAWAL(2, "savingsAccountTransactionType.withdrawal"), // + INTEREST_POSTING(3, "savingsAccountTransactionType.interestPosting"); + + private final Integer value; + private final String code; + + private SavingsAccountTransactionType(final Integer value, final String code) { + this.value = value; + this.code = code; + } + + public Integer getValue() { + return this.value; + } + + public String getCode() { + return code; + } + + public static SavingsAccountTransactionType fromInt(final Integer transactionType) { + + if (transactionType == null) { return SavingsAccountTransactionType.INVALID; } + + SavingsAccountTransactionType loanTransactionType = SavingsAccountTransactionType.INVALID; + switch (transactionType) { + case 1: + loanTransactionType = SavingsAccountTransactionType.DEPOSIT; + break; + case 2: + loanTransactionType = SavingsAccountTransactionType.WITHDRAWAL; + break; + case 3: + loanTransactionType = SavingsAccountTransactionType.INTEREST_POSTING; + break; + } + return loanTransactionType; + } + + public boolean isDeposit() { + return this.value.equals(SavingsAccountTransactionType.DEPOSIT.getValue()); + } + + public boolean isWithdrawal() { + return this.value.equals(SavingsAccountTransactionType.WITHDRAWAL.getValue()); + } + + public boolean isInterestPosting() { + return this.value.equals(SavingsAccountTransactionType.INTEREST_POSTING.getValue()); + } +} \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/exception/InsufficientAccountBalanceException.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/exception/InsufficientAccountBalanceException.java new file mode 100644 index 000000000..1d8f24a1b --- /dev/null +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/exception/InsufficientAccountBalanceException.java @@ -0,0 +1,17 @@ +package org.mifosplatform.portfolio.savings.exception; + +import java.math.BigDecimal; + +import org.mifosplatform.infrastructure.core.exception.AbstractPlatformDomainRuleException; + +/** + * Thrown when an attempt is made to withdraw money that is greater than the + * account balance. + */ +public class InsufficientAccountBalanceException extends AbstractPlatformDomainRuleException { + + public InsufficientAccountBalanceException(final String paramName, final BigDecimal accountBalance, final BigDecimal withdrawalRequested) { + super("error.msg.savingsaccount.transaction.insufficient.account.balance", "Insufficient account balance.", paramName, + accountBalance, withdrawalRequested); + } +} \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/exception/InvalidSavingsAccountTransactionException.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/exception/InvalidSavingsAccountTransactionException.java new file mode 100644 index 000000000..5a193be56 --- /dev/null +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/exception/InvalidSavingsAccountTransactionException.java @@ -0,0 +1,15 @@ +package org.mifosplatform.portfolio.savings.exception; + +import org.mifosplatform.infrastructure.core.exception.AbstractPlatformDomainRuleException; + +/** + * Thrown when an attempt is made to withdraw money that is greater than the + * account balance. + */ +public class InvalidSavingsAccountTransactionException extends AbstractPlatformDomainRuleException { + + public InvalidSavingsAccountTransactionException(final String errorCode, final String defaultErrorMessage, final String paramName, + final Object... defaultUserMessageArgs) { + super("error.msg.savingsaccount.transaction." + errorCode, defaultErrorMessage, paramName, defaultUserMessageArgs); + } +} \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/handler/DepositSavingsAccountCommandHandler.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/handler/DepositSavingsAccountCommandHandler.java new file mode 100644 index 000000000..31664f3cc --- /dev/null +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/handler/DepositSavingsAccountCommandHandler.java @@ -0,0 +1,26 @@ +package org.mifosplatform.portfolio.savings.handler; + +import org.mifosplatform.commands.handler.NewCommandSourceHandler; +import org.mifosplatform.infrastructure.core.api.JsonCommand; +import org.mifosplatform.infrastructure.core.data.CommandProcessingResult; +import org.mifosplatform.portfolio.savings.service.SavingsAccountWritePlatformService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +@Service +public class DepositSavingsAccountCommandHandler implements NewCommandSourceHandler { + + private final SavingsAccountWritePlatformService savingAccountWritePlatformService; + + @Autowired + public DepositSavingsAccountCommandHandler(final SavingsAccountWritePlatformService savingAccountWritePlatformService) { + this.savingAccountWritePlatformService = savingAccountWritePlatformService; + } + + @Transactional + @Override + public CommandProcessingResult processCommand(final JsonCommand command) { + return this.savingAccountWritePlatformService.deposit(command.getLoanId(), command); + } +} \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/handler/WithdrawSavingsAccountCommandHandler.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/handler/WithdrawSavingsAccountCommandHandler.java new file mode 100644 index 000000000..8707f7a04 --- /dev/null +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/handler/WithdrawSavingsAccountCommandHandler.java @@ -0,0 +1,26 @@ +package org.mifosplatform.portfolio.savings.handler; + +import org.mifosplatform.commands.handler.NewCommandSourceHandler; +import org.mifosplatform.infrastructure.core.api.JsonCommand; +import org.mifosplatform.infrastructure.core.data.CommandProcessingResult; +import org.mifosplatform.portfolio.savings.service.SavingsAccountWritePlatformService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +@Service +public class WithdrawSavingsAccountCommandHandler implements NewCommandSourceHandler { + + private final SavingsAccountWritePlatformService savingAccountWritePlatformService; + + @Autowired + public WithdrawSavingsAccountCommandHandler(final SavingsAccountWritePlatformService savingAccountWritePlatformService) { + this.savingAccountWritePlatformService = savingAccountWritePlatformService; + } + + @Transactional + @Override + public CommandProcessingResult processCommand(final JsonCommand command) { + return this.savingAccountWritePlatformService.withdrawal(command.getLoanId(), command); + } +} \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsAccountReadPlatformService.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsAccountReadPlatformService.java index 1680b6258..327c952ee 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsAccountReadPlatformService.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsAccountReadPlatformService.java @@ -8,12 +8,17 @@ package org.mifosplatform.portfolio.savings.service; import java.util.Collection; import org.mifosplatform.portfolio.savings.data.SavingsAccountData; +import org.mifosplatform.portfolio.savings.data.SavingsAccountTransactionData; public interface SavingsAccountReadPlatformService { Collection retrieveAll(); - SavingsAccountData retrieveOne(Long accountId); + SavingsAccountData retrieveOne(Long savingsId); SavingsAccountData retrieveTemplate(Long clientId, Long groupId, Long productId); + + SavingsAccountTransactionData retrieveDepositTransactionTemplate(Long savingsId); + + Collection retrieveAllTransactions(Long savingsId); } \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java index 26e9383be..fc2deee8b 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java @@ -10,8 +10,10 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; +import org.joda.time.LocalDate; import org.mifosplatform.infrastructure.core.data.EnumOptionData; import org.mifosplatform.infrastructure.core.domain.JdbcSupport; +import org.mifosplatform.infrastructure.core.service.DateUtils; import org.mifosplatform.infrastructure.core.service.TenantAwareRoutingDataSource; import org.mifosplatform.infrastructure.security.service.PlatformSecurityContext; import org.mifosplatform.organisation.monetary.data.CurrencyData; @@ -21,6 +23,9 @@ import org.mifosplatform.portfolio.group.data.GroupData; import org.mifosplatform.portfolio.group.service.GroupReadPlatformService; import org.mifosplatform.portfolio.loanproduct.domain.PeriodFrequencyType; import org.mifosplatform.portfolio.savings.data.SavingsAccountData; +import org.mifosplatform.portfolio.savings.data.SavingsAccountSummaryData; +import org.mifosplatform.portfolio.savings.data.SavingsAccountTransactionData; +import org.mifosplatform.portfolio.savings.data.SavingsAccountTransactionEnumData; import org.mifosplatform.portfolio.savings.data.SavingsProductData; import org.mifosplatform.portfolio.savings.exception.SavingsAccountNotFoundException; import org.springframework.beans.factory.annotation.Autowired; @@ -38,6 +43,8 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead private final GroupReadPlatformService groupReadPlatformService; private final SavingsProductReadPlatformService savingsProductReadPlatformService; private final SavingsDropdownReadPlatformService dropdownReadPlatformService; + private final SavingsAccountTransactionTemplateMapper transactionTemplateMapper; + private final SavingsAccountTransactionsMapper transactionsMapper; @Autowired public SavingsAccountReadPlatformServiceImpl(final PlatformSecurityContext context, final TenantAwareRoutingDataSource dataSource, @@ -50,6 +57,8 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead this.groupReadPlatformService = groupReadPlatformService; this.savingsProductReadPlatformService = savingProductReadPlatformService; this.dropdownReadPlatformService = dropdownReadPlatformService; + transactionTemplateMapper = new SavingsAccountTransactionTemplateMapper(); + transactionsMapper = new SavingsAccountTransactionsMapper(); } @Override @@ -59,7 +68,6 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead final SavingAccountMapper mapper = new SavingAccountMapper(); final String sql = "select " + mapper.schema(); return this.jdbcTemplate.query(sql, mapper, new Object[] {}); - } @Override @@ -88,14 +96,18 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead sqlBuilder.append("g.id as groupId, g.name as groupName, "); sqlBuilder.append("sp.id as productId, sp.name as productName, "); sqlBuilder.append("sa.currency_code as currencyCode, sa.currency_digits as currencyDigits, "); - sqlBuilder - .append("curr.name as currencyName, curr.internationalized_name_code as currencyNameCode, curr.display_symbol as currencyDisplaySymbol, "); - sqlBuilder - .append("sa.nominal_interest_rate_per_period as interestRate, sa.nominal_interest_rate_period_frequency_enum as interestRatePeriodFrequencyType, "); + sqlBuilder.append("curr.name as currencyName, curr.internationalized_name_code as currencyNameCode, "); + sqlBuilder.append("curr.display_symbol as currencyDisplaySymbol, "); + sqlBuilder.append("sa.nominal_interest_rate_per_period as interestRate, "); + sqlBuilder.append("sa.nominal_interest_rate_period_frequency_enum as interestRatePeriodFrequencyType, "); sqlBuilder.append("sa.annual_nominal_interest_rate as annualInterestRate, "); sqlBuilder.append("sa.min_required_opening_balance as minRequiredOpeningBalance, "); - sqlBuilder - .append("sa.lockin_period_frequency as lockinPeriodFrequency, sa.lockin_period_frequency_enum as lockinPeriodFrequencyType "); + sqlBuilder.append("sa.lockin_period_frequency as lockinPeriodFrequency,"); + sqlBuilder.append("sa.lockin_period_frequency_enum as lockinPeriodFrequencyType, "); + sqlBuilder.append("sa.total_deposits_derived as totalDeposits, "); + sqlBuilder.append("sa.total_withdrawals_derived as totalWithdrawals, "); + sqlBuilder.append("sa.total_interest_posted_derived as totalInterestPosted, "); + sqlBuilder.append("sa.account_balance_derived as accountBalance "); sqlBuilder.append("from m_savings_account sa "); sqlBuilder.append("left outer join m_client c ON c.id = sa.client_id "); sqlBuilder.append("left outer join m_group g ON g.id = sa.group_id "); @@ -137,7 +149,7 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead .fromInt(JdbcSupport.getInteger(rs, "interestRatePeriodFrequencyType"))); final BigDecimal annualInterestRate = rs.getBigDecimal("annualInterestRate"); - final BigDecimal minRequiredOpeningBalance = rs.getBigDecimal("minRequiredOpeningBalance"); + final BigDecimal minRequiredOpeningBalance = JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "minRequiredOpeningBalance"); final Integer lockinPeriodFrequency = JdbcSupport.getInteger(rs, "lockinPeriodFrequency"); EnumOptionData lockinPeriodFrequencyType = null; @@ -147,9 +159,17 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead .fromInt(lockinPeriodFrequencyTypeValue)); } + final BigDecimal totalDeposits = JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "totalDeposits"); + final BigDecimal totalWithdrawals = JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "totalWithdrawals"); + final BigDecimal totalInterestPosted = JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "totalInterestPosted"); + final BigDecimal accountBalance = JdbcSupport.getBigDecimalDefaultToZeroIfNull(rs, "accountBalance"); + + final SavingsAccountSummaryData summary = new SavingsAccountSummaryData(currency, totalDeposits, totalWithdrawals, + totalInterestPosted, accountBalance); + return SavingsAccountData.instance(id, accountNo, externalId, groupId, groupName, clientId, clientName, productId, productName, currency, interestRate, interestRatePeriodFrequencyType, annualInterestRate, minRequiredOpeningBalance, - lockinPeriodFrequency, lockinPeriodFrequencyType); + lockinPeriodFrequency, lockinPeriodFrequencyType, summary); } } @@ -181,9 +201,10 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead .retrieveInterestRatePeriodFrequencyTypeOptions(); final Collection lockinPeriodFrequencyTypeOptions = this.dropdownReadPlatformService .retrieveLockinPeriodFrequencyTypeOptions(); + final Collection transactions = null; template = SavingsAccountData.withTemplateOptions(template, productOptions, interestRatePeriodFrequencyTypeOptions, - lockinPeriodFrequencyTypeOptions); + lockinPeriodFrequencyTypeOptions, transactions); } else { String clientName = null; @@ -200,13 +221,124 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead final Collection interestRatePeriodFrequencyTypeOptions = null; final Collection lockinPeriodFrequencyTypeOptions = null; + final Collection transactions = null; + template = SavingsAccountData.withTemplateOptions(template, productOptions, interestRatePeriodFrequencyTypeOptions, - lockinPeriodFrequencyTypeOptions); + lockinPeriodFrequencyTypeOptions, transactions); } return template; } + @Override + public SavingsAccountTransactionData retrieveDepositTransactionTemplate(final Long savingsId) { + + try { + this.context.authenticatedUser(); + + final String sql = "select " + transactionTemplateMapper.schema() + " where sa.id = ?"; + + return this.jdbcTemplate.queryForObject(sql, transactionTemplateMapper, new Object[] { savingsId }); + } catch (EmptyResultDataAccessException e) { + throw new SavingsAccountNotFoundException(savingsId); + } + } + + @Override + public Collection retrieveAllTransactions(final Long savingsId) { + + final String sql = "select " + this.transactionsMapper.schema() + " where sa.id = ?"; + + return this.jdbcTemplate.query(sql, this.transactionsMapper, new Object[] { savingsId }); + } + + private static final class SavingsAccountTransactionsMapper implements RowMapper { + + private final String schemaSql; + + public SavingsAccountTransactionsMapper() { + + final StringBuilder sqlBuilder = new StringBuilder(400); + sqlBuilder.append("tr.id as transactionId, tr.transaction_type_enum as transactionType, "); + sqlBuilder.append("tr.transaction_date as transactionDate, tr.amount as transactionAmount,"); + sqlBuilder.append("sa.id as savingsId, sa.account_no as accountNo, "); + sqlBuilder.append("sa.currency_code as currencyCode, sa.currency_digits as currencyDigits, "); + sqlBuilder.append("curr.name as currencyName, curr.internationalized_name_code as currencyNameCode, "); + sqlBuilder.append("curr.display_symbol as currencyDisplaySymbol "); + sqlBuilder.append("from m_savings_account sa "); + sqlBuilder.append("join m_savings_account_transaction tr on tr.savings_account_id = sa.id "); + sqlBuilder.append("join m_currency curr on curr.code = sa.currency_code "); + + this.schemaSql = sqlBuilder.toString(); + } + + public String schema() { + return this.schemaSql; + } + + @Override + public SavingsAccountTransactionData mapRow(final ResultSet rs, @SuppressWarnings("unused") final int rowNum) throws SQLException { + final Long id = rs.getLong("transactionId"); + final int transactionTypeInt = JdbcSupport.getInteger(rs, "transactionType"); + final SavingsAccountTransactionEnumData transactionType = SavingsEnumerations.transactionType(transactionTypeInt); + + final LocalDate date = JdbcSupport.getLocalDate(rs, "transactionDate"); + final BigDecimal amount = JdbcSupport.getBigDecimalDefaultToZeroIfNull(rs, "transactionAmount"); + + final Long savingsId = rs.getLong("savingsId"); + final String accountNo = rs.getString("accountNo"); + + final String currencyCode = rs.getString("currencyCode"); + final String currencyName = rs.getString("currencyName"); + final String currencyNameCode = rs.getString("currencyNameCode"); + final String currencyDisplaySymbol = rs.getString("currencyDisplaySymbol"); + final Integer currencyDigits = JdbcSupport.getInteger(rs, "currencyDigits"); + final CurrencyData currency = new CurrencyData(currencyCode, currencyName, currencyDigits, currencyDisplaySymbol, + currencyNameCode); + + return SavingsAccountTransactionData.create(id, transactionType, savingsId, accountNo, date, currency, amount); + } + } + + private static final class SavingsAccountTransactionTemplateMapper implements RowMapper { + + private final String schemaSql; + + public SavingsAccountTransactionTemplateMapper() { + final StringBuilder sqlBuilder = new StringBuilder(400); + sqlBuilder.append("sa.id as id, sa.account_no as accountNo, "); + sqlBuilder.append("sa.currency_code as currencyCode, sa.currency_digits as currencyDigits, "); + sqlBuilder.append("curr.name as currencyName, curr.internationalized_name_code as currencyNameCode, "); + sqlBuilder.append("curr.display_symbol as currencyDisplaySymbol, "); + sqlBuilder.append("sa.min_required_opening_balance as minRequiredOpeningBalance "); + sqlBuilder.append("from m_savings_account sa "); + sqlBuilder.append("join m_currency curr on curr.code = sa.currency_code "); + + this.schemaSql = sqlBuilder.toString(); + } + + public String schema() { + return this.schemaSql; + } + + @Override + public SavingsAccountTransactionData mapRow(final ResultSet rs, @SuppressWarnings("unused") final int rowNum) throws SQLException { + + final Long savingsId = rs.getLong("id"); + final String accountNo = rs.getString("accountNo"); + + final String currencyCode = rs.getString("currencyCode"); + final String currencyName = rs.getString("currencyName"); + final String currencyNameCode = rs.getString("currencyNameCode"); + final String currencyDisplaySymbol = rs.getString("currencyDisplaySymbol"); + final Integer currencyDigits = JdbcSupport.getInteger(rs, "currencyDigits"); + final CurrencyData currency = new CurrencyData(currencyCode, currencyName, currencyDigits, currencyDisplaySymbol, + currencyNameCode); + + return SavingsAccountTransactionData.template(savingsId, accountNo, DateUtils.getLocalDateOfTenant(), currency); + } + } + private static final class SavingAccountTemplateMapper implements RowMapper { private final ClientData client; @@ -257,7 +389,7 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead .fromInt(JdbcSupport.getInteger(rs, "interestRatePeriodFrequencyType"))); final BigDecimal annualInterestRate = null; - final BigDecimal minRequiredOpeningBalance = rs.getBigDecimal("minRequiredOpeningBalance"); + final BigDecimal minRequiredOpeningBalance = JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "minRequiredOpeningBalance"); final Integer lockinPeriodFrequency = JdbcSupport.getInteger(rs, "lockinPeriodFrequency"); EnumOptionData lockinPeriodFrequencyType = null; @@ -281,9 +413,10 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead groupName = group.getName(); } + final SavingsAccountSummaryData summary = null; return SavingsAccountData.instance(null, null, null, groupId, groupName, clientId, clientName, productId, productName, currency, interestRate, interestRatePeriodFrequencyType, annualInterestRate, minRequiredOpeningBalance, - lockinPeriodFrequency, lockinPeriodFrequencyType); + lockinPeriodFrequency, lockinPeriodFrequencyType, summary); } } } \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsAccountWritePlatformService.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsAccountWritePlatformService.java index b073a014c..d0483eb94 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsAccountWritePlatformService.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsAccountWritePlatformService.java @@ -14,9 +14,9 @@ public interface SavingsAccountWritePlatformService { CommandProcessingResult updateSavingAccount(Long accountId, JsonCommand command); - CommandProcessingResult deposit(JsonCommand command); - - CommandProcessingResult withdraw(JsonCommand command); - CommandProcessingResult deleteSavingAccount(Long accountId); + + CommandProcessingResult deposit(Long savingsId, JsonCommand command); + + CommandProcessingResult withdrawal(Long savingsId, JsonCommand command); } \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsAccountWritePlatformServiceJpaRepositoryImpl.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsAccountWritePlatformServiceJpaRepositoryImpl.java index ddb77b24d..61a34e9ad 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsAccountWritePlatformServiceJpaRepositoryImpl.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsAccountWritePlatformServiceJpaRepositoryImpl.java @@ -5,9 +5,11 @@ */ package org.mifosplatform.portfolio.savings.service; +import java.math.BigDecimal; import java.util.LinkedHashMap; import java.util.Map; +import org.joda.time.LocalDate; import org.mifosplatform.infrastructure.core.api.JsonCommand; import org.mifosplatform.infrastructure.core.data.CommandProcessingResult; import org.mifosplatform.infrastructure.core.data.CommandProcessingResultBuilder; @@ -23,12 +25,14 @@ import org.mifosplatform.portfolio.group.domain.GroupRepository; import org.mifosplatform.portfolio.group.exception.GroupNotFoundException; import org.mifosplatform.portfolio.savings.api.SavingsApiConstants; import org.mifosplatform.portfolio.savings.data.SavingsAccountDataValidator; +import org.mifosplatform.portfolio.savings.data.SavingsAccountTransactionDataValidator; import org.mifosplatform.portfolio.savings.domain.SavingsAccount; import org.mifosplatform.portfolio.savings.domain.SavingsAccountAssembler; -import org.mifosplatform.portfolio.savings.domain.SavingsAccountRepository; +import org.mifosplatform.portfolio.savings.domain.SavingsAccountRepositoryWrapper; +import org.mifosplatform.portfolio.savings.domain.SavingsAccountTransaction; +import org.mifosplatform.portfolio.savings.domain.SavingsAccountTransactionRepository; import org.mifosplatform.portfolio.savings.domain.SavingsProduct; import org.mifosplatform.portfolio.savings.domain.SavingsProductRepository; -import org.mifosplatform.portfolio.savings.exception.SavingsAccountNotFoundException; import org.mifosplatform.portfolio.savings.exception.SavingsProductNotFoundException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -43,9 +47,11 @@ public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements Savi private final static Logger logger = LoggerFactory.getLogger(SavingsAccountWritePlatformServiceJpaRepositoryImpl.class); private final PlatformSecurityContext context; - private final SavingsAccountRepository savingAccountRepository; + private final SavingsAccountRepositoryWrapper savingAccountRepository; + private final SavingsAccountTransactionRepository savingsAccountTransactionRepository; private final SavingsAccountAssembler savingAccountAssembler; private final SavingsAccountDataValidator savingsAccountDataValidator; + private final SavingsAccountTransactionDataValidator savingsAccountTransactionDataValidator; private final AccountNumberGeneratorFactory accountIdentifierGeneratorFactory; private final ClientRepository clientRepository; private final GroupRepository groupRepository; @@ -53,13 +59,18 @@ public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements Savi @Autowired public SavingsAccountWritePlatformServiceJpaRepositoryImpl(final PlatformSecurityContext context, - final SavingsAccountRepository savingAccountRepository, final SavingsAccountAssembler savingAccountAssembler, + final SavingsAccountRepositoryWrapper savingAccountRepository, + final SavingsAccountTransactionRepository savingsAccountTransactionRepository, + final SavingsAccountAssembler savingAccountAssembler, final SavingsAccountDataValidator savingsAccountDataValidator, + final SavingsAccountTransactionDataValidator savingsAccountTransactionDataValidator, final AccountNumberGeneratorFactory accountIdentifierGeneratorFactory, final ClientRepository clientRepository, final GroupRepository groupRepository, final SavingsProductRepository savingsProductRepository) { this.context = context; this.savingAccountRepository = savingAccountRepository; + this.savingsAccountTransactionRepository = savingsAccountTransactionRepository; this.savingAccountAssembler = savingAccountAssembler; + this.savingsAccountTransactionDataValidator = savingsAccountTransactionDataValidator; this.accountIdentifierGeneratorFactory = accountIdentifierGeneratorFactory; this.savingsAccountDataValidator = savingsAccountDataValidator; this.clientRepository = clientRepository; @@ -136,8 +147,7 @@ public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements Savi final Map changes = new LinkedHashMap(20); - final SavingsAccount account = this.savingAccountRepository.findOne(accountId); - if (account == null) { throw new SavingsAccountNotFoundException(accountId); } + final SavingsAccount account = this.savingAccountRepository.findOneWithNotFoundDetection(accountId); account.update(command, changes); @@ -192,54 +202,13 @@ public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements Savi } } - @Transactional - @Override - public CommandProcessingResult deposit(final JsonCommand command) { - - this.context.authenticatedUser(); - - SavingsAccount account = this.savingAccountRepository.findOne(command.entityId()); - if (account == null) { throw new SavingsAccountNotFoundException(command.entityId()); } - - // FIXME - add basic support for deposits - - return new CommandProcessingResultBuilder() // - .withEntityId(account.getId()) // - .withOfficeId(account.officeId()) // - .withClientId(account.clientId()) // - .withGroupId(account.groupId()) // - .build(); - } - - @Transactional - @Override - public CommandProcessingResult withdraw(final JsonCommand command) { - - this.context.authenticatedUser(); - - final SavingsAccount account = this.savingAccountRepository.findOne(command.entityId()); - if (account == null) { throw new SavingsAccountNotFoundException(command.entityId()); } - - // FIXME - add basic support for withdrawals - - this.savingAccountRepository.save(account); - - return new CommandProcessingResultBuilder() // - .withEntityId(account.getId()) // - .withOfficeId(account.officeId()) // - .withClientId(account.clientId()) // - .withGroupId(account.groupId()) // - .build(); - } - @Transactional @Override public CommandProcessingResult deleteSavingAccount(final Long accountId) { this.context.authenticatedUser(); - final SavingsAccount account = this.savingAccountRepository.findOne(accountId); - if (account == null) { throw new SavingsAccountNotFoundException(accountId); } + final SavingsAccount account = this.savingAccountRepository.findOneWithNotFoundDetection(accountId); this.savingAccountRepository.delete(account); @@ -250,4 +219,60 @@ public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements Savi .withGroupId(account.groupId()) // .build(); } + + @Transactional + @Override + public CommandProcessingResult deposit(final Long savingsId, final JsonCommand command) { + + this.context.authenticatedUser(); + + this.savingsAccountTransactionDataValidator.validate(command); + + final SavingsAccount account = this.savingAccountRepository.findOneWithNotFoundDetection(savingsId); + + final LocalDate transactionDate = command.localDateValueOfParameterNamed("transactionDate"); + final BigDecimal transactionAmount = command.bigDecimalValueOfParameterNamed("transactionAmount"); + + final SavingsAccountTransaction deposit = account.deposit(transactionDate, transactionAmount); + final Long transactionId = saveTransactionToGenerateTransactionId(deposit); + + this.savingAccountRepository.save(account); + + return new CommandProcessingResultBuilder() // + .withEntityId(transactionId) // + .withOfficeId(account.officeId()) // + .withClientId(account.clientId()) // + .withGroupId(account.groupId()) // + .withSavingsId(savingsId) // + .build(); + } + + private Long saveTransactionToGenerateTransactionId(final SavingsAccountTransaction transaction) { + this.savingsAccountTransactionRepository.save(transaction); + return transaction.getId(); + } + + @Transactional + @Override + public CommandProcessingResult withdrawal(final Long savingsId, final JsonCommand command) { + + this.context.authenticatedUser(); + + final SavingsAccount account = this.savingAccountRepository.findOneWithNotFoundDetection(savingsId); + + final LocalDate transactionDate = command.localDateValueOfParameterNamed("transactionDate"); + final BigDecimal transactionAmount = command.bigDecimalValueOfParameterNamed("transactionAmount"); + + final SavingsAccountTransaction withdrawal = account.withdrawal(transactionDate, transactionAmount); + final Long transactionId = saveTransactionToGenerateTransactionId(withdrawal); + this.savingAccountRepository.save(account); + + return new CommandProcessingResultBuilder() // + .withEntityId(transactionId) // + .withOfficeId(account.officeId()) // + .withClientId(account.clientId()) // + .withGroupId(account.groupId()) // + .withSavingsId(savingsId) // + .build(); + } } \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsEnumerations.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsEnumerations.java index d091b5e17..5188c9b82 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsEnumerations.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsEnumerations.java @@ -7,6 +7,8 @@ package org.mifosplatform.portfolio.savings.service; import org.mifosplatform.infrastructure.core.data.EnumOptionData; import org.mifosplatform.portfolio.loanproduct.domain.PeriodFrequencyType; +import org.mifosplatform.portfolio.savings.data.SavingsAccountTransactionEnumData; +import org.mifosplatform.portfolio.savings.domain.SavingsAccountTransactionType; public class SavingsEnumerations { @@ -71,4 +73,34 @@ public class SavingsEnumerations { } return optionData; } + + public static SavingsAccountTransactionEnumData transactionType(final int transactionType) { + return transactionType(SavingsAccountTransactionType.fromInt(transactionType)); + } + + public static SavingsAccountTransactionEnumData transactionType(final SavingsAccountTransactionType type) { + + SavingsAccountTransactionEnumData optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.INVALID + .getValue().longValue(), SavingsAccountTransactionType.INVALID.getCode(), "Invalid"); + + switch (type) { + case INVALID: + optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.INVALID.getValue().longValue(), + SavingsAccountTransactionType.INVALID.getCode(), "Invalid"); + break; + case DEPOSIT: + optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.DEPOSIT.getValue().longValue(), + SavingsAccountTransactionType.DEPOSIT.getCode(), "Deposit"); + break; + case WITHDRAWAL: + optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.WITHDRAWAL.getValue().longValue(), + SavingsAccountTransactionType.WITHDRAWAL.getCode(), "Withdrawal"); + break; + case INTEREST_POSTING: + optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.INTEREST_POSTING.getValue().longValue(), + SavingsAccountTransactionType.INTEREST_POSTING.getCode(), "Interest posting"); + break; + } + return optionData; + } } \ No newline at end of file