sellstock-cli(1)
cli - record FIFO stock or commodity sales
Description
sellstock-cli
NAME
sellstock-cli - record FIFO stock or commodity sales
SYNOPSIS
sellstock-cli
DESCRIPTION
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.
ENVIRONMENT
The following
environment variable is recognized by this program:
LEDGER_FILE
Path to ledger file to work with.
FILES
The config file
for ledger(1), namely file .ledgerrc in
user’s home directory is scanned looking for the
following option.
--file FILE
Path to ledger file to work with.
SEE ALSO
ledger(1), addtrans(1), cleartrans-cli(1), sorttrans-cli(1), withdraw-cli(1).