diff options
author | Diogo Trentini <diogotrentini@gmail.com> | 2020-09-16 22:38:01 -0300 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2021-02-02 17:45:10 +0800 |
commit | 5560b0c40f3986704df25095fcc485bcc1de9e5b (patch) | |
tree | f61df53eea9a57da82717409c89b1309f09ecd32 /src/post.h | |
parent | ebd2d8dd0865ef41d1931c5304cb42ee1b312cb7 (diff) | |
download | fork-ledger-5560b0c40f3986704df25095fcc485bcc1de9e5b.tar.gz fork-ledger-5560b0c40f3986704df25095fcc485bcc1de9e5b.tar.bz2 fork-ledger-5560b0c40f3986704df25095fcc485bcc1de9e5b.zip |
Fix issues related to payees declared on posting's metadata
Payees declared on posting's metadata are now validated with `--check-payees`
option. Also, their aliases are now considered on reports as well.
Diffstat (limited to 'src/post.h')
-rw-r--r-- | src/post.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -73,6 +73,12 @@ public: optional<datetime_t> checkin; optional<datetime_t> checkout; +private: + + optional<string> _payee; + +public: + post_t(account_t * _account = NULL, flags_t _flags = ITEM_NORMAL) : item_t(_flags), xact(NULL), account(_account) @@ -132,7 +138,11 @@ public: virtual date_t primary_date() const; virtual optional<date_t> aux_date() const; + string payee_from_tag() const; string payee() const; + void set_payee(const string& payee) { + _payee = payee; + } bool must_balance() const { return ! has_flags(POST_VIRTUAL) || has_flags(POST_MUST_BALANCE); |