diff --git a/TODO.txt b/TODO.txt
index ac21b95..59c2a62 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -1,7 +1,7 @@
//////////////////////////////////////////////////////////
//TODO
-
+case 3740 - schema update fix inventory stuff
//////////////////////////////////////////////////////////
diff --git a/release procedure.txt b/release procedure.txt
index b5134c1..d8ab826 100644
--- a/release procedure.txt
+++ b/release procedure.txt
@@ -4,7 +4,7 @@ Release procedure as of 6/15/17
1 Save all, commit changes
2 Select release mode.
3 Select Build->configuration manager Double check that every project is selected for build
-4 Build->build solution watch for errors during build
+4 Build->re-build solution watch for errors during build
5 Build->Configuration manager, change AyaNova.exe build platform to "x86" from "AnyCpu"
6 Build AyaNova.exe project only watch for errors
7 Build->Configuration manager, change AyaNova.exe build back to "AnyCPU" from "x86"
diff --git a/source/MBI/Properties/PublishProfiles/PublishMBI.pubxml.user b/source/MBI/Properties/PublishProfiles/PublishMBI.pubxml.user
index 96f13ba..6893792 100644
--- a/source/MBI/Properties/PublishProfiles/PublishMBI.pubxml.user
+++ b/source/MBI/Properties/PublishProfiles/PublishMBI.pubxml.user
@@ -13,7 +13,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
03/14/2019 14:44:18
- 03/31/2020 11:14:30
+ 04/01/2020 17:08:29
06/14/2017 11:29:54
@@ -34,40 +34,40 @@ by editing this MSBuild file. In order to learn more about this please visit htt
03/14/2019 14:41:56
- 03/31/2020 11:14:30
+ 04/01/2020 17:08:29
- 03/31/2020 11:14:30
+ 04/01/2020 17:08:29
03/22/2019 15:27:40
- 03/31/2020 11:08:39
+ 04/01/2020 17:07:43
- 03/31/2020 11:08:41
+ 04/01/2020 17:07:44
- 03/31/2020 11:08:39
+ 04/01/2020 17:07:43
- 03/31/2020 11:14:30
+ 04/01/2020 17:08:29
03/14/2019 14:42:21
- 03/31/2020 11:08:43
+ 04/01/2020 17:07:46
- 03/31/2020 11:14:15
+ 04/01/2020 17:08:16
- 03/31/2020 11:14:30
+ 04/01/2020 17:08:29
- 03/31/2020 11:08:40
+ 04/01/2020 17:07:44
06/14/2017 12:04:42
@@ -76,61 +76,61 @@ by editing this MSBuild file. In order to learn more about this please visit htt
06/14/2017 11:32:19
- 03/31/2020 11:08:39
+ 04/01/2020 17:07:43
- 03/31/2020 11:14:30
+ 04/01/2020 17:08:29
- 03/31/2020 11:14:30
+ 04/01/2020 17:08:29
- 03/31/2020 11:14:30
+ 04/01/2020 17:08:29
03/18/2019 11:54:01
- 03/31/2020 11:14:30
+ 04/01/2020 17:08:29
- 03/31/2020 11:14:30
+ 04/01/2020 17:08:29
- 03/31/2020 11:14:30
+ 04/01/2020 17:08:29
- 03/31/2020 11:14:30
+ 04/01/2020 17:08:29
- 03/31/2020 11:14:30
+ 04/01/2020 17:08:29
- 03/31/2020 11:14:21
+ 04/01/2020 17:08:22
- 03/31/2020 11:14:21
+ 04/01/2020 17:08:22
03/22/2019 15:27:40
- 03/31/2020 11:14:21
+ 04/01/2020 17:08:22
03/14/2019 14:44:19
- 03/31/2020 11:14:21
+ 04/01/2020 17:08:22
03/14/2019 14:44:19
- 03/31/2020 11:14:21
+ 04/01/2020 17:08:22
- 03/31/2020 11:14:21
+ 04/01/2020 17:08:22
03/14/2019 14:44:19
@@ -142,25 +142,25 @@ by editing this MSBuild file. In order to learn more about this please visit htt
03/14/2019 14:44:19
- 03/31/2020 11:14:17
+ 04/01/2020 17:08:18
- 03/31/2020 11:14:21
+ 04/01/2020 17:08:22
- 03/31/2020 11:14:21
+ 04/01/2020 17:08:22
- 03/31/2020 11:14:21
+ 04/01/2020 17:08:22
03/14/2019 14:44:19
- 03/31/2020 11:14:21
+ 04/01/2020 17:08:22
- 03/31/2020 11:14:21
+ 04/01/2020 17:08:22
03/14/2019 14:44:18
diff --git a/source/WinFormApp/Form1.cs b/source/WinFormApp/Form1.cs
index dc7837b..4a69e28 100644
--- a/source/WinFormApp/Form1.cs
+++ b/source/WinFormApp/Form1.cs
@@ -5512,7 +5512,13 @@ namespace AyaNova
{
new MyApp().Run(args);
}
- catch (System.NullReferenceException )
+ catch (System.NullReferenceException)
+ {
+ ;//no operation, this was found to be happening when an old db is updated to a new db, maybe
+ //an attempt to show something that doesn't exist yet in db or...?
+ //it's so obscure I'm just going to swallow it here (but only that specific one)
+ }
+ catch (System.ObjectDisposedException)
{
;//no operation, this was found to be happening when an old db is updated to a new db, maybe
//an attempt to show something that doesn't exist yet in db or...?
diff --git a/source/bizobjects/AyaLib/GZTW.AyaNova.BLL/DBManager.cs b/source/bizobjects/AyaLib/GZTW.AyaNova.BLL/DBManager.cs
index bff8c33..16a81b4 100644
--- a/source/bizobjects/AyaLib/GZTW.AyaNova.BLL/DBManager.cs
+++ b/source/bizobjects/AyaLib/GZTW.AyaNova.BLL/DBManager.cs
@@ -875,7 +875,7 @@ namespace GZTW.AyaNova.BLL
get
{
//UPDATE CASE 1354 EVERY TIME A NEW SCHEMA VERSION IS DONE
- return 135;
+ return 136;
//UPDATE CASE 1354 EVERY TIME A NEW SCHEMA VERSION IS DONE
//https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/1354
}
@@ -4449,6 +4449,54 @@ No message for error code 336397208 found.
}
#endregion
+ #region MSSQL Version 136 Case 3740
+ if (nSchemaLevel < 136)
+ {
+
+ DDL(@"-- **** FIX INVENTORY ON ORDER ****
+-- Reset all ON ORDER to zero
+update APARTBYWAREHOUSEINVENTORY set AQUANTITYONORDER=0;
+-- Update on order to actual values in PO Items
+update APARTBYWAREHOUSEINVENTORY
+set AQUANTITYONORDER=zACTUAL.zActualQuantityOnOrder
+from(
+select APURCHASEORDERITEM.APARTID, APURCHASEORDERITEM.APARTWAREHOUSEID, APURCHASEORDERITEM.AQUANTITYORDERED-APURCHASEORDERITEM.AQUANTITYRECEIVED as zActualQuantityOnOrder
+from APURCHASEORDERITEM
+where APURCHASEORDERITEM.ACLOSED=0
+) as zACTUAL
+where
+zACTUAL.APARTWAREHOUSEID= APARTBYWAREHOUSEINVENTORY.APARTWAREHOUSEID and
+zACTUAL.APARTID=APARTBYWAREHOUSEINVENTORY.APARTID;
+-- *** FIX INVENTORY COMMITTED ***
+-- Reset all on order committed to zero
+update APARTBYWAREHOUSEINVENTORY set AQTYONORDERCOMMITTED = 0;
+-- Update on order committed to actual values in PO Items
+update APARTBYWAREHOUSEINVENTORY
+set AQTYONORDERCOMMITTED=zACTUAL.zActualQuantityOnOrder
+from(
+select APURCHASEORDERITEM.APARTID, APURCHASEORDERITEM.APARTWAREHOUSEID, APURCHASEORDERITEM.AQUANTITYORDERED-APURCHASEORDERITEM.AQUANTITYRECEIVED as zActualQuantityOnOrder
+from APURCHASEORDERITEM
+where APURCHASEORDERITEM.ACLOSED=0 and APURCHASEORDERITEM.AWORKORDERITEMPARTREQUESTID is not null
+) as zACTUAL
+where
+zACTUAL.APARTWAREHOUSEID= APARTBYWAREHOUSEINVENTORY.APARTWAREHOUSEID and
+zACTUAL.APARTID=APARTBYWAREHOUSEINVENTORY.APARTID;
+
+-- Delete 'closed none received' orphan poitems
+delete APURCHASEORDERITEM from APURCHASEORDERITEM
+left outer join APURCHASEORDER on APURCHASEORDERITEM.APURCHASEORDERID = APURCHASEORDER.AID
+where APURCHASEORDER.ASTATUS=6;
+
+-- Fix 'Closed - partially received' po items with mismatching quantities
+update APURCHASEORDERITEM set AQUANTITYORDERED=AQUANTITYRECEIVED, ACLOSED=1 from APURCHASEORDERITEM
+left outer join APURCHASEORDER on APURCHASEORDERITEM.APURCHASEORDERID = APURCHASEORDER.AID
+where APURCHASEORDER.ASTATUS=4;");
+
+
+
+ nSchemaLevel = 136;
+ }
+ #endregion
#endregion mssql v 7.5