Repository: hmrc/income-tax-view-change-frontend
Pull request #2820: MISUV-9289 Adding 'charges to pay later' tab to Self Assessment page
Author: login: dnyuar
Created: 2025-03-25T15:39:16Z | Merged: 2025-03-27T15:08:10Z



Diff:
diff --git a/app/models/financialDetails/YourSelfAssessmentChargesViewModel.scala b/app/models/financialDetails/YourSelfAssessmentChargesViewModel.scala
index f78efb2ced..49ee384124 100644
--- a/app/models/financialDetails/YourSelfAssessmentChargesViewModel.scala
+++ b/app/models/financialDetails/YourSelfAssessmentChargesViewModel.scala
@@ -36,6 +36,31 @@ case class YourSelfAssessmentChargesViewModel(hasOverdueOrAccruingInterestCharge
   lazy val currentTaxYear: TaxYear = dateService.getCurrentTaxYear
 
   lazy val currentDate: LocalDate = dateService.getCurrentDate
+
+  def overdueChargesWithIndex: List[(ChargeItem, Int)] = {
+    ChargeItem.sortedOverdueOrAccruingInterestChargeList(whatYouOweChargesList).zipWithIndex
+  }
+
+  def chargesDueWithin30DaysWithIndex: List[(ChargeItem, Int)] = {
+    ChargeItem.chargesDueWithin30DaysList(whatYouOweChargesList).zipWithIndex
+  }
+
+  def chargesDueAfter30DaysWithIndex: List[(ChargeItem, Int)] = {
+    ChargeItem.chargesDueAfter30DaysList(whatYouOweChargesList).zipWithIndex
+  }
+
+  def chargesDueAfter30DaysListNonEmpty: Boolean = {
+    ChargeItem.chargesDueAfter30DaysList(whatYouOweChargesList).nonEmpty
+  }
+
+  def chargesDueWithin30DaysListNonEmpty: Boolean = {
+    ChargeItem.chargesDueWithin30DaysList(whatYouOweChargesList).nonEmpty
+  }
+
+  def overdueAccruingInterestOrOutstandingChargesListNonEmpty: Boolean = {
+    ChargeItem.overdueOrAccruingInterestChargeList(whatYouOweChargesList).nonEmpty ||
+      whatYouOweChargesList.overdueOutstandingCharges.nonEmpty
+  }
 }
 
 object YourSelfAssessmentChargesViewModel {
diff --git a/app/views/YourSelfAssessmentCharges.scala.html b/app/views/YourSelfAssessmentCharges.scala.html
index 4d5b807c7c..4a6b330651 100644
--- a/app/views/YourSelfAssessmentCharges.scala.html
+++ b/app/views/YourSelfAssessmentCharges.scala.html
@@ -215,7 +215,7 @@
     @tableRowWithInterest(rowId: String, chargeItem: ChargeItem, index: Int, id: String) = {
         <tr class="govuk-table__row" id="@rowId">
             <td class="govuk-table__cell">
-                @getDisplayDueDate(chargeItem).toLongDate.toNonBreaking
+                @getDisplayDueDate(chargeItem).toLongDateShort.toNonBreaking
             </td>
             <td class="govuk-table__cell">
                 @getPaymentTypeEntry(chargeItem = chargeItem, isOverduePayment = true,
@@ -245,7 +245,7 @@
 @tableRowWithoutInterest(rowId: String, chargeItem: ChargeItem, index: Int, id: String) = {
 <tr class="govuk-table__row" id="@rowId">
     <td class="govuk-table__cell">
-        @getDisplayDueDate(chargeItem).toLongDate.toNonBreaking
+        @getDisplayDueDate(chargeItem).toLongDateShort.toNonBreaking
     </td>
     <td class="govuk-table__cell">
         @getPaymentTypeEntry(chargeItem = chargeItem, isOverduePayment = false,
@@ -379,33 +379,35 @@ <h2 class="govuk-tabs__title">
                                     Contents
                                 </h2>
                                 <ul class="govuk-tabs__list">
-                                    @if(ChargeItem.overdueOrAccruingInterestChargeList(viewModel.whatYouOweChargesList).nonEmpty || viewModel.whatYouOweChargesList.overdueOutstandingCharges.nonEmpty) {
+                                    @if(viewModel.overdueAccruingInterestOrOutstandingChargesListNonEmpty) {
                                         <li class="govuk-tabs__list-item govuk-tabs__list-item--selected">
                                             <a class="govuk-tabs__tab" href="#charges-due-now">
                                             @getMessage("charges-due-now")
                                             </a>
                                         </li>
                                     }
-                                    @if(viewModel.whatYouOweChargesList.chargesDueWithin30DaysList.nonEmpty) {
+                                    @if(viewModel.chargesDueWithin30DaysListNonEmpty) {
                                     <li class="govuk-tabs__list-item">
                                         <a class="govuk-tabs__tab" href="#charges-due-in-30-days">
                                             @getMessage("charges-due-in-30-days")
                                         </a>
                                     </li>
                                     }
-                                    <li class="govuk-tabs__list-item govuk-tabs__list-item--selected">
-                                        <a class="govuk-tabs__tab" href="#placeholder">
-                                            Placeholder
-                                        </a>
-                                    </li>
+                                    @if(viewModel.chargesDueAfter30DaysListNonEmpty) {
+                                        <li class="govuk-tabs__list-item govuk-tabs__list-item--selected">
+                                            <a class="govuk-tabs__tab" href="#charges-due-later" id="charges-due-later">
+                                            @getMessage("charges-to-pay-later")
+                                            </a>
+                                        </li>
+                                    }
                                 </ul>
 
-                                @if(viewModel.whatYouOweChargesList.chargesDueWithin30DaysList.nonEmpty) {
+                                @if(viewModel.chargesDueWithin30DaysListNonEmpty) {
                                 <div class="govuk-tabs__panel" id="charges-due-in-30-days">
                                     <table class="govuk-table">
                                         @tableHead("due-in-30-days-payments-table-head", false)
                                         <tbody class="govuk-table__body">
-                                        @for((charge, index) <- ChargeItem.chargesDueWithin30DaysList(viewModel.whatYouOweChargesList).zipWithIndex) {
+                                        @for((charge, index) <- viewModel.chargesDueWithin30DaysWithIndex) {
                                         @tableRowWithoutInterest(s"due-30-days-$index", charge, index, "taxYearSummary-link")
                                         }
                                         <tr class="govuk-table__header">
@@ -451,7 +453,7 @@ <h2 class="govuk-tabs__title">
                                                 @if(viewModel.whatYouOweChargesList.bcdChargeTypeDefinedAndGreaterThanZero) {
                                                     <tr class="govuk-table__row" id="balancing-charge-type-0">
                                                         <td class="govuk-table__cell">@{
-                                                            viewModel.whatYouOweChargesList.getRelevantDueDate.toLongDate
+                                                            viewModel.whatYouOweChargesList.getRelevantDueDate.toLongDateShort
                                                         }</td>
                                                         <td class="govuk-table__cell">
                                                             @p(id = Some("balancing-charge"))(Html(getMessage("balancingCharge.text")))
@@ -471,7 +473,7 @@ <h2 class="govuk-tabs__title">
                                                         }</td>
                                                     </tr>
                                                 }
-                                                @for((charge, index) <- ChargeItem.sortedOverdueOrAccruingInterestChargeList(viewModel.whatYouOweChargesList).zipWithIndex) {
+                                                @for((charge, index) <- viewModel.overdueChargesWithIndex) {
                                                     @tableRowWithInterest(s"due-$index", charge, index, "taxYearSummary-link")
                                                 }
                                                 <tr class="govuk-table__header">
@@ -507,9 +509,16 @@ <h2 class="govuk-tabs__title">
                                         }
                                     </div>
                                 }
-                                <div class="govuk-tabs__panel" id="placeholder">
-                                    <h2 class="govuk-heading-l">Placeholder</h2>
-                                </div>
+                            <div class="govuk-tabs__panel govuk-tabs__panel--hidden" id="charges-due-later">
+                                <table class="govuk-table">
+                                    @tableHead("charges-due-later-table-head", showInterest = false)
+                                    <tbody class="govuk-table__body">
+                                    @for((charge, index) <- viewModel.chargesDueAfter30DaysWithIndex) {
+                                        @tableRowWithoutInterest(s"due-$index", charge, index, "taxYearSummary-link")
+                                    }
+                                    </tbody>
+                                </table>
+                            </div>
                             </div>
 
                             @getPaymentPlanSection
diff --git a/conf/messages b/conf/messages
index 2c3adeb994..afe0f435a2 100644
--- a/conf/messages
+++ b/conf/messages
@@ -904,6 +904,7 @@ selfAssessmentCharges.charges-due-now-with-amount                  = Charges due
 selfAssessmentCharges.no-payments-due                              = You have no payments due.
 selfAssessmentCharges.no-payments-due-agent                        = Your client has no payments due.
 selfAssessmentCharges.charges-due-now                              = Charges due now
+selfAssessmentCharges.charges-to-pay-later                         = Charges to pay later
 selfAssessmentCharges.tableHead.due-date                           = Due date
 selfAssessmentCharges.tableHead.tax-year                           = Tax year
 selfAssessmentCharges.tableHead.type-of-charge                     = Type of charge
diff --git a/conf/messages.cy b/conf/messages.cy
index bacba4012d..746832129e 100644
--- a/conf/messages.cy
+++ b/conf/messages.cy
@@ -904,6 +904,7 @@ selfAssessmentCharges.charges-due-now-with-amount                  = Charges due
 selfAssessmentCharges.no-payments-due                              = Nid oes gennych taliadau sy’n ddyledus.
 selfAssessmentCharges.no-payments-due-agent                        = Nid oes gan eich cleient daliadau sy’n ddyledus.
 selfAssessmentCharges.charges-due-now                              = Charges due now
+selfAssessmentCharges.charges-to-pay-later                         = Charges to pay later
 selfAssessmentCharges.tableHead.due-date                           = Dyddiad dyledus
 selfAssessmentCharges.tableHead.tax-year                           = Blwyddyn dreth
 selfAssessmentCharges.tableHead.type-of-charge                     = Type of charge
diff --git a/test/testConstants/ChargeConstants.scala b/test/testConstants/ChargeConstants.scala
index b763820098..c8a49434b7 100644
--- a/test/testConstants/ChargeConstants.scala
+++ b/test/testConstants/ChargeConstants.scala
@@ -21,7 +21,7 @@ import models.financialDetails._
 import models.incomeSourceDetails.TaxYear
 import models.outstandingCharges.{OutstandingChargeModel, OutstandingChargesModel}
 import services.{DateService, DateServiceInterface}
-import testConstants.FinancialDetailsTestConstants.{currentYear, dueDateDueIn30Days, dueDateMoreThan30Days, dueDateOverdue, financialDetailsReviewAndReconcileInterest, fixedDate, id1040000123, id1040000124, id1040000125, id1040000126, noDunningLocks, oneDunningLock, outstandingChargesDueIn30Days, outstandingChargesDueInMoreThan30Days, outstandingChargesModel, testFinancialDetailsModelWithChargesOfSameType}
+import testConstants.FinancialDetailsTestConstants.{currentYear, dueDateDueIn30Days, dueDateMoreThan30Days, dueDateOverdue, financialDetailsReviewAndReconcileInterest, fixedDate, futureFixedDate, id1040000123, id1040000124, id1040000125, id1040000126, noDunningLocks, oneDunningLock, outstandingChargesDueIn30Days, outstandingChargesDueInMoreThan30Days, outstandingChargesModel, testFinancialDetailsModelWithChargesOfSameType}
 
 import java.time.LocalDate
 
@@ -404,6 +404,52 @@ trait ChargeConstants {
        paymentLot = Some("paymentLot")
   )
 
+  val poa1WithFutureDueDate = ChargeItem(
+    transactionId = id1040000123,
+    taxYear = TaxYear.forYearEnd(2030),
+    transactionType = PoaOneDebit,
+    subTransactionType = None,
+    outstandingAmount = 2500,
+    originalAmount = 4000,
+    documentDate = LocalDate.of(2018, 3, 29),
+    dueDate = Some(futureFixedDate),
+    latePaymentInterestAmount = None,
+    interestOutstandingAmount = None,
+    interestFromDate = None,
+    interestEndDate = None,
+    lpiWithDunningLock = None,
+    interestRate = None,
+    amountCodedOut = None,
+    dunningLock = false,
+    poaRelevantAmount = Some(2500),
+    dueDateForFinancialDetail = None,
+    paymentLotItem = Some("paymentLotItem"),
+    paymentLot = Some("paymentLot")
+  )
+
+  val poa2WithFutureDueDate = ChargeItem(
+    transactionId = id1040000123,
+    taxYear = TaxYear.forYearEnd(2030),
+    transactionType = PoaTwoDebit,
+    subTransactionType = None,
+    outstandingAmount = 3500,
+    originalAmount = 4000,
+    documentDate = LocalDate.of(2018, 3, 29),
+    dueDate = Some(futureFixedDate.plusYears(2)),
+    latePaymentInterestAmount = None,
+    interestOutstandingAmount = None,
+    interestFromDate = None,
+    interestEndDate = None,
+    lpiWithDunningLock = None,
+    interestRate = None,
+    amountCodedOut = None,
+    dunningLock = false,
+    poaRelevantAmount = Some(2500),
+    dueDateForFinancialDetail = None,
+    paymentLotItem = Some("paymentLotItem"),
+    paymentLot = Some("paymentLot")
+  )
+
   val balancingChargeNics2 = ChargeItem(
     taxYear = TaxYear.forYearEnd(2021),
     transactionId = id1040000124,
diff --git a/test/testConstants/FinancialDetailsTestConstants.scala b/test/testConstants/FinancialDetailsTestConstants.scala
index 8967d11fd1..abc337cb85 100644
--- a/test/testConstants/FinancialDetailsTestConstants.scala
+++ b/test/testConstants/FinancialDetailsTestConstants.scala
@@ -37,6 +37,8 @@ object FinancialDetailsTestConstants {
 
   val fixedDateTwo: LocalDate = LocalDate.of(2018, 12, 15)
 
+  val futureFixedDate: LocalDate = LocalDate.of(2030, 3, 12)
+
   implicit val dateService: DateService = app.injector.instanceOf[DateService]
 
   val id1040000123 = "1040000123"
diff --git a/test/views/YourSelfAssessmentChargesViewSpec.scala b/test/views/YourSelfAssessmentChargesViewSpec.scala
index a6a2c0c520..931e2b6aba 100644
--- a/test/views/YourSelfAssessmentChargesViewSpec.scala
+++ b/test/views/YourSelfAssessmentChargesViewSpec.scala
@@ -33,7 +33,7 @@ import play.api.test.Helpers.{contentAsString, defaultAwaitTimeout}
 import play.twirl.api.HtmlFormat
 import testConstants.BaseTestConstants.{testNino, testUserTypeAgent, testUserTypeIndividual}
 import testConstants.ChargeConstants
-import testConstants.FinancialDetailsTestConstants.{dueDateOverdue, noDunningLocks, oneDunningLock, outstandingChargesModel, twoDunningLocks}
+import testConstants.FinancialDetailsTestConstants.{dueDateOverdue, futureFixedDate, noDunningLocks, oneDunningLock, outstandingChargesModel, twoDunningLocks}
 import testUtils.{TestSupport, ViewSpec}
 import views.html.YourSelfAssessmentCharges
 
@@ -97,6 +97,7 @@ class YourSelfAssessmentChargesViewSpec extends TestSupport with FeatureSwitchin
   val itsaPOA1: String = "ITSA- POA 1"
   val itsaPOA2: String = "ITSA - POA 2"
   val cancelledPayeSelfAssessment: String = messages("selfAssessmentCharges.cancelledPayeSelfAssessment.text")
+  val chargesToPayLaterTab: String = messages("selfAssessmentCharges.charges-to-pay-later")
 
   val interestEndDateFuture: LocalDate = LocalDate.of(2100, 1, 1)
 
@@ -343,6 +344,13 @@ class YourSelfAssessmentChargesViewSpec extends TestSupport with FeatureSwitchin
     codedOutDocumentDetail = Some(codedOutDocumentDetailCi)
   )
 
+  val whatYouOweDataWithDueDateInFuture: WhatYouOweChargesList = WhatYouOweChargesList(
+    balanceDetails = BalanceDetails(1.00, 2.00, 3.00, None, None, None, None, None),
+    chargesList = List(poa1WithFutureDueDate, poa2WithFutureDueDate),
+    outstandingChargesModel = None,
+    codedOutDocumentDetail = None
+  )
+
   val whatYouOweDataCodingOutWithoutAmountCodingOut: WhatYouOweChargesList = whatYouOweDataWithCodingOutNics2.copy(codedOutDocumentDetail = None)
 
   val whatYouOweDataWithCancelledPayeSa: WhatYouOweChargesList = WhatYouOweChargesList(
@@ -412,7 +420,7 @@ class YourSelfAssessmentChargesViewSpec extends TestSupport with FeatureSwitchin
           tableHead.select("th").get(4).text() shouldBe amountDue
 
           val firstChargeRow = pageDocument.getElementById("balancing-charge-type-0")
-          firstChargeRow.select("td").first().text() shouldBe fixedDate.minusDays(30).toLongDate
+          firstChargeRow.select("td").first().text() shouldBe fixedDate.minusDays(30).toLongDateShort
           firstChargeRow.select("td").get(1).text() shouldBe preMTDRemainingBalance
           firstChargeRow.select("td").get(2).text() shouldBe preMtdPayments(
             (fixedDate.getYear - 1).toString, fixedDate.getYear.toString)
@@ -420,14 +428,14 @@ class YourSelfAssessmentChargesViewSpec extends TestSupport with FeatureSwitchin
           firstChargeRow.select("td").last().text() shouldBe "£123,456.67"
 
           val secondChargeRow = pageDocument.getElementById("due-0")
-          secondChargeRow.select("td").first().text() shouldBe fixedDate.minusDays(10).toLongDate
+          secondChargeRow.select("td").first().text() shouldBe fixedDate.minusDays(10).toLongDateShort
           secondChargeRow.select("td").get(1).text() shouldBe s"$poa1Text 1"
           secondChargeRow.select("td").get(2).text() shouldBe taxYearSummaryText("2022", "2023")
           secondChargeRow.select("td").get(3).text() shouldBe "£100.00"
           secondChargeRow.select("td").last().text() shouldBe "£50.00"
 
           val thirdChargeRow = pageDocument.getElementById("due-1")
-          thirdChargeRow.select("td").first().text() shouldBe fixedDate.minusDays(1).toLongDate
+          thirdChargeRow.select("td").first().text() shouldBe fixedDate.minusDays(1).toLongDateShort
           thirdChargeRow.select("td").get(1).text() shouldBe s"$poa2Text 2"
           thirdChargeRow.select("td").get(2).text() shouldBe taxYearSummaryText("2022", "2023")
           thirdChargeRow.select("td").get(3).text() shouldBe "£100.00"
@@ -439,28 +447,28 @@ class YourSelfAssessmentChargesViewSpec extends TestSupport with FeatureSwitchin
 
         "display penalties if user has penalties" in new TestSetup(charges = whatYouOweDataWithPenalties, penaltiesEnabled = true) {
           val overduePoa = pageDocument.getElementById("due-0")
-          overduePoa.select("td").first().text() shouldBe fixedDate.minusMonths(3).toLongDate
+          overduePoa.select("td").first().text() shouldBe fixedDate.minusMonths(3).toLongDateShort
           overduePoa.select("td").get(1).text() shouldBe s"$poa2Text 1"
           overduePoa.select("td").get(2).text() shouldBe taxYearSummaryText("2022", "2023")
           overduePoa.select("td").get(3).text() shouldBe "£24.99"
           overduePoa.select("td").last().text() shouldBe "£75.99"
 
           val lateSubmissionPenalty = pageDocument.getElementById("due-1")
-          lateSubmissionPenalty.select("td").first().text() shouldBe fixedDate.minusMonths(2).toLongDate
+          lateSubmissionPenalty.select("td").first().text() shouldBe fixedDate.minusMonths(2).toLongDateShort
           lateSubmissionPenalty.select("td").get(1).text() shouldBe s"$lateSubmissionPenaltyText 2"
           lateSubmissionPenalty.select("td").get(2).text() shouldBe taxYearSummaryText("2022", "2023")
           lateSubmissionPenalty.select("td").get(3).text() shouldBe "£42.57"
           lateSubmissionPenalty.select("td").last().text() shouldBe "£100.01"
 
           val firstLatePaymentPenalty = pageDocument.getElementById("due-2")
-          firstLatePaymentPenalty.select("td").first().text() shouldBe fixedDate.minusDays(10).toLongDate
+          firstLatePaymentPenalty.select("td").first().text() shouldBe fixedDate.minusDays(10).toLongDateShort
           firstLatePaymentPenalty.select("td").get(1).text() shouldBe s"$firstLPPText 3"
           firstLatePaymentPenalty.select("td").get(2).text() shouldBe taxYearSummaryText("2022", "2023")
           firstLatePaymentPenalty.select("td").get(3).text() shouldBe "£42.50"
           firstLatePaymentPenalty.select("td").last().text() shouldBe "£50.00"
 
           val secondLatePaymentPenalty = pageDocument.getElementById("due-3")
-          secondLatePaymentPenalty.select("td").first().text() shouldBe fixedDate.minusDays(1).toLongDate
+          secondLatePaymentPenalty.select("td").first().text() shouldBe fixedDate.minusDays(1).toLongDateShort
           secondLatePaymentPenalty.select("td").get(1).text() shouldBe s"$secondLPPText 4"
           secondLatePaymentPenalty.select("td").get(2).text() shouldBe taxYearSummaryText("2022", "2023")
           secondLatePaymentPenalty.select("td").get(3).text() shouldBe "£24.05"
@@ -586,7 +594,7 @@ class YourSelfAssessmentChargesViewSpec extends TestSupport with FeatureSwitchin
           overdueTableHeader.select("th").last().text() shouldBe amountDue
 
           val overduePaymentsTableRow1: Element = pageDocument.select("tr").get(2)
-          overduePaymentsTableRow1.select("td").first().text() shouldBe fixedDate.minusDays(10).toLongDate
+          overduePaymentsTableRow1.select("td").first().text() shouldBe fixedDate.minusDays(10).toLongDateShort
           overduePaymentsTableRow1.select("td").get(1).text() shouldBe poa1Text + s" 1"
           overduePaymentsTableRow1.select("td").get(2).text() shouldBe taxYearSummaryText((fixedDate.getYear - 1).toString, fixedDate.getYear.toString)
           overduePaymentsTableRow1.select("td").last().text() shouldBe "£50.00"
@@ -620,7 +628,7 @@ class YourSelfAssessmentChargesViewSpec extends TestSupport with FeatureSwitchin
         }
         "have overdue payments with POA2 charge type with hyperlink " in new TestSetup(charges = whatYouOweDataWithOverdueLPI(List(None, None))) {
           val overduePaymentsTableRow2: Element = pageDocument.select("tr").get(3)
-          overduePaymentsTableRow2.select("td").first().text() shouldBe fixedDate.minusDays(1).toLongDate
+          overduePaymentsTableRow2.select("td").first().text() shouldBe fixedDate.minusDays(1).toLongDateShort
           overduePaymentsTableRow2.select("td").get(1).text() shouldBe poa2Text + s" 2"
           overduePaymentsTableRow2.select("td").last().text() shouldBe "£75.00"
 
@@ -629,6 +637,39 @@ class YourSelfAssessmentChargesViewSpec extends TestSupport with FeatureSwitchin
         }
       }
 
+
+      "the user has charges due in over 30 days" should {
+        s"have the title $yourSelfAssessmentChargesTitle" in new TestSetup(charges = whatYouOweDataWithDueDateInFuture) {
+          pageDocument.title() shouldBe yourSelfAssessmentChargesTitle
+        }
+
+        s"have a page heading of $yourSelfAssessmentChargesHeading" in new TestSetup(charges = whatYouOweDataWithDueDateInFuture) {
+          pageDocument.getElementById("page-heading").text() shouldBe yourSelfAssessmentChargesHeading
+        }
+
+        "display the 'Charges due later' tab, with correct table header, charges and total" in new TestSetup(charges = whatYouOweDataWithDueDateInFuture) {
+          findElementById("self-assessment-charges-tabs").isDefined shouldBe true
+
+          val tableHead = pageDocument.getElementById("charges-due-later-table-head")
+          tableHead.select("th").first().text() shouldBe dueDate
+          tableHead.select("th").get(1).text() shouldBe chargeType
+          tableHead.select("th").get(2).text() shouldBe taxYear
+          tableHead.select("th").get(3).text() shouldBe amountDue
+
+          val chargesDueLaterTableRow1: Element = pageDocument.select("tr").get(1)
+          chargesDueLaterTableRow1.select("td").first().text() shouldBe futureFixedDate.toLongDateShort
+          chargesDueLaterTableRow1.select("td").get(1).text() shouldBe poa1Text + s" 1"
+          chargesDueLaterTableRow1.select("td").get(2).text() shouldBe taxYearSummaryText((futureFixedDate.getYear - 1).toString, futureFixedDate.getYear.toString())
+          chargesDueLaterTableRow1.select("td").last().text() shouldBe "£2,500.00"
+
+          val chargesDueLaterTableRow2: Element = pageDocument.select("tr").get(2)
+          chargesDueLaterTableRow2.select("td").first().text() shouldBe futureFixedDate.plusYears(2).toLongDateShort
+          chargesDueLaterTableRow2.select("td").get(1).text() shouldBe poa2Text + s" 2"
+          chargesDueLaterTableRow2.select("td").get(2).text() shouldBe taxYearSummaryText((futureFixedDate.getYear - 1).toString, futureFixedDate.getYear.toString())
+          chargesDueLaterTableRow2.select("td").last().text() shouldBe "£3,500.00"
+        }
+
+      }
 //
 //      "the user has charges and access viewer with mixed dates" should { //TODO: TO be implemented once we have multiple tabs on this page, and display charges due in the future
 //        s"have the title $yourSelfAssessmentChargesTitle and notes" in new TestSetup(charges = whatYouOweDataWithMixedData1) {
@@ -914,7 +955,7 @@ class YourSelfAssessmentChargesViewSpec extends TestSupport with FeatureSwitchin
 
         val chargeRow = pageDocument.getElementById("due-30-days-0")
         chargeRow should not be null
-        chargeRow.select("td").get(0).text() should include("5 December 2023")
+        chargeRow.select("td").get(0).text() should include("5 Dec 2023")
         chargeRow.select("td").get(1).text() should include(poa1Text)
         chargeRow.select("td").get(2).text() should include("Tax year")
         chargeRow.select("td").get(3).text() shouldBe "£50.00"


Reviews:
user: login: danielmaltz1
state: DISMISSED
author_association: CONTRIBUTOR
submitted_at: 2025-03-26T09:26:31Z
user: login: avelx
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-26T09:28:38Z
user: login: avelx
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-26T09:29:17Z
user: login: danielmaltz1
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-03-27T14:42:04Z

Review comments:
diff_hunk: @@ -402,11 +390,13 @@ <h2 class="govuk-tabs__title">
                                         </a>
                                     </li>
                                     }
-                                    <li class="govuk-tabs__list-item govuk-tabs__list-item--selected">
-                                        <a class="govuk-tabs__tab" href="#placeholder">
-                                            Placeholder
-                                        </a>
-                                    </li>
+                                    @if(ChargeItem.chargesDueAfter30DaysList(viewModel.whatYouOweChargesList).nonEmpty) {
path: app/views/YourSelfAssessmentCharges.scala.html
user: login: avelx
body: I think we can add a new property to existing view model 
created_at: 2025-03-26T09:28:38Z
author_association: CONTRIBUTOR
diff_hunk: @@ -516,9 +506,16 @@ <h2 class="govuk-tabs__title">
                                         }
                                     </div>
                                 }
-                                <div class="govuk-tabs__panel" id="placeholder">
-                                    <h2 class="govuk-heading-l">Placeholder</h2>
-                                </div>
+                            <div class="govuk-tabs__panel govuk-tabs__panel--hidden" id="charges-due-later">
+                                <table class="govuk-table">
+                                    @tableHead("charges-due-later-table-head", showInterest = false)
+                                    <tbody class="govuk-table__body">
+                                    @for((charge, index) <- ChargeItem.chargesDueAfter30DaysList(viewModel.whatYouOweChargesList).zipWithIndex) {
path: app/views/YourSelfAssessmentCharges.scala.html
user: login: avelx
body: same here, if we can reduce complexity here and add new property to a view model
created_at: 2025-03-26T09:29:17Z
author_association: CONTRIBUTOR

PR comments:
user: login: platops-pr-bot
created_at: 2025-03-25T15:42:46Z
body: - `SBT` can be updated to `1.10.10` in [project/build.properties](https://github.com/hmrc/income-tax-view-change-frontend/blob/MISUV-9289a/project/build.properties#L1)
- `Scala` can be updated from `2.13.12` to `2.13.16` in [build.sbt](https://github.com/hmrc/income-tax-view-change-frontend/blob/MISUV-9289a/build.sbt#L87)
- `uk.gov.hmrc.sbt-distributables` can be updated to `2.6.0` in [project/plugins.sbt](https://github.com/hmrc/income-tax-view-change-frontend/blob/MISUV-9289a/project/plugins.sbt#L11)
- `uk.gov.hmrc:bootstrap-frontend-play-30` can be updated to `9.11.0` in [build.sbt](https://github.com/hmrc/income-tax-view-change-frontend/blob/MISUV-9289a/build.sbt#L1).
- `uk.gov.hmrc:crypto-json-play-30` can be updated to `8.2.0` in [build.sbt](https://github.com/hmrc/income-tax-view-change-frontend/blob/MISUV-9289a/build.sbt#L1).
- `uk.gov.hmrc:play-frontend-hmrc-play-30` can be updated to `11.13.0` in [build.sbt](https://github.com/hmrc/income-tax-view-change-frontend/blob/MISUV-9289a/build.sbt#L1).
- `uk.gov.hmrc.mongo:hmrc-mongo-play-30` can be updated to `2.6.0` in [build.sbt](https://github.com/hmrc/income-tax-view-change-frontend/blob/MISUV-9289a/build.sbt#L1).
- `uk.gov.hmrc:bootstrap-test-play-30` can be updated to `9.11.0` in [build.sbt](https://github.com/hmrc/income-tax-view-change-frontend/blob/MISUV-9289a/build.sbt#L1).
- `uk.gov.hmrc.mongo:hmrc-mongo-test-play-30` can be updated to `2.6.0` in [build.sbt](https://github.com/hmrc/income-tax-view-change-frontend/blob/MISUV-9289a/build.sbt#L1).
author_association: NONE
user: login: dnyuar
created_at: 2025-03-25T20:14:40Z
body: ~~PR also involves reverting a few changes to the messages file and removing a duplicated piece of code from YourSelfAssessmentChargesView which is causing the ATs to fail. This was added in a previous PR which was merged.~~
author_association: CONTRIBUTOR