Hi there,

I’m fairly new to Beancount and I’m trying to import my last couple of 
years of payslips, however I’ve run into a snag with a fairly complex 
multi-currency transaction. I work for an international company and moved 
offices in 2018. My company paid out my full end of year bonus in my new 
country (CH), but needed to withhold taxes on a prorated portion of my 
bonus in my old country (AU). 

The tricky parts are two-fold: 

   1. 
   
   My company doesn’t know the exact withholding amount at the point my 
   bonus is paid out, so they withhold an approximate amount. Then, in the 
   following month they either refund or further deduct the difference.
   2. 
   
   The actual currency conversions used aren’t specified anywhere - instead 
   I need to infer the amount by looking at the bonus amount on my AU payslip 
   (which is netted out to zero).
   
Here is my current best attempt to represent this by moving the CH withheld 
amount to a temporary account at an inferred exchange rate:

2019-01-25 ! "Hooli CH Paystub"

  period: "2019-01-01 - 2019-01-31"

  Income:CH:Hooli:Salary                                                   
              -19307.7 CHF

  Income:CH:Hooli:HealthInsuranceContrib                                   
                  -675 CHF

  Income:AU:Hooli:AnnualBonus                                               
            -16433.75 CHF

  Income:CH:Hooli:AnnualBonus                                               
            -45566.25 CHF

  Income:CH:Hooli:Pension                                                   
              -2133.5 CHF

  Assets:AU:HoldingForTaxes                         
22741.72/16433.75*7723.85 AUD @@      7723.85 CHF

  Expenses:Taxes:CH:Tax                                                     
              24162.2 CHF

  Assets:CH:Pension                                                        
                  4267 CHF

  Assets:CH:Checking                                                       
              47963.15 CHF

2019-01-25 ! "Hooli AU Paystub"

  Income:AU:Hooli:Super                                                    
              -2274.17 AUD

  Assets:AU:Super                                                           
              2274.17 AUD

  Assets:AU:HoldingForTaxes                                                 
            -10660.00 AUD

  Expenses:Taxes:AU                                                        
              10660.00 AUD

2019-02-25 * "Hooli CH Paystub"

  period: "2019-02-01 - 2019-02-28"

  Income:CH:Hooli:Salary                                                   
              19437.75 CHF

  Income:CH:Hooli:PeerBonus                                                
                  -200 CHF

  Income:CH:Hooli:Pension                                                   
              -2133.5 CHF

  Expenses:Taxes:CH:TaxAtSource                                             
              8086.85 CHF

  Assets:CH:MSSB:Withholding                                                
              -3040.4 CHF

  Assets:AU:HoldingForTaxes                                  
-22741.72/16433.75*20.70   @@ -20.70 CHF

  Assets:CH:Pension                                                        
                  4267 CHF

  Expenses:Misc                                                            
                481.75 CHF

  Assets:CH:Checking                                                       
              12471.75 CHF

2019-02-26 pad Assets:AU:HoldingForTaxes Expenses:RoundingErrors

2019-02-26 balance Assets:AU:HoldingForTaxes 0 AUD


My question for you all is: is there a more elegant way to represent this?  
A couple of things stand out to me as particularly messy:

   1. 
   
   The complex inline manual currency conversion - is there is a better way 
   to move the money into AUD without 
   2. 
   
   For the refund amount of $20.70 CHF I get a warning about negative 
   prices and a reference to 
   http://furius.ca/beancount/doc/bug-negative-prices, but it’s not clear 
   to me how to “fix” this. I really do want a negative amount here?
   3. 
   
   I’d ideally like to zero out the HoldingForTaxes account without an 
   additional pad + balance assertion. Is there a way I can reference the 
   remaining amount in the third transaction and use that so that the 
   “rounding error” gets absorbed into the exchange rate?
   


Thanks,

Walder

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/34fb415b-b247-47ca-b37c-8f71fd34dc9dn%40googlegroups.com.

Reply via email to