[LS]Pick Lots doesn't reserve inventory until posted

Issue No: LG-2005
Created 3/13/2019 10:46:07 PM
Type Bug
Priority Major
Status Closed
Resolution Fixed
Fixed Version 19.1
Description   Description:   When using "Pick Lots" through the LS, the available inventory isn't being reserved until the LS is posted. If multiple loads are on a contract, a load can be scheduled and saved for later shipment and then when a second load is scheduled, the same storage location can be depleted upon post. This leaves the first load scheduled using the inventory in that storage location unable to actually be picked and shipped due to the inventory actually being in another shipment.     Steps to reproduce and use case:   # Choose a lot in inventory for a packaged product. # Enter a contract for that item totaling more than the current total in inventory. # Create two loads for that contract equal to the contract amount. # Select the first load an use "pick lots" to fill the load. Save the LS. Do not post it. # Select the second load and use pick lots to fill the load. ## **Pay attention to the available inventory in the storage locations. The first load didn't reserve the available inventory.** # Save and post the second load. # Re-open the first load and try to post it. # Error : "Negative stock quantity is not allowed for .... " ## This error is correct because the storage location no longer has any inventory for that product.   Acceptance:   # When lots are tied to an LS, the inventory in the selected lots should be reserved and not available to be used until that LS is deleted, or the quantity in that lot is removed from the LS. # The reserved inventory should still show as inventory on hand until the LS posted.   Example:   In the use case, when the inventory in the storage location is chosen to ship, it should be reserved and not in the inventory available to ship for future loads. The loads were for 27 ton each. There were 52 tons available for the item. Storage location C-37 had 11 ton available, C-38 had 10 ton, A-04 had 23 ton available and A-24 had 10 ton available. Load #1 selects 11 ton from C-37, 10 ton from C-38 and 6 ton from A-04. Load 2 should see A-04 has 17 ton available and A-24 has 10 ton available. C-37 and C-38 should not be available to load #2 once load #1 has been saved.       Total inventory for GRT-20-80-1TN and corresponding storage location quantity   !pastedImage_d113938_0.png!   Loads created for the contract !pastedImage_d113938_1.png!   Load #1 - Shows all lots and quantities available to choose from in each storage location - Saved but not posted   !pastedImage_d113938_2.png!     Load #1 Lots, storage location and corresponding quantity chosen for the load.   !pastedImage_d113938_3.png!     Load #2 lots, storage location and corresponding quantities available to choose after saving load #1   !pastedImage_d113938_4.png!     Data used   Environment: [https://i21.zfsinc.com:8443/CrestonTE]     -CT-10292 (Sale)   -LS-3121   -LS-3122