HDTN-270603 - Terminal to Location must use blank actual cost id

Issue No: MFG-4505
Created 3/7/2022 2:41:05 AM
Type Bug
Priority Blocker
Status Closed
Resolution Fixed
Fixed Version 19.1
Description *This issue relates to i21 Help Desk ticket:* [ HDTN-270603 - another inventory valuation problem|https://helpdesk.irely.com/iRelyi21live/#/HD/Ticket/?ticket=HDTN-270603]   This is related to IC-10124.     *Steps to Reproduce:*   Step 1: Create Transports Load with Blending Transaction:   # Origin: Terminal + Location Destination: Diff Location # Origin: Terminal + Terminal. Destination: Diff Location   Step 2: Post Transaction   Step 3: Verify Costing Method Used in Inventory Valuation     *Issue:*   In TR-16525, the receipt is from +Terminal+ and distribution header is +Location+.   !pastedImage_d181057_0.jpg!   !pastedImage_d181057_1.jpg!   From how I understand it:   * After the IR is created for the "Terminal" Receipt, it will need to transfer exact stocks from RL-1 and move it to 31 - NASHVILLE CITGO. * After the transfer is posted, it will need to blend it to produce 2,776 gallons of B11LSC.   The root cause is the conflict on the strActualCost Id assigned to the blend transaction.   * Transport Load created an inventory transfer that has an actual cost id for the "from location" and blank for the "to location". ** This will reduce the exact stocks from RL-1 and move it to a new location. When moved into the new location, it will get mixed to the regular FIFO cost buckets. !pastedImage_d181057_2.jpg! * Meanwhile the uspMFPostConsumption is trying to consume LSDSC that bears an actual cost id. ** Consume is trying to find a stock for LSDSC that have an actual cost from 31 - NASHVILLE CITGO. It only found 25 gallons that was posted in INVTRN-31977. *** Below are the valuation records related to TR-16525. !pastedImage_d181057_3.jpg! * *Expected:* The consume transaction should not have the actual cost id if the origin is 'Terminal' and distribution is 'Location'. The code in uspMFPostConsumption should change. !pastedImage_d181057_4.png|height=373,width=745! * See also scenario 8 in [http://inet.irelyserver.com/pages/viewpage.action?spaceKey=INV&title=TR-Check+FIFO+Costing+and+Actual+Costing+with+Blend] .     *Acceptance:*   Costing method used should be correct