Negative stock quantity error while moving a lot

Issue No: IC-7639
Created 8/10/2019 1:27:13 AM
Type Bug
Priority Blocker
Status Closed
Resolution Fixed
Fixed Version 19.1
Description This issue relates to i21 Help Desk ticket. Click the link below to go to Help Desk ticket.   [HDTN-234474 - ISSUE (IR-5758)|https://helpdesk.irely.com/iRelyi21live//#/HD/Ticket/?ticket=HDTN-234474]   Steps:   Here is the sequence of transactions found that replicates the issue:   # In IR-5758, receive and post 40 bags and 1600 lbs on lot R000064072. ## Storage Location: CDS Inventory ## Storage Unit: Material Received # Unpost IR-5758. # On the same lot, change the the weight from 1600 lbs to 1760 lbs. Repost the IR. # In Manufacturing -> Views -> Inventory View, Move Lot R000064072 to: ## New Storage Location: Aisle 11-B ## New Storage Unit: 11-031 # and then it appears they wanted to unpost IR-5758. # In Manufacturing -> Views -> Inventory View, Move Lot R000064072 back to the original locations: ## New Storage Location: CDS Inventory ## New Storage Unit: Material Received # Unpost the IR and repost the IR twice. # In Manufacturing -> Views -> Inventory View, Move Lot R000064072 again to: ## New Storage Location: Aisle 11-B ## New Storage Unit: 11-031 ## The error "Negative stock quantity is not allowed for 95200 at CDS - Cadeco Sugar, CDS Inventory, and Material Received." will show. The lot move will fail.     There is no negative quantity in lot.   exec sp_executesql N'uspMFLotMove @intLotId, @intNewSubLocationId, @intNewStorageLocationId, @dblMoveQty, @intMoveItemUOMId, @intUserId, @blnValidateLotReservation, @blnInventoryMove, @dtmDate,@strReasonCode,@strNotes',N'@intLotId int,@intNewSubLocationId int,@intNewStorageLocationId int,@dblMoveQty decimal(2,0),@intMoveItemUOMId int,@intUserId int,@blnValidateLotReservation bit,@blnInventoryMove bit,@dtmDate datetime,@strReasonCode nvarchar(4000),@strNotes nvarchar(4000)',@intLotId=677774,@intNewSubLocationId=8,@intNewStorageLocationId=1887,@dblMoveQty=40,@intMoveItemUOMId=2908,@intUserId=1,@blnValidateLotReservation=1,@blnInventoryMove=1,@dtmDate='2019-08-09 00:00:00',@strReasonCode=N'',@strNotes=N''     Error:   Msg 50000, Level 16, State 1, Procedure uspMFLotMove, Line 865 Negative stock quantity is not allowed for 95200 at CDS - Cadeco Sugar, CDS Inventory, and Material Received.     Acceptance: Should be able to move the lot since stock is available.