diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-10-08 20:47:38 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-10-08 20:47:38 +0000 |
commit | 68399771603d9a2d084a9eaca480f17016801fe6 (patch) | |
tree | 02859ae3e2743f8b141a9837f703c21d77651759 /sql/Pg-tables.sql | |
parent | 7376ef357ac4dce6bf30548c773774dddd2ea033 (diff) |
First round of tax code replacement, adds cumulative tax support
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@195 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'sql/Pg-tables.sql')
-rwxr-xr-x | sql/Pg-tables.sql | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/Pg-tables.sql b/sql/Pg-tables.sql index 42471a15..40a81af8 100755 --- a/sql/Pg-tables.sql +++ b/sql/Pg-tables.sql @@ -12,7 +12,7 @@ CREATE SEQUENCE jcitemsid; SELECT nextval ('jcitemsid'); -- -create table transactions ( +CREATE TABLE transactions ( id int PRIMARY KEY, table_name text ); @@ -243,12 +243,20 @@ CREATE TABLE partstax ( PRIMARY KEY (parts_id, chart_id) ); -- +CREATE TABLE taxmodule ( + taxmodule_id serial PRIMARY KEY, + taxmodulename text NOT NULL +}; +-- CREATE TABLE tax ( chart_id int PRIMARY KEY, rate numeric, taxnumber text, validto date, - FOREIGN KEY (chart_id) REFERENCES chart (id) + pass integer DEFAULT 0 NOT NULL, + taxmodule_id int, + FOREIGN KEY (chart_id) REFERENCES chart (id), + FOREIGN KEY (taxmodule_id) REFERENCES taxmodule (taxmodule_id) ); -- CREATE TABLE customertax ( |