From eb576ba5be3b049c4aeb3fbde9aa563d1f647b93 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 19 Apr 2019 11:18:33 -0700 Subject: [PATCH] import: document a problem with balance assignments [ci skip] --- hledger/Hledger/Cli/Commands/Import.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hledger/Hledger/Cli/Commands/Import.md b/hledger/Hledger/Cli/Commands/Import.md index bd691232b..288f22df8 100644 --- a/hledger/Hledger/Cli/Commands/Import.md +++ b/hledger/Hledger/Cli/Commands/Import.md @@ -19,3 +19,18 @@ to see only uncategorised transactions: ```shell $ hledger import --dry ... | hledger -f- print unknown --ignore-assertions ``` + +Importing balance assignments: + +Entries added by import will have their posting amounts made explicit (like `hledger print -x`). +This means that any balance assignments in imported files must be evaluated; +but, imported files don't get to see the main file's account balances. +As a result, importing entries with balance assignments +(eg from an institution that provides only balances and not posting amounts) +will probably generate incorrect posting amounts. +To avoid this problem, use print instead of import: + + $ hledger print IMPORTFILE [--new] >> $LEDGER_FILE + +(If you think import should leave amounts implicit like print does, +please test it and send a pull request.)