Short answer: there's no "customary"
If you want a precise amount, put it i n
4.039 VFIAX {247.59 USD}

If you need to get rid of rounding error check in the plugins directory
there's a plugin for that



On Thu, Dec 28, 2017 at 7:39 AM, Joel Shprentz <[email protected]> wrote:

> Beancount cloned with hg at 2017-12-27 22:14 EST
> Python 3.5.3 running on Ubuntu 14.04
>
> In the following bean file, I purchase $1,000.00 of a Vanguard fund.
> Vanguard reports shares to three decimal places.
>
> option "operating_currency" "USD"
> option "booking_algorithm" "FULL"
>
> 2017-12-01 commodity USD
> 2017-12-01 commodity VFIAX
>
> 2017-12-01 open Assets:Checking
> 2017-12-01 open Equity:Opening-Balances
> 2017-12-01 open Assets:Vanguard     VFIAX "FIFO"
>
> 2017-12-01 * "Opening balance"
>   Assets:Checking           1000.00 USD
>   Equity:Opening-Balances
>
> 2017-12-27 * "Buy retirement fund shares"
>   Assets:Vanguard           4.039 VFIAX {}
>   Assets:Checking           -1000.00 USD
>
> Using bean-web, in the trail balance report for all transactions, the USD
> column totals -0.00 and the total balance is -0.0000000000000000000000001
> USD. Other reports appear correct.
>
> The share purchase transaction details show a basis of
> 999.9999999999999999999999999 USD instead of 1000.00 USD. *How can I
> configure Beancount to round the basis to the customary two decimal places
> for USD?*
>
> Hash:4baf7306f442bd171b65dd8a83e8390f
> Location: /home/joel/projects/accounting/vanguard.bean:15
>
> ------------ Balances before transaction
>
>   Assets:Vanguard
>
>   Assets:Checking                                        1000.00 USD
>
>
> ------------ Transaction
>
> 2017-12-27 * "Buy retirement fund shares"
>   Assets:Vanguard     4.039 VFIAX {247.59 USD, 2017-12-27}  ; 
> 999.9999999999999999999999999 USD
>   Assets:Checking  -1000.00 USD                             ;                 
>      -1000.00 USD
>
>
> Residual: (-0.0000000000000000000000001 USD)
> Tolerances: USD=0.005
> Basis: (999.9999999999999999999999999 USD)
>
> ------------ Balances after transaction
>
> * Assets:Vanguard  4.039 VFIAX {247.5860361475612775439465214 USD, 2017-12-27}
>
>   Assets:Checking
>
> --
> 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/ms
> gid/beancount/9b46d869-2e31-4466-951a-7b910f34f977%40googlegroups.com
> <https://groups.google.com/d/msgid/beancount/9b46d869-2e31-4466-951a-7b910f34f977%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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%2BhM9xp9fS5UXDXrbza_hAs2AdsAOvOo38ziFGNaVUS156A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to