Credit memo is doing wrong

CREATED A NEW ITEM .

I purchase that item .

Date = 31/01/09
Qty = 100
Rate = 1000 Here i just received only , I did not create Invoice

I have one ledger entry only

so Invenotry stock = 100 In item card

I sold that item

Date = 05/02/09( DD/MM/YY)

Qty = 100

Rate = 2000 I created SHIP & INVOICE

So INventory = 0 In item card

Now i received INvoice On 06/02/09.

I created the Invoice acutal Direct unit cost = 15 /- ( but i entered the as 10 )

So based on this Line amount is wrong,

Excise amount is wrong
Vat amount is wrong.

By mistake i post that one so all tables effectd Like G/L table, Customer ledger, Excise entry, Detail tax entry.

So now i realized that posted wrong amount .

Now i want reverse that one .

So in many forums Experts told if u posted the wrong amount use Credit memo to reverse that transactions.

So now i created that credit memo and posted that one.

So all tables reversed .
Here system reversed that Item ledger entry also

so In inventory field = - 100 In item card after i post the credit memo.

So it is totally wrong . I think system should not reverse that inventory transaction.

Now what is the solution to correct that credit memo.

Nothing wrong in your example.

You created PO, received your 100 Items, and SOLD them, Qty on Inventory = 0 (assuming there wasn’t any other Purchases/Sales with this Item)

Then you “reversed” your PO with Credit Memo, posted it and got -100 on Inventory. It is OK by now, and when you create corrected PO and post it, Inventory will be back to zero again.

You don’t need to “correct” your Credit Memo - leave it as is.