No problem.

I have a partial work around with 
     *$ ledger -f 2013.led bal 
'--balance-format=%(justify(scrub(to_balance(int(display_total))), 20, -1, 
true, color)) %(depth_spacer) %(!options.flat ? depth_spacer : "") 
%-(ansify_if(partial_account(options.flat), blue if 
color))\n%/%$1\n%/--------------------\n'*

that is, replacing the standard display_total with int(display_total).   I 
lose the commas and dollar signs since any sort of to_amount() call just 
puts back on the extra items.

Looking carefully, I do not thing I can do it.   There is no substring 
operator, no way to truncate a string if it is in the amount field, and no 
way to change the to_amount() function.

Any thoughts?

Charles


On Friday, August 23, 2013 4:26:29 PM UTC-7, Jeffrey Brent McBeth wrote:
>
> On Fri, Aug 23, 2013 at 04:08:17PM -0700, Charles Merriam wrote: 
> >    Er, ok. 
> >    I now have an answer saying "ledger uses floats; you are hosed." and 
> >    "ledger does not use floats; you are hosed". 
> >    Is there a way to use the -d option to fix this? 
> >    Charles 
>
> That is my fault.  My first sentence was supposed to say "The ledger docs 
> are pretty explicit in the fact that they do not use floats for amounts" 
>
> I don't know how my fingers fumbled.  My apologies. 
>
> >      > The ledger docs are pretty explicit in the fact that they use 
> floats 
> >      for 
> >      > amounts. �I just grepped through the code, and there are 
> astoundingly 
> >      few 
> >      > instances of the word float or double in the code, and they 
> appear at 
> >      first 
> >      > blush to all be related to size calculations rather than storing 
> any 
> >      > amounts. 
> > 
> >      Ledger *NEVER* uses floats for monetary values, but only for 
> imprecise 
> >      things 
> -- 
> "The man who does not read good books has no advantage over 
>  the man who cannot read them." 
>  -- Mark Twain 
>

-- 

--- 
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/groups/opt_out.

Reply via email to