Skip to content

Commit

Permalink
Revert "also copy costs that round to zero"
Browse files Browse the repository at this point in the history
This reverts commit e2f64be.

post->cost is actually of type optional, so the cast to bool iscorrect.
  • Loading branch information
dbear496 authored and jwiegley committed Aug 7, 2024
1 parent 214cd07 commit c744039
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xact.cc
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ 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.is_null())
if(post->cost)
new_post->cost = post->cost;

// A Cleared transaction implies all of its automatic posting are cleared
Expand Down

0 comments on commit c744039

Please sign in to comment.