This commit is contained in:
2021-11-16 23:02:10 +00:00
parent f831cf0a07
commit e3eed6122f
4 changed files with 43 additions and 5 deletions

2
.vscode/launch.json vendored
View File

@@ -55,7 +55,7 @@
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
"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_TZ_OFFSET": "-8",
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_14\\bin\\"

View File

@@ -42,6 +42,25 @@ namespace AyaNova.Models
public bool AllowScheduleConflicts { get; set; } = true;
//ADDRESS / CONTACT INFO reporting etc
public string WebAddress { get; set; }
public string EmailAddress { get; set; }
public string Phone1 { get; set; }
public string Phone2 { get; set; }
//POSTAL ADDRESS
public string PostAddress { get; set; }
public string PostCity { get; set; }
public string PostRegion { get; set; }
public string PostCountry { get; set; }
public string PostCode { get; set; }
//PHYSICAL ADDRESS
public string Address { get; set; }
public string City { get; set; }
public string Region { get; set; }
public string Country { get; set; }
public decimal? Latitude { get; set; }
public decimal? Longitude { get; set; }
//CUSTOMER ACCESS FEATURES AND SETTINGS

View File

@@ -22,7 +22,7 @@ namespace AyaNova.Util
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!!
private const int DESIRED_SCHEMA_LEVEL = 1;
internal const long EXPECTED_COLUMN_COUNT = 1304;
internal const long EXPECTED_COLUMN_COUNT = 1319;
internal const long EXPECTED_INDEX_COUNT = 153;
internal const long EXPECTED_CHECK_CONSTRAINTS = 518;
internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 198;
@@ -31,7 +31,7 @@ namespace AyaNova.Util
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!!
///////////////////////////////////////////////////////////////// (C1302:I153:CC518:FC198:V11:R2)
///////////////////////////////////////////////////////////////// C1319:I153:CC518:FC198:V11:R2
@@ -252,6 +252,8 @@ namespace AyaNova.Util
//create global biz settings table
await ExecQueryAsync("CREATE TABLE aglobalbizsettings (id INTEGER NOT NULL PRIMARY KEY, "
+ "webaddress TEXT, phone1 TEXT, phone2 TEXT, emailaddress 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), "
+ "filtercasesensitive BOOL DEFAULT FALSE, "
+ "useinventory BOOL DEFAULT TRUE, "
+ "allowscheduleconflicts BOOL DEFAULT TRUE, "

View File

@@ -1659,6 +1659,23 @@ namespace AyaNova.Util
{
GlobalBizSettingsBiz biz = GlobalBizSettingsBiz.GetBiz(ct);
var gbiz = await biz.GetAsync(false);
gbiz.Latitude = (decimal)Fake.Address.Latitude();
gbiz.Longitude = (decimal)Fake.Address.Longitude();
gbiz.Address = Fake.Address.StreetAddress();
gbiz.City = Fake.Address.City();
gbiz.Region = Fake.Address.State();
gbiz.Country = Fake.Address.Country();
gbiz.PostAddress = Fake.Address.StreetAddress();
gbiz.PostCity = gbiz.City;
gbiz.PostRegion = gbiz.Region;
gbiz.PostCountry = gbiz.Country;
gbiz.PostCode = Fake.Address.ZipCode();
gbiz.Phone1 = Fake.Phone.PhoneNumber();
gbiz.Phone2 = Fake.Phone.PhoneNumber();
gbiz.WebAddress = Fake.Internet.Protocol() + "://example." + Fake.Internet.DomainSuffix();
gbiz.EmailAddress = Fake.Internet.ExampleEmail();
gbiz.TaxPartPurchaseId = TCGoods;
gbiz.TaxPartSaleId = TCGoods;
gbiz.TaxRateSaleId = TCServices;
@@ -1670,9 +1687,9 @@ namespace AyaNova.Util
gbiz.CustomerAllowNotifyWOCreated = true;
gbiz.CustomerAllowUserSettings = true;
gbiz.CustomerAllowViewWO = true;
// gbiz.CustomerDefaultWorkOrderReportId=1;
// gbiz.CustomerDefaultWorkOrderReportId=1;
gbiz.CustomerAllowWOWiki = true;
gbiz.CustomerAllowWOAttachments=true;
gbiz.CustomerAllowWOAttachments = true;
await biz.PutAsync(gbiz);
ServerGlobalBizSettings.Initialize(gbiz, null);