I bought a pair of eyeglasses for $5 from a friend. I only paid to him $4 however as I didn't have enough cash then, so that means I owe him $1. Today I paid off the remaining $1.
How should I record this into GnuCash?
Here's an example of a minimal account hierarchy that would be involved:
You could, of course, tweak the specifics as desired.
Then, for your initial transaction of purchasing the eyeglasses, you have one transaction with three splits:
Account Debit Credit ================================= ========= ======== Expenses:Eyeglasses $5.00 Assets:Cash $4.00 Liabilities:Money owed to Friend $1.00
That is to say, you pay for the glasses by transferring $4 of cash and $1 of adding a liability. The liability account goes up to having a balance of $1.
When you pay back the liability, that's a transfer from your cash back to the liability, bringing the liability's balance back to $0 since you don't owe money anymore:
Account Debit Credit ================================= ========= ======== Assets:Cash $1.00 Liabilities:Money owed to Friend $1.00
While that the "formal" way to represent it, in practice for a case like this I might not actually bother with making a separate liability account for owing a friend a small amount of money. That is, I might just track a $4 expense on one day and a $1 expense on the next day, and not track that I actually did incur a debt in there. It depends on the details of how and why you want to track your personal expenses.