@hmcts/ccpay-web-component 5.0.2-beta6 → 5.0.2-beta8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1739,13 +1739,18 @@ var PaymentViewComponent = /** @class */ (function () {
1739
1739
  */
1740
1740
  function (paymentgrp) {
1741
1741
  if (paymentgrp !== null && paymentgrp !== undefined) {
1742
- if (this.chkIssueRefundBtnEnable(paymentgrp.payments[0])) {
1743
- this.paymentGroup = paymentgrp;
1744
- this.viewStatus = 'issuerefund';
1745
- this.isRefundRemission = true;
1746
- this.paymentLibComponent.isFromPaymentDetailPage = true;
1747
- this.isFromPaymentDetailPage = true;
1748
- this.isFromServiceRequestPage = this.paymentLibComponent.isFromServiceRequestPage;
1742
+ if (paymentgrp.fees[0].over_payment > 0) {
1743
+ this.viewCompStatus = 'overpayment';
1744
+ }
1745
+ else {
1746
+ if (this.chkIssueRefundBtnEnable(paymentgrp.payments[0])) {
1747
+ this.paymentGroup = paymentgrp;
1748
+ this.viewStatus = 'issuerefund';
1749
+ this.isRefundRemission = true;
1750
+ this.paymentLibComponent.isFromPaymentDetailPage = true;
1751
+ this.isFromPaymentDetailPage = true;
1752
+ this.isFromServiceRequestPage = this.paymentLibComponent.isFromServiceRequestPage;
1753
+ }
1749
1754
  }
1750
1755
  }
1751
1756
  };