This commit is contained in:
@@ -466,7 +466,7 @@ MULTIPLE discount / markup ITEMS
|
|||||||
AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("HeadOffice"));
|
AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("HeadOffice"));
|
||||||
if (await ct.Unit.AnyAsync(m => m.ContractId == inObj.Id))
|
if (await ct.Unit.AnyAsync(m => m.ContractId == inObj.Id))
|
||||||
AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("Unit"));
|
AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("Unit"));
|
||||||
if (await ct.WorkOrder.AnyAsync(m => m.ContractId == inObj.Id))
|
if (await ct.WorkOrder.AnyAsync(m => m.ContractId == inObj.Id))
|
||||||
AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("WorkOrder"));
|
AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("WorkOrder"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -523,7 +523,7 @@ MULTIPLE discount / markup ITEMS
|
|||||||
UserTranslationId,
|
UserTranslationId,
|
||||||
CurrentUserRoles);
|
CurrentUserRoles);
|
||||||
if (preTrans == null)
|
if (preTrans == null)
|
||||||
await TranslationBiz.GetSubsetStaticAsync(
|
preTrans = await TranslationBiz.GetSubsetStaticAsync(
|
||||||
new List<string> { "TimeSpanDays", "TimeSpanHours", "TimeSpanMinutes", "TimeSpanSeconds" },
|
new List<string> { "TimeSpanDays", "TimeSpanHours", "TimeSpanMinutes", "TimeSpanSeconds" },
|
||||||
UserTranslationId);
|
UserTranslationId);
|
||||||
|
|
||||||
|
|||||||
@@ -25,13 +25,13 @@ namespace AyaNova.Util
|
|||||||
internal const long EXPECTED_COLUMN_COUNT = 943;
|
internal const long EXPECTED_COLUMN_COUNT = 943;
|
||||||
internal const long EXPECTED_INDEX_COUNT = 141;
|
internal const long EXPECTED_INDEX_COUNT = 141;
|
||||||
internal const long EXPECTED_CHECK_CONSTRAINTS = 435;
|
internal const long EXPECTED_CHECK_CONSTRAINTS = 435;
|
||||||
internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 116;
|
internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 115;
|
||||||
internal const long EXPECTED_VIEWS = 6;
|
internal const long EXPECTED_VIEWS = 6;
|
||||||
internal const long EXPECTED_ROUTINES = 2;
|
internal const long EXPECTED_ROUTINES = 2;
|
||||||
|
|
||||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////// C943:I141:CC435:FC115:V6:R2
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -758,11 +758,11 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
|||||||
//WORKORDER
|
//WORKORDER
|
||||||
await ExecQueryAsync("CREATE TABLE aworkorder (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, serial BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, "
|
await ExecQueryAsync("CREATE TABLE aworkorder (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, serial BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, "
|
||||||
+ "notes TEXT, wiki TEXT, customfields TEXT, tags VARCHAR(255) ARRAY, customerid BIGINT NOT NULL REFERENCES acustomer (id), "
|
+ "notes TEXT, wiki TEXT, customfields TEXT, tags VARCHAR(255) ARRAY, customerid BIGINT NOT NULL REFERENCES acustomer (id), "
|
||||||
+ "projectid BIGINT REFERENCES aproject, contractid BIGINT NULL REFERENCES acontract, internalreferencenumber text, customerreferencenumber text, customercontactname text, "
|
+ "projectid BIGINT REFERENCES aproject, contractid BIGINT NULL, internalreferencenumber text, customerreferencenumber text, customercontactname text, "
|
||||||
+ "servicedate TIMESTAMP, completebydate TIMESTAMP, invoicenumber TEXT, customersignature TEXT, customersignaturename TEXT, customersignaturecaptured TIMESTAMP, "
|
+ "servicedate TIMESTAMP, completebydate TIMESTAMP, invoicenumber TEXT, customersignature TEXT, customersignaturename TEXT, customersignaturecaptured TIMESTAMP, "
|
||||||
+ "techsignature TEXT, techsignaturename TEXT, techsignaturecaptured TIMESTAMP, durationtocompleted INTERVAL NOT NULL, onsite BOOL NOT NULL, contract TEXT, "
|
+ "techsignature TEXT, techsignaturename TEXT, techsignaturecaptured TIMESTAMP, durationtocompleted INTERVAL NOT NULL, onsite BOOL NOT NULL, contract TEXT, "
|
||||||
+ "postaddress TEXT, postcity TEXT, postregion TEXT, postcountry TEXT, postcode TEXT, address TEXT, city TEXT, region TEXT, country TEXT, latitude DECIMAL(9,6), longitude DECIMAL(9,6) "
|
+ "postaddress TEXT, postcity TEXT, postregion TEXT, postcountry TEXT, postcode TEXT, address TEXT, city TEXT, region TEXT, country TEXT, latitude DECIMAL(9,6), longitude DECIMAL(9,6) "
|
||||||
+ ")");
|
+ ")");//note deliberately not referencing contract here as it's not tied to it, just needs to keep track of it in case user selects alternate then triggers recalc
|
||||||
|
|
||||||
await ExecQueryAsync("CREATE TABLE aworkorderstate (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, workorderid BIGINT NOT NULL REFERENCES aworkorder (id), "
|
await ExecQueryAsync("CREATE TABLE aworkorderstate (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, workorderid BIGINT NOT NULL REFERENCES aworkorder (id), "
|
||||||
+ "workorderstatusid BIGINT NOT NULL REFERENCES aworkorderstatus (id), created TIMESTAMP NOT NULL, userid BIGINT NOT NULL REFERENCES auser (id)"
|
+ "workorderstatusid BIGINT NOT NULL REFERENCES aworkorderstatus (id), created TIMESTAMP NOT NULL, userid BIGINT NOT NULL REFERENCES auser (id)"
|
||||||
|
|||||||
Reference in New Issue
Block a user