Transactions split across multiple input files (importers).

250 views
Skip to first unread message

Alan H

unread,
Oct 22, 2021, 4:06:26 AM10/22/21
to Beancount
Hey folks;

Delurk comment: I've been using beancount more and more seriously over the last year and the final convincing moment for me was how quickly I could do my Canadian taxes with a few custom plugins to split expenses based on meta data and then record and balance assert everything so I'd have confidence things didn't 'rot' until next tax season. I also now use it exclusively for corporate accounts keeping.

Today's conundrum:

  • I live and work in the UK for a US company.
  • Part of my compensation is Restricted Stock; almost exactly like the examples posted in the github.io docs [0].

The problem is the 'float/limbo' account for me:
  • On payslips, the limbo refund amount is in GBP (and I record it thusly) (imported by importer 1 (my custom payroll.py importer) as our UK payroll records everything in GBP.
  • On vesting events (reports from broken) the limbo taxed amount is reported in USD and handled by custom importer rsu_vesting_reports.py)

I have an example hermetic example file on github [1].

I balance everything by adding an FX conversion posting-pair to the vesting event that changes the USD tax amount to the (manually matched) GBP amount from payroll. This is really cumbersome. Note that it gets even more cumbersome when there are multiple vests -  I need to sort out the FX entirely independently without the GBP equivalence and this makes me tempted to do the FX as a separate transaction on the limbo account by hand...
Now that I'm thinking about it; the income on a multiple-vest scenario will be similarly poorly constrained. I'm leaning more and more to just having to manually reconcile the FX monthly - or write a plugin that will add the USD/GBP conversions every payroll.

Thoughts from anyone? Specifically on:
1) This specific problem (ha!)
2) Getting different postings from different import sources for a single transaction?
3) Creative alternate ways to deal with this.


What's a better strategy?

Martin Blais

unread,
Oct 31, 2021, 2:55:35 PM10/31/21
to Beancount
On Fri, Oct 22, 2021 at 4:06 AM Alan H <al...@polyphase.ca> wrote:
Hey folks;

Delurk comment: I've been using beancount more and more seriously over the last year and the final convincing moment for me was how quickly I could do my Canadian taxes with a few custom plugins to split expenses based on meta data and then record and balance assert everything so I'd have confidence things didn't 'rot' until next tax season. I also now use it exclusively for corporate accounts keeping.

Nice! Glad the framework is working for you.

  
Today's conundrum:

  • I live and work in the UK for a US company.
  • Part of my compensation is Restricted Stock; almost exactly like the examples posted in the github.io docs [0].

The problem is the 'float/limbo' account for me:
  • On payslips, the limbo refund amount is in GBP (and I record it thusly) (imported by importer 1 (my custom payroll.py importer) as our UK payroll records everything in GBP.
  • On vesting events (reports from broken) the limbo taxed amount is reported in USD and handled by custom importer rsu_vesting_reports.py)

I have an example hermetic example file on github [1].

I balance everything by adding an FX conversion posting-pair to the vesting event that changes the USD tax amount to the (manually matched) GBP amount from payroll. This is really cumbersome. Note that it gets even more cumbersome when there are multiple vests -  I need to sort out the FX entirely independently without the GBP equivalence and this makes me tempted to do the FX as a separate transaction on the limbo account by hand...
Now that I'm thinking about it; the income on a multiple-vest scenario will be similarly poorly constrained. I'm leaning more and more to just having to manually reconcile the FX monthly - or write a plugin that will add the USD/GBP conversions every payroll.

Thoughts from anyone? Specifically on:
1) This specific problem (ha!)
2) Getting different postings from different import sources for a single transaction?
3) Creative alternate ways to deal with this.

It seems to me you're doing the right thing, I don't see much of an easy way around it.
If this is a monthly event, I'd be on the fence about automating it or just doing it by hand.
If I felt more like automating it, I'd find the amount between the transactions and insert the missing conversion rate by pairing the transactions (should be possible by date).
Rather than a plugin, this is something you could do in a script, produce a modified file (with the added conversions), and pop up a graphical diff for verification of correct insertion of the missing number. That'll get you through most of the pain (I think).



 
--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/692cb295-ebd2-49a1-8518-0ecbf0ee05d3n%40googlegroups.com.
Message has been deleted

Alan H

unread,
Jun 12, 2022, 8:51:59 AM6/12/22
to Beancount
I realise I never followed up. I went with a small script and leveraging my diff tooling. That was a nice suggestion.
Thanks Martin
Alan
Reply all
Reply to author
Forward
0 new messages