On Tue, Dec 18, 2018 at 3:30 AM Daniele Nicolodi <[email protected]> wrote:

> Hello,
>
> I'm trying to write an importer for some account statements that report
> operations in different currencies. For example transferring USD to EUR.
> Those statements report the amount paid for the transaction (in USD),
> the total fees (in USD), the amount converted (that could be obtained
> from the previous two amounts), the amount transferred (in EUR), and the
> exchange rate, oddly in EUR per 1 USD, rather than the other way around.
>
> To enter this transaction I would like to enter something like:
>
> 2018-12-11 * "TRANSFER" "Foo"
>      Expenses:Unknown             20.00 EUR @@ 22.74 USD
>      Expenses:Fees:Transfer        1.32 USD
>      Assets:Checking             -24.06 USD
>
> but I haven't found a way to specify the total cost with the @@ syntax
> in the ingest framework.
>

The schema does not provide a representation of the total price.
Only the per-unit price.
The convenience is provided at the level of the grammar, but converted to
per-unit price:
https://bitbucket.org/blais/beancount/src/2b388a853ae4b3eb1cff288e75cdc89afcb24249/beancount/parser/grammar.py#lines-819



> As an alternative solution I can simply convert the total price into
> unit price, but this introduces rounding errors, and I would like to
> avoid to think about those.


Tolerance is a normal part of the process of balancing a transaction.
If you sum up the amounts, the balance rule ensures that the residual
amount is below some tolerance number.
The tolerance is inferred as per the numbers provided on the transaction
(for each currency).
Read more about it here:
http://furius.ca/beancount/doc/tolerances



>
> Am I missing something or what I would like to do is not possible?
>

Not possible.
This would introduce too many complications in the schema, it has been
considered and discussed numerous times.




>
> Thank you.
>
> Best,
> Dan
>
> --
> 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 post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/2aeb8251-183c-0e6a-37db-815402c4ad73%40grinta.net
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhMkZoE8atAkW0Q4fQDdG9Dk2h576xPfPDC%3DFZhhvwsLtA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to