mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-25 03:13:25 +03:00
bin: move: improve help
This commit is contained in:
parent
1591939074
commit
fc8c85931c
@ -48,39 +48,38 @@ cmdmode = hledgerCommandMode
|
|||||||
-- help text must be above _FLAGS, blank lines will not be displayed.
|
-- help text must be above _FLAGS, blank lines will not be displayed.
|
||||||
[s| hledger-move
|
[s| hledger-move
|
||||||
Print an entry to move funds between accounts, preserving costs and subaccounts
|
Print an entry to move funds between accounts, preserving costs and subaccounts
|
||||||
|
.
|
||||||
Usage: hledger-move AMT FROMACCT TOACCT
|
Usage: hledger-move AMT FROMACCT TOACCT
|
||||||
|
.
|
||||||
AMT is a positive hledger amount, as in journal format.
|
|
||||||
FROMACCT is an account name or regular expression, as in an acct: query.
|
|
||||||
The alphabetically first account name it matches is the source account.
|
|
||||||
TOACCT is an account name or regexp selecting the destination account.
|
|
||||||
|
|
||||||
This command prints a journal entry which you can add to your journal,
|
This command prints a journal entry which you can add to your journal,
|
||||||
representing a transfer of the requested amount from the source account
|
representing a transfer of some amount from a source account (and/or
|
||||||
to the destination account.
|
its subaccounts) to a destination account.
|
||||||
|
It is mainly intended for moving assets, especially investment assets
|
||||||
The commodity to be moved is determined by AMT's commodity symbol.
|
with subaccounts representing lots.
|
||||||
|
.
|
||||||
This command can also move amounts from subaccounts (one level, at least).
|
AMT is a positive hledger amount, including a commodity symbol.
|
||||||
It will move amounts first out of the main source account if possible,
|
.
|
||||||
then as needed out of each subaccount in alphanumerical order of names,
|
FROMACCT is the source account (an account name, or a regular expression
|
||||||
|
whose alphanumerically first match is the source account).
|
||||||
|
.
|
||||||
|
TOACCT is the destination account (or account-matching regexp).
|
||||||
|
.
|
||||||
|
This command can also transfer from, and to, child accounts.
|
||||||
|
It will move amounts first out of FROMACCT if possible,
|
||||||
|
then as needed out of its subaccounts in alphanumerical order,
|
||||||
until the total requested amount is moved.
|
until the total requested amount is moved.
|
||||||
(This is useful when withdrawing from an account with subaccounts
|
Ie, if subaccounts are named by acquisition date (eg ":YYYYMMDD"),
|
||||||
representing investment lots; if these are named by acquisition date
|
they will be withdrawn in FIFO order.
|
||||||
(eg ":YYYYMMDD"), they will be moved in FIFO order.)
|
.
|
||||||
|
Any subaccounts withdrawn from will be recreated under TOACCT,
|
||||||
This command is mainly intended for moving assets.
|
unless the --consolidate flag is used. With --consolidate,
|
||||||
If there are not sufficient positive balances in the source account(s)
|
all amounts are transferred to TOACCT, discarding lot information.
|
||||||
|
.
|
||||||
|
If there is not a sufficient positive balance in FROMACCT and its subaccounts
|
||||||
to supply the requested amount, the command will fail.
|
to supply the requested amount, the command will fail.
|
||||||
|
.
|
||||||
Any source subaccounts used will be recreated under the destination account.
|
|
||||||
Or, to consolidate amounts in the main destination account
|
|
||||||
(discarding lot information), use the --consolidate flag.
|
|
||||||
|
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
.
|
||||||
$ hledger-move $50 assets:checking assets:cash # withdraw cash from bank
|
$ hledger-move $50 assets:checking assets:cash # withdraw cash from bank
|
||||||
$ hledger-move ADA1000 ada:wallet1 ada:wallet2 # move 1000 ADA, keeping lots
|
$ hledger-move ADA1000 ada:wallet1 ada:wallet2 # move 1000 ADA, keeping lots
|
||||||
|
|
||||||
@ -108,6 +107,8 @@ You can disable this validation by adding the --force flag.
|
|||||||
|
|
||||||
balance assertions
|
balance assertions
|
||||||
|
|
||||||
|
respecting end date, for calculating balances and generated txn date
|
||||||
|
|
||||||
-}
|
-}
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user