Thanks to /u/orcusvoyager1hampig for spelling this out to me on reddit

I go out to dinner with a friend and they offer to pay me back later for their meal. I write this in my ledger:

1
2
3
4
2021-07-19 * "Chipotle" "Dinner w/Dave"
    Liabilities:AmEx:Blue                       -30 USD
    Assets:Debts:Dave                                  15 USD
    Expenses:Dining                                    15 USD

This makes sense to me. Today, I sold something for Dave on ebay. I’m going to reduce what he owes me using that part of the payment:

1
2
3
4
5
2021-07-30 * "ebay" "payment"
    Assets:Bank                                        25 USD
    Income:Ebay                                       -20 USD ; my stuff
    Income:Ebay                                        -5 USD ; Dave's $5 item
    Assets:Debts:Dave                                  -5 USD ; ????

This does not balance. As a quick fix, I can remove the Income:Ebay -5 USD and take that from Dave’s debt account directly. However, at the end of the month beancount will report $20 of revenue while ebay’s statement will report the full $25.

Matching these numbers is important to me. What I need to do is:

  1. Keep a record of Assets:Inventory as an intermediary between Dave’s debt and my other Assets.
  2. Keep a record of Expenses:COGS (Cost Of Goods Sold) to sink Dave’s transferred inventory into once sold.

Note the additional transaction here:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
2021-07-19 * "Chipotle" "Dinner w/Dave"
    Liabilities:AmEx:Blue                       -30 USD
    Assets:Debts:Dave                                  15 USD
    Expenses:Dining                                    15 USD

;
; Dave's debt is officially reduced here:
;

2021-07-30 * "Dave gives me his things to sell"
    Assets:Inventory                                    5 USD
    Assets:Debts:Dave

2021-07-30 * "ebay" "payment ; sold $20 of my things and $5 of dave's"
    Assets:Bank                                        25 USD
    Income:Ebay                                       -25 USD ; my stuff + Dave's $5 item
    Assets:Inventory                                   -5 USD
    Expenses:COGS                                       5 USD

For future debts I will need to determine the price of our asset transaction ($5) after the item is sold.

Quick dose of nostalgia, when googling beancount COGS, a wiki for Toontown is the first result. Fun times.

Interesting plugin for deeper Fava integration:

https://github.com/ROCHK/fava_inventory