ad-si/Transity

Split transactions

Closed this issue · 11 comments

How do you handle split transactions? For example I spent $50 at a restaurant, $20 I am counting as expense toward food and $30 is money I expect to be paid back to me by a friend?

I wonder if the only way would be $20 from X to food and $30 from X to account payable (loan to friend).

ad-si commented

I would do something like this:

transactions:
  - utc: '2013-12-31 12:00'
    transfers:
      - from: tony:wallet
        to: fancy_restaurant
        amount: 20 $
        tags: [food]

      - from: tony:wallet
        to: friend
        amount: 30 $
        note: Loan to help him pay for the food
        tags: [to-repay]

Once he has reimbursed me, I would remove the to-repay tag.
Does this answer your question?

ad-si commented

Although I'd probably put the loan into its own transaction. They are not really related…

ad-si commented

@tonyxiao Does this answer your question and can I close the issue?

They are related from an accounting perspective if I pay with a CC. The work-around would artificially create 2 CC transactions when it's one in reality. And that's the normal situation from which this desire to split arises.

ad-si commented

But in my example it is only 1 transaction? If you are more concerned with the real flow of the money and less with the semantic meaning, you can do it like this:

transactions:
  - utc: '2013-12-31 12:00'
    credit-card-transaction-id: 123456
    transfers:
      - from: tony:wallet
        to: fancy_restaurant
        amount: 20 $
        tags: [food]

      - from: tony:wallet
        to: fancy_restaurant
        amount: 30 $
        tags: [loan]
ad-si commented

Closing this for now. Feel free to add more comments if my solutions aren't good enough.

Where would the credit card transaction itself be? I guess in the transity world there really aren't accounts the same way as in the double-entry world?

ad-si commented

I do it like this:

transactions:
  - utc: '2013-12-10 12:00'
    tags: [food]
    transfers:
      - from: visa
        to: fancy_restaurant
        amount: 20 $

      - utc: '2014-01-01'
        from: tony:bank
        to: visa
        amount: 20 $

Just like the real flow of money is. 🤷‍♂️

Accounts in the "double-entry world" are actually categories / tags if you ask me. In Transity I clearly differentiate between where ist the money (wallet, bank account, …) and what was the purpose of the transaction (food, rent, …). Also notice that the tag food is for the whole transaction and not just one of the two transfers, since the whole transaction was for buying food. The visa account was just an intermediary.

Does that make sense to you?

Gotcha. So in the case where I pay $50 out of visa and $20 of which was for John who is gonna pay me back, is this how you might write it?

transactions:
  - utc: '2013-12-10 12:00'
    tags: [food]
    transfers:
      - from: visa
        to: fancy_restaurant
        amount: 50 $

      - from: john:iou-tony
        to: tony:iou-john
        amount: 20 $ 
ad-si commented
  • john:iou-tony is misusing the account feature as a tag. There is no physical iou-tony account
  • Since only your expense to the restaurant was about "food", you need to associate it only with that transfer

But this is actually an interesting case since I would model a more semantically correct
representation of the cash flow rather than the actual cash flow.
After all, the end-goal of all this to conceptually understand where your money went

transactions:
  - utc: '2013-12-10 12:00'
    transfers:
      - from: visa
        to: fancy_restaurant
        amount: 30 $
        note: Burger with Fries
        tags: [food]

      - from: visa
        to: john
        amount: 20 $
       
      - utc: '2013-12-11'
        from: john:wallet
        to: tony:wallet
        amount: 20 $

I don't really care that John used the 20 $ to buy food, I only care about that I lend it to him, and he paid it back a day later.
If it's important to you , you can of course at one more transfer like:

      - from: john
        to: fancy_restaurant
        amount: 20 $
        note: Chicken
        tags: [food]

While this doesn't cover the actual flow of money (you transferring 50 $ to the restaurant), it more faithfully covers the underlying semantic meaning of the transaction.

I always link the original bank statement to the transaction with files: [statements/2013-12_visa], so if I'm interested in 100% accurate physical flow of the money I can check that out.