This commit is contained in:
2021-03-26 16:52:54 +00:00
parent 0432bc3628
commit c042162daf
2 changed files with 38 additions and 10 deletions

View File

@@ -48,7 +48,7 @@ namespace AyaNova.Util
CURRENCY: DECIMAL(38,18) (to support potential of cryptocurrencies) largest Etherium value fits in this (36bytes)
TAX/PERCENTAGES/PDF PAGE SCALE: DECIMAL(8,5) largest tax I could find would fit in this, that's 3 digits to left and 5 to right
Taxes are in face value not fractional value, i.e. "7" not .07 in db
Inventory/incidents general numbers (19,5)
Inventory/incidents/service rate quantity etc general numbers (19,5)
Latitude/longitude 9,6
@@ -775,9 +775,11 @@ $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"
+ ")");
//WORKORDERITEM LOAN
await ExecQueryAsync("CREATE TABLE aworkorderitemloan (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, workorderitemid BIGINT NOT NULL REFERENCES aworkorderitem (id), "
+ "notes TEXT, customfields TEXT, tags VARCHAR(255) ARRAY)");