Trading generally works such that you pick up the goods you want to buy and then try to trade for it. I'm not sure what happens if you eat the fish you hadn't paid for yet, but I assume that if the very next action would be to offer to pay for it they may well accept it without grumbling, so you ate most of the fish, paid your dept, and was left without dept and the remaining piece of fish (which generally is the same scenario Sami drew up).
You can also buy things carried in someone else's inventory, and I wouldn't be surprised of a starving character stuffing himself with a picked up fish and then trying to buy another one from the inventory of a character might just clear the dept rather than having to pay twice the payment, i.e. both for the fish eaten and the new one to buy, making a transaction that clears the dept but looks like a buy of a new one without being it.
Both cases are speculations, of course.