case 3740

This commit is contained in:
2020-04-02 17:17:48 +00:00
parent d3da5e5bf4
commit 35b14f27ba
5 changed files with 90 additions and 36 deletions

View File

@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////
//TODO //TODO
case 3740 - schema update fix inventory stuff
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////

View File

@@ -4,7 +4,7 @@ Release procedure as of 6/15/17
1 Save all, commit changes 1 Save all, commit changes
2 Select release mode. 2 Select release mode.
3 Select Build->configuration manager Double check that every project is selected for build 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" 5 Build->Configuration manager, change AyaNova.exe build platform to "x86" from "AnyCpu"
6 Build AyaNova.exe project only watch for errors 6 Build AyaNova.exe project only watch for errors
7 Build->Configuration manager, change AyaNova.exe build back to "AnyCPU" from "x86" 7 Build->Configuration manager, change AyaNova.exe build back to "AnyCPU" from "x86"

View File

@@ -13,7 +13,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<publishTime>03/14/2019 14:44:18</publishTime> <publishTime>03/14/2019 14:44:18</publishTime>
</File> </File>
<File Include="bin/App_global.asax.compiled"> <File Include="bin/App_global.asax.compiled">
<publishTime>03/31/2020 11:14:30</publishTime> <publishTime>04/01/2020 17:08:29</publishTime>
</File> </File>
<File Include="bin/App_global.asax.dll"> <File Include="bin/App_global.asax.dll">
<publishTime>06/14/2017 11:29:54</publishTime> <publishTime>06/14/2017 11:29:54</publishTime>
@@ -34,40 +34,40 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<publishTime>03/14/2019 14:41:56</publishTime> <publishTime>03/14/2019 14:41:56</publishTime>
</File> </File>
<File Include="bin/clients.aspx.cdcab7d2.compiled"> <File Include="bin/clients.aspx.cdcab7d2.compiled">
<publishTime>03/31/2020 11:14:30</publishTime> <publishTime>04/01/2020 17:08:29</publishTime>
</File> </File>
<File Include="bin/cmd.aspx.cdcab7d2.compiled"> <File Include="bin/cmd.aspx.cdcab7d2.compiled">
<publishTime>03/31/2020 11:14:30</publishTime> <publishTime>04/01/2020 17:08:29</publishTime>
</File> </File>
<File Include="bin/config.txt"> <File Include="bin/config.txt">
<publishTime>03/22/2019 15:27:40</publishTime> <publishTime>03/22/2019 15:27:40</publishTime>
</File> </File>
<File Include="bin/CSLA.Core.Bindablebase.dll"> <File Include="bin/CSLA.Core.Bindablebase.dll">
<publishTime>03/31/2020 11:08:39</publishTime> <publishTime>04/01/2020 17:07:43</publishTime>
</File> </File>
<File Include="bin/CSLA.dll"> <File Include="bin/CSLA.dll">
<publishTime>03/31/2020 11:08:41</publishTime> <publishTime>04/01/2020 17:07:44</publishTime>
</File> </File>
<File Include="bin/CSLA.Server.DataPortal.dll"> <File Include="bin/CSLA.Server.DataPortal.dll">
<publishTime>03/31/2020 11:08:39</publishTime> <publishTime>04/01/2020 17:07:43</publishTime>
</File> </File>
<File Include="bin/default.aspx.cdcab7d2.compiled"> <File Include="bin/default.aspx.cdcab7d2.compiled">
<publishTime>03/31/2020 11:14:30</publishTime> <publishTime>04/01/2020 17:08:29</publishTime>
</File> </File>
<File Include="bin/FirebirdSql.Data.FirebirdClient.dll"> <File Include="bin/FirebirdSql.Data.FirebirdClient.dll">
<publishTime>03/14/2019 14:42:21</publishTime> <publishTime>03/14/2019 14:42:21</publishTime>
</File> </File>
<File Include="bin/GZTW.AyaNova.BLL.dll"> <File Include="bin/GZTW.AyaNova.BLL.dll">
<publishTime>03/31/2020 11:08:43</publishTime> <publishTime>04/01/2020 17:07:46</publishTime>
</File> </File>
<File Include="bin/GZTW.AyaNovaMBI.dll"> <File Include="bin/GZTW.AyaNovaMBI.dll">
<publishTime>03/31/2020 11:14:15</publishTime> <publishTime>04/01/2020 17:08:16</publishTime>
</File> </File>
<File Include="bin/GZTW.AyaNovaMBI.Pages.dll"> <File Include="bin/GZTW.AyaNovaMBI.Pages.dll">
<publishTime>03/31/2020 11:14:30</publishTime> <publishTime>04/01/2020 17:08:29</publishTime>
</File> </File>
<File Include="bin/GZTW.Data.dll"> <File Include="bin/GZTW.Data.dll">
<publishTime>03/31/2020 11:08:40</publishTime> <publishTime>04/01/2020 17:07:44</publishTime>
</File> </File>
<File Include="bin/GZTW.MBI.dll"> <File Include="bin/GZTW.MBI.dll">
<publishTime>06/14/2017 12:04:42</publishTime> <publishTime>06/14/2017 12:04:42</publishTime>
@@ -76,61 +76,61 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<publishTime>06/14/2017 11:32:19</publishTime> <publishTime>06/14/2017 11:32:19</publishTime>
</File> </File>
<File Include="bin/GZTW.Profile.dll"> <File Include="bin/GZTW.Profile.dll">
<publishTime>03/31/2020 11:08:39</publishTime> <publishTime>04/01/2020 17:07:43</publishTime>
</File> </File>
<File Include="bin/labor.aspx.cdcab7d2.compiled"> <File Include="bin/labor.aspx.cdcab7d2.compiled">
<publishTime>03/31/2020 11:14:30</publishTime> <publishTime>04/01/2020 17:08:29</publishTime>
</File> </File>
<File Include="bin/memoedit.aspx.cdcab7d2.compiled"> <File Include="bin/memoedit.aspx.cdcab7d2.compiled">
<publishTime>03/31/2020 11:14:30</publishTime> <publishTime>04/01/2020 17:08:29</publishTime>
</File> </File>
<File Include="bin/memoto.aspx.cdcab7d2.compiled"> <File Include="bin/memoto.aspx.cdcab7d2.compiled">
<publishTime>03/31/2020 11:14:30</publishTime> <publishTime>04/01/2020 17:08:29</publishTime>
</File> </File>
<File Include="bin/Newtonsoft.Json.dll"> <File Include="bin/Newtonsoft.Json.dll">
<publishTime>03/18/2019 11:54:01</publishTime> <publishTime>03/18/2019 11:54:01</publishTime>
</File> </File>
<File Include="bin/ro.aspx.cdcab7d2.compiled"> <File Include="bin/ro.aspx.cdcab7d2.compiled">
<publishTime>03/31/2020 11:14:30</publishTime> <publishTime>04/01/2020 17:08:29</publishTime>
</File> </File>
<File Include="bin/sched2labor.aspx.cdcab7d2.compiled"> <File Include="bin/sched2labor.aspx.cdcab7d2.compiled">
<publishTime>03/31/2020 11:14:30</publishTime> <publishTime>04/01/2020 17:08:29</publishTime>
</File> </File>
<File Include="bin/schedule.aspx.cdcab7d2.compiled"> <File Include="bin/schedule.aspx.cdcab7d2.compiled">
<publishTime>03/31/2020 11:14:30</publishTime> <publishTime>04/01/2020 17:08:29</publishTime>
</File> </File>
<File Include="bin/sign.aspx.cdcab7d2.compiled"> <File Include="bin/sign.aspx.cdcab7d2.compiled">
<publishTime>03/31/2020 11:14:30</publishTime> <publishTime>04/01/2020 17:08:29</publishTime>
</File> </File>
<File Include="bin/status.aspx.cdcab7d2.compiled"> <File Include="bin/status.aspx.cdcab7d2.compiled">
<publishTime>03/31/2020 11:14:30</publishTime> <publishTime>04/01/2020 17:08:29</publishTime>
</File> </File>
<File Include="clients.aspx"> <File Include="clients.aspx">
<publishTime>03/31/2020 11:14:21</publishTime> <publishTime>04/01/2020 17:08:22</publishTime>
</File> </File>
<File Include="cmd.aspx"> <File Include="cmd.aspx">
<publishTime>03/31/2020 11:14:21</publishTime> <publishTime>04/01/2020 17:08:22</publishTime>
</File> </File>
<File Include="config.txt"> <File Include="config.txt">
<publishTime>03/22/2019 15:27:40</publishTime> <publishTime>03/22/2019 15:27:40</publishTime>
</File> </File>
<File Include="default.aspx"> <File Include="default.aspx">
<publishTime>03/31/2020 11:14:21</publishTime> <publishTime>04/01/2020 17:08:22</publishTime>
</File> </File>
<File Include="jquery-1.4.4.min.js"> <File Include="jquery-1.4.4.min.js">
<publishTime>03/14/2019 14:44:19</publishTime> <publishTime>03/14/2019 14:44:19</publishTime>
</File> </File>
<File Include="labor.aspx"> <File Include="labor.aspx">
<publishTime>03/31/2020 11:14:21</publishTime> <publishTime>04/01/2020 17:08:22</publishTime>
</File> </File>
<File Include="mbi.css"> <File Include="mbi.css">
<publishTime>03/14/2019 14:44:19</publishTime> <publishTime>03/14/2019 14:44:19</publishTime>
</File> </File>
<File Include="memoedit.aspx"> <File Include="memoedit.aspx">
<publishTime>03/31/2020 11:14:21</publishTime> <publishTime>04/01/2020 17:08:22</publishTime>
</File> </File>
<File Include="memoto.aspx"> <File Include="memoto.aspx">
<publishTime>03/31/2020 11:14:21</publishTime> <publishTime>04/01/2020 17:08:22</publishTime>
</File> </File>
<File Include="ok.gif"> <File Include="ok.gif">
<publishTime>03/14/2019 14:44:19</publishTime> <publishTime>03/14/2019 14:44:19</publishTime>
@@ -142,25 +142,25 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<publishTime>03/14/2019 14:44:19</publishTime> <publishTime>03/14/2019 14:44:19</publishTime>
</File> </File>
<File Include="PrecompiledApp.config"> <File Include="PrecompiledApp.config">
<publishTime>03/31/2020 11:14:17</publishTime> <publishTime>04/01/2020 17:08:18</publishTime>
</File> </File>
<File Include="ro.aspx"> <File Include="ro.aspx">
<publishTime>03/31/2020 11:14:21</publishTime> <publishTime>04/01/2020 17:08:22</publishTime>
</File> </File>
<File Include="sched2labor.aspx"> <File Include="sched2labor.aspx">
<publishTime>03/31/2020 11:14:21</publishTime> <publishTime>04/01/2020 17:08:22</publishTime>
</File> </File>
<File Include="schedule.aspx"> <File Include="schedule.aspx">
<publishTime>03/31/2020 11:14:21</publishTime> <publishTime>04/01/2020 17:08:22</publishTime>
</File> </File>
<File Include="sig.js"> <File Include="sig.js">
<publishTime>03/14/2019 14:44:19</publishTime> <publishTime>03/14/2019 14:44:19</publishTime>
</File> </File>
<File Include="sign.aspx"> <File Include="sign.aspx">
<publishTime>03/31/2020 11:14:21</publishTime> <publishTime>04/01/2020 17:08:22</publishTime>
</File> </File>
<File Include="status.aspx"> <File Include="status.aspx">
<publishTime>03/31/2020 11:14:21</publishTime> <publishTime>04/01/2020 17:08:22</publishTime>
</File> </File>
<File Include="user.gif"> <File Include="user.gif">
<publishTime>03/14/2019 14:44:18</publishTime> <publishTime>03/14/2019 14:44:18</publishTime>

View File

@@ -5512,7 +5512,13 @@ namespace AyaNova
{ {
new MyApp().Run(args); 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 ;//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...? //an attempt to show something that doesn't exist yet in db or...?

View File

@@ -875,7 +875,7 @@ namespace GZTW.AyaNova.BLL
get get
{ {
//UPDATE CASE 1354 EVERY TIME A NEW SCHEMA VERSION IS DONE //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 //UPDATE CASE 1354 EVERY TIME A NEW SCHEMA VERSION IS DONE
//https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/1354 //https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/1354
} }
@@ -4449,6 +4449,54 @@ No message for error code 336397208 found.
} }
#endregion #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 #endregion mssql v 7.5