From 5560b0c40f3986704df25095fcc485bcc1de9e5b Mon Sep 17 00:00:00 2001 From: Diogo Trentini Date: Wed, 16 Sep 2020 22:38:01 -0300 Subject: 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. --- src/post.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/post.h') diff --git a/src/post.h b/src/post.h index aaf7ec64..a724f903 100644 --- a/src/post.h +++ b/src/post.h @@ -73,6 +73,12 @@ public: optional checkin; optional checkout; +private: + + optional _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 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); -- cgit v1.2.3