Got the ledger closings to work again. This seems to work ok, although I notice closing the ledger after deposit results in a balance forward entry of $0.00 . I'll work on it next

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@421 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-30 01:59:10 +00:00
parent 42677ae2f4
commit 55c5c9e9e6
11 changed files with 186 additions and 192 deletions

View File

@@ -933,7 +933,7 @@ CREATE TABLE `pmgr_ledgers` (
`sequence` INT(10) UNSIGNED DEFAULT 1,
`prior_ledger_id` INT(10) UNSIGNED DEFAULT NULL,
`close_id` INT(10) UNSIGNED DEFAULT NULL,
`close_transaction_id` INT(10) UNSIGNED DEFAULT NULL,
`comment` VARCHAR(255) DEFAULT NULL,
@@ -941,20 +941,6 @@ CREATE TABLE `pmgr_ledgers` (
) 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`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- ----------------------------------------------------------------------
-- ----------------------------------------------------------------------
-- TABLE pmgr_transactions
@@ -966,6 +952,7 @@ CREATE TABLE `pmgr_transactions` (
`type` ENUM('INVOICE',
'RECEIPT',
'DEPOSIT',
'CLOSE',
-- 'CREDIT',
-- 'REFUND',
'TRANSFER')
@@ -991,15 +978,15 @@ CREATE TABLE `pmgr_transactions` (
-- The account/ledger of the transaction set
-- (e.g. A/R, Bank, etc)
`account_id` INT(10) UNSIGNED NOT NULL,
`ledger_id` INT(10) UNSIGNED NOT NULL,
`account_id` INT(10) UNSIGNED DEFAULT NULL,
`ledger_id` INT(10) UNSIGNED DEFAULT NULL,
-- For convenience. Actually, INVOICE will always set crdr
-- to DEBIT, RECEIPT will use CREDIT, and DEPOSIT will use
-- DEBIT
`crdr` ENUM('DEBIT',
'CREDIT')
NOT NULL,
DEFAULT NULL,
-- amount is for convenience. It can always be calculated from
-- the associated double entries (and therefore will need to be