jbms / beancount-import

Web UI for semi-automatically importing external data into beancount
GNU General Public License v2.0
393 stars 103 forks source link

Verifying that I have receipts for all transactions #200

Open marcrasi opened 1 year ago

marcrasi commented 1 year ago

I'm setting up an accounting workflow using beancount-import, and one thing I want to do is verify that I have receipts for all my transactions.

I think I see a way to do this using "uncleared postings," but I'm not sure if there is a better way, so I wanted to ask here. I also possibly have a feature request that would make it easier to do this using "uncleared postings."

I have a few receipt importers (the amazon receipt importer, an importer for receipts that I scan and manually transcribe), and my idea is to set the receipt importers as authoritative sources for all of my "Expense" accounts. That way, if for example I import a transaction from a credit card statement, the Expense leg of the transaction will show up as "uncleared" unless I have imported a corresponding receipt.

One snag with this approach is that it looks like I can only have one authoritative source per account, so I actually won't be able to have multiple receipt importers declare that they are authoritative. My idea for working around this is to create a dummy importer that doesn't actually import anything but that declares itself as authoritative for all the Expense accounts, and knows how to check if there is metadata from any of the real importers.

Does this overall sound like a reasonable approach?

If this does seem like a reasonable approach, it leads to my feature request: Allow me to declare multiple importers as authoritative for the same account. Define a leg to be cleared if any of the importers for that account consider it to be cleared. (I'd be up for trying to implement this myself if it sounds like a reasonable idea!)

jbms commented 1 year ago

I think your feature request is reasonable.

Another option to consider would be to define a bean query that finds transactions without a receipt. That might be a simpler way to do what you want.