Sorry to say you are indeed wrong, lets approach it in a yet another way. Lets see only the shopkeeper perspective, to keep things simple
Pre-Sale:
He has Rs.200 worth of goods he owns. So zero loss, zero gain.
Sale:
He no longer has Rs.200 of goods, but has Rs.200 cash. So zero loss, zero gain.
Post-Sale:
He has to give Rs.1000 cash to friend. So 1000 loss.
Whatever numbers or transactions that happened beyond what I wrote above, are of no monetary significance to him