X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/d319704a66e9be64da837ccea10af6774c2b0838..999fedbd9ddf7f73d468776559edfcc34f7aafdf:/sql/lx-office.sql

diff --git a/sql/lx-office.sql b/sql/lx-office.sql
index d2c0bca27..6ccc09931 100644
--- a/sql/lx-office.sql
+++ b/sql/lx-office.sql
@@ -109,12 +109,23 @@ CREATE TABLE "defaults" (
 	"rfqnumber" text,
         "customernumber" text,
         "vendornumber" text,
+        "audittrail" bool default 'f',
         "articlenumber" text,
         "servicenumber" text,
         "itime" timestamp DEFAULT now(),
         "mtime" timestamp
 );
-INSERT INTO defaults (version) VALUES ('2.1.2');
+INSERT INTO defaults (version,audittrail) VALUES ('2.1.2', 't');
+
+CREATE TABLE audittrail (
+        "trans_id" int,
+        "tablename" text,
+        "reference" text,
+        "formname" text,
+        "action" text,
+        "transdate" timestamp default current_timestamp,
+        "employee_id" int
+);
 
 CREATE TABLE "acc_trans" (
 	"trans_id" integer,
@@ -370,7 +381,7 @@ CREATE TABLE "oe" (
 );
 
 CREATE TABLE "orderitems" (
-	"trans_id" integer REFERENCES oe (id),
+	"trans_id" integer,
 	"parts_id" integer REFERENCES parts (id),
 	"description" text,
 	"qty" real,
@@ -417,6 +428,8 @@ CREATE TABLE "employee" (
 CREATE TABLE "shipto" (
 	"trans_id" integer,
 	"shiptoname" character varying(75),
+        "shiptodepartment_1" character varying(75),
+        "shiptodepartment_2" character varying(75),
 	"shiptostreet" character varying(75),
 	"shiptozipcode" character varying(75),
 	"shiptocity" character varying(75),
