This commit is contained in:
@@ -783,7 +783,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
//WORKORDERITEM LABOR
|
||||
await ExecQueryAsync("CREATE TABLE aworkorderitemlabor (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, workorderitemid BIGINT NOT NULL REFERENCES aworkorderitem (id), "
|
||||
+ "userid BIGINT REFERENCES auser, servicestartdate TIMESTAMP, servicestopdate TIMESTAMP, servicerateid BIGINT REFERENCES aservicerate, servicedetails text, "
|
||||
+ "serviceratequantity DECIMAL(19,5) NOT NULL default 0, nochargequantity DECIMAL(19,5) NOT NULL default 0, servicebankid BIGINT REFERENCES aservicebank, taxcodesaleid BIGINT REFERENCES ataxcode, "
|
||||
+ "serviceratequantity DECIMAL(19,5) NOT NULL default 0, nochargequantity DECIMAL(19,5) NOT NULL default 0, servicebankid BIGINT REFERENCES aservicebank, taxcodesaleid BIGINT REFERENCES ataxcode, "
|
||||
+ "cost DECIMAL(38,18) NOT NULL default 0, listprice DECIMAL(38,18) NOT NULL default 0, price DECIMAL(38,18) NOT NULL default 0, taxapct DECIMAL(8,5) NOT NULL default 0, "
|
||||
+ "taxbpct DECIMAL(8,5) NOT NULL default 0, taxontax BOOL NOT NULL default false, taxname TEXT "
|
||||
+ ")");
|
||||
@@ -796,10 +796,10 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
await ExecQueryAsync("ALTER TABLE aloanunit ADD column workorderitemloanid BIGINT NULL REFERENCES aworkorderitemloan");
|
||||
|
||||
//WORKORDERITEM PART
|
||||
await ExecQueryAsync("CREATE TABLE aworkorderitempart (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, workorderitemid BIGINT NOT NULL REFERENCES aworkorderitem (id), "
|
||||
+ "description TEXT, serials TEXT, partid BIGINT NOT NULL REFERENCES apart, partwarehouseid BIGINT NOT NULL REFERENCES apartwarehouse, "
|
||||
+ "quantity DECIMAL(19,5) NOT NULL default 0, cost DECIMAL(38,18) NOT NULL default 0, baseprice DECIMAL(38,18) NOT NULL default 0, price DECIMAL(38,18) NOT NULL default 0, "
|
||||
+ "manualdiscountpct DECIMAL(8,5) NOT NULL default 0, taxpartsaleid BIGINT REFERENCES ataxcode "
|
||||
await ExecQueryAsync("CREATE TABLE aworkorderitempart (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, workorderitemid BIGINT NOT NULL REFERENCES aworkorderitem (id), description TEXT, serials TEXT, "
|
||||
+ "partid BIGINT NOT NULL REFERENCES apart, partwarehouseid BIGINT NOT NULL REFERENCES apartwarehouse, quantity DECIMAL(19,5) NOT NULL default 0, taxpartsaleid BIGINT REFERENCES ataxcode "
|
||||
+ "cost DECIMAL(38,18) NOT NULL default 0, listprice DECIMAL(38,18) NOT NULL default 0, price DECIMAL(38,18) NOT NULL default 0, taxapct DECIMAL(8,5) NOT NULL default 0, "
|
||||
+ "taxbpct DECIMAL(8,5) NOT NULL default 0, taxontax BOOL NOT NULL default false, taxname TEXT "
|
||||
+ ")");
|
||||
|
||||
//WORKORDERITEM PART REQUEST
|
||||
@@ -823,8 +823,9 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
await ExecQueryAsync("CREATE TABLE aworkorderitemtravel (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, workorderitemid BIGINT NOT NULL REFERENCES aworkorderitem (id), "
|
||||
+ "userid BIGINT REFERENCES auser, travelstartdate TIMESTAMP, travelstopdate TIMESTAMP, travelrateid BIGINT REFERENCES atravelrate, traveldetails text, "
|
||||
+ "travelratequantity DECIMAL(19,5) NOT NULL default 0, nochargequantity DECIMAL(19,5) NOT NULL default 0, servicebankid BIGINT REFERENCES aservicebank, "
|
||||
+ "taxcodesaleid BIGINT REFERENCES ataxcode, distance DECIMAL(19,5) NOT NULL default 0, baseprice DECIMAL(38,18) NOT NULL default 0, price DECIMAL(38,18) NOT NULL default 0, "
|
||||
+ "manualdiscountpct DECIMAL(8,5) NOT NULL default 0 "
|
||||
+ "taxcodesaleid BIGINT REFERENCES ataxcode, distance DECIMAL(19,5) NOT NULL default 0, "
|
||||
+ "cost DECIMAL(38,18) NOT NULL default 0, listprice DECIMAL(38,18) NOT NULL default 0, price DECIMAL(38,18) NOT NULL default 0, taxapct DECIMAL(8,5) NOT NULL default 0, "
|
||||
+ "taxbpct DECIMAL(8,5) NOT NULL default 0, taxontax BOOL NOT NULL default false, taxname TEXT "
|
||||
+ ")");
|
||||
|
||||
//WORKORDERITEM UNIT
|
||||
|
||||
Reference in New Issue
Block a user