Hello,
A new user to ledger here. I have a tmp.csv file that contains the
following:
--8<---------------cut here---------------start------------->8---
date,,,payee,,debit,credit
2023-04-22,2023-04-24,0311,COSTCO WHSE#1322,Merchandise,,10.99
--8<---------------cut here---------------end--------------->8---
But I get an error when running the command:
husain@localhost:~/Finance$ ledger convert tmp.csv --input-date-format "%Y-%m-%d" --rich-data -f personal.dat
While parsing file "/home/husain/Finance/tmp.csv", line 1:
While parsing CSV line:
2023-04-22,2023-04-24,0311,COSTCO WHSE#1322,Merchandise,,10.99
Error: Only one posting with null amount allowed per transaction
I get the same error as well if I run the following:
husain@localhost:~/Finance$ ledger convert tmp.csv --input-date-format "%Y-%m-%d" --rich-data -f personal.dat --account Assets:Bank --invert
While parsing file "/home/husain/Finance/tmp.csv", line 1:
While parsing CSV line:
2023-04-22,2023-04-24,0311,COSTCO WHSE#1322,Merchandise,,10.99
Error: Cannot negate an uninitialized amount
I am not sure what is going on. Guidance would be appreciated.
Note that I am running into this issue after consulting the
documentation in:
https://ledger-cli.org/doc/ledger3.html#The-convert-command
The documentation includes a command similar to the one listed above. I
also consulted the man page. However, the man page is not clear on how
to use the convert command as it does not group the options together. I
am, for example, unsure what the "-f" flag does here.
Thanks,
Husain