summaryrefslogtreecommitdiff
path: root/src/account.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-17 23:42:23 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-17 23:42:23 -0400
commit31e8ed7587f6c7dc54e9623dd6a4e09ad5b6b017 (patch)
tree27e27c95c45d3e1cee0138709406c7b7ea4a8736 /src/account.cc
parentf82ae73ecfd52cfc639270e303c6b00941bc7a48 (diff)
downloadfork-ledger-31e8ed7587f6c7dc54e9623dd6a4e09ad5b6b017.tar.gz
fork-ledger-31e8ed7587f6c7dc54e9623dd6a4e09ad5b6b017.tar.bz2
fork-ledger-31e8ed7587f6c7dc54e9623dd6a4e09ad5b6b017.zip
Individual postings may each have their own payee
If a posting has the metadata field "Payee" set to a string, that will be used as the payee name for that posting. This affects the register report, the payees report, and the --by-payee option. This is useful because sometimes I send, say, 4 checks at a time to my bank. So on my bank statement, this is all just one amount: 2010-06-17 Sample Assets:Bank $400.00 Income:Check1 $-100.00 Income:Check2 $-100.00 Income:Check3 $-100.00 Income:Check4 $-100.00 Though it's important that the Assets:Bank posting be a single posting of $400 value, I'd like for income reports to show whom each check came from. Now I can say: 2010-06-17 Sample Assets:Bank $400.00 Income:Check1 $-100.00 ; Payee: Person One Income:Check2 $-100.00 ; Payee: Person Two Income:Check3 $-100.00 ; Payee: Person Three Income:Check4 $-100.00 ; Payee: Person Four When I report this, it appears as: 10-Jun-17 Sample Assets:Bank $400.00 $400.00 Person One Income:Check1 $-100.00 $300.00 Person Two Income:Check2 $-100.00 $200.00 Person Three Income:Check3 $-100.00 $100.00 Person Four Income:Check4 $-100.00 0 This shows that they are all in the same transaction (which is why the date is not repeated), but they have different payees.
Diffstat (limited to 'src/account.cc')
-rw-r--r--src/account.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/account.cc b/src/account.cc
index ceeb1c12..3e0ad086 100644
--- a/src/account.cc
+++ b/src/account.cc
@@ -626,7 +626,7 @@ void account_t::xdata_t::details_t::update(post_t& post,
if (gather_all) {
accounts_referenced.insert(post.account->fullname());
- payees_referenced.insert(post.xact->payee);
+ payees_referenced.insert(post.payee());
}
}