Hi Alex,

Can you describe in more detail how you'd like this to look like?

Here's what I think you're saying (please correct me if I'm wrong):
For this kind of input:

  2014-05-11 open Liabilities:CreditCard  BRL
  2014-05-11 open Expenses:CoolStuff      BRL,USD
  2014-05-11 open Expenses:ForeignTax     BRL

  2014-05-11 * "Compra local"
    Liabilities:CreditCard        -102.39 BRL
    Expenses:CoolStuff


  2014-05-11 * "Compra global"
    Liabilities:CreditCard        -82.30 BRL @ 0.45 USD
    Expenses:CoolStuff


You would like the transactions to get parsed into this:

  2014-05-11 * "Compra local"
    Liabilities:CreditCard        -82.30 BRL @ 0.45 USD
    Expenses:CoolStuff             37.0350 USD

  2014-05-11 * "Compra global"
    Liabilities:CreditCard        -82.30 BRL @ 0.45 USD
    Expenses:CoolStuff             34.6721670 USD
    Expenses:ForeignTax            5.25074 BRL @ 0.45 USD


For the local transaction, the automatically filled-in amount is as
usual, just the converted amount.

For the global transaction, instead of just converting the amount,
take 6.38% of it and automatically insert a new posting to book
that against the foreign tax amount, and fill in the auto-posting
with the remainder.

Would that work?



An idea I've been toying with at some point is to allow the user to
specify more than a single posting without an amount, like this:

  2014-05-11 * "Compra global"
    Liabilities:CreditCard        -82.30 BRL @ 0.45 USD
    Expenses:CoolStuff
    Expenses:ForeignTax            6.38%

where all the percentages of those postings would still have to sum
up to 100%, and one of them could be left without a percentage, as
above (the Expenses:CoolStuff posting is automatically set to
93.62%). The amounts automatically booked would be in proportion to
their percentage. This is the second time I hear of a use case for
this.

However, your use case seems to warrant a more automatic usage. If
the tax is stable (e.g. it only changes every year, for instance),
you would still want to code this into the system.

I think Ledger has some way to automatically book a virtual amount
on a pattern; that might be enough if the tax never changes.





On Sat, May 10, 2014 at 5:19 PM, Alexandre Rademaker
<[email protected]>wrote:

>
> Sorry for this probably silly question but I didn't find any info in the
> docs.
>
> I need to add an automatic post about the tax that I pay each time that I
> use my credit card for international purchases. If I buy in Brazilian
> Reais, no tax, but if I buy something in dollars or euros, I have to pay
> 6.38% of tax. I could register one transaction per statement (summing up
> the total amount of tax that I payed for all international purchases in
> that statement)  or I could register the tax amount per entry (purchase). I
> prefer the second one. Any idea?
>
> Automatic transaction is the only way to go? Can I have on post relative
> to the amount of the transaction? Can automatic transaction be fired only
> when specific currency was used in a specific account?
>
> Best,
> Alexandre
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Ledger" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to