Hi everyone! I think I'm having the same/similar issue. I try to declare the following commodity:
commodity JPY format 1,234. JPY Note that I include a dot at the end of the amount, this is to indicate the commodity does not uses decimals. This is compatible with hledger, but with ledger, I get the following error: "Error: commodity directive symbol JPY and format directive symbol should be the same" Is this behavior expected? Regards Antonio M. El domingo, 4 de junio de 2023 a las 12:06:47 UTC-4, Scott Carpenter escribió: > Thanks, Martin. And thanks for all the work you do with maintaining things > and managing these releases! > > Scott > > On Sunday, June 4, 2023 at 10:30:13 AM UTC-5 Martin Michlmayr wrote: > >> I think this works as expected (now), but maybe it needs to be >> documented better. "format" requires an example of how the commodity >> is to be used - you have to include the commodity because some people >> (or regions) put it before the number and some people after. >> >> >> >> * Scott Carpenter <[email protected]> [2023-06-04 06:00]: >> > I see now that if I use, say: >> > >> > commodity xyz >> > format 1,000.000 xyz >> > >> > Putting the commodity last, things behave the same as before with my >> > output. >> > >> > On Sunday, June 4, 2023 at 7:23:06 AM UTC-5 Scott Carpenter wrote: >> > >> > > After updating to 3.3.2, I was getting errors like this with my >> > > commodities: >> > > >> > > While parsing file <something.ldg>, line 6: >> > > Error: commodity directive symbol abc and format directive symbol >> should >> > > be the same >> > > >> > > Note the two spaces between "symbol" and "should". Looks like there >> is no >> > > format directive symbol. Commodities look like this: >> > > >> > > commodity $ >> > > format $ 1,000.00 >> > > default >> > > >> > > commodity abc >> > > format 1,000.000000 >> > > >> > > commodity xyz >> > > format 1,000.000 >> > > >> > > And many more entries. I've been using these for many years. Every >> format >> > > line after the first one produced an error like the above when I ran >> the >> > > file through ledger. >> > > >> > > Adding the commodity to the format line makes the error go away: >> > > >> > > commodity abc >> > > format abc 1,000.000000 >> > > >> > > Was I doing it wrong all this time and just getting away with it? >> > > >> > > Figured I'd share as an FYI that something changed with this, and to >> help >> > > others that might run into the same error. >> > > >> > > Thank you! >> > > >> > >> > -- >> > >> > --- >> > 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/c12415e0-8882-4f43-bb1c-71993986f803n%40googlegroups.com. >> >> >> >> >> -- >> Martin Michlmayr >> https://www.cyrius.com/ >> > -- --- 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/73bb31d0-7982-497d-a92e-8c9cf9d012f0n%40googlegroups.com.
