2018-09-12 14:48:59 -04:00
|
|
|
--------------------------balances----------------------------------------------------
|
|
|
|
|
|
|
|
CREATE TABLE evt.bal (
|
|
|
|
acct TEXT REFERENCES evt.acct(acct)
|
|
|
|
,perd daterange
|
|
|
|
,obal numeric(12,2)
|
|
|
|
,debits numeric(12,2)
|
|
|
|
,credits numeric(12,2)
|
|
|
|
,cbal numeric(12,2)
|
|
|
|
);
|
|
|
|
COMMENT ON COLUMN evt.bal.acct IS 'account';
|
|
|
|
COMMENT ON COLUMN evt.bal.perd IS 'period';
|
|
|
|
COMMENT ON COLUMN evt.bal.obal IS 'opening balance';
|
|
|
|
COMMENT ON COLUMN evt.bal.debits IS 'total debits';
|
|
|
|
COMMENT ON COLUMN evt.bal.credits IS 'total credits';
|
2018-09-12 00:48:44 -04:00
|
|
|
COMMENT ON COLUMN evt.bal.cbal IS 'closing balance';
|