Let's understand first how system works ::
I have used the date format as : MM/DD/YYYY and all the amount in USD. Assuming Item001.
1. Date = 04/01/2019 :: Purchase :: Qty = 10 :: Unit Price = $10 :: total = $100 :: Value Open = Yes
Moving Average = $ ( 100 / 10 ) = $ 10.
cost amt posted = 10 * 10 = $100
2. Date = 04/02/2019 :: Purchase :: Qty = 10 :: Unit Price = $15 :: total = $150 :: Value Open = Yes
Moving Average = $( 150 + 100 ) /20 = $12.5
Cost Amount showing against transaction = 10*12.5 = $ 125
3. Date = 04/02/2019 :: Sales :: Qty = -5 :: Unit Price = $12.5 ( based on moving average as of last transactions ) :: total = $ -62.5 :: Value Open = Yes
Moving Average = $( 150 + 100 -62.5 ) /15 = $12.5
Cost Amount showing against transaction = -5*12.5 = - $62.5
4. Date = 04/10/2019 :: Sales :: Qty = -8 :: Unit Price = $12.5 ( based on moving average as of last transactions ) :: total = $ -100 :: Value Open = Yes
Moving Average = $( 150 + 100 -62.5 -100 ) /7 = $12.5
Cost Amount showing against transaction = -8*12.5 = - $100.00
5. Date = 04/12/2019 :: Purchase :: Qty = 20 :: Unit Price = $25 :: total = $500 :: Value Open = Yes
Moving Average = $( 150 + 100 -62.5 -100 + 500 ) /27 = $21.76
Cost Amount showing against transaction = 20*21.76 = $435.2
6. Date = 04/12/2019 :: Sales :: Qty = -18 :: Unit Price = $21.76 ( based on moving average as of last transactions ) :: total = $ -391.68 :: Value Open = Yes
Moving Average = $( 150 + 100 -62.5 -100 +500 -391.68 ) /9 = $21.76
Cost Amount showing against transaction = -18*21.76 = - $391.68
When u run the recalculation ::: All the issue transactions will be proposed with a new line with proper adjustment to meet the required inventory method per item which is attached in the item model group per item like FIFO , LIFO or Weighted average etc .
based on FIFO -- the first item which will be issued will be at the cost of first purchase price of the item ...
lets see them :
3. Qty = -5 should be issued at the price of $10. so total = -$50.
so adjustment to this line = + $12.5
to make -62.5 usd back to 50 USD. ( Recalculation is proposing thsi line )
1.Value open = YES
2.Value open = YES
5.Value open = YES
===
4. Qty = -8 should be issued as below : first -5 qty at $10 and next -3 qty at $15.
so total = (-5*10) + ( -3*15) = - $95
so adjustment should be : + $5
to make -100 usd to -95 usd . ( the same recalculation run is proposing another adjustment in separate line with the same item but different issue transaction )
1. Value Open =NO , which is proposed by recalculation . this will change to No after running the inventory close but proposed by inventory recalculation .As this receipt is knocked off in the issue transaction of 3 and 4 .
2. Value Open = Yes.
== after no 6.
6. Qty = -18 should be issued as below :
first -7 qty at $15 = - $105
second -11 qty at $25 = - $275
total = -( $105 + $275) = - $380
initial posted = - $391.68
adjustment required = + $11.68
and then
1. Value open = NO
2. Value Open = No
3. Value Open = Yes ( as still 9 purchased qty are yet to be knocked off )