From 33d43a4e782ed63bd5862507421048e6a2e03295 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 8 Feb 2023 23:45:00 +0000 Subject: [PATCH] --- .vscode/launch.json | 2 +- server/biz/GlobalBizSettingsBiz.cs | 2 ++ server/util/AySchema.cs | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 7cade77..d5d28f8 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -33,7 +33,7 @@ "SOCKEYE_DB_CONNECTION": "Server=localhost;Username=postgres;Password=sockeye;Database=sockeye;CommandTimeout=300;", "SOCKEYE_DATA_PATH": "c:\\temp\\sockeye", "SOCKEYE_USE_URLS": "http://*:7676;", - //"SOCKEYE_PERMANENTLY_ERASE_DATABASE": "true", + "SOCKEYE_PERMANENTLY_ERASE_DATABASE": "true", //"SOCKEYE_REPORT_RENDERING_TIMEOUT":"1", "SOCKEYE_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_14\\bin" }, diff --git a/server/biz/GlobalBizSettingsBiz.cs b/server/biz/GlobalBizSettingsBiz.cs index 7364c8e..8219fd7 100644 --- a/server/biz/GlobalBizSettingsBiz.cs +++ b/server/biz/GlobalBizSettingsBiz.cs @@ -253,6 +253,7 @@ namespace Sockeye.Biz //create product if not exist then import //Get product id if exists var ProductName = jPurchase["name"].Value(); + bool maybeRenewal=ProductName.ToLowerInvariant().Contains("renew"); ProductName = ProductName.Replace("- Renewal", "").Replace(" Renewal", "").Replace(" RENEWAL", "").Replace("CANCELLED ", "").Replace("CANCELED ", ""); var p = await ct.Product.AsNoTracking().FirstOrDefaultAsync(z => z.VendorCode == jPurchase["productCode"].Value()); @@ -304,6 +305,7 @@ namespace Sockeye.Biz s.RenewNoticeSent = jPurchase["renewNoticeSent"].Value(); s.SalesOrderNumber = jPurchase["salesOrderNumber"].Value(); s.Notes = jPurchase["notes"].Value(); + s.IsRenewal=maybeRenewal; PurchaseBiz biz = PurchaseBiz.GetBiz(ct); await biz.CreateAsync(s); } diff --git a/server/util/AySchema.cs b/server/util/AySchema.cs index 5a4b17f..3f6941c 100644 --- a/server/util/AySchema.cs +++ b/server/util/AySchema.cs @@ -22,16 +22,16 @@ namespace Sockeye.Util //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!! private const int DESIRED_SCHEMA_LEVEL = 17; - internal const long EXPECTED_COLUMN_COUNT = 530; + internal const long EXPECTED_COLUMN_COUNT = 531; internal const long EXPECTED_INDEX_COUNT = 75; - internal const long EXPECTED_CHECK_CONSTRAINTS = 251; + internal const long EXPECTED_CHECK_CONSTRAINTS = 252; internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 37; internal const long EXPECTED_VIEWS = 0; internal const long EXPECTED_ROUTINES = 2; //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!! - ///////////////////////////////////////// (C530:I75:CC251:FC37:V0:R2) + ///////////////////////////////////////// C531:I75:CC252:FC37:V0:R2 /* MAXIMUM POSTGRES OBJECT NAME LENGTH: 63 CHARACTERS