diff --git a/app/views/transactions/_split_parent_row.html.erb b/app/views/transactions/_split_parent_row.html.erb index 70b44ebd2..6813609c3 100644 --- a/app/views/transactions/_split_parent_row.html.erb +++ b/app/views/transactions/_split_parent_row.html.erb @@ -64,6 +64,6 @@
<%= potential_match.name %>
<%= potential_match.date.strftime("%b %d, %Y") %> • <%= potential_match.account.name %>
-"> +
"> <%= format_money(-potential_match.amount_money) %>
diff --git a/test/controllers/transactions_controller_test.rb b/test/controllers/transactions_controller_test.rb index 8c79b793e..546f58be0 100644 --- a/test/controllers/transactions_controller_test.rb +++ b/test/controllers/transactions_controller_test.rb @@ -96,6 +96,20 @@ class TransactionsControllerTest < ActionDispatch::IntegrationTest assert_dom "#total-transactions", count: 1, text: "1" end + test "split parent rows mark amount as privacy-sensitive" do + entry = create_transaction(account: accounts(:depository), amount: 100, name: "Split parent") + + entry.split!([ + { name: "Part 1", amount: 60, category_id: nil }, + { name: "Part 2", amount: 40, category_id: nil } + ]) + + get transactions_url + + assert_response :success + assert_select ".split-group > div.opacity-50 p.privacy-sensitive", count: 1 + end + test "can paginate" do family = families(:empty) sign_in users(:empty)