I opted not to use the dollar sign throughout my 41,000 lines of entries 
(even though I could have done a search and replace).  Instead, I found the 
following workaround:  --amount '($1,000.00*a)/$1,000.00'

Prior to that workaround (supra), I used a function in Emacs to 
replace-regexp-in-string, but that prior workaround is now deprecated by 
the above-mentioned approach.

On Tuesday, December 1, 2020 at 10:48:56 PM UTC-8 [email protected] 
wrote:

> Thank both, Kent and Martin:  You are both correct ... adding a dollar 
> sign corrects the issue.  I was looking for a command-line argument or a 
> master setting of some type that would affect reports for the entire file 
> of about 41,000 lines of entries.  I have since done a search/replace of 
> all numbers by adding a dollar sign, and I can confirm that this works now.
>
> On Tuesday, December 1, 2020 at 10:03:29 PM UTC-8 Kent Spillner wrote:
>
>> Are you absolutely certain?  What version of ledger do you have 
>> installed?  Which operating system are you using?  How did you install 
>> ledger (i.e. from official packages for your system, or did you build it 
>> yourself from source)?  What is the exact command you are running?  Can you 
>> share a minimal snippet of your ledger file that reproduces the issue 
>> (anonymize the accounts & change the actual values, etc.)?  Can you 
>> reproduce it with a new minimal ledger file?
>>
>> For example, what is the output if you run the something like the 
>> following commands (‘$’ represents your command prompt):
>>
>> $ ledger —version
>> $ cat >foo.dat <<EOF
>> 2020-12-01 * (1234) Acme, Inc.
>>     expenses:misc   \$1,234,567,890.95
>>     assets:checking
>> EOF
>> $ ledger -f foo.dat balance
>>
>> Sent from my iPhone
>>
>> On Dec 1, 2020, at 22:16, Keith David Bershatsky <
>> [email protected]> wrote:
>>
>> Thank you, Kent, for having a look at this particular thread.  
>> Unfortunately, the current version of ledger does not do this 
>> out-of-the-box.  All of my entries in the master ledger.dat file have 
>> commas as three-digit separators, and all hundredths are completely spelled 
>> out; e.g., 1,800.00; 13,750.50, etc. in the master ledger.dat file.
>>
>>
>>
>> The reg and bal ledger reports all omit the 3-digit comma separators, and 
>> also omit the hundredths place when the number looks like 1800.5, and also 
>> omits both the tenths and hundredths place when the number looks like 1800.
>> On Tuesday, December 1, 2020 at 7:32:56 PM UTC-8 Kent Spillner wrote:
>>
>>> That’s clearly documented in both the online docs & the webpage: ledger 
>>> will automatically copy whatever format you use (e.g.: 
>>> https://www.ledger-cli.org/3.0/doc/ledger3.html#Keeping-a-Journal).  So 
>>> if you want it to format as $1,800.00 you just need to use that format in 
>>> your ledger file(s).
>>>
>>> Just this past weekend I noticed that I suddenly started getting 3 
>>> decimal places in my reports.  Turned out I had an errant $500.000 in one 
>>> posting.
>>>
>>> Sent from my iPhone
>>>
>>> On Dec 1, 2020, at 20:50, Keith David Bershatsky <
>>> [email protected]> wrote:
>>>
>>> How can I instruct ledger-cli to display the output with three-digit 
>>> comma separators and also double hundredths (even if .00)?
>>>
>>>
>>>
>>> E.g., Instead of 1800, I would like to see 1,800.00
>>>
>>> Thanks,
>>>
>>> Keith
>>>
>>> -- 
>>>
>>> --- 
>>> 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].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/ledger-cli/df6129d5-c7a9-4afe-8860-2d87a717b6dfn%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/ledger-cli/df6129d5-c7a9-4afe-8860-2d87a717b6dfn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> -- 
>>
>> --- 
>> 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].
>>
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ledger-cli/f1727df7-c2c9-49a6-8828-b44e3585d0fbn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ledger-cli/f1727df7-c2c9-49a6-8828-b44e3585d0fbn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>

-- 

--- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/0789bacc-6334-4211-9216-0b287a3a9492n%40googlegroups.com.

Reply via email to