diff options
author | Kai Wohlfahrt <kai.wohlfahrt@gmail.com> | 2020-06-09 22:12:13 +0100 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2021-01-31 09:59:02 +0800 |
commit | e791e4924f4bfb58044420ff5ab495f3ff5cf8c1 (patch) | |
tree | 98032476405868aad7d0986dabf13917c399af0b /src/csv.h | |
parent | b155f8928c6a33af42f859b27c83639b72517f5e (diff) | |
download | fork-ledger-e791e4924f4bfb58044420ff5ab495f3ff5cf8c1.tar.gz fork-ledger-e791e4924f4bfb58044420ff5ab495f3ff5cf8c1.tar.bz2 fork-ledger-e791e4924f4bfb58044420ff5ab495f3ff5cf8c1.zip |
Add debit field to convert command
This changes the error reported when a transaction with no amount is
imported.
Diffstat (limited to 'src/csv.h')
-rw-r--r-- | src/csv.h | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -51,6 +51,8 @@ class xact_t; class journal_t; class account_t; +DECLARE_EXCEPTION(csv_error, std::runtime_error); + class csv_reader { parse_context_t context; @@ -60,7 +62,8 @@ class csv_reader FIELD_DATE_AUX, FIELD_CODE, FIELD_PAYEE, - FIELD_AMOUNT, + FIELD_CREDIT, + FIELD_DEBIT, FIELD_COST, FIELD_TOTAL, FIELD_NOTE, @@ -72,7 +75,8 @@ class csv_reader mask_t date_aux_mask; mask_t code_mask; mask_t payee_mask; - mask_t amount_mask; + mask_t credit_mask; + mask_t debit_mask; mask_t cost_mask; mask_t total_mask; mask_t note_mask; @@ -87,7 +91,8 @@ public: date_aux_mask("posted( ?date)?"), code_mask("code"), payee_mask("(payee|desc(ription)?|title)"), - amount_mask("amount"), + credit_mask("credit|amount"), + debit_mask("debit"), cost_mask("cost"), total_mask("total"), note_mask("note") { |