change office transactions capability to support intra office transactions and external transactions (money in or out of office from external entity).

This commit is contained in:
Keith Woodlock
2012-07-12 11:58:53 +01:00
parent 47c5f33d23
commit 1a29bbe97e
9 changed files with 202 additions and 73 deletions
@@ -0,0 +1,22 @@
-- create office transaction table
DROP TABLE IF EXISTS `mifosngprovider`.`portfolio_office_monetary_transfers`;
DROP TABLE IF EXISTS `mifosngprovider`.`portfolio_office_transaction`;
CREATE TABLE `portfolio_office_transaction` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`from_office_id` bigint(20) DEFAULT NULL,
`to_office_id` bigint(20) DEFAULT NULL,
`currency_code` varchar(3) NOT NULL,
`currency_digits` int(11) NOT NULL,
`transaction_amount` decimal(19,6) NOT NULL,
`transaction_date` date NOT NULL,
`description` varchar(100) DEFAULT NULL,
`created_date` datetime DEFAULT NULL,
`createdby_id` bigint(20) DEFAULT NULL,
`lastmodified_date` datetime DEFAULT NULL,
`lastmodifiedby_id` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FK1E37728B93C6C1B6` (`to_office_id`),
KEY `FK1E37728B783C5C25` (`from_office_id`),
CONSTRAINT `FK1E37728B783C5C25` FOREIGN KEY (`from_office_id`) REFERENCES `org_office` (`id`),
CONSTRAINT `FK1E37728B93C6C1B6` FOREIGN KEY (`to_office_id`) REFERENCES `org_office` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;