summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordbear496 <70439542+dbear496@users.noreply.github.com>2023-07-13 20:58:04 -0400
committerJohn Wiegley <johnw@newartisans.com>2024-08-06 15:38:57 -1000
commit2a23c3a14ed5d0cff564a5fb90d568df28eaeab4 (patch)
treeadc3fc00977ec9f0aa7ca92fa8a8035c007ebeed /src
parent9b3af746464cb094e3b3fd7c3ebf0ec74126ebac (diff)
downloadfork-ledger-2a23c3a14ed5d0cff564a5fb90d568df28eaeab4.tar.gz
fork-ledger-2a23c3a14ed5d0cff564a5fb90d568df28eaeab4.tar.bz2
fork-ledger-2a23c3a14ed5d0cff564a5fb90d568df28eaeab4.zip
copy cost from automatic transaction posting
fixes #2268
Diffstat (limited to 'src')
-rw-r--r--src/xact.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xact.cc b/src/xact.cc
index 0a080901..af93468f 100644
--- a/src/xact.cc
+++ b/src/xact.cc
@@ -836,6 +836,8 @@ void auto_xact_t::extend_xact(xact_base_t& xact, parse_context_t& context)
// the automated xact's one.
post_t * new_post = new post_t(account, amt);
new_post->copy_details(*post);
+ if(post->cost)
+ new_post->cost = post->cost;
// A Cleared transaction implies all of its automatic posting are cleared
// CPR 2012/10/23