Added a closes table to the schema, so that we can keep track of daily closes, deposits, etc. Moved into the model an operation to close a set of ledgers and make a deposit.
git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@200 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -905,23 +905,26 @@ DROP TABLE IF EXISTS `pmgr_ledgers`;
|
||||
CREATE TABLE `pmgr_ledgers` (
|
||||
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
|
||||
-- REVISIT <AP>: 20090605
|
||||
-- If ledgers do need to be closed, then we'll need
|
||||
-- to add several parameters indicating the period
|
||||
-- this particular ledger is valid and so on.
|
||||
|
||||
`account_id` INT(10) UNSIGNED NOT NULL,
|
||||
`sequence` INT(10) UNSIGNED DEFAULT 1,
|
||||
`closed` INT UNSIGNED DEFAULT 0,
|
||||
|
||||
-- REVISIT <AP>: 20090607
|
||||
-- Probably, a single close should have the ability to close
|
||||
-- many different account ledgers. For now, just timestamping.
|
||||
-- `close_id` INT(10) UNSIGNED NOT NULL,
|
||||
`prior_ledger_id` INT(10) UNSIGNED DEFAULT NULL,
|
||||
`close_id` INT(10) UNSIGNED DEFAULT NULL,
|
||||
|
||||
`open_stamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`close_stamp` DATETIME DEFAULT NULL,
|
||||
`comment` VARCHAR(255) DEFAULT NULL,
|
||||
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- ----------------------------------------------------------------------
|
||||
-- TABLE pmgr_closes
|
||||
|
||||
DROP TABLE IF EXISTS `pmgr_closes`;
|
||||
CREATE TABLE `pmgr_closes` (
|
||||
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`stamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`comment` VARCHAR(255) DEFAULT NULL,
|
||||
|
||||
PRIMARY KEY (`id`)
|
||||
|
||||
Reference in New Issue
Block a user