branch: elpa/csv2ledger
commit d00914d9f1c8742f7edbbbbebd67d3a477be02a5
Author: Joost Kremers <joost.krem...@ipsoft.com>
Commit: Joost Kremers <joost.krem...@ipsoft.com>

    c2l-csv-line-to-ledger: Check c2l-fallback-account before asking the user.
---
 csv2ledger.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/csv2ledger.el b/csv2ledger.el
index 233b0af021..8f169107e9 100644
--- a/csv2ledger.el
+++ b/csv2ledger.el
@@ -261,9 +261,14 @@ for that account."
   "Convert ROW to a ledger entry.
 ROW contains the data of the entry as a list of strings.  The
 strings are interpreted according to the template in
-`c2l-csv-columns'."
+`c2l-csv-columns'.  The transaction is booked to the account in
+`c2l-base-account'.  The reverse account is determined on the
+basis of the matchers in `c2l-account-matchers-file'.  If none is
+found, the value of `c2l-fallback-account' is used.  If that
+option is unset, the user is asked for an account."
   (let* ((fields (--remove (eq (car it) '_) (-zip-pair c2l-csv-columns row)))
          (account (or (-some #'c2l-match-account (mapcar #'cdr (--filter (memq 
(car it) c2l-title-match-fields) fields)))
+                      c2l-fallback-account
                       (completing-read (format "Account for transaction %s, %s 
«%.75s» "
                                                (funcall c2l-title-function 
fields)
                                                (alist-get 'amount fields)

Reply via email to