X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/59c1d7e3c7d71eb3f80c8a1f1478b29087882475..b3721e4e65d62ea30b68b00ac77b4495b1f17337:/sql/lx-office.sql diff --git a/sql/lx-office.sql b/sql/lx-office.sql index 6ccc09931..9caa7bd04 100644 --- a/sql/lx-office.sql +++ b/sql/lx-office.sql @@ -160,7 +160,11 @@ CREATE TABLE "invoice" ( "deliverydate" date, "serialnumber" text, "itime" timestamp DEFAULT now(), - "mtime" timestamp + "mtime" timestamp, + "pricegroup_id" integer, + "ordnumber" text, + "transdate" text, + "cusordnumber" text ); CREATE TABLE "vendor" ( @@ -239,9 +243,10 @@ CREATE TABLE "customer" ( "obsolete" boolean DEFAULT 'f', "ustid" varchar(12), "username" varchar(50), - "user_password" varchar(12), + "user_password" text, "salesman_id" integer, - "c_vendor_id" text + "c_vendor_id" text, + "klass" integer DEFAULT 0 ); @@ -280,6 +285,7 @@ CREATE TABLE "ar" ( "paid" numeric (15,5), "datepaid" date, "duedate" date, + "deliverydate" date, "invoice" boolean DEFAULT 'f', "shippingpoint" text, "terms" smallint DEFAULT 0, @@ -392,9 +398,13 @@ CREATE TABLE "orderitems" ( "reqdate" date, "ship" real, "serialnumber" text, - "id" integer DEFAULT nextval('orderitemsid'::text) PRIMARY KEY, + "id" integer DEFAULT nextval('orderitemsid'::text), "itime" timestamp DEFAULT now(), - "mtime" timestamp + "mtime" timestamp, + "pricegroup_id" integer, + "ordnumber" text, + "transdate" text, + "cusordnumber" text ); CREATE TABLE "exchangerate" ( @@ -444,7 +454,7 @@ CREATE TABLE "shipto" ( CREATE TABLE "project" ( "id" integer DEFAULT nextval('id'::text) PRIMARY KEY, - "projectnumber" text, + "projectnumber" text UNIQUE, "description" text, "itime" timestamp DEFAULT now(), "mtime" timestamp @@ -551,6 +561,22 @@ CREATE TABLE "licenseinvoice" ( license_id integer ); +-- Preisgruppenverwaltung +CREATE TABLE "pricegroup" ( + "id" integer DEFAULT nextval('id'::text), + "pricegroup" text not null, + PRIMARY KEY (id) +); +--Preisverwaltung der Preisgruppen +CREATE TABLE "prices" ( + "parts_id" integer REFERENCES parts(id), + "pricegroup_id" integer REFERENCES pricegroup(id), + "price" numeric(15,5) +); + + + + -- Table of tax authoritys -- for module ustva -- Lx office