diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-10-18 00:45:37 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-10-18 00:45:37 +0000 |
commit | 59a9c930a875cc618b7386314bcfc69adc4fe549 (patch) | |
tree | 5cd55697cc97b255cf3d24df431d49a9cdcc3471 /sql | |
parent | e20e7a6e47760d0e8561ae7d13a29ddc24330b68 (diff) |
POS Fixes:
1: Drawer opening now uses correct printer designation
2: Change issued is now entered with correct memo field.
3: Closing tell report works as advertised
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1782 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'sql')
-rw-r--r-- | sql/Pg-database.sql | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sql/Pg-database.sql b/sql/Pg-database.sql index 85c8df74..bfaf7c75 100644 --- a/sql/Pg-database.sql +++ b/sql/Pg-database.sql @@ -781,6 +781,7 @@ insert into batch_class (id,class) values (2,'ar'); insert into batch_class (id,class) values (3,'payment'); insert into batch_class (id,class) values (4,'payment_reversal'); insert into batch_class (id,class) values (5,'gl'); +insert into batch_class (id,class) values (6,'receipt'); SELECT SETVAL('batch_class_id_seq',6); @@ -795,12 +796,22 @@ CREATE TABLE batch ( created_on date default now() ); +COMMENT ON batch.batch_class_id IS +$$ Note that this field is largely used for sorting the vouchers. A given batch is NOT restricted to this type.$$; + CREATE TABLE voucher ( - trans_id int, + trans_id int REFERENCES transactions(id) NOT NULL, batch_id int references batch(id) not null, - id serial primary key + id serial NOT NULL, + batch_class int references batch_class not null, + PRIMARY KEY (batch_class, batch_id, trans_id) ); +COMMENT ON batch.batch_class IS $$ This is the authoritative class of the +voucher. $$; + +COMMENT ON voucher.id IS $$ This is simply a surrogate key for easy reference.$$; + -- create table shipto ( trans_id int, |