Mark to Market - Counter Part Exposure is incorrect when Pricing Contract is deleted

Issue No: RM-4430
Created 11/11/2021 5:22:05 AM
Type Bug-QC
Priority Blocker
Status Closed
Resolution Fixed
Fixed Version 21.2
Description *This issue relates to i21 Help Desk ticket:* [ HDTN-266487 - Restore i21 completed|https://helpdesk.irely.com/iRelyi21live/#/HD/Ticket/?ticket=HDTN-266487]   Steps:   # Create a Purchase Basis Contract with QTY=2880 \| 60Kg bags # Add Pricing layers: ## 5 Lots \| 2100 Price ## 9 Lots \| 2101 Price ## 3 Lots \| 2102 Price # Save # Run Mark To Market and check Fixed Volumes - Passed # Go back to Contract and delete the 2nd and 3rd layer # Save # Run Mark to Market and check Fixed and Unfixed volumes     Issue:   Unfixed Transaction Volume showed 172.80     Acceptance:   {color:#000000}Fixed Transaction Volume should show: 50.82{color}   * Priced portion is 847.058823 60 KG. So this is 50,823.53 KG ** 847.058823 * 60 = 50,823.53 * Convert 50,823.53 KG to Ton ** 50,823.53 /1000 = 50.82   {color:#000000}Unfixed Transaction Volume should show:121.98{color}   * Unpriced portion is is 2032.94 60 KG. So this is 121,975.5 KG ** 2032.94 * 60 = 121,975.5 * Convert 121,975.5 KG to Ton ** 121,975.5 /1000 = 121.98