Multi-leg transactions

I’m reading through the documentation on AshDoubleEntry, and I can’t really determine whether it is possible to use that module to create multi-leg transactions.

It seems like the TransferResource defines a from_account and to_account, which to me indicates that it might not be possible?

To be clear, a multi-leg transaction is something like this:

Account Debit Credit
Small acquisitions 100
Purchase VAT 25
Bank account 125

The way that you’d accomplish something similar to that is by relating the transfers to a third party resource so that there was something that tied them together. I believe the structure should be there for you to do that.

So you could create a new resource for tracking that information, while having the underlying ledger implementation stay the same.

1 Like

Interesting, I’ll have to look into that at some point. Thanks for your quick response!