Repository: ministryofjustice/laa-apply-for-legal-aid
Pull request #7743: AP-5430 Refactor income CYA page
Author: login: RoseSAK
Labels: name: approved
description: Approved by code reviewers
Created: 2025-04-15T17:18:27Z | Merged: 2025-04-29T09:34:10Z

## What

[Link to story](https://dsdmoj.atlassian.net/browse/AP-5430)

Reduce complexity of income CYA page

## Checklist

Before you ask people to review this PR:

- Tests and rubocop should be passing: `bundle exec rake`.
- Github should not be reporting conflicts; you should have recently run `git rebase main`.
- The [development standards](https://dsdmoj.atlassian.net/wiki/spaces/ATPPB/pages/5503385837/Development+standards) and [Git Workflow](https://dsdmoj.atlassian.net/wiki/spaces/ATPPB/pages/4602855954/Git+Workflow) documentation on Confluence should be followed.
- There should be no unnecessary whitespace changes. These make diffs harder to read and conflicts more likely.
- The PR description should say what you changed and why, with a link to the JIRA story.
- You should have looked at the diff against main and ensured that nothing unexpected is included in your changes.
- You should have checked that the commit messages say why the change was made.



Diff:
diff --git a/app/helpers/payments_summary_partial_url_helper.rb b/app/helpers/payments_summary_partial_url_helper.rb
new file mode 100644
index 0000000000..9736c1ac0f
--- /dev/null
+++ b/app/helpers/payments_summary_partial_url_helper.rb
@@ -0,0 +1,9 @@
+module PaymentsSummaryPartialUrlHelper
+  def payments_summary_partial_url(partner, credit, regular_payments, *)
+    version = partner == true ? "partners" : "means"
+    payment_type = credit == true ? "income" : "outgoing"
+    page = regular_payments || partner ? "regular_#{payment_type}s" : "identify_types_of_#{payment_type}"
+    url = "providers_legal_aid_application_#{version}_#{page}_path"
+    Rails.application.routes.url_helpers.send(url, *)
+  end
+end
diff --git a/app/views/providers/means/check_income_answers/_applicant_income_assessment.html.erb b/app/views/providers/means/check_income_answers/_applicant_income_assessment.html.erb
index 16e89e06f9..116a9274a0 100644
--- a/app/views/providers/means/check_income_answers/_applicant_income_assessment.html.erb
+++ b/app/views/providers/means/check_income_answers/_applicant_income_assessment.html.erb
@@ -5,89 +5,33 @@
 <section class="applicant">
   <h2 class="govuk-heading-l"><%= t(".income-heading") %></h2>
 
-  <% if bank_statement_upload %>
-    <%= render("shared/check_answers/bank_statements", bank_statements: @legal_aid_application.attachments.bank_statement_evidence, read_only:, partner: false) %>
-  <% elsif @legal_aid_application.cfe_result.present? && display_employment_income? %>
-    <%= render "shared/employment_income_table" %>
-  <% end %>
+  <%= render("shared/check_answers/bank_statements", partner: false, read_only:) if bank_statement_upload %>
+
+  <%= render "shared/employment_income_table" if @legal_aid_application.cfe_result.present? && display_employment_income? %>
 
   <% if @legal_aid_application.applicant.hmrc_employment_income? %>
     <% if @legal_aid_application.applicant.has_multiple_employments? %>
-      <%= render(
-            "shared/check_answers/full_employment_details",
-            individual: "Your client",
-            read_only:,
-            partner: false,
-          ) %>
+      <%= render("shared/check_answers/full_employment_details", partner: false, read_only:) %>
     <% else %>
-      <%= render "shared/check_answers/employed_income", partner: false, read_only: %>
+      <%= render("shared/check_answers/employed_income", partner: false, read_only:) %>
     <% end %>
   <% elsif @legal_aid_application.applicant.employed? %>
-    <%= render(
-          "shared/check_answers/full_employment_details",
-          individual: "Your client",
-          read_only:,
-          partner: false,
-        ) %>
+    <%= render("shared/check_answers/full_employment_details", partner: false, read_only:) %>
   <% end %>
 
-  <% if bank_statement_upload %>
-    <%= render("shared/check_answers/benefits_income",
-               transactions_for: "applicant",
-               individual: @legal_aid_application.applicant,
-               state_benefits: @legal_aid_application.applicant.state_benefits,
-               version: "means",
-               read_only:) %>
-  <% end %>
+  <%= render("shared/check_answers/benefits_income", partner: false, read_only:) if bank_statement_upload %>
 
-  <%= render(
-        "shared/check_answers/payments_summary",
-        payment_type: t(".credits-section-heading"),
-        url: bank_statement_upload ? providers_legal_aid_application_means_regular_incomes_path(@legal_aid_application) : providers_legal_aid_application_means_identify_types_of_income_path(@legal_aid_application),
-        transaction_types: @credit_transaction_types,
-        individual: "Applicant",
-        read_only:,
-      ) %>
+  <!--  Income payments-->
+  <%= render("shared/check_answers/payments_summary", credit: true, partner: false, read_only:) %>
 
-  <% if bank_statement_upload %>
-    <%= render(
-          "shared/check_answers/cash_payments",
-          url: providers_legal_aid_application_means_cash_income_path,
-          individual: "Applicant",
-          individual_with_determiner: t("generic.client"),
-          type: :income,
-          read_only:,
-        ) %>
-  <% end %>
+  <%= render("shared/check_answers/cash_payments", partner: false, type: :income, read_only:) if bank_statement_upload %>
 
-  <%= render(
-        "shared/check_answers/student_finance",
-        individual: "Client",
-        individual_with_determiner: t("generic.client"),
-        model: @legal_aid_application.applicant,
-        url: providers_legal_aid_application_means_student_finance_path(@legal_aid_application),
-        read_only:,
-      ) %>
+  <%= render("shared/check_answers/student_finance", partner: false, read_only:) %>
 
   <h2 class="govuk-heading-l"><%= t(".outgoings-heading") %></h2>
 
-  <%= render(
-        "shared/check_answers/payments_summary",
-        payment_type: t(".debits-section-heading"),
-        url: bank_statement_upload ? providers_legal_aid_application_means_regular_outgoings_path(@legal_aid_application) : providers_legal_aid_application_means_identify_types_of_outgoing_path(@legal_aid_application),
-        transaction_types: @debit_transaction_types,
-        individual: "Applicant",
-        read_only:,
-      ) %>
+  <!--  Outgoing payments-->
+  <%= render("shared/check_answers/payments_summary", credit: false, partner: false, read_only:) %>
 
-  <% if bank_statement_upload %>
-    <%= render(
-          "shared/check_answers/cash_payments",
-          url: providers_legal_aid_application_means_cash_outgoing_path,
-          individual: "Applicant",
-          individual_with_determiner: t("generic.client"),
-          type: :outgoings,
-          read_only:,
-        ) %>
-  <% end %>
+  <%= render("shared/check_answers/cash_payments", partner: false, type: :outgoings, read_only:) if bank_statement_upload %>
 </section>
diff --git a/app/views/providers/means/check_income_answers/_partner_income_assessment.html.erb b/app/views/providers/means/check_income_answers/_partner_income_assessment.html.erb
index 339dfb2c81..f180092bf6 100644
--- a/app/views/providers/means/check_income_answers/_partner_income_assessment.html.erb
+++ b/app/views/providers/means/check_income_answers/_partner_income_assessment.html.erb
@@ -3,79 +3,29 @@
 <section class="partner">
   <h2 class="govuk-heading-l"><%= t(".income-heading") %></h2>
 
-  <%= render("shared/check_answers/bank_statements", bank_statements: @legal_aid_application.attachments.part_bank_state_evidence, read_only:, partner: true) %>
+  <%= render("shared/check_answers/bank_statements", partner: true, read_only:) %>
 
   <% if @legal_aid_application.partner.hmrc_employment_income? %>
     <% if @legal_aid_application.partner.has_multiple_employments? %>
-      <%= render(
-            "shared/check_answers/full_employment_details",
-            individual: t("generic.partner"),
-            read_only:,
-            partner: true,
-          ) %>
+      <%= render("shared/check_answers/full_employment_details", partner: true, read_only:) %>
     <% else %>
-      <%= render "shared/check_answers/employed_income", partner: true, read_only: %>
+      <%= render("shared/check_answers/employed_income", partner: true, read_only:) %>
     <% end %>
   <% elsif @legal_aid_application.partner.employed? %>
-    <%= render(
-          "shared/check_answers/full_employment_details",
-          individual: t("generic.partner"),
-          read_only:,
-          partner: true,
-        ) %>
+    <%= render("shared/check_answers/full_employment_details", partner: true, read_only:) %>
   <% end %>
 
-  <%= render("shared/check_answers/benefits_income",
-             transactions_for: "partner",
-             individual: @legal_aid_application.partner,
-             state_benefits: @legal_aid_application.partner.state_benefits,
-             version: "partners",
-             read_only:) %>
+  <%= render("shared/check_answers/benefits_income", partner: true, read_only:) %>
 
-  <%= render(
-        "shared/check_answers/payments_summary",
-        payment_type: t(".credits-section-heading"),
-        url: providers_legal_aid_application_partners_regular_incomes_path(@legal_aid_application),
-        transaction_types: @credit_transaction_types,
-        individual: "Partner",
-        read_only:,
-      ) %>
+  <%= render("shared/check_answers/payments_summary", partner: true, credit: true, read_only:) %>
 
-  <%= render(
-        "shared/check_answers/cash_payments",
-        url: providers_legal_aid_application_partners_cash_income_path,
-        individual: "Partner",
-        individual_with_determiner: t("generic.partner"),
-        type: :income,
-        read_only:,
-      ) %>
+  <%= render("shared/check_answers/cash_payments", partner: true, type: :income, read_only:) %>
 
-  <%= render(
-        "shared/check_answers/student_finance",
-        individual: "Partner",
-        individual_with_determiner: t("generic.partner"),
-        model: @legal_aid_application.partner,
-        url: providers_legal_aid_application_partners_student_finance_path(@legal_aid_application),
-        read_only:,
-      ) %>
+  <%= render("shared/check_answers/student_finance", partner: true, read_only:) %>
 
   <h2 class="govuk-heading-l"><%= t(".outgoings-heading") %></h2>
 
-  <%= render(
-        "shared/check_answers/payments_summary",
-        payment_type: t(".debits-section-heading"),
-        url: providers_legal_aid_application_partners_regular_outgoings_path(@legal_aid_application),
-        transaction_types: @debit_transaction_types,
-        individual: "Partner",
-        read_only:,
-      ) %>
+  <%= render("shared/check_answers/payments_summary", partner: true, credit: false, read_only:) %>
 
-  <%= render(
-        "shared/check_answers/cash_payments",
-        url: providers_legal_aid_application_partners_cash_outgoing_path,
-        individual: "Partner",
-        individual_with_determiner: t("generic.partner"),
-        type: :outgoings,
-        read_only:,
-      ) %>
+  <%= render("shared/check_answers/cash_payments", partner: true, type: :outgoings, read_only:) %>
 </section>
diff --git a/app/views/providers/means/check_income_answers/show.html.erb b/app/views/providers/means/check_income_answers/show.html.erb
index 42ada6b040..c6f81c6142 100644
--- a/app/views/providers/means/check_income_answers/show.html.erb
+++ b/app/views/providers/means/check_income_answers/show.html.erb
@@ -1,7 +1,7 @@
 <% individual = if @legal_aid_application.applicant.has_partner_with_no_contrary_interest?
-                  "your client or their partner"
+                  t("generic.client_or_partner")
                 else
-                  "your client"
+                  t("generic.client")
                 end %>
 
 <%= page_template(page_title: t(".h1-heading"), caption: t(".caption"), column_width: "full") do %>
@@ -14,20 +14,14 @@
 
   <%= render("providers/means/check_income_answers/partner_income_assessment", read_only: false) if @legal_aid_application.applicant.has_partner_with_no_contrary_interest? %>
 
-  <% if @legal_aid_application.housing_payments? %>
-    <%= render(
-          "shared/check_answers/housing_benefit",
-          read_only: false,
-          partner: @legal_aid_application.applicant.has_partner_with_no_contrary_interest?,
-        ) %>
-  <% end %>
+  <%= render("shared/check_answers/housing_benefit", partner: @legal_aid_application.applicant.has_partner_with_no_contrary_interest?) if @legal_aid_application.housing_payments? %>
 
   <h2 class="govuk-heading-l"><%= t("providers.means.check_income_answers.dependants.heading-h2") %></h2>
 
   <%= render "shared/check_answers/dependants" %>
 
   <h2 class="govuk-heading-m"><%= t(".what_happens_next.heading") %></h2>
-  <p class="govuk-body govuk-!-margin-bottom-8"><%= t(".what_happens_next.text", individual:) %></p>
+  <p class="govuk-body govuk-!-margin-bottom-6"><%= t(".what_happens_next.text", individual:) %></p>
 
   <%= next_action_buttons_with_form(
         url: providers_legal_aid_application_means_check_income_answers_path,
diff --git a/app/views/shared/check_answers/_bank_statements.html.erb b/app/views/shared/check_answers/_bank_statements.html.erb
index 8ad2c1ef47..ecd253ad50 100644
--- a/app/views/shared/check_answers/_bank_statements.html.erb
+++ b/app/views/shared/check_answers/_bank_statements.html.erb
@@ -1,12 +1,14 @@
 <% read_only = false unless local_assigns.key?(:read_only) %>
 
-<% url = if partner
-           providers_legal_aid_application_partners_bank_statements_path(@legal_aid_application)
-         else
-           providers_legal_aid_application_bank_statements_path(@legal_aid_application)
-         end %>
-
-<% individual = partner ? "Partner" : "Client" %>
+<% if partner
+     individual = "Partner"
+     url = providers_legal_aid_application_partners_bank_statements_path(@legal_aid_application)
+     bank_statements = @legal_aid_application.attachments.part_bank_state_evidence
+   else
+     individual = "Client"
+     url = providers_legal_aid_application_bank_statements_path(@legal_aid_application)
+     bank_statements = @legal_aid_application.attachments.bank_statement_evidence
+   end %>
 
 <%= govuk_summary_card(title: t(".section_heading"),
                        heading_level: 3,
diff --git a/app/views/shared/check_answers/_benefits_income.html.erb b/app/views/shared/check_answers/_benefits_income.html.erb
index aee39386ac..861e3c0f39 100644
--- a/app/views/shared/check_answers/_benefits_income.html.erb
+++ b/app/views/shared/check_answers/_benefits_income.html.erb
@@ -1,13 +1,17 @@
 <% read_only = false unless local_assigns.key?(:read_only) %>
 
-<% unless read_only
-     url = if individual.receives_state_benefits?
-             state_benefit_partial_url(:add_benefits, version, @legal_aid_application)
-           else
-             state_benefit_partial_url(:receive_benefits, version, @legal_aid_application)
-           end
+<% if partner
+     individual = @legal_aid_application.partner
+     transactions_for = "partner"
+     version = "partners"
+   else
+     individual = @legal_aid_application.applicant
+     transactions_for = "applicant"
+     version = "means"
    end %>
 
+<% url = individual.receives_state_benefits? ? state_benefit_partial_url(:add_benefits, version, @legal_aid_application) : state_benefit_partial_url(:receive_benefits, version, @legal_aid_application) unless read_only %>
+
 <%= govuk_summary_card(title: t(".#{transactions_for}.heading"), heading_level: 3, html_attributes: { id: "app-check-your-answers__#{transactions_for}__state_benefits_question" }) do |card| %>
   <% unless read_only %>
     <%= card.with_action { govuk_link_to(t("generic.change"), url, "aria-label": t(".#{transactions_for}.change_aria")) } %>
@@ -20,7 +24,7 @@
   <% end %>
 <% end %>
 
-<% state_benefits.each_with_index do |state_benefit, index| %>
+<% individual.state_benefits.each_with_index do |state_benefit, index| %>
 
   <%= govuk_summary_card(title: t(".benefit_heading", index: index + 1), heading_level: 3, html_attributes: { id: "app-check-your-answers__#{transactions_for}__state_benefits_#{index + 1}" }) do |card| %>
     <%= unless read_only
diff --git a/app/views/shared/check_answers/_cash_payments.html.erb b/app/views/shared/check_answers/_cash_payments.html.erb
index a58babab72..4b14cb3678 100644
--- a/app/views/shared/check_answers/_cash_payments.html.erb
+++ b/app/views/shared/check_answers/_cash_payments.html.erb
@@ -1,4 +1,23 @@
 <% read_only = false unless local_assigns.key?(:read_only) %>
+
+<% if partner
+     individual = "Partner"
+     individual_with_determiner = t("generic.partner")
+     url = if type.eql?(:income)
+             providers_legal_aid_application_partners_cash_income_path
+           else
+             providers_legal_aid_application_partners_cash_outgoing_path
+           end
+   else
+     individual = "Applicant"
+     individual_with_determiner = t("generic.client")
+     url = if type.eql?(:income)
+             providers_legal_aid_application_means_cash_income_path
+           else
+             providers_legal_aid_application_means_cash_outgoing_path
+           end
+   end %>
+
 <% cash_transaction_types = if type.eql?(:income)
                               @legal_aid_application.income_cash_transaction_types_for(individual)
                             elsif type.eql?(:outgoings)
diff --git a/app/views/shared/check_answers/_employed_income.html.erb b/app/views/shared/check_answers/_employed_income.html.erb
index b91177acdd..a8d19b5353 100644
--- a/app/views/shared/check_answers/_employed_income.html.erb
+++ b/app/views/shared/check_answers/_employed_income.html.erb
@@ -1,3 +1,5 @@
+<% read_only = false unless local_assigns.key?(:read_only) %>
+
 <% if partner
      individual = "partner"
      individual_with_determiner = t("generic.partner")
diff --git a/app/views/shared/check_answers/_full_employment_details.html.erb b/app/views/shared/check_answers/_full_employment_details.html.erb
index 7550ae1edf..65eb7e55f7 100644
--- a/app/views/shared/check_answers/_full_employment_details.html.erb
+++ b/app/views/shared/check_answers/_full_employment_details.html.erb
@@ -1,3 +1,5 @@
+<% read_only = false unless local_assigns.key?(:read_only) %>
+
 <% if partner
      individual_with_determiner = t("generic.partner")
      url = providers_legal_aid_application_partners_full_employment_details_path(@legal_aid_application)
diff --git a/app/views/shared/check_answers/_housing_benefit.html.erb b/app/views/shared/check_answers/_housing_benefit.html.erb
index 43530cbd9f..6078e0b5ec 100644
--- a/app/views/shared/check_answers/_housing_benefit.html.erb
+++ b/app/views/shared/check_answers/_housing_benefit.html.erb
@@ -1,15 +1,14 @@
-<h2 class="govuk-heading-l"><%= t(".heading") %></h3>
+<% read_only = false unless local_assigns.key?(:read_only) %>
 
 <% with_partner = partner ? "client_with_partner" : "client_only" %>
 
+<h2 class="govuk-heading-l"><%= t(".heading") %></h2>
 <%= govuk_summary_card(
       title: t(".card_title"),
       html_attributes: { id: "app-check-your-answers__housing_benefit", "data-check-your-answers-section": t(".heading").parameterize },
       heading_level: 3,
     ) do |card| %>
-  <% unless read_only %>
-    <%= card.with_action { govuk_link_to(t("generic.change"), providers_legal_aid_application_means_housing_benefits_path(@legal_aid_application), "aria-label": t(".card_title")) } %>
-  <% end %>
+  <%= card.with_action { govuk_link_to(t("generic.change"), providers_legal_aid_application_means_housing_benefits_path(@legal_aid_application), "aria-label": t(".card_title")) } unless read_only %>
   <%= card.with_summary_list do |summary_list| %>
     <% if @legal_aid_application.applicant_in_receipt_of_housing_benefit? %>
       <% housing_benefit_type = TransactionType.find_by(name: "housing_benefit") %>
diff --git a/app/views/shared/check_answers/_payments_summary.html.erb b/app/views/shared/check_answers/_payments_summary.html.erb
index 5876afb3bd..45742ece63 100644
--- a/app/views/shared/check_answers/_payments_summary.html.erb
+++ b/app/views/shared/check_answers/_payments_summary.html.erb
@@ -1,5 +1,16 @@
 <% read_only = false unless local_assigns.key?(:read_only) %>
 
+<% individual = partner ? "Partner" : "Applicant"
+   regular_payments = partner || @legal_aid_application.client_uploading_bank_statements?
+   url = payments_summary_partial_url(partner, credit, regular_payments, @legal_aid_application) %>
+<% if credit
+     payment_type = t(".credits_section_heading.#{individual.downcase}")
+     transaction_types = @credit_transaction_types
+   else
+     payment_type = t(".debits_section_heading.#{individual.downcase}")
+     transaction_types = @debit_transaction_types
+   end %>
+
 <%= govuk_summary_card(title: payment_type, heading_level: 3, html_attributes: { id: "app-check-your-answers__#{payment_type.parameterize(separator: '_')}" }) do |card| %>
   <% unless read_only %>
     <%= card.with_action { govuk_link_to(t("generic.change"), url, "aria-label": "#{t('generic.change')} #{payment_type}") } %>
diff --git a/app/views/shared/check_answers/_student_finance.html.erb b/app/views/shared/check_answers/_student_finance.html.erb
index 4a0bc35899..32cb44561f 100644
--- a/app/views/shared/check_answers/_student_finance.html.erb
+++ b/app/views/shared/check_answers/_student_finance.html.erb
@@ -1,3 +1,17 @@
+<% read_only = false unless local_assigns.key?(:read_only) %>
+
+<% if partner
+     individual = "Partner"
+     individual_with_determiner = t("generic.partner")
+     model = @legal_aid_application.partner
+     url = providers_legal_aid_application_partners_student_finance_path(@legal_aid_application)
+   else
+     individual = "Client"
+     individual_with_determiner = t("generic.client")
+     model = @legal_aid_application.applicant
+     url = providers_legal_aid_application_means_student_finance_path(@legal_aid_application)
+   end %>
+
 <%= govuk_summary_card(title: t(".heading"), heading_level: 3, html_attributes: { id: "app-check-your-answers__#{model.class.to_s.downcase}__student_finance" }) do |card| %>
   <% unless read_only %>
     <%= card.with_action { govuk_link_to(t("generic.change"), url, "aria-label": "#{t('generic.change')} #{individual_with_determiner}'s #{t('.heading')}") } %>
diff --git a/app/views/shared/review_application/_partner_income.erb b/app/views/shared/review_application/_partner_income.erb
deleted file mode 100644
index 38c8d1d4ba..0000000000
--- a/app/views/shared/review_application/_partner_income.erb
+++ /dev/null
@@ -1,94 +0,0 @@
-<h2 class="govuk-heading-l"><%= t(".income-heading") %></h2>
-
-<!-- UPLOADED BANK STATEMENTS -->
-
-<% if @legal_aid_application.partner_uploading_bank_statements? %>
-  <%= render("shared/check_answers/bank_statements", bank_statements: @legal_aid_application.attachments.part_bank_state_evidence, read_only: true, partner: true) %>
-<% end %>
-
-<!-- EMPLOYMENT INCOME -->
-
-<section class="print-no-break">
-  <% if @legal_aid_application.partner.hmrc_employment_income? %>
-    <% if @legal_aid_application.partner.has_multiple_employments? %>
-      <%= render("shared/check_answers/full_employment_details", read_only: true, partner: true,) %>
-    <% else %>
-      <%= render "shared/check_answers/employed_income", read_only: true, partner: true %>
-    <% end %>
-  <% elsif @legal_aid_application.partner.employed? %>
-    <%= render("shared/check_answers/full_employment_details", read_only: true, partner: false,) %>
-  <% end %>
-</section>
-
-<!-- BENEFITS -->
-
-<% if @legal_aid_application.uploading_bank_statements? %>
-  <%= render("shared/check_answers/benefits_income",
-             transactions_for: "partner",
-             individual: @legal_aid_application.partner,
-             state_benefits: @legal_aid_application.partner.state_benefits,
-             read_only: true) %>
-<% end %>
-
-<!-- INCOME -->
-
-<section class="print-no-break">
-  <%= render(
-        "shared/check_answers/payments_summary",
-        payment_type: t(".credits-section-heading"),
-        url: @legal_aid_application.partner_uploading_bank_statements? ? :regular_incomes : :identify_types_of_incomes,
-        transaction_types: TransactionType.credits.without_disregarded_benefits.without_benefits,
-        read_only: true,
-        individual: "Partner",
-      ) %>
-</section>
-
-<!-- CASH INCOME -->
-
-<section class="print-no-break">
-  <%= render(
-        "shared/check_answers/cash_payments",
-        read_only: true,
-        individual: "Partner",
-        individual_with_determiner: t("generic.partner"),
-        type: :income,
-      ) %>
-</section>
-
-<!-- STUDENT FINANCE -->
-
-<%= render(
-      "shared/check_answers/student_finance",
-      individual: "Partner",
-      individual_with_determiner: t("generic.partner"),
-      model: @legal_aid_application.partner,
-      read_only: true,
-    ) %>
-
-<!-- OUTGOINGS -->
-
-<section class="print-no-break">
-  <h2 class="govuk-heading-l"><%= t(".outgoings-heading") %></h2>
-
-  <%= render(
-        "shared/check_answers/payments_summary",
-        payment_type: t(".debits-section-heading"),
-        url: @legal_aid_application.partner_uploading_bank_statements? ? :regular_outgoings : :identify_types_of_outgoings,
-        transaction_types: TransactionType.debits,
-        read_only: true,
-        individual: "Partner",
-        ) %>
-</section>
-
-<!-- CASH PAYMENTS -->
-
-<section class="print-no-break">
-  <%= render(
-        "shared/check_answers/cash_payments",
-        read_only: true,
-        url: providers_legal_aid_application_means_cash_outgoing_path,
-        individual: "Partner",
-        individual_with_determiner: t("generic.partner"),
-        type: :outgoings,
-        ) %>
-</section>
diff --git a/app/views/shared/review_application/_questions_and_answers.html.erb b/app/views/shared/review_application/_questions_and_answers.html.erb
index 081aa669f3..0d6090c41e 100644
--- a/app/views/shared/review_application/_questions_and_answers.html.erb
+++ b/app/views/shared/review_application/_questions_and_answers.html.erb
@@ -57,11 +57,7 @@
     <%= render("providers/means/check_income_answers/partner_income_assessment", read_only: true) if @legal_aid_application.applicant.has_partner_with_no_contrary_interest? %>
 
     <% if @legal_aid_application.housing_payments? %>
-      <%= render(
-            "shared/check_answers/housing_benefit",
-            read_only: true,
-            partner: @legal_aid_application.applicant.has_partner_with_no_contrary_interest?,
-          ) %>
+      <%= render("shared/check_answers/housing_benefit", read_only: true, partner: @legal_aid_application.applicant.has_partner_with_no_contrary_interest?) %>
     <% end %>
 
     <h2 class="govuk-heading-l"><%= t("providers.means.check_income_answers.dependants.heading-h2") %></h2>
diff --git a/config/locales/en/providers.yml b/config/locales/en/providers.yml
index 13087c2a0f..8f441d614b 100644
--- a/config/locales/en/providers.yml
+++ b/config/locales/en/providers.yml
@@ -1146,8 +1146,6 @@ en:
         applicant_income_assessment:
           income-heading: Your client's income
           outgoings-heading: Your client's outgoings
-          credits-section-heading: Payments your client gets
-          debits-section-heading: Payments your client pays
         partner_income_assessment:
           income-heading: The partner's income
           outgoings-heading: The partner's outgoings
diff --git a/config/locales/en/shared.yml b/config/locales/en/shared.yml
index e90e39ab93..7f29557988 100644
--- a/config/locales/en/shared.yml
+++ b/config/locales/en/shared.yml
@@ -565,6 +565,13 @@ en:
         no_transactions: "No"
         html:
           no_transactions: "No"
+      payments_summary:
+        credits_section_heading:
+          applicant: Payments your client gets
+          partner: Payments the partner gets
+        debits_section_heading:
+          applicant: Payments your client pays
+          partner: Payments the partner pays
       student_finance:
         heading: Student finance
         question: "%{individual} gets student finance?"
@@ -892,8 +899,7 @@ en:
       partner_income:
         income-heading: The partner's income
         outgoings-heading: The partner's outgoings
-        credits-section-heading: Payments the partner gets
-        debits-section-heading: Payments the partner pays
+
       questions_and_answers:
         client_name: Client
         case_reference_html: <abbr title='Legal Aid Agency'>LAA</abbr> reference
diff --git a/features/providers/partner_means_assessment/review_and_print.feature b/features/providers/partner_means_assessment/review_and_print.feature
index c857db0815..32883afbc9 100644
--- a/features/providers/partner_means_assessment/review_and_print.feature
+++ b/features/providers/partner_means_assessment/review_and_print.feature
@@ -17,7 +17,7 @@ Feature: Review and print your application
 
       | h2  | Cases linked to this one |
       | h3  | Linking |
-      
+
       | h2  | What you're applying for |
       | h3  | Extend, variation or discharge - Part IV |
       | h3  | Variation or discharge under section 5 protection from harassment act 1997 |
@@ -47,7 +47,7 @@ Feature: Review and print your application
       | h2  | The partner's outgoings |
       | h3  | Payments the partner pays |
       | h3  | Payments the partner pays in cash|
-      
+
       | h2  | Housing benefit |
       | h3  | Housing benefit details |
 
@@ -65,7 +65,7 @@ Feature: Review and print your application
       | h2  | Bank accounts |
       | h3  | Your client's accounts |
       | h3  | The partner's accounts |
-      
+
       | h2  | Savings and assets |
       | h3  | Your client or their partner's savings or investments |
       | h3  | Your client or their partner's assets |
@@ -87,7 +87,7 @@ Feature: Review and print your application
 
       | h2  | Variation or discharge under section 5 protection from harassment act 1997 |
       | h3  | Chances of success |
-      
+
       | h2  | Print your application |
 
     Then the following sections should not exist:
@@ -114,7 +114,7 @@ Feature: Review and print your application
 
       | h2  | Cases linked to this one |
       | h3  | Linking |
-      
+
       | h2  | What you're applying for |
       | h3  | Variation or discharge under section 5 protection from harassment act 1997 |
       | h3  | Extend, variation or discharge - Part IV |
@@ -157,7 +157,7 @@ Feature: Review and print your application
       | h3  | Money in bank accounts |
       | h3  | The partner's accounts |
       | h3  | Your client's offline accounts |
-      
+
       | h2  | Savings and assets |
       | h3  | Your client or their partner's savings or investments |
       | h3  | Your client or their partner's assets |
@@ -179,7 +179,7 @@ Feature: Review and print your application
 
       | h2  | Variation or discharge under section 5 protection from harassment act 1997 |
       | h3  | Chances of success |
-      
+
       | h2  | Print your application |
 
     Then the following sections should not exist:
@@ -202,7 +202,7 @@ Feature: Review and print your application
 
       | h2  | Cases linked to this one |
       | h3  | Linking |
-      
+
       | h2  | What you're applying for |
       | h3  | Extend, variation or discharge - Part IV |
       | h3  | Variation or discharge under section 5 protection from harassment act 1997 |
@@ -241,7 +241,7 @@ Feature: Review and print your application
 
       | h2  | Variation or discharge under section 5 protection from harassment act 1997 |
       | h3  | Chances of success |
-      
+
       | h2  | Print your application |
 
     Then the following sections should not exist:
@@ -251,11 +251,11 @@ Feature: Review and print your application
       | h3  | Payments your client gets |
       | h3  | Payments your client gets in cash |
       | h3  | Student finance |
-      
+
       | h2  | Your client's outgoings |
       | h3  | Payments your client pays |
       | h3  | Payments your client pays in cash|
-      
+
       | h2  | Housing Benefit |
       | h3  | Housing benefit details |
 
diff --git a/spec/helpers/payments_summary_partial_url_helper_spec.rb b/spec/helpers/payments_summary_partial_url_helper_spec.rb
new file mode 100644
index 0000000000..22a78c5c7b
--- /dev/null
+++ b/spec/helpers/payments_summary_partial_url_helper_spec.rb
@@ -0,0 +1,68 @@
+require "rails_helper"
+
+RSpec.describe PaymentsSummaryPartialUrlHelper do
+  let(:application) { create(:legal_aid_application) }
+  let(:partner) { false }
+  let(:credit) { false }
+  let(:regular_payments) { false }
+
+  describe ".payments_summary_partial_url" do
+    subject(:helper_method) { payments_summary_partial_url(partner, credit, regular_payments, application) }
+
+    context "when partner=true and credit=true" do
+      let(:partner) { true }
+      let(:credit) { true }
+
+      it "returns the url for partner regular incomes page" do
+        expect(helper_method).to match "/providers/applications/#{application.id}/partners/regular_incomes?locale=en"
+      end
+    end
+
+    context "when partner=true and credit=false" do
+      let(:partner) { true }
+      let(:credit) { false }
+
+      it "returns the url for partner regular outgoings page" do
+        expect(helper_method).to match "/providers/applications/#{application.id}/partners/regular_outgoings?locale=en"
+      end
+    end
+
+    context "when partner=false and credit=true and regular_payments=false" do
+      let(:partner) { false }
+      let(:credit) { true }
+
+      it "returns the url for client identify types of incomes page" do
+        expect(helper_method).to match "/providers/applications/#{application.id}/means/identify_types_of_income?locale=en"
+      end
+    end
+
+    context "when partner=false and credit=false and regular_payments=false" do
+      let(:partner) { false }
+      let(:credit) { false }
+
+      it "returns the url for client identify types of outgoings page" do
+        expect(helper_method).to match "/providers/applications/#{application.id}/means/identify_types_of_outgoing?locale=en"
+      end
+    end
+
+    context "when partner=false and credit=true and regular_payments=true" do
+      let(:partner) { false }
+      let(:credit) { true }
+      let(:regular_payments) { true }
+
+      it "returns the url for client regular outgoings page" do
+        expect(helper_method).to match "/providers/applications/#{application.id}/means/regular_incomes?locale=en"
+      end
+    end
+
+    context "when partner=false and credit=false and regular_payments=true" do
+      let(:partner) { false }
+      let(:credit) { false }
+      let(:regular_payments) { true }
+
+      it "returns the url for client regular outgoings page" do
+        expect(helper_method).to match "/providers/applications/#{application.id}/means/regular_outgoings?locale=en"
+      end
+    end
+  end
+end


Reviews:
user: login: agoldstone93
body: Looks good, only one non blocking comment
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-22T09:26:19Z
user: login: naseberry
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-22T10:02:28Z
user: login: naseberry
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-22T10:07:37Z
user: login: agoldstone93
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-22T10:25:22Z
user: login: RoseSAK
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-22T15:52:20Z
user: login: RoseSAK
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-23T13:13:09Z
user: login: agoldstone93
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-23T13:24:14Z
user: login: RoseSAK
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-29T09:33:59Z

Review comments:
diff_hunk: @@ -5,89 +5,35 @@
 <section class="applicant">
   <h2 class="govuk-heading-l"><%= t(".income-heading") %></h2>
 
-  <% if bank_statement_upload %>
-    <%= render("shared/check_answers/bank_statements", bank_statements: @legal_aid_application.attachments.bank_statement_evidence, read_only:, partner: false) %>
-  <% elsif @legal_aid_application.cfe_result.present? && display_employment_income? %>
-    <%= render "shared/employment_income_table" %>
-  <% end %>
+  <%= render("shared/check_answers/bank_statements", partner: false) if @legal_aid_application.client_uploading_bank_statements? %>
+
+  <%= render "shared/employment_income_table" if @legal_aid_application.cfe_result.present? && display_employment_income? %>
 
   <% if @legal_aid_application.applicant.hmrc_employment_income? %>
     <% if @legal_aid_application.applicant.has_multiple_employments? %>
-      <%= render(
-            "shared/check_answers/full_employment_details",
-            individual: "Your client",
-            read_only:,
-            partner: false,
-          ) %>
+      <%= render("shared/check_answers/full_employment_details", partner: false) %>
     <% else %>
-      <%= render "shared/check_answers/employed_income", partner: false, read_only: %>
+      <%= render("shared/check_answers/employed_income", partner: false) %>
     <% end %>
   <% elsif @legal_aid_application.applicant.employed? %>
-    <%= render(
-          "shared/check_answers/full_employment_details",
-          individual: "Your client",
-          read_only:,
-          partner: false,
-        ) %>
+    <%= render("shared/check_answers/full_employment_details", partner: false) %>
   <% end %>
 
-  <% if bank_statement_upload %>
-    <%= render("shared/check_answers/benefits_income",
-               transactions_for: "applicant",
-               individual: @legal_aid_application.applicant,
-               state_benefits: @legal_aid_application.applicant.state_benefits,
-               version: "means",
-               read_only:) %>
-  <% end %>
+  <%= render("shared/check_answers/benefits_income", partner: false) if @legal_aid_application.client_uploading_bank_statements? %>
 
-  <%= render(
-        "shared/check_answers/payments_summary",
-        payment_type: t(".credits-section-heading"),
-        url: bank_statement_upload ? providers_legal_aid_application_means_regular_incomes_path(@legal_aid_application) : providers_legal_aid_application_means_identify_types_of_income_path(@legal_aid_application),
-        transaction_types: @credit_transaction_types,
-        individual: "Applicant",
-        read_only:,
-      ) %>
+  <!--  Income payments-->
+  <%= render("shared/check_answers/payments_summary", credit: true, partner: false) %>
 
   <% if bank_statement_upload %>
-    <%= render(
-          "shared/check_answers/cash_payments",
-          url: providers_legal_aid_application_means_cash_income_path,
-          individual: "Applicant",
-          individual_with_determiner: t("generic.client"),
-          type: :income,
-          read_only:,
-        ) %>
+    <%= render("shared/check_answers/cash_payments", partner: false, type: :income) %>
   <% end %>
 
-  <%= render(
-        "shared/check_answers/student_finance",
-        individual: "Client",
-        individual_with_determiner: t("generic.client"),
-        model: @legal_aid_application.applicant,
-        url: providers_legal_aid_application_means_student_finance_path(@legal_aid_application),
-        read_only:,
-      ) %>
+  <%= render("shared/check_answers/student_finance", partner: false) %>
 
   <h2 class="govuk-heading-l"><%= t(".outgoings-heading") %></h2>
 
-  <%= render(
-        "shared/check_answers/payments_summary",
-        payment_type: t(".debits-section-heading"),
-        url: bank_statement_upload ? providers_legal_aid_application_means_regular_outgoings_path(@legal_aid_application) : providers_legal_aid_application_means_identify_types_of_outgoing_path(@legal_aid_application),
-        transaction_types: @debit_transaction_types,
-        individual: "Applicant",
-        read_only:,
-      ) %>
+  <!--  Outgoing payments-->
+  <%= render("shared/check_answers/payments_summary", credit: false, partner: false, read_only:) %>
path: app/views/providers/means/check_income_answers/_applicant_income_assessment.html.erb
user: login: agoldstone93
body: ~~You've got rid of all the other `read_only`s in this page. Is this one supposed to stay? If it's going, can you also get rid of the line to set the `read_only` variable in line 1?~~
created_at: 2025-04-22T07:53:45Z
author_association: CONTRIBUTOR
diff_hunk: @@ -5,89 +5,35 @@
 <section class="applicant">
   <h2 class="govuk-heading-l"><%= t(".income-heading") %></h2>
 
-  <% if bank_statement_upload %>
-    <%= render("shared/check_answers/bank_statements", bank_statements: @legal_aid_application.attachments.bank_statement_evidence, read_only:, partner: false) %>
-  <% elsif @legal_aid_application.cfe_result.present? && display_employment_income? %>
-    <%= render "shared/employment_income_table" %>
-  <% end %>
+  <%= render("shared/check_answers/bank_statements", partner: false) if @legal_aid_application.client_uploading_bank_statements? %>
path: app/views/providers/means/check_income_answers/_applicant_income_assessment.html.erb
user: login: agoldstone93
body: On lines 27 and 38 you've still used the `bank_statement_upload` variable. I think either is fine but are you ok to make them the same for consistency, or is there something I'm missing?
created_at: 2025-04-22T07:57:23Z
author_association: CONTRIBUTOR
diff_hunk: @@ -5,89 +5,35 @@
 <section class="applicant">
   <h2 class="govuk-heading-l"><%= t(".income-heading") %></h2>
 
-  <% if bank_statement_upload %>
-    <%= render("shared/check_answers/bank_statements", bank_statements: @legal_aid_application.attachments.bank_statement_evidence, read_only:, partner: false) %>
-  <% elsif @legal_aid_application.cfe_result.present? && display_employment_income? %>
-    <%= render "shared/employment_income_table" %>
-  <% end %>
+  <%= render("shared/check_answers/bank_statements", partner: false) if @legal_aid_application.client_uploading_bank_statements? %>
+
+  <%= render "shared/employment_income_table" if @legal_aid_application.cfe_result.present? && display_employment_income? %>
 
   <% if @legal_aid_application.applicant.hmrc_employment_income? %>
     <% if @legal_aid_application.applicant.has_multiple_employments? %>
-      <%= render(
-            "shared/check_answers/full_employment_details",
-            individual: "Your client",
-            read_only:,
-            partner: false,
-          ) %>
+      <%= render("shared/check_answers/full_employment_details", partner: false) %>
     <% else %>
-      <%= render "shared/check_answers/employed_income", partner: false, read_only: %>
+      <%= render("shared/check_answers/employed_income", partner: false) %>
     <% end %>
   <% elsif @legal_aid_application.applicant.employed? %>
-    <%= render(
-          "shared/check_answers/full_employment_details",
-          individual: "Your client",
-          read_only:,
-          partner: false,
-        ) %>
+    <%= render("shared/check_answers/full_employment_details", partner: false) %>
   <% end %>
 
-  <% if bank_statement_upload %>
-    <%= render("shared/check_answers/benefits_income",
-               transactions_for: "applicant",
-               individual: @legal_aid_application.applicant,
-               state_benefits: @legal_aid_application.applicant.state_benefits,
-               version: "means",
-               read_only:) %>
-  <% end %>
+  <%= render("shared/check_answers/benefits_income", partner: false) if @legal_aid_application.client_uploading_bank_statements? %>
 
-  <%= render(
-        "shared/check_answers/payments_summary",
-        payment_type: t(".credits-section-heading"),
-        url: bank_statement_upload ? providers_legal_aid_application_means_regular_incomes_path(@legal_aid_application) : providers_legal_aid_application_means_identify_types_of_income_path(@legal_aid_application),
-        transaction_types: @credit_transaction_types,
-        individual: "Applicant",
-        read_only:,
-      ) %>
+  <!--  Income payments-->
+  <%= render("shared/check_answers/payments_summary", credit: true, partner: false) %>
 
   <% if bank_statement_upload %>
-    <%= render(
-          "shared/check_answers/cash_payments",
-          url: providers_legal_aid_application_means_cash_income_path,
-          individual: "Applicant",
-          individual_with_determiner: t("generic.client"),
-          type: :income,
-          read_only:,
-        ) %>
+    <%= render("shared/check_answers/cash_payments", partner: false, type: :income) %>
   <% end %>
 
-  <%= render(
-        "shared/check_answers/student_finance",
-        individual: "Client",
-        individual_with_determiner: t("generic.client"),
-        model: @legal_aid_application.applicant,
-        url: providers_legal_aid_application_means_student_finance_path(@legal_aid_application),
-        read_only:,
-      ) %>
+  <%= render("shared/check_answers/student_finance", partner: false) %>
 
   <h2 class="govuk-heading-l"><%= t(".outgoings-heading") %></h2>
 
-  <%= render(
-        "shared/check_answers/payments_summary",
-        payment_type: t(".debits-section-heading"),
-        url: bank_statement_upload ? providers_legal_aid_application_means_regular_outgoings_path(@legal_aid_application) : providers_legal_aid_application_means_identify_types_of_outgoing_path(@legal_aid_application),
-        transaction_types: @debit_transaction_types,
-        individual: "Applicant",
-        read_only:,
-      ) %>
+  <!--  Outgoing payments-->
+  <%= render("shared/check_answers/payments_summary", credit: false, partner: false, read_only:) %>
path: app/views/providers/means/check_income_answers/_applicant_income_assessment.html.erb
user: login: agoldstone93
body: Ah, I'm on the next commit so ignore this 
created_at: 2025-04-22T08:34:32Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,9 @@
+module PaymentsSummaryPartialUrlHelper
+  def payments_summary_partial_url(partner, credit, regular_payments, *)
+    version = partner == true ? "partners" : "means"
+    payment_type = credit == true ? "income" : "outgoing"
+    page = regular_payments ? "regular_#{payment_type}s" : "identify_types_of_#{payment_type}"
+    url = "providers_legal_aid_application_#{version}_#{page}_path"
+    Rails.application.routes.url_helpers.send(url, *)
+  end
+end
path: app/helpers/payments_summary_partial_url_helper.rb
user: login: naseberry
body: Should we spec for this helper?
created_at: 2025-04-22T10:02:28Z
author_association: CONTRIBUTOR
diff_hunk: @@ -5,89 +5,35 @@
 <section class="applicant">
   <h2 class="govuk-heading-l"><%= t(".income-heading") %></h2>
 
-  <% if bank_statement_upload %>
-    <%= render("shared/check_answers/bank_statements", bank_statements: @legal_aid_application.attachments.bank_statement_evidence, read_only:, partner: false) %>
-  <% elsif @legal_aid_application.cfe_result.present? && display_employment_income? %>
-    <%= render "shared/employment_income_table" %>
-  <% end %>
+  <%= render("shared/check_answers/bank_statements", partner: false, read_only:) if @legal_aid_application.client_uploading_bank_statements? %>
+
+  <%= render "shared/employment_income_table" if @legal_aid_application.cfe_result.present? && display_employment_income? %>
 
   <% if @legal_aid_application.applicant.hmrc_employment_income? %>
     <% if @legal_aid_application.applicant.has_multiple_employments? %>
-      <%= render(
-            "shared/check_answers/full_employment_details",
-            individual: "Your client",
-            read_only:,
-            partner: false,
-          ) %>
+      <%= render("shared/check_answers/full_employment_details", partner: false, read_only:) %>
     <% else %>
-      <%= render "shared/check_answers/employed_income", partner: false, read_only: %>
+      <%= render("shared/check_answers/employed_income", partner: false, read_only:) %>
     <% end %>
   <% elsif @legal_aid_application.applicant.employed? %>
-    <%= render(
-          "shared/check_answers/full_employment_details",
-          individual: "Your client",
-          read_only:,
-          partner: false,
-        ) %>
+    <%= render("shared/check_answers/full_employment_details", partner: false, read_only:) %>
   <% end %>
 
-  <% if bank_statement_upload %>
-    <%= render("shared/check_answers/benefits_income",
-               transactions_for: "applicant",
-               individual: @legal_aid_application.applicant,
-               state_benefits: @legal_aid_application.applicant.state_benefits,
-               version: "means",
-               read_only:) %>
-  <% end %>
+  <%= render("shared/check_answers/benefits_income", partner: false, read_only:) if @legal_aid_application.client_uploading_bank_statements? %>
 
-  <%= render(
-        "shared/check_answers/payments_summary",
-        payment_type: t(".credits-section-heading"),
-        url: bank_statement_upload ? providers_legal_aid_application_means_regular_incomes_path(@legal_aid_application) : providers_legal_aid_application_means_identify_types_of_income_path(@legal_aid_application),
-        transaction_types: @credit_transaction_types,
-        individual: "Applicant",
-        read_only:,
-      ) %>
+  <!--  Income payments-->
+  <%= render("shared/check_answers/payments_summary", credit: true, partner: false, read_only:) %>
 
   <% if bank_statement_upload %>
-    <%= render(
-          "shared/check_answers/cash_payments",
-          url: providers_legal_aid_application_means_cash_income_path,
-          individual: "Applicant",
-          individual_with_determiner: t("generic.client"),
-          type: :income,
-          read_only:,
-        ) %>
+    <%= render("shared/check_answers/cash_payments", partner: false, type: :income, read_only:) %>
   <% end %>
 
-  <%= render(
-        "shared/check_answers/student_finance",
-        individual: "Client",
-        individual_with_determiner: t("generic.client"),
-        model: @legal_aid_application.applicant,
-        url: providers_legal_aid_application_means_student_finance_path(@legal_aid_application),
-        read_only:,
-      ) %>
+  <%= render("shared/check_answers/student_finance", partner: false, read_only:) %>
 
   <h2 class="govuk-heading-l"><%= t(".outgoings-heading") %></h2>
 
-  <%= render(
-        "shared/check_answers/payments_summary",
-        payment_type: t(".debits-section-heading"),
-        url: bank_statement_upload ? providers_legal_aid_application_means_regular_outgoings_path(@legal_aid_application) : providers_legal_aid_application_means_identify_types_of_outgoing_path(@legal_aid_application),
-        transaction_types: @debit_transaction_types,
-        individual: "Applicant",
-        read_only:,
-      ) %>
+  <!--  Outgoing payments-->
+  <%= render("shared/check_answers/payments_summary", credit: false, partner: false, read_only:) %>
 
-  <% if bank_statement_upload %>
-    <%= render(
-          "shared/check_answers/cash_payments",
-          url: providers_legal_aid_application_means_cash_outgoing_path,
-          individual: "Applicant",
-          individual_with_determiner: t("generic.client"),
-          type: :outgoings,
-          read_only:,
-        ) %>
-  <% end %>
+  <%= render("shared/check_answers/cash_payments", partner: false, type: :outgoings, read_only:) if bank_statement_upload %>
path: app/views/providers/means/check_income_answers/_applicant_income_assessment.html.erb
user: login: naseberry
body: Nit: Is it possible to have an Inline or Block pattern? Line 27 uses a conditional block, this line uses the condition inline.
created_at: 2025-04-22T10:07:37Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1,12 +1,14 @@
 <% read_only = false unless local_assigns.key?(:read_only) %>
 
-<% url = if partner
-           providers_legal_aid_application_partners_bank_statements_path(@legal_aid_application)
-         else
-           providers_legal_aid_application_bank_statements_path(@legal_aid_application)
-         end %>
-
-<% individual = partner ? "Partner" : "Client" %>
+<% if partner
+     individual = "Partner"
path: app/views/shared/check_answers/_bank_statements.html.erb
user: login: agoldstone93
body: Could we set each of these on the controller(s - i guess for each cya page) rather than in each of the partials?
created_at: 2025-04-22T10:25:22Z
author_association: CONTRIBUTOR
diff_hunk: @@ -5,89 +5,35 @@
 <section class="applicant">
   <h2 class="govuk-heading-l"><%= t(".income-heading") %></h2>
 
-  <% if bank_statement_upload %>
-    <%= render("shared/check_answers/bank_statements", bank_statements: @legal_aid_application.attachments.bank_statement_evidence, read_only:, partner: false) %>
-  <% elsif @legal_aid_application.cfe_result.present? && display_employment_income? %>
-    <%= render "shared/employment_income_table" %>
-  <% end %>
+  <%= render("shared/check_answers/bank_statements", partner: false) if @legal_aid_application.client_uploading_bank_statements? %>
path: app/views/providers/means/check_income_answers/_applicant_income_assessment.html.erb
user: login: RoseSAK
body: Ah yes thanks good catch 
created_at: 2025-04-22T15:52:20Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1,12 +1,14 @@
 <% read_only = false unless local_assigns.key?(:read_only) %>
 
-<% url = if partner
-           providers_legal_aid_application_partners_bank_statements_path(@legal_aid_application)
-         else
-           providers_legal_aid_application_bank_statements_path(@legal_aid_application)
-         end %>
-
-<% individual = partner ? "Partner" : "Client" %>
+<% if partner
+     individual = "Partner"
path: app/views/shared/check_answers/_bank_statements.html.erb
user: login: RoseSAK
body: How do you mean? Most of these partials will display twice on the CYA page, once for the client and once for the partner, so the individual needs to be different in each case. I might have misunderstood what you're suggesting though?
created_at: 2025-04-23T13:13:09Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1,12 +1,14 @@
 <% read_only = false unless local_assigns.key?(:read_only) %>
 
-<% url = if partner
-           providers_legal_aid_application_partners_bank_statements_path(@legal_aid_application)
-         else
-           providers_legal_aid_application_bank_statements_path(@legal_aid_application)
-         end %>
-
-<% individual = partner ? "Partner" : "Client" %>
+<% if partner
+     individual = "Partner"
path: app/views/shared/check_answers/_bank_statements.html.erb
user: login: agoldstone93
body: @RoseSAK Hmm yeah maybe you're right. It just feels like there's a lot of logic in the view and I wondered whether it could be moved elsewhere to clean it up a bit and avoid writing very similar stuff in each view, such as:

```
if partner
  individual = "partner"
  individual_with_determiner = t("generic.partner")
else
 individual = "Client"
 individual_with_determiner = t("generic.client")
end
```

Not a blocking comment or a major issue though
created_at: 2025-04-23T13:24:14Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1,12 +1,14 @@
 <% read_only = false unless local_assigns.key?(:read_only) %>
 
-<% url = if partner
-           providers_legal_aid_application_partners_bank_statements_path(@legal_aid_application)
-         else
-           providers_legal_aid_application_bank_statements_path(@legal_aid_application)
-         end %>
-
-<% individual = partner ? "Partner" : "Client" %>
+<% if partner
+     individual = "Partner"
path: app/views/shared/check_answers/_bank_statements.html.erb
user: login: RoseSAK
body: Yeah that would be good, I'll merge this and write a separate ticket for that 
created_at: 2025-04-29T09:33:59Z
author_association: CONTRIBUTOR

PR comments:
user: login: sonarqubecloud[bot]
created_at: 2025-04-23T14:21:33Z
body: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=ministryofjustice_laa-apply-for-legal-aid&pullRequest=7743) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=ministryofjustice_laa-apply-for-legal-aid&pullRequest=7743&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=ministryofjustice_laa-apply-for-legal-aid&pullRequest=7743&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=ministryofjustice_laa-apply-for-legal-aid&pullRequest=7743&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=ministryofjustice_laa-apply-for-legal-aid&pullRequest=7743&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=ministryofjustice_laa-apply-for-legal-aid&pullRequest=7743&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=ministryofjustice_laa-apply-for-legal-aid&pullRequest=7743)


author_association: NONE