summaryrefslogtreecommitdiff
path: root/sql/Pg-tables.sql
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2006-10-08 20:47:38 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2006-10-08 20:47:38 +0000
commit68399771603d9a2d084a9eaca480f17016801fe6 (patch)
tree02859ae3e2743f8b141a9837f703c21d77651759 /sql/Pg-tables.sql
parent7376ef357ac4dce6bf30548c773774dddd2ea033 (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-xsql/Pg-tables.sql12
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 (