sellstock-cli(1) | General Commands Manual | sellstock-cli(1) |
sellstock-cli - record FIFO stock or commodity sales
sellstock-cli
sellstock-cli is a text program for quickly recording commodity sales in a ledger file.
The program first prompts for the account in which the commodity was stored, the account for commissions, and the account to credit for gains and losses, as well as the amount and name of sold commodity, its sale price, and the commission.
Then the program invokes ledger to list the dates and prices at which each commodity was purchased, lists them, subtracts the requested amount and shows the result.
Finally, the resulting transaction is shown, asking for a confirmation to save it to the journal.
The program must be supplied with location of the ledger file to work with. The location of the file is determined using the following mechanisms, in this order. The first mechanism which yields a result, wins.
The following environment variable is recognized by this program:
The config file for ledger(1), namely file .ledgerrc in user's home directory is scanned looking for the following option.
ledger(1), addtrans(1), cleartrans-cli(1), sorttrans-cli(1), withdraw-cli(1).
November 14 2022 |