This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -53,7 +53,7 @@
|
|||||||
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
||||||
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
||||||
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
||||||
"AYANOVA_SERVER_TEST_MODE": "false",
|
"AYANOVA_SERVER_TEST_MODE": "true",
|
||||||
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
||||||
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
||||||
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
||||||
|
|||||||
@@ -459,7 +459,9 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
ReturnList.Add(new NameIdItem() { Name = LT["ContractOverrideTypePriceDiscount"], Id = (long)ContractOverrideType.PriceDiscount });
|
ReturnList.Add(new NameIdItem() { Name = LT["ContractOverrideTypePriceDiscount"], Id = (long)ContractOverrideType.PriceDiscount });
|
||||||
ReturnList.Add(new NameIdItem() { Name = LT["ContractOverrideTypeMarkup"], Id = (long)ContractOverrideType.CostMarkup });
|
ReturnList.Add(new NameIdItem() { Name = LT["ContractOverrideTypeMarkup"], Id = (long)ContractOverrideType.CostMarkup });
|
||||||
ReturnList.Add(new NameIdItem() { Name = "-", Id = (long)ContractOverrideType.NotSet });
|
//this is not a valid setting, not sure why it's there
|
||||||
|
// ReturnList.Add(new NameIdItem() { Name = "-", Id = (long)ContractOverrideType.NotSet });
|
||||||
|
|
||||||
}
|
}
|
||||||
//#################################################################################################################
|
//#################################################################################################################
|
||||||
//################### NEW HERE DO NOT FORGET TO ADD TO LISTS AVAILABLE ABOVE AS WELL ##############################
|
//################### NEW HERE DO NOT FORGET TO ADD TO LISTS AVAILABLE ABOVE AS WELL ##############################
|
||||||
|
|||||||
@@ -347,8 +347,7 @@ MULTIPLE discount / markup ITEMS
|
|||||||
}
|
}
|
||||||
if (item.OverridePct == 0)
|
if (item.OverridePct == 0)
|
||||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractPartOverrideItems[{i}].OverridePct");
|
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractPartOverrideItems[{i}].OverridePct");
|
||||||
if (item.OverrideType == ContractOverrideType.NotSet)
|
|
||||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractPartOverrideItems[{i}].OverrideType");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//SERVICE RATES
|
//SERVICE RATES
|
||||||
@@ -379,8 +378,7 @@ MULTIPLE discount / markup ITEMS
|
|||||||
}
|
}
|
||||||
if (item.OverridePct == 0)
|
if (item.OverridePct == 0)
|
||||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractServiceRateOverrideItems[{i}].OverridePct");
|
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractServiceRateOverrideItems[{i}].OverridePct");
|
||||||
if (item.OverrideType == ContractOverrideType.NotSet)
|
|
||||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractServiceRateOverrideItems[{i}].OverrideType");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -412,8 +410,7 @@ MULTIPLE discount / markup ITEMS
|
|||||||
}
|
}
|
||||||
if (item.OverridePct == 0)
|
if (item.OverridePct == 0)
|
||||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractTravelRateOverrideItems[{i}].OverridePct");
|
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractTravelRateOverrideItems[{i}].OverridePct");
|
||||||
if (item.OverrideType == ContractOverrideType.NotSet)
|
|
||||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractTravelRateOverrideItems[{i}].OverrideType");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ namespace AyaNova.Biz
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public enum ContractOverrideType : int
|
public enum ContractOverrideType : int
|
||||||
{
|
{
|
||||||
NotSet = 0,
|
|
||||||
PriceDiscount = 1,
|
PriceDiscount = 1,
|
||||||
CostMarkup = 2
|
CostMarkup = 2
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,14 +24,14 @@ namespace AyaNova.Util
|
|||||||
|
|
||||||
internal const long EXPECTED_COLUMN_COUNT = 788;
|
internal const long EXPECTED_COLUMN_COUNT = 788;
|
||||||
internal const long EXPECTED_INDEX_COUNT = 130;
|
internal const long EXPECTED_INDEX_COUNT = 130;
|
||||||
internal const long EXPECTED_CHECK_CONSTRAINTS = 357;
|
internal const long EXPECTED_CHECK_CONSTRAINTS = 358;
|
||||||
internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 78;
|
internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 78;
|
||||||
internal const long EXPECTED_VIEWS = 3;
|
internal const long EXPECTED_VIEWS = 3;
|
||||||
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!!!!
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////// (C788:I130:CC358:FC78:V3:R2)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -679,15 +679,15 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
|||||||
|
|
||||||
//CONTRACTPARTOVERRIDE
|
//CONTRACTPARTOVERRIDE
|
||||||
await ExecQueryAsync("CREATE TABLE acontractpartoverride (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, contractid BIGINT NOT NULL REFERENCES acontract ON DELETE CASCADE, "
|
await ExecQueryAsync("CREATE TABLE acontractpartoverride (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, contractid BIGINT NOT NULL REFERENCES acontract ON DELETE CASCADE, "
|
||||||
+ " overridepct DECIMAL(8,5) NOT NULL, overridetype INTEGER NOT NULL, tags VARCHAR(255) ARRAY)");
|
+ " overridepct DECIMAL(8,5) NOT NULL, overridetype INTEGER NOT NULL CONSTRAINT chk_overridetype_valid CHECK (overridetype > 0 AND overridetype < 3), tags VARCHAR(255) ARRAY)");
|
||||||
|
|
||||||
//CONTRACTSERVICERATEOVERRIDE
|
//CONTRACTSERVICERATEOVERRIDE
|
||||||
await ExecQueryAsync("CREATE TABLE acontractservicerateoverride (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, contractid BIGINT NOT NULL REFERENCES acontract ON DELETE CASCADE, "
|
await ExecQueryAsync("CREATE TABLE acontractservicerateoverride (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, contractid BIGINT NOT NULL REFERENCES acontract ON DELETE CASCADE, "
|
||||||
+ " overridepct DECIMAL(8,5) NOT NULL, overridetype INTEGER NOT NULL, tags VARCHAR(255) ARRAY)");
|
+ " overridepct DECIMAL(8,5) NOT NULL, overridetype INTEGER NOT NULL CONSTRAINT chk_overridetype_valid CHECK (overridetype > 0 AND overridetype < 3), tags VARCHAR(255) ARRAY)");
|
||||||
|
|
||||||
//CONTRACTTRAVELRATEOVERRIDE
|
//CONTRACTTRAVELRATEOVERRIDE
|
||||||
await ExecQueryAsync("CREATE TABLE acontracttravelrateoverride (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, contractid BIGINT NOT NULL REFERENCES acontract ON DELETE CASCADE, "
|
await ExecQueryAsync("CREATE TABLE acontracttravelrateoverride (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, contractid BIGINT NOT NULL REFERENCES acontract ON DELETE CASCADE, "
|
||||||
+ " overridepct DECIMAL(8,5) NOT NULL, overridetype INTEGER NOT NULL, tags VARCHAR(255) ARRAY)");
|
+ " overridepct DECIMAL(8,5) NOT NULL, overridetype INTEGER NOT NULL CONSTRAINT chk_overridetype_valid CHECK (overridetype > 0 AND overridetype < 3), tags VARCHAR(255) ARRAY)");
|
||||||
|
|
||||||
|
|
||||||
//HEADOFFICE
|
//HEADOFFICE
|
||||||
|
|||||||
Reference in New Issue
Block a user