Hi,



please look into this costing issue


1) Purchase1    item1 100 @ 6.071
2) Purchase2    item1 10 @ 3.1

Avgcost = ((100 * 6.071) + (10 * 3.1)) / 100 + 10
             = 607.1 + 31 / 110
              = 638.1 / 110
              = 5.8


3) Sales1     item1 5 @ 5.8



current stock is 105

Now to cancel the Purchase1 as entry was wrong 

we need to reverse the cost


4) Purchase return of purchase1


Avgcost = ((105 * 5.8) - (100 * 6.071)) / 105 - 100
               = 609 - 607.1 / 5
              = 1.9 / 5
               = 0.38



which seems to be wrong

thank in advance