@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.
@@ -1734,13 +1734,18 @@
1734
1734
  */
1735
1735
  function (paymentgrp) {
1736
1736
  if (paymentgrp !== null && paymentgrp !== undefined) {
1737
- if (this.chkIssueRefundBtnEnable(paymentgrp.payments[0])) {
1738
- this.paymentGroup = paymentgrp;
1739
- this.viewStatus = 'issuerefund';
1740
- this.isRefundRemission = true;
1741
- this.paymentLibComponent.isFromPaymentDetailPage = true;
1742
- this.isFromPaymentDetailPage = true;
1743
- this.isFromServiceRequestPage = this.paymentLibComponent.isFromServiceRequestPage;
1737
+ if (paymentgrp.fees[0].over_payment > 0) {
1738
+ this.viewCompStatus = 'overpayment';
1739
+ }
1740
+ else {
1741
+ if (this.chkIssueRefundBtnEnable(paymentgrp.payments[0])) {
1742
+ this.paymentGroup = paymentgrp;
1743
+ this.viewStatus = 'issuerefund';
1744
+ this.isRefundRemission = true;
1745
+ this.paymentLibComponent.isFromPaymentDetailPage = true;
1746
+ this.isFromPaymentDetailPage = true;
1747
+ this.isFromServiceRequestPage = this.paymentLibComponent.isFromServiceRequestPage;
1748
+ }
1744
1749
  }
1745
1750
  }
1746
1751
  };