From 52cf84e7d0c58af691781fcffc474ef23a6b4f8b Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 2 Sep 2021 13:46:52 +0000 Subject: [PATCH] --- .vscode/launch.json | 2 +- docs/8.0/ayanova/docs/ops-form-backup.md | 8 +++----- docs/8.0/ayanova/docs/ops-restore.md | 2 ++ server/AyaNova/DataList/PartInventoryDataList.cs | 12 ++++++++++-- server/AyaNova/util/AySchema.cs | 6 +++--- 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index b77f3b95..fcc80a75 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -53,7 +53,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": "-7", "AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\" diff --git a/docs/8.0/ayanova/docs/ops-form-backup.md b/docs/8.0/ayanova/docs/ops-form-backup.md index 0826b5d6..4b9e7a03 100644 --- a/docs/8.0/ayanova/docs/ops-form-backup.md +++ b/docs/8.0/ayanova/docs/ops-form-backup.md @@ -58,13 +58,11 @@ This table contains the available backups on the server and provides the link to #### Backup names The listed backups have particular names: -The first segment of the name identifies if the backup is a manual one or an automated one. +The first segment of the name identifies the data in the backup file: Database backups will have "db" in their name, attachment backups will have "at" in their name. If the backup was triggered manually in the user interface it will be prepended with "manual" in the name. -The second segment of the name identifies the data in the backup file: Database backups will have "db" in their name, attachment backups will have "at" in their name. +The second segment is the date and time of the backup. -The third segment is the date and time of the backup. - -Attachment backups are zip files and database backups are Postgress standard .backup files. +Attachment backups are `.zip` files and database backups are Postgress standard `.backup` files. ### Menu option: Backup now The Backup now menu option does exactly that: an on demand instant backup. This is useful for testing purposes or after large changes are made that you would like to ensure have been backed up. This will generate a manual backup that is not part of the normal automated backup process. diff --git a/docs/8.0/ayanova/docs/ops-restore.md b/docs/8.0/ayanova/docs/ops-restore.md index 43063c62..a4a8d778 100644 --- a/docs/8.0/ayanova/docs/ops-restore.md +++ b/docs/8.0/ayanova/docs/ops-restore.md @@ -1,3 +1,5 @@ # RESTORE BACKUP Placeholder +[under construction] + todo: how to restore, where the key is etc; this page is linked to from the client app when there is no license diff --git a/server/AyaNova/DataList/PartInventoryDataList.cs b/server/AyaNova/DataList/PartInventoryDataList.cs index 28391d7b..3590d7a2 100644 --- a/server/AyaNova/DataList/PartInventoryDataList.cs +++ b/server/AyaNova/DataList/PartInventoryDataList.cs @@ -12,11 +12,11 @@ namespace AyaNova.DataList DefaultListAType = AyaType.PartInventoryDataList; SQLFrom = "from viewpartinventorylist "; - + var RoleSet = BizRoles.GetRoleSet(DefaultListAType); AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change; - DefaultColumns = new List() { "PartPartNumber", "PartWarehouseName", "PartInventoryBalance", "PartByWarehouseInventoryMinStockLevel","PartByWarehouseInventoryReorderQuantity","PartByWarehouseInventoryQuantityOnOrder", "PartByWarehouseInventoryQtyOnOrderCommitted", "Active" }; + DefaultColumns = new List() { "PartPartNumber", "PartWarehouseName", "PartInventoryBalance", "PartByWarehouseInventoryMinStockLevel", "PartByWarehouseInventoryReorderQuantity", "PartByWarehouseInventoryQuantityOnOrder", "PartByWarehouseInventoryQtyOnOrderCommitted", "Active" }; DefaultSortBy = new Dictionary() { { "PartPartNumber", "+" }, { "PartWarehouseName", "+" } }; FieldDefinitions = new List(); @@ -149,6 +149,14 @@ namespace AyaNova.DataList SqlValueColumnName = "reorderqty" }); + FieldDefinitions.Add(new DataListFieldDefinition + { + TKey = "Tags", + FieldKey = "parttags", + UiFieldDataType = (int)UiFieldDataType.Tags, + SqlValueColumnName = "parttags" + }); + //META FieldDefinitions.Add(new DataListFieldDefinition diff --git a/server/AyaNova/util/AySchema.cs b/server/AyaNova/util/AySchema.cs index f0811438..6302709a 100644 --- a/server/AyaNova/util/AySchema.cs +++ b/server/AyaNova/util/AySchema.cs @@ -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 = 1246; + internal const long EXPECTED_COLUMN_COUNT = 1247; internal const long EXPECTED_INDEX_COUNT = 146; internal const long EXPECTED_CHECK_CONSTRAINTS = 517; internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 192; @@ -31,7 +31,7 @@ namespace AyaNova.Util //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!! - ///////////////////////////////////////////////////////////////// C1246:I146:CC517:FC192:V8:R2 + ///////////////////////////////////////////////////////////////// C1247:I146:CC517:FC192:V8:R2 @@ -899,7 +899,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE"); //VIEWPARTINVENTORYLIST await ExecQueryAsync( "CREATE VIEW viewpartinventorylist AS select apart.id as partid, apart.partnumber, apart.name as partname, apart.active as partactive, apart.cost as partcost, apart.retail as partretail," - +"apartwarehouse.id as partwarehouseid, apartwarehouse.name as partwarehousename, awholesaler.name as wholesalername, awholesaler.id as wholesalerid, " + +"apart.tags as parttags, apartwarehouse.id as partwarehouseid, apartwarehouse.name as partwarehousename, awholesaler.name as wholesalername, awholesaler.id as wholesalerid, " +"aaltwholesaler.id as altwholesalerid, aaltwholesaler.name as altwholesalername, vpartinventorynow.balance as onhandqty,COALESCE(vpartsonorder.quantityonorder,0) as onorderqty, " +"COALESCE(vpartsonordercommitted.quantityonordercommitted,0) as onordercommittedqty,COALESCE(apartstocklevel.minimumquantity,0) as restockminqty, " +"GREATEST( COALESCE(apartstocklevel.minimumquantity, 0) - (COALESCE(vpartinventorynow.balance, 0) + COALESCE(vpartsonorder.quantityonorder, 0) - COALESCE(vpartsonordercommitted.quantityonordercommitted, 0)) ,0) AS reorderqty,"