@hmcts/ccpay-web-component 5.0.7-beta20 → 5.0.7-beta22

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.
Files changed (103) hide show
  1. package/bundles/hmcts-ccpay-web-component.umd.js +2222 -648
  2. package/bundles/hmcts-ccpay-web-component.umd.js.map +1 -1
  3. package/bundles/hmcts-ccpay-web-component.umd.min.js +1 -1
  4. package/bundles/hmcts-ccpay-web-component.umd.min.js.map +1 -1
  5. package/esm2015/hmcts-ccpay-web-component.js +33 -31
  6. package/esm2015/lib/components/add-remission/add-remission.component.js +695 -120
  7. package/esm2015/lib/components/allocate-payments/allocate-payments.component.js +16 -16
  8. package/esm2015/lib/components/case-transactions/case-transactions.component.js +31 -17
  9. package/esm2015/lib/components/contact-details/contact-details.component.js +447 -0
  10. package/esm2015/lib/components/fee-summary/fee-summary.component.js +18 -13
  11. package/esm2015/lib/components/payment-view/payment-view.component.js +188 -106
  12. package/esm2015/lib/components/process-refund/process-refund.component.js +49 -28
  13. package/esm2015/lib/components/refund-list/refund-list.component.js +3 -3
  14. package/esm2015/lib/components/refund-status/refund-status.component.js +211 -30
  15. package/esm2015/lib/components/reports/reports.component.js +105 -20
  16. package/esm2015/lib/components/service-request/service-request.component.js +237 -146
  17. package/esm2015/lib/components/status-history/status-history.component.js +2 -2
  18. package/esm2015/lib/components/table/table.component.js +24 -9
  19. package/esm2015/lib/interfaces/IFee.js +13 -1
  20. package/esm2015/lib/interfaces/IPayment.js +7 -1
  21. package/esm2015/lib/interfaces/IPutNotificationRequest.js +25 -0
  22. package/esm2015/lib/interfaces/IRefundContactDetails.js +25 -0
  23. package/esm2015/lib/interfaces/IRefundFee.js +21 -0
  24. package/esm2015/lib/interfaces/IRefundList.js +7 -1
  25. package/esm2015/lib/interfaces/IRefundsNotifications.js +21 -0
  26. package/esm2015/lib/interfaces/IRemission.js +7 -1
  27. package/esm2015/lib/interfaces/IResubmitRefundRequest.js +10 -2
  28. package/esm2015/lib/interfaces/PostIssueRefundRetroRemission.js +6 -2
  29. package/esm2015/lib/interfaces/PostRefundRetroRemission.js +20 -2
  30. package/esm2015/lib/payment-lib.component.js +12 -3
  31. package/esm2015/lib/payment-lib.module.js +3 -1
  32. package/esm2015/lib/payment-lib.service.js +16 -1
  33. package/esm2015/lib/services/notification/notification.service.js +85 -0
  34. package/esm2015/lib/services/refunds/refunds.service.js +10 -1
  35. package/esm2015/lib/services/shared/error-handler.service.js +7 -3
  36. package/esm2015/lib/services/shared/httpclient/webcomponent.http.client.js +1 -1
  37. package/esm2015/lib/services/xl-file/xl-file.service.js +28 -1
  38. package/esm5/hmcts-ccpay-web-component.js +33 -31
  39. package/esm5/lib/components/add-remission/add-remission.component.js +817 -125
  40. package/esm5/lib/components/allocate-payments/allocate-payments.component.js +16 -16
  41. package/esm5/lib/components/case-transactions/case-transactions.component.js +31 -17
  42. package/esm5/lib/components/contact-details/contact-details.component.js +472 -0
  43. package/esm5/lib/components/fee-summary/fee-summary.component.js +18 -13
  44. package/esm5/lib/components/payment-view/payment-view.component.js +219 -124
  45. package/esm5/lib/components/process-refund/process-refund.component.js +52 -78
  46. package/esm5/lib/components/refund-list/refund-list.component.js +3 -3
  47. package/esm5/lib/components/refund-status/refund-status.component.js +247 -28
  48. package/esm5/lib/components/reports/reports.component.js +111 -20
  49. package/esm5/lib/components/service-request/service-request.component.js +278 -176
  50. package/esm5/lib/components/status-history/status-history.component.js +2 -2
  51. package/esm5/lib/components/table/table.component.js +27 -9
  52. package/esm5/lib/interfaces/IFee.js +13 -1
  53. package/esm5/lib/interfaces/IPayment.js +7 -1
  54. package/esm5/lib/interfaces/IPutNotificationRequest.js +23 -0
  55. package/esm5/lib/interfaces/IRefundContactDetails.js +25 -0
  56. package/esm5/lib/interfaces/IRefundFee.js +21 -0
  57. package/esm5/lib/interfaces/IRefundList.js +7 -1
  58. package/esm5/lib/interfaces/IRefundsNotifications.js +21 -0
  59. package/esm5/lib/interfaces/IRemission.js +7 -1
  60. package/esm5/lib/interfaces/IResubmitRefundRequest.js +8 -2
  61. package/esm5/lib/interfaces/PostIssueRefundRetroRemission.js +5 -2
  62. package/esm5/lib/interfaces/PostRefundRetroRemission.js +16 -2
  63. package/esm5/lib/payment-lib.component.js +9 -2
  64. package/esm5/lib/payment-lib.module.js +3 -1
  65. package/esm5/lib/payment-lib.service.js +23 -1
  66. package/esm5/lib/services/notification/notification.service.js +89 -0
  67. package/esm5/lib/services/refunds/refunds.service.js +16 -1
  68. package/esm5/lib/services/shared/error-handler.service.js +11 -3
  69. package/esm5/lib/services/shared/httpclient/webcomponent.http.client.js +1 -1
  70. package/esm5/lib/services/xl-file/xl-file.service.js +33 -1
  71. package/fesm2015/hmcts-ccpay-web-component.js +1995 -560
  72. package/fesm2015/hmcts-ccpay-web-component.js.map +1 -1
  73. package/fesm5/hmcts-ccpay-web-component.js +2219 -605
  74. package/fesm5/hmcts-ccpay-web-component.js.map +1 -1
  75. package/hmcts-ccpay-web-component.d.ts +32 -30
  76. package/hmcts-ccpay-web-component.metadata.json +1 -1
  77. package/lib/components/add-remission/add-remission.component.d.ts +45 -3
  78. package/lib/components/case-transactions/case-transactions.component.d.ts +2 -1
  79. package/lib/components/contact-details/contact-details.component.d.ts +49 -0
  80. package/lib/components/payment-view/payment-view.component.d.ts +23 -6
  81. package/lib/components/process-refund/process-refund.component.d.ts +6 -1
  82. package/lib/components/refund-status/refund-status.component.d.ts +34 -6
  83. package/lib/components/reports/reports.component.d.ts +6 -0
  84. package/lib/components/service-request/service-request.component.d.ts +28 -9
  85. package/lib/components/table/table.component.d.ts +1 -0
  86. package/lib/interfaces/IFee.d.ts +6 -0
  87. package/lib/interfaces/IPayment.d.ts +3 -0
  88. package/lib/interfaces/IPutNotificationRequest.d.ts +6 -0
  89. package/lib/interfaces/IRefundContactDetails.d.ts +9 -0
  90. package/lib/interfaces/IRefundFee.d.ts +7 -0
  91. package/lib/interfaces/IRefundList.d.ts +4 -0
  92. package/lib/interfaces/IRefundsNotifications.d.ts +16 -0
  93. package/lib/interfaces/IRemission.d.ts +3 -0
  94. package/lib/interfaces/IResubmitRefundRequest.d.ts +5 -1
  95. package/lib/interfaces/PostIssueRefundRetroRemission.d.ts +3 -1
  96. package/lib/interfaces/PostRefundRetroRemission.d.ts +7 -1
  97. package/lib/payment-lib.component.d.ts +2 -0
  98. package/lib/payment-lib.service.d.ts +3 -0
  99. package/lib/services/notification/notification.service.d.ts +15 -0
  100. package/lib/services/refunds/refunds.service.d.ts +2 -0
  101. package/lib/services/shared/error-handler.service.d.ts +1 -1
  102. package/lib/services/xl-file/xl-file.service.d.ts +1 -0
  103. package/package.json +5 -1
@@ -13,7 +13,7 @@ import { MatFormFieldModule } from '@angular/material/form-field';
13
13
  import { MatInputModule } from '@angular/material/input';
14
14
  import { FormBuilder, Validators, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
15
15
  import { ActivatedRoute, Router } from '@angular/router';
16
- import { Injectable, Component, Input, Output, EventEmitter, ViewChild, ChangeDetectorRef, Pipe, NgModule, defineInjectable, inject } from '@angular/core';
16
+ import { Injectable, Component, Input, Output, EventEmitter, ChangeDetectorRef, ViewChild, Pipe, NgModule, defineInjectable, inject } from '@angular/core';
17
17
 
18
18
  /**
19
19
  * @fileoverview added by tsickle
@@ -60,6 +60,19 @@ class PaymentLibService {
60
60
  getRefundsApiRootUrl() {
61
61
  return this.REFUNDS_API_ROOT;
62
62
  }
63
+ /**
64
+ * @param {?} notificationapiRoot
65
+ * @return {?}
66
+ */
67
+ setNoticationApiRootUrl(notificationapiRoot) {
68
+ this.NOTIFICATION_API_ROOT = notificationapiRoot;
69
+ }
70
+ /**
71
+ * @return {?}
72
+ */
73
+ getNoticationApiRootUrl() {
74
+ return this.NOTIFICATION_API_ROOT;
75
+ }
63
76
  /**
64
77
  * @param {?} cardPaymentReturnUrl
65
78
  * @return {?}
@@ -380,6 +393,7 @@ class PaymentLibComponent {
380
393
  this.cd = cd;
381
394
  this.OrderslistService = OrderslistService$$1;
382
395
  this.unProcessedPaymentServiceId = null;
396
+ this.isFromPayBubble = false;
383
397
  this.unProcessedPayment = null;
384
398
  this.orderFeesTotal = 0.00;
385
399
  this.orderRemissionTotal = 0.00;
@@ -399,6 +413,7 @@ class PaymentLibComponent {
399
413
  this.paymentLibService.setApiRootUrl(this.API_ROOT);
400
414
  this.paymentLibService.setBulkScanApiRootUrl(this.BULKSCAN_API_ROOT);
401
415
  this.paymentLibService.setRefundndsApiRootUrl(this.REFUNDS_API_ROOT);
416
+ this.paymentLibService.setNoticationApiRootUrl(this.NOTIFICATION_API_ROOT);
402
417
  this.paymentLibService.setCardPaymentReturnUrl(this.CARDPAYMENTRETURNURL);
403
418
  if (this.LOGGEDINUSERROLES.length > 0) {
404
419
  this.OrderslistService.setUserRolesList(this.LOGGEDINUSERROLES);
@@ -449,7 +464,7 @@ PaymentLibComponent.decorators = [
449
464
  <ccpay-pba-payment *ngIf="viewName === 'pba-payment'"
450
465
  [pbaPayOrderRef]="pbaPayOrderRef"
451
466
  ></ccpay-pba-payment>
452
- <ccpay-case-transactions [isTakePayment]="isTakePayment" [LOGGEDINUSERROLES]="LOGGEDINUSERROLES" *ngIf="viewName === 'case-transactions'"></ccpay-case-transactions>
467
+ <ccpay-case-transactions [isTakePayment]="isTakePayment" [isFromServiceRequestPage]="isFromServiceRequestPage" [LOGGEDINUSERROLES]="LOGGEDINUSERROLES" *ngIf="viewName === 'case-transactions'"></ccpay-case-transactions>
453
468
  <app-mark-unidentified-payment *ngIf="viewName === 'unidentifiedPage'"
454
469
  [caseType]="CASETYPE"></app-mark-unidentified-payment>
455
470
  <app-mark-unsolicited-payment *ngIf="viewName === 'unsolicitedPage'"
@@ -464,7 +479,9 @@ PaymentLibComponent.decorators = [
464
479
  [isTurnOff]="ISTURNOFF"
465
480
  [caseType]="CASETYPE"
466
481
  ></ccpay-fee-summary>
467
- <ccpay-reports *ngIf="viewName === 'reports'"></ccpay-reports>
482
+ <ccpay-reports *ngIf="viewName === 'reports'"
483
+ [ISPAYMENTSTATUSENABLED] = "ISPAYMENTSTATUSENABLED"
484
+ ></ccpay-reports>
468
485
  `
469
486
  }] }
470
487
  ];
@@ -478,6 +495,7 @@ PaymentLibComponent.propDecorators = {
478
495
  API_ROOT: [{ type: Input, args: ['API_ROOT',] }],
479
496
  BULKSCAN_API_ROOT: [{ type: Input, args: ['BULKSCAN_API_ROOT',] }],
480
497
  REFUNDS_API_ROOT: [{ type: Input, args: ['REFUNDS_API_ROOT',] }],
498
+ NOTIFICATION_API_ROOT: [{ type: Input, args: ['NOTIFICATION_API_ROOT',] }],
481
499
  CARDPAYMENTRETURNURL: [{ type: Input, args: ['CARDPAYMENTRETURNURL',] }],
482
500
  CCD_CASE_NUMBER: [{ type: Input, args: ['CCD_CASE_NUMBER',] }],
483
501
  EXC_REFERENCE: [{ type: Input, args: ['EXC_REFERENCE',] }],
@@ -588,12 +606,16 @@ class ErrorHandlerService {
588
606
  }
589
607
  /**
590
608
  * @param {?} isErrorExist
609
+ * @param {?=} isDataNotExist
610
+ * @param {?=} error
591
611
  * @return {?}
592
612
  */
593
- getServerErrorMessage(isErrorExist) {
613
+ getServerErrorMessage(isErrorExist, isDataNotExist = false, error = '') {
614
+ /** @type {?} */
615
+ const bodyContent = isDataNotExist ? error : 'Try again later';
594
616
  return {
595
617
  title: "There is a problem with the service",
596
- body: "Try again later",
618
+ body: bodyContent,
597
619
  showError: isErrorExist
598
620
  };
599
621
  }
@@ -1102,6 +1124,29 @@ PaymentViewService.ctorParameters = () => [
1102
1124
  ];
1103
1125
  /** @nocollapse */ PaymentViewService.ngInjectableDef = defineInjectable({ factory: function PaymentViewService_Factory() { return new PaymentViewService(inject(HttpClient), inject(WebComponentHttpClient), inject(LoggerService), inject(ErrorHandlerService), inject(PaymentLibService)); }, token: PaymentViewService, providedIn: "root" });
1104
1126
 
1127
+ /**
1128
+ * @fileoverview added by tsickle
1129
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1130
+ */
1131
+ class PostRefundRetroRemission {
1132
+ /**
1133
+ * @param {?} contact_details
1134
+ * @param {?} fees
1135
+ * @param {?} payment_reference
1136
+ * @param {?} refund_reason
1137
+ * @param {?} total_refund_amount
1138
+ * @param {?} is_over_payment
1139
+ */
1140
+ constructor(contact_details, fees, payment_reference, refund_reason, total_refund_amount, is_over_payment) {
1141
+ this.contact_details = contact_details;
1142
+ this.fees = fees;
1143
+ this.payment_reference = payment_reference;
1144
+ this.refund_reason = refund_reason;
1145
+ this.total_refund_amount = total_refund_amount;
1146
+ this.is_over_payment = is_over_payment === 'op';
1147
+ }
1148
+ }
1149
+
1105
1150
  /**
1106
1151
  * @fileoverview added by tsickle
1107
1152
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -1124,28 +1169,7 @@ class PaymentViewComponent {
1124
1169
  this.allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];
1125
1170
  this.remissions = [];
1126
1171
  this.allPaymentsFailure = [];
1127
- this.check4AllowedRoles2AccessRefund = (/**
1128
- * @return {?}
1129
- */
1130
- () => {
1131
- return this.allowedRolesToAccessRefund.some((/**
1132
- * @param {?} role
1133
- * @return {?}
1134
- */
1135
- role => this.LOGGEDINUSERROLES.indexOf(role) !== -1));
1136
- });
1137
- this.allowFurtherAccessAfter4Days = (/**
1138
- * @param {?} payment
1139
- * @return {?}
1140
- */
1141
- (payment) => {
1142
- if (payment !== null && payment !== undefined) {
1143
- /** @type {?} */
1144
- let tmp4DayAgo = new Date();
1145
- tmp4DayAgo.setDate(tmp4DayAgo.getDate() - 4);
1146
- return tmp4DayAgo >= new Date(payment.date_created);
1147
- }
1148
- });
1172
+ this.isContinueBtnDisabled = true;
1149
1173
  }
1150
1174
  /**
1151
1175
  * @return {?}
@@ -1192,6 +1216,7 @@ class PaymentViewComponent {
1192
1216
  }
1193
1217
  }));
1194
1218
  paymentGroup.fees = fees;
1219
+ this.paymentFees = fees;
1195
1220
  this.paymentGroup = paymentGroup;
1196
1221
  this.paymentGroup.payments = this.paymentGroup.payments.filter((/**
1197
1222
  * @param {?} paymentGroupObj
@@ -1252,6 +1277,21 @@ class PaymentViewComponent {
1252
1277
  goToPaymentList() {
1253
1278
  this.paymentLibComponent.viewName = 'payment-list';
1254
1279
  }
1280
+ /**
1281
+ * @return {?}
1282
+ */
1283
+ getOverPaymentValue() {
1284
+ /** @type {?} */
1285
+ let feesOverPayment = 0;
1286
+ this.paymentGroup.fees.forEach((/**
1287
+ * @param {?} fee
1288
+ * @return {?}
1289
+ */
1290
+ fee => {
1291
+ feesOverPayment += fee.over_payment;
1292
+ }));
1293
+ return feesOverPayment > 0 ? feesOverPayment : this.paymentGroup.payments[0].over_payment;
1294
+ }
1255
1295
  /**
1256
1296
  * @return {?}
1257
1297
  */
@@ -1324,7 +1364,7 @@ class PaymentViewComponent {
1324
1364
  * @return {?}
1325
1365
  */
1326
1366
  addRemission(fee) {
1327
- if (this.chkForAddRemission(fee.code)) {
1367
+ if (this.chkIsAddRemissionBtnEnable(fee)) {
1328
1368
  this.feeId = fee;
1329
1369
  this.paymentViewService.getApportionPaymentDetails(this.paymentGroup.payments[0].reference).subscribe((/**
1330
1370
  * @param {?} paymentGroup
@@ -1361,6 +1401,56 @@ class PaymentViewComponent {
1361
1401
  }
1362
1402
  return false;
1363
1403
  }
1404
+ /**
1405
+ * @return {?}
1406
+ */
1407
+ processRefund() {
1408
+ this.isConfirmationBtnDisabled = true;
1409
+ this.errorMessage = '';
1410
+ /** @type {?} */
1411
+ const obj = this.paymentGroup.fees[0];
1412
+ this.fees = [{ id: obj.id,
1413
+ code: obj.code,
1414
+ version: obj.version,
1415
+ apportion_amount: obj.apportion_amount,
1416
+ calculated_amount: obj.calculated_amount,
1417
+ updated_volume: obj.updated_volume ? obj.updated_volume : obj.volume,
1418
+ volume: obj.volume,
1419
+ refund_amount: this.getOverPaymentValue() }];
1420
+ /** @type {?} */
1421
+ const requestBody = new PostRefundRetroRemission(this.contactDetailsObj, this.fees, this.paymentGroup.payments[0].reference, 'RR037', this.getOverPaymentValue(), 'op');
1422
+ this.paymentViewService.postRefundsReason(requestBody).subscribe((/**
1423
+ * @param {?} response
1424
+ * @return {?}
1425
+ */
1426
+ response => {
1427
+ if (JSON.parse(response)) {
1428
+ this.viewCompStatus = '';
1429
+ this.viewStatus = 'refundconfirmationpage';
1430
+ this.refundReference = JSON.parse(response).refund_reference;
1431
+ this.refundAmount = JSON.parse(response).refund_amount;
1432
+ }
1433
+ }), (/**
1434
+ * @param {?} error
1435
+ * @return {?}
1436
+ */
1437
+ (error) => {
1438
+ this.errorMessage = error;
1439
+ this.isConfirmationBtnDisabled = false;
1440
+ this.cd.detectChanges();
1441
+ }));
1442
+ }
1443
+ /**
1444
+ * @param {?=} note
1445
+ * @return {?}
1446
+ */
1447
+ gotoAddressPage(note) {
1448
+ if (note) {
1449
+ this.notification = { contact_details: note, notification_type: note.notification_type };
1450
+ }
1451
+ this.errorMessage = '';
1452
+ this.viewCompStatus = 'overPaymentAddressCapture';
1453
+ }
1364
1454
  /**
1365
1455
  * @param {?} payment
1366
1456
  * @param {?} remission
@@ -1368,57 +1458,41 @@ class PaymentViewComponent {
1368
1458
  * @return {?}
1369
1459
  */
1370
1460
  addRefundForRemission(payment, remission, fees) {
1371
- if (this.chkIsRefundRemissionBtnEnable()) {
1372
- this.payment = payment;
1373
- this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe((/**
1374
- * @param {?} paymentGroup
1461
+ //if(!this.chkIsIssueRefundBtnEnable(payment)) {
1462
+ this.paymentViewService.getApportionPaymentDetails(payment.reference).subscribe((/**
1463
+ * @param {?} paymentGroup
1464
+ * @return {?}
1465
+ */
1466
+ paymentGroup => {
1467
+ this.paymentGroup = paymentGroup;
1468
+ this.paymentGroup.payments = this.paymentGroup.payments.filter((/**
1469
+ * @param {?} paymentGroupObj
1375
1470
  * @return {?}
1376
1471
  */
1377
- paymentGroup => {
1378
- this.paymentGroup = paymentGroup;
1379
- this.paymentGroup.payments = this.paymentGroup.payments.filter((/**
1380
- * @param {?} paymentGroupObj
1381
- * @return {?}
1382
- */
1383
- paymentGroupObj => paymentGroupObj['reference'].includes(this.payment.reference)));
1384
- this.payment = this.paymentGroup.payments[0];
1385
- this.remissions = remission;
1386
- this.remissionFeeAmt = fees.filter((/**
1387
- * @param {?} data
1388
- * @return {?}
1389
- */
1390
- data => data.code === this.remissions['fee_code']))[0].net_amount;
1391
- this.viewStatus = 'addrefundforremission';
1392
- // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;
1393
- // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;
1394
- }), (/**
1395
- * @param {?} error
1472
+ paymentGroupObj => paymentGroupObj['reference'].includes(payment.reference)));
1473
+ this.payment = this.paymentGroup.payments[0];
1474
+ this.remissions = remission;
1475
+ this.remissionFeeAmt = fees.filter((/**
1476
+ * @param {?} data
1396
1477
  * @return {?}
1397
1478
  */
1398
- (error) => this.errorMessage = error));
1399
- }
1479
+ data => data.code === this.remissions['fee_code']))[0].net_amount;
1480
+ this.viewStatus = 'addrefundforremission';
1481
+ // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;
1482
+ // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;
1483
+ }), (/**
1484
+ * @param {?} error
1485
+ * @return {?}
1486
+ */
1487
+ (error) => this.errorMessage = error));
1488
+ //}
1400
1489
  }
1401
1490
  /**
1402
1491
  * @return {?}
1403
1492
  */
1404
- chkIsRefundRemissionBtnEnable() {
1405
- if (this.paymentGroup !== null && this.paymentGroup !== undefined) {
1406
- this.paymentGroup.payments.forEach((/**
1407
- * @param {?} payment
1408
- * @return {?}
1409
- */
1410
- payment => {
1411
- if (payment.method.toLocaleLowerCase() === 'payment by account' && payment.status.toLocaleLowerCase() === 'success' && this.allowFurtherAccessAfter4Days(payment)) {
1412
- this.isRefundRemissionBtnEnable = true;
1413
- }
1414
- }));
1415
- if (this.isRefundRemissionBtnEnable) {
1416
- return true;
1417
- }
1418
- else {
1419
- return false;
1420
- }
1421
- }
1493
+ goToPaymentViewComponent() {
1494
+ this.viewCompStatus = '';
1495
+ this.viewStatus = 'paymentview';
1422
1496
  }
1423
1497
  /**
1424
1498
  * @param {?} paymentgrp
@@ -1426,13 +1500,18 @@ class PaymentViewComponent {
1426
1500
  */
1427
1501
  issueRefund(paymentgrp) {
1428
1502
  if (paymentgrp !== null && paymentgrp !== undefined) {
1429
- if (this.chkIssueRefundBtnEnable(paymentgrp.payments[0])) {
1430
- this.paymentGroup = paymentgrp;
1431
- this.viewStatus = 'issuerefund';
1432
- this.isRefundRemission = true;
1433
- this.paymentLibComponent.isFromPaymentDetailPage = true;
1434
- this.isFromPaymentDetailPage = true;
1435
- this.isFromServiceRequestPage = this.paymentLibComponent.isFromServiceRequestPage;
1503
+ if (this.chkIsIssueRefundBtnEnable(paymentgrp.payments[0])) {
1504
+ if (paymentgrp.payments[0].over_payment > 0) {
1505
+ this.viewCompStatus = 'overpayment';
1506
+ }
1507
+ else {
1508
+ this.paymentGroup = paymentgrp;
1509
+ this.viewStatus = 'issuerefund';
1510
+ this.isRefundRemission = true;
1511
+ this.paymentLibComponent.isFromPaymentDetailPage = true;
1512
+ this.isFromPaymentDetailPage = true;
1513
+ this.isFromServiceRequestPage = false;
1514
+ }
1436
1515
  }
1437
1516
  }
1438
1517
  }
@@ -1455,51 +1534,82 @@ class PaymentViewComponent {
1455
1534
  * @param {?} payment
1456
1535
  * @return {?}
1457
1536
  */
1458
- chkIssueRefundBtnEnable(payment) {
1459
- if (this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(payment) &&
1460
- payment.method === 'payment by account' && payment.status.toLocaleLowerCase() === 'success') {
1461
- this.isIssueRefunfBtnEnable = true;
1462
- }
1463
- if (this.isIssueRefunfBtnEnable) {
1464
- return true;
1537
+ chkIsIssueRefundBtnEnable(payment) {
1538
+ if (payment !== null && payment !== undefined) {
1539
+ return payment.issue_refund && payment.refund_enable;
1465
1540
  }
1466
1541
  else {
1467
1542
  return false;
1468
1543
  }
1469
1544
  }
1470
1545
  /**
1546
+ * @param {?} remission
1471
1547
  * @return {?}
1472
1548
  */
1473
- chkForPBAPayment() {
1474
- if (this.paymentGroup !== null && this.paymentGroup !== undefined) {
1475
- /** @type {?} */
1476
- let payment = this.paymentGroup.payments[0];
1477
- if (payment.method.toLocaleLowerCase() === 'payment by account' && this.allowFurtherAccessAfter4Days(payment)) {
1478
- return true;
1479
- }
1549
+ chkIsAddRefundBtnEnable(remission) {
1550
+ if (remission !== null && remission !== undefined) {
1551
+ return remission.add_refund;
1552
+ }
1553
+ else {
1480
1554
  return false;
1481
1555
  }
1482
1556
  }
1483
1557
  /**
1484
- * @param {?} feeCode
1558
+ * @param {?} fee
1485
1559
  * @return {?}
1486
1560
  */
1487
- chkForAddRemission(feeCode) {
1488
- if (this.chkForPBAPayment() && this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(this.paymentGroup.payments[0])) {
1489
- if (this.paymentGroup.remissions && this.paymentGroup.remissions.length > 0) {
1490
- for (const remission of this.paymentGroup.remissions) {
1491
- if (remission.fee_code === feeCode) {
1492
- return false;
1493
- }
1494
- }
1495
- return true;
1496
- }
1497
- return true;
1561
+ chkIsAddRemissionBtnEnable(fee) {
1562
+ if (fee !== null && fee !== undefined) {
1563
+ return fee.add_remission && fee.remission_enable;
1498
1564
  }
1499
1565
  else {
1500
1566
  return false;
1501
1567
  }
1502
1568
  }
1569
+ /**
1570
+ * @param {?} paymentType
1571
+ * @return {?}
1572
+ */
1573
+ selectPymentOption(paymentType) {
1574
+ this.paymentType = paymentType;
1575
+ this.isContinueBtnDisabled = false;
1576
+ }
1577
+ /**
1578
+ * @param {?} paymentgrp
1579
+ * @return {?}
1580
+ */
1581
+ continuePayment(paymentgrp) {
1582
+ if (this.paymentType === 'op') {
1583
+ this.isFullyRefund = false;
1584
+ this.viewCompStatus = 'overPaymentAddressCapture';
1585
+ }
1586
+ else if (this.paymentType === 'fp') {
1587
+ this.isFullyRefund = true;
1588
+ this.paymentGroup = paymentgrp;
1589
+ this.viewStatus = 'issuerefund';
1590
+ this.viewCompStatus = "";
1591
+ this.isRefundRemission = true;
1592
+ this.paymentLibComponent.isFromPaymentDetailPage = true;
1593
+ this.isFromPaymentDetailPage = true;
1594
+ this.isFromServiceRequestPage = this.paymentLibComponent.isFromServiceRequestPage;
1595
+ }
1596
+ }
1597
+ /**
1598
+ * @param {?} event
1599
+ * @return {?}
1600
+ */
1601
+ gotoPaymentSelectPage(event) {
1602
+ event.preventDefault();
1603
+ this.viewCompStatus = 'overpayment';
1604
+ }
1605
+ /**
1606
+ * @param {?} obj
1607
+ * @return {?}
1608
+ */
1609
+ getContactDetails(obj) {
1610
+ this.contactDetailsObj = obj;
1611
+ this.viewCompStatus = 'overpaymentcheckandanswer';
1612
+ }
1503
1613
  /**
1504
1614
  * @return {?}
1505
1615
  */
@@ -1533,8 +1643,8 @@ class PaymentViewComponent {
1533
1643
  PaymentViewComponent.decorators = [
1534
1644
  { type: Component, args: [{
1535
1645
  selector: 'ccpay-payment-view',
1536
- template: "\n<ng-container *ngIf=\"viewStatus === 'paymentview'\">\n<div class=\"govuk-width-container\">\n\n <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a href=\"javascript:void(0)\" (click)=\"goToCaseTransationPage($event)\" class=\"govuk-back-link\">Back</a>\n </li>\n </ol>\n </div>\n\n <main class=\"govuk-main-wrapper govuk-!-padding-top-0\" id=\"main-content\" role=\"main\">\n\n <div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Payment details could not be retrieved\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n </div>\n\n <div class=\"payment-view-alignment\" *ngIf=\"!errorMessage && paymentGroup?.payments[0]\">\n\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='PAYMENTDETAILS'>\n <div class=\"govuk-grid-row\">\n <div class=\"column\">\n <h1 class=\"heading-large govuk-!-margin-top-0\">Payment details</h1>\n </div>\n </div>\n <table>\n <tbody>\n\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Service request reference</td>\n <td class=\"tb-col-w\">{{ serviceReference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Payment reference</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.reference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Payment amount</td>\n <td class=\"tb-col-w\">\u00A3{{ paymentGroup?.payments[0]?.amount | number:'.2' }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0] && paymentGroup?.payments[0]?.document_control_number && !paymentGroup?.payments[0]?.external_reference\">\n <td class=\"bold tb-col-w\">Payment asset number(DCN)</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.document_control_number }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0] && paymentGroup?.payments[0]?.document_control_number && !paymentGroup?.payments[0]?.external_reference\">\n <td class=\"bold tb-col-w\">Banked date</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.banked_date | date:'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0] && paymentGroup?.payments[0]?.external_reference\">\n <td class=\"bold tb-col-w\">GovPay Transaction ID</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.external_reference }}</td>\n </tr>\n <tr class=\"section\" >\n <td class=\"bold tb-col-w\">Payment method</td>\n <td class=\"tb-col-w text-transform\">{{ paymentGroup?.payments[0]?.method }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0]?.method === 'payment by account'\" >\n <td class=\"bold tb-col-w\">Type</td>\n <td class=\"tb-col-w\" *ngIf=\"paymentGroup?.payments[0]?.method !== 'card'\">Credit</td>\n <td class=\"tb-col-w\" *ngIf=\"paymentGroup?.payments[0]?.method === 'card'\">Card</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Channel</td>\n <td class=\"tb-col-w text-transform\">{{ paymentGroup?.payments[0]?.channel }}</td>\n </tr>\n <!-- <tr class=\"section\">\n <td class=\"bold tb-col-w\">Method</td>\n <td *ngIf=\"paymentGroup?.payments[0]?.method !== 'card'\">{{ paymentGroup?.payments[0]?.method }}</td>\n <td *ngIf=\"paymentGroup?.payments[0]?.method === 'card'\">CARD</td>\n </tr> -->\n <!-- <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0]?.channel !== 'telephony'\">\n <td class=\"bold tb-col-w\">Status</td>\n <td>{{ paymentGroup?.payments[0]?.status }}</td>\n </tr> -->\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0]?.payment_allocation[0] !== undefined\">\n <td class=\"bold tb-col-w\">Allocaton status</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.payment_allocation[0]?.allocation_status }}</td>\n </tr>\n\n <tr *ngIf=\"paymentGroup?.payments[0].organisation_name\">\n <td class=\"bold tb-col-w\">PBA account name</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.organisation_name }}</td>\n </tr>\n\n <tr *ngIf=\"paymentGroup?.payments[0].account_number\">\n <td class=\"bold tb-col-w\">PBA number</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.account_number }}</td>\n </tr>\n\n <tr *ngIf=\"paymentGroup?.payments[0].customer_reference\">\n <td class=\"bold tb-col-w\">Customer internal reference</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.customer_reference }}</td>\n </tr>\n\n </tbody>\n </table>\n\n <div>\n <!-- Status histories -->\n <ccpay-payment-statuses *ngIf=\"isStatusAllocated\" [isTakePayment]=\"isTakePayment\"></ccpay-payment-statuses>\n </div>\n <div class=\"remission\">\n <button [disabled]=\"!chkIssueRefundBtnEnable(paymentGroup?.payments[0])\" (click)=\"issueRefund(paymentGroup)\" class=\"govuk-button govuk-button--secondary\">Issue refund</button>\n </div>\n<div *ngIf=\"ISPAYMENTSTATUSENABLED === 'Enable'\">\n <div class=\"column\">\n <h2 class=\"heading-medium\">Disputed payment history</h2>\n </div>\n \n <div>\n <table>\n <thead>\n <tr>\n <th>Status</th>\n <th>Amount</th>\n <th>Date</th>\n <th>Payment reference</th>\n <th>Event</th>\n <th></th>\n </tr>\n </thead> \n <tbody *ngIf=\"!errorMsg && allPaymentsFailure.length > 0\">\n <tr *ngFor=\"let payment of allPaymentsFailure\">\n <td>{{ payment.status }}</td>\n <td>\u00A3{{ payment.disputed_amount | number:'.2' }}</td>\n <td>{{(payment.representment_date ? payment.representment_date : payment.failure_event_date_time) | date:'dd MMM yyyy'}}</td>\n <td>{{ payment.payment_reference }}</td>\n <td >{{ payment.failure_type }}</td>\n <td>\n \n <a href=\"javascript:void(0)\" (click)=\"goToPaymentFailuePage(payment)\">Show detail</a>\n\n </td>\n </tr>\n </tbody>\n <tbody *ngIf=\"errorMsg || allPaymentsFailure.length === 0\">\n <tr>\n <td colspan=\"6\"> No disputed payment history available. </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n \n <div *ngIf=\"checkForFees(paymentGroup)\">\n <div *ngIf=\"paymentGroup.fees.length > 0\">\n <div class=\"column\">\n <br/>\n <br/>\n <h2 class=\"heading-large\">Fee and remission details</h2>\n\n </div>\n </div>\n\n <div *ngFor=\"let fee of paymentGroup.fees\">\n <table class=\"table\">\n <tbody>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Description</td>\n <td class=\"tb-col-w\">Application for {{ fee.description }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Fee code</td>\n <td class=\"tb-col-w\">{{ fee?.code }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\" [ngClass]=\"{'tr-border': !fee.apportion_amount && !fee.remissions && !isTurnOff }\">Fee amount</td>\n <td [ngClass]=\"{'tr-border': !fee.apportion_amount && !fee.remissions && !isTurnOff}\">\u00A3{{ fee?.calculated_amount | number:'.2' }}</td>\n </tr>\n\n <tr *ngIf=\"fee.apportion_amount\">\n <td class=\"bold tb-col-w tr-border\" [ngClass]=\"{'tr-border': !fee.remissions}\">Allocated amount</td>\n <td [ngClass]=\"{'tr-border': !fee.remissions}\">\u00A3{{ fee?.apportion_amount | number:'.2' }}</td>\n </tr>\n\n </tbody>\n </table>\n <button [disabled]=\"!chkForAddRemission(fee.code)\" (click)=\"addRemission(fee)\" class=\"govuk-button govuk-button--secondary\"> Add remission</button>\n </div>\n\n <!-- remissions -->\n <div class=\"order-class\">\n <div class=\"column\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-24 whitespace-inherit\" scope=\"col\">Help with fees or remission code</td>\n <td class=\"govuk-table__header col-27 whitespace-inherit\" scope=\"col\">Reference</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Fee</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header whitespace-inherit refundBtn\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngFor=\"let remission of paymentGroup.remissions\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.hwf_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.remission_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.fee_code }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n <td class=\"govuk-table__cell refundBtn whitespace-inherit\" >\n <button [disabled]=\"!chkIsRefundRemissionBtnEnable()\" (click)=\"addRefundForRemission(paymentGroup.payments[0],remission,paymentGroup.fees)\" class=\"govuk-button govuk-button--secondary\"> Add refund</button>\n </td>\n </tr>\n </tbody>\n\n\n </table>\n </div></div>\n\n <div *ngIf=\"paymentGroup.remissions?.length === 0\">\n <span class=\"mar-17\" >No help with fees or remissions.</span>\n </div>\n\n </div>\n </div>\n </main>\n</div>\n\n</ng-container>\n<ng-container *ngIf=\"viewStatus === 'addremission' && feeId\">\n<ccpay-add-remission\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[fee]=\"feeId\"\n[payment] = \"payment\"\n[orderStatus] =\"paymentGroup.payments[0].status\"\n[paidAmount]= \"paymentGroup.payments[0].amount\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[paymentGroupRef]=\"paymentGroup.payment_group_reference\"\n[isFromPaymentDetailPage] = \"true\"\n[ccdCaseNumber]=\"ccdCaseNumber\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"\n[orderRef] = \"orderRef\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"></ccpay-add-remission>\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'addrefundforremission' && payment\">\n\n<ccpay-add-remission\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[payment]=\"payment\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[feeamount]=\"remissionFeeAmt\"\n[remission] = \"remissions\"\n[isFromServiceRequestPage]=\"false\"\n[paymentGroupRef]=\"paymentGroup.payment_group_reference\"\n[ccdCaseNumber]=\"ccdCaseNumber\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"\n[orderRef] = \"orderRef\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"></ccpay-add-remission>\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'issuerefund'\">\n <ccpay-add-remission\n [isTurnOff]=\"isTurnOff\"\n [isStrategicFixEnable]=\"isStrategicFixEnable\"\n [payment] = 'paymentGroup.payments[0]'\n [viewCompStatus]= \"viewStatus\"\n [orderStatus] =\"paymentGroup.payments[0].status\"\n [paidAmount]= \"paymentGroup.payments[0].amount\"\n [isRefundRemission]=\"isRefundRemission\"\n [caseType]=\"caseType\"\n [isFromServiceRequestPage]=\"isFromServiceRequestPage\"\n [isFromPaymentDetailPage] = \"isFromPaymentDetailPage\"\n [paymentGroupRef]=\"paymentGroup.payment_group_reference\"\n [ccdCaseNumber]=\"ccdCaseNumber\"\n [orderFeesTotal] = \"orderFeesTotal\"\n [orderTotalPayments] = \"orderTotalPayments\"\n [orderRemissionTotal] = \"orderRemissionTotal\"\n [orderRef] = \"orderRef\"\n [orderCreated] = \"orderCreated\"\n [orderParty] = \"orderParty\"\n [orderCCDEvent] = \"orderCCDEvent\"\n [orderDetail] = \"orderDetail\"\n [LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\">\n ></ccpay-add-remission>\n</ng-container>\n<ng-container *ngIf=\"viewStatus === 'order-full-view'\">\n <ccpay-service-request\n [viewStatus] = \"viewStatus\"\n [orderRef] = \"orderRef\"\n [orderStatus] = \"orderStatus\"\n [orderCreated] = \"orderCreated\"\n [orderParty] = \"orderParty\"\n [orderCCDEvent] = \"orderCCDEvent\"\n [orderDetail] = \"orderDetail\"\n [LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n [takePayment] = \"isTakePayment\"\n [ccdCaseNumber] = \"ccdCaseNumber\"\n [orderFeesTotal] = \"orderFeesTotal\"\n [orderTotalPayments] = \"orderTotalPayments\"\n [orderRemissionTotal] = \"orderRemissionTotal\"\n [isServiceRequest] = \"isServiceRequest\"\n (goToServiceRquestComponent) = \"goToServiceRequestPage()\"\n>\n</ccpay-service-request>\n\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'payment-failure'\">\n <div class=\"payment-failure-alignment\">\n <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a href=\"javascript:void(0)\" (click)=\"goBackToPaymentView($event)\" class=\"govuk-back-link\">Back</a>\n </li>\n </ol>\n </div>\n <div class=\"govuk-grid-row\">\n <div class=\"column\">\n <h1 class=\"heading-large govuk-!-margin-top-0\">Failure event details</h1>\n </div>\n </div>\n <table>\n <tbody>\n\n <tr class=\"section\">\n <td class=\"bold\">Failure reference</td>\n <td>\t{{selectedPaymentsStatus.failure_reference}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Failure reason</td>\n <td>\t{{selectedPaymentsStatus.failure_reason}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Payment reference</td>\n <td>{{ selectedPaymentsStatus.payment_reference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Payment amount</td>\n <td> \u00A3{{ paymentGroup?.payments[0]?.amount | number:'.2' }}</td>\n\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Disputed amount</td>\n <td>\t\u00A3{{selectedPaymentsStatus.disputed_amount | number:'.2'}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Additional information</td>\n <td>\t{{selectedPaymentsStatus.additional_reference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Failure type</td>\n <td>\t{{ selectedPaymentsStatus.failure_type }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Failure event date and time</td>\n <td> {{ selectedPaymentsStatus.failure_event_date_time | date:'dd MMM yyyy HH:mm:ss' }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"selectedPaymentsStatus.has_amount_debited\">\n <td class=\"bold\">Has disputed amount debited</td>\n <td>\t{{selectedPaymentsStatus.has_amount_debited}}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"selectedPaymentsStatus.representment_status\">\n <td class=\"bold\">Status following representation of payment</td>\n <td>\t{{(selectedPaymentsStatus.representment_status === 'Yes' || selectedPaymentsStatus.representment_status === 'yes') ? 'Success' : 'Failure'}}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"selectedPaymentsStatus.representment_date\">\n <td class=\"bold\">Date payment represented</td>\n <td>\t{{selectedPaymentsStatus.representment_date | date:'dd MMM yyyy HH:mm:ss'}}</td>\n </tr>\n </tbody>\n </table>\n\n <div>\n </div>\n </div>\n</ng-container>\n",
1537
- styles: [".tb-col-w{width:330px}.tr-border{border-bottom:2px solid}.payment-view-alignment{margin-left:30px}.govuk-button{font-size:19px;float:left;margin-top:2em}.remission{margin-bottom:7em}.govuk-error-summary__title{font-size:24px!important}.govuk-table__cell,.govuk-table__header{padding:0;line-height:1.3;vertical-align:middle}.govuk-table__row{line-height:1.3}.govuk-table__cell:last-child{text-align:right}.text-transform::first-letter{text-transform:capitalize}.govuk-link{cursor:pointer}.mar-17{font-size:19px!important}.payment-failure-alignment{margin-bottom:50px}"]
1646
+ template: "<div class=\"payment-view-section\">\n<ng-container *ngIf=\"viewStatus === 'paymentview' && viewCompStatus !== 'overpayment' && viewCompStatus !== 'overPaymentAddressCapture' && viewCompStatus !== 'overpaymentcheckandanswer'\">\n<div class=\"govuk-width-container\">\n\n <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a href=\"javascript:void(0)\" (click)=\"goToCaseTransationPage($event)\" class=\"govuk-back-link\">Back</a>\n </li>\n </ol>\n </div>\n\n <main class=\"govuk-main-wrapper govuk-!-padding-top-0\" id=\"main-content\" role=\"main\">\n\n <div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Payment details could not be retrieved\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n </div>\n\n <div class=\"payment-view-alignment\" *ngIf=\"!errorMessage && paymentGroup?.payments[0]\">\n\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='PAYMENTDETAILS'>\n <div class=\"govuk-grid-row\">\n <div class=\"column\">\n <h1 class=\"heading-large govuk-!-margin-top-0\">Payment details</h1>\n </div>\n </div>\n <table>\n <tbody>\n\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Service request reference</td>\n <td class=\"tb-col-w\">{{ serviceReference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Payment reference</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.reference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Payment amount</td>\n <td class=\"tb-col-w\">\u00A3{{ paymentGroup?.payments[0]?.amount | number:'.2' }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0]?.over_payment > 0\">\n <td class=\"bold tb-col-w\">Over payment</td>\n <td class=\"tb-col-w\">\u00A3{{ getOverPaymentValue() | number:'.2' }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0] && paymentGroup?.payments[0]?.document_control_number && !paymentGroup?.payments[0]?.external_reference\">\n <td class=\"bold tb-col-w\">Payment asset number(DCN)</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.document_control_number }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0] && paymentGroup?.payments[0]?.document_control_number && !paymentGroup?.payments[0]?.external_reference\">\n <td class=\"bold tb-col-w\">Banked date</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.banked_date | date:'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0] && paymentGroup?.payments[0]?.external_reference\">\n <td class=\"bold tb-col-w\">GovPay Transaction ID</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.external_reference }}</td>\n </tr>\n <tr class=\"section\" >\n <td class=\"bold tb-col-w\">Payment method</td>\n <td class=\"tb-col-w text-transform\">{{ paymentGroup?.payments[0]?.method }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0]?.method === 'payment by account'\" >\n <td class=\"bold tb-col-w\">Type</td>\n <td class=\"tb-col-w\" *ngIf=\"paymentGroup?.payments[0]?.method !== 'card'\">Credit</td>\n <td class=\"tb-col-w\" *ngIf=\"paymentGroup?.payments[0]?.method === 'card'\">Card</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Channel</td>\n <td class=\"tb-col-w text-transform\">{{ paymentGroup?.payments[0]?.channel }}</td>\n </tr>\n <!-- <tr class=\"section\">\n <td class=\"bold tb-col-w\">Method</td>\n <td *ngIf=\"paymentGroup?.payments[0]?.method !== 'card'\">{{ paymentGroup?.payments[0]?.method }}</td>\n <td *ngIf=\"paymentGroup?.payments[0]?.method === 'card'\">CARD</td>\n </tr> -->\n <!-- <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0]?.channel !== 'telephony'\">\n <td class=\"bold tb-col-w\">Status</td>\n <td>{{ paymentGroup?.payments[0]?.status }}</td>\n </tr> -->\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0]?.payment_allocation[0] !== undefined\">\n <td class=\"bold tb-col-w\">Allocaton status</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.payment_allocation[0]?.allocation_status }}</td>\n </tr>\n\n <tr *ngIf=\"paymentGroup?.payments[0].organisation_name\">\n <td class=\"bold tb-col-w\">PBA account name</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.organisation_name }}</td>\n </tr>\n\n <tr *ngIf=\"paymentGroup?.payments[0].account_number\">\n <td class=\"bold tb-col-w\">PBA number</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.account_number }}</td>\n </tr>\n\n <tr *ngIf=\"paymentGroup?.payments[0].customer_reference\">\n <td class=\"bold tb-col-w\">Customer internal reference</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.customer_reference }}</td>\n </tr>\n\n </tbody>\n </table>\n\n <div>\n <!-- Status histories -->\n <ccpay-payment-statuses *ngIf=\"isStatusAllocated\" [isTakePayment]=\"isTakePayment\"></ccpay-payment-statuses>\n </div>\n <div class=\"remission\">\n <button [disabled]=\"!chkIsIssueRefundBtnEnable(paymentGroup?.payments[0])\" (click)=\"issueRefund(paymentGroup)\" class=\"govuk-button govuk-button--secondary\">Issue refund</button>\n </div>\n<div *ngIf=\"ISPAYMENTSTATUSENABLED\">\n <div class=\"column\">\n <h2 class=\"heading-medium\">Disputed payment history</h2>\n </div>\n \n <div>\n <table>\n <thead>\n <tr>\n <th>Status</th>\n <th>Amount</th>\n <th>Date</th>\n <th>Payment reference</th>\n <th>Event</th>\n <th></th>\n </tr>\n </thead> \n <tbody *ngIf=\"!errorMsg && allPaymentsFailure.length > 0\">\n <tr *ngFor=\"let payment of allPaymentsFailure\">\n <td>{{ payment.status }}</td>\n <td>\u00A3{{ payment.disputed_amount | number:'.2' }}</td>\n <td>{{(payment.representment_date ? payment.representment_date : payment.failure_event_date_time) | date:'dd MMM yyyy'}}</td>\n <td>{{ payment.payment_reference }}</td>\n <td >{{ payment.failure_type }}</td>\n <td>\n \n <a href=\"javascript:void(0)\" (click)=\"goToPaymentFailuePage(payment)\">Show detail</a>\n\n </td>\n </tr>\n </tbody>\n <tbody *ngIf=\"errorMsg || allPaymentsFailure.length === 0\">\n <tr>\n <td colspan=\"6\"> No disputed payment history available. </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n \n <div *ngIf=\"checkForFees(paymentGroup)\">\n <div *ngIf=\"paymentGroup.fees.length > 0\">\n <div class=\"column\">\n <br/>\n <br/>\n <h2 class=\"heading-large\">Fee and remission details</h2>\n\n </div>\n </div>\n\n <div *ngFor=\"let fee of paymentGroup.fees\">\n <table class=\"table\">\n <tbody>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Description</td>\n <td class=\"tb-col-w\">Application for {{ fee.description }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Fee code</td>\n <td class=\"tb-col-w\">{{ fee?.code }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\" [ngClass]=\"{'tr-border': !fee.apportion_amount && !fee.remissions && !isTurnOff }\">Fee amount</td>\n <td [ngClass]=\"{'tr-border': !fee.apportion_amount && !fee.remissions && !isTurnOff}\">\u00A3{{ fee?.calculated_amount | number:'.2' }}</td>\n </tr>\n\n <tr *ngIf=\"fee.apportion_amount\">\n <td class=\"bold tb-col-w tr-border\" [ngClass]=\"{'tr-border': !fee.remissions}\">Allocated amount</td>\n <td [ngClass]=\"{'tr-border': !fee.remissions}\">\u00A3{{ fee?.apportion_amount | number:'.2' }}</td>\n </tr>\n\n </tbody>\n </table>\n <button [disabled]=\"!chkIsAddRemissionBtnEnable(fee)\" (click)=\"addRemission(fee)\" class=\"govuk-button govuk-button--secondary\"> Add remission</button>\n </div>\n\n <!-- remissions -->\n <div class=\"order-class\">\n <div class=\"column\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-24 whitespace-inherit\" scope=\"col\">Help with fees or remission code</td>\n <td class=\"govuk-table__header col-27 whitespace-inherit\" scope=\"col\">Reference</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Fee</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header whitespace-inherit refundBtn\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngFor=\"let remission of paymentGroup.remissions\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.hwf_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.remission_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.fee_code }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n <td class=\"govuk-table__cell refundBtn whitespace-inherit\" >\n <button [disabled]=\"!chkIsAddRefundBtnEnable(remission)\" (click)=\"addRefundForRemission(paymentGroup.payments[0],remission,paymentGroup.fees)\" class=\"govuk-button govuk-button--secondary\"> Add refund</button>\n </td>\n </tr>\n </tbody>\n\n\n </table>\n </div></div>\n\n <div *ngIf=\"paymentGroup.remissions?.length === 0\">\n <span class=\"mar-17\" >No help with fees or remissions.</span>\n </div>\n\n </div>\n </div>\n </main>\n</div>\n\n</ng-container>\n<ng-container *ngIf=\"viewStatus === 'addremission' && feeId && viewCompStatus !== 'overpayment' && viewCompStatus !== 'overPaymentAddressCapture' && viewCompStatus !== 'overpaymentcheckandanswer'\">\n<ccpay-add-remission \n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[fee]=\"feeId\"\n[payment] = \"payment\"\n[orderStatus] =\"paymentGroup.payments[0].status\"\n[paidAmount]= \"paymentGroup.payments[0].amount\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[paymentGroupRef]=\"paymentGroup.payment_group_reference\"\n[isFromPaymentDetailPage] = \"true\"\n[ccdCaseNumber]=\"ccdCaseNumber\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"\n[orderRef] = \"orderRef\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"></ccpay-add-remission>\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'addrefundforremission' && payment && viewCompStatus !== 'overpayment' && viewCompStatus !== 'overPaymentAddressCapture' && viewCompStatus !== 'overpaymentcheckandanswer'\">\n\n<ccpay-add-remission\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[payment]=\"payment\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[feeamount]=\"remissionFeeAmt\"\n[remission] = \"remissions\"\n[isFromServiceRequestPage]=\"false\"\n[paymentGroupRef]=\"paymentGroup.payment_group_reference\"\n[ccdCaseNumber]=\"ccdCaseNumber\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"\n[orderRef] = \"orderRef\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"></ccpay-add-remission>\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'issuerefund' && viewCompStatus !== 'overpayment' && viewCompStatus !== 'overPaymentAddressCapture' && viewCompStatus !== 'overpaymentcheckandanswer'\">\n <ccpay-add-remission \n [isTurnOff]=\"isTurnOff\"\n [isStrategicFixEnable]=\"isStrategicFixEnable\"\n [payment] = 'paymentGroup.payments[0]'\n [viewCompStatus]= \"viewStatus\"\n [orderStatus] =\"paymentGroup.payments[0].status\"\n [paidAmount]= \"paymentGroup.payments[0].amount\"\n [isRefundRemission]=\"isRefundRemission\"\n [caseType]=\"caseType\"\n [isFromServiceRequestPage]=\"isFromServiceRequestPage\"\n [isFromPaymentDetailPage] = \"isFromPaymentDetailPage\"\n [paymentGroupRef]=\"paymentGroup.payment_group_reference\"\n [ccdCaseNumber]=\"ccdCaseNumber\"\n [orderFeesTotal] = \"orderFeesTotal\"\n [orderTotalPayments] = \"orderTotalPayments\"\n [orderRemissionTotal] = \"orderRemissionTotal\"\n [orderRef] = \"orderRef\"\n [orderCreated] = \"orderCreated\"\n [orderParty] = \"orderParty\"\n [orderCCDEvent] = \"orderCCDEvent\"\n [orderDetail] = \"orderDetail\"\n [fees] =\"paymentFees\"\n [isFullyRefund] = \"isFullyRefund\"\n [LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\">\n \n ></ccpay-add-remission>\n</ng-container>\n<ng-container *ngIf=\"viewStatus === 'order-full-view' && viewCompStatus !== 'overpayment' && viewCompStatus !== 'overPaymentAddressCapture' && viewCompStatus !== 'overpaymentcheckandanswer'\">\n <ccpay-service-request\n [viewStatus] = \"viewStatus\"\n [orderRef] = \"orderRef\"\n [orderStatus] = \"orderStatus\"\n [orderCreated] = \"orderCreated\"\n [orderParty] = \"orderParty\"\n [orderCCDEvent] = \"orderCCDEvent\"\n [orderDetail] = \"orderDetail\"\n [LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n [takePayment] = \"isTakePayment\"\n [ccdCaseNumber] = \"ccdCaseNumber\"\n [orderFeesTotal] = \"orderFeesTotal\"\n [orderTotalPayments] = \"orderTotalPayments\"\n [orderRemissionTotal] = \"orderRemissionTotal\"\n [isServiceRequest] = \"isServiceRequest\"\n (goToServiceRquestComponent) = \"goToServiceRequestPage()\"\n>\n</ccpay-service-request>\n\n</ng-container>\n</div>\n<div class=\"over-payment\">\n<ng-container *ngIf=\"viewCompStatus === 'overpayment'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='OVERPAYMENTPAGE'> \n <h1 class=\"heading-large\">Issue refund</h1>\n <h1 class=\"heading-medium\">Case reference: {{ccdCaseNumber | ccdHyphens }}</h1>\n <span id=\"how-contacted-conditional-hint govuk-font19px\" class=\"form-hint\">\n Payment reference: {{paymentGroup?.payments[0]?.reference}}\n </span>\n<div class=\"govuk-form-group\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <b>\n Select payment to refund\n </b>\n </legend>\n <div class=\"govuk-radios\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"over-payment\" name=\"over-payment\" type=\"radio\" (click)=\"selectPymentOption('op')\" value=\"op\">\n <label class=\"govuk-label govuk-radios__label govuk-font19px\" for=\"where-do-you-live\">\n Over payment \u00A3{{getOverPaymentValue() | number:'.2'}}\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"full-payment\" name=\"over-payment\" type=\"radio\" (click)=\"selectPymentOption('fp')\" value=\"fp\">\n <label class=\"govuk-label govuk-radios__label govuk-font19px\" for=\"where-do-you-live-2\">\n Full payment \u00A3{{paymentGroup?.payments[0]?.amount | number:'.2'}}\n </label>\n </div>\n </div>\n <button class=\"govuk-button govuk-button--secondary over-payment-alignment govuk-font19px\"\n (click)=\"goToPaymentViewComponent()\"> Previous</button>\n <button \n (click)=\"continuePayment(paymentGroup)\"\n [disabled]=\"isContinueBtnDisabled\"\n [ngClass]='isContinueBtnDisabled ? \"button button--disabled govuk-!-margin-right-1 govuk-font19px\" : \"button govuk-!-margin-right-1 govuk-font19px\"'\n class=\"govuk-button\"> Continue</button>\n </fieldset>\n</div>\n</ng-container>\n\n<ng-container *ngIf=\"viewCompStatus === 'overPaymentAddressCapture'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='OVERPAYMENTADDRESSCAPTUREPAGE'> \n <h1 class=\"govuk-heading-l\">Issue refund</h1>\n <h2 class=\"govuk-heading-m govuk-font19px\">Case reference: {{ccdCaseNumber | ccdHyphens }}</h2>\n <span id=\"how-contacted-conditional-hint\" class=\"govuk-hint govuk-font19px\">\n Payment reference: {{paymentGroup?.payments[0]?.reference}}\n </span>\n<ccpay-contact-details \n[addressObj] = notification\n(assignContactDetails)=\"getContactDetails($event)\"\n(redirectToIssueRefund)=\"gotoPaymentSelectPage($event)\" ></ccpay-contact-details>\n<p>\n <a (click)=\"goToCaseTransationPage($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n</p>\n</ng-container>\n\n<ng-container *ngIf=\"viewCompStatus === 'overpaymentcheckandanswer'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ADDREFUNDFORREMISSION'> \n <div class=\"govuk-warning-text\">\n \n <h1 class=\"heading-large\"> Check your answers</h1>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\"> {{paymentGroup.payments[0].reference}} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment amount</td>\n <td class=\"govuk-table__cell\">{{paymentGroup.payments[0].amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee amount</td>\n <td class=\"govuk-table__cell\">{{paymentGroup?.fees[0]?.net_amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td class=\"govuk-table__cell\">{{getOverPaymentValue() | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund reason</td>\n <td class=\"govuk-table__cell\">Over payment</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send to</td>\n <td class=\"govuk-table__cell\">{{orderParty}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send via</td>\n <td class=\"govuk-table__cell\">\n <div *ngIf=\"contactDetailsObj?.notification_type === 'EMAIL'\" class=\"contactDetails-width\">\n <strong>Email</strong>\n <br/>\n {{contactDetailsObj?.email}}\n </div>\n <div *ngIf=\"contactDetailsObj?.notification_type === 'LETTER'\" class=\"contactDetails-width\">\n <strong>Post</strong>\n <br/>\n {{contactDetailsObj?.address_line}}&nbsp;{{contactDetailsObj?.city}}&nbsp;{{contactDetailsObj?.county}}&nbsp;{{contactDetailsObj?.country}}&nbsp;{{contactDetailsObj?.postal_code}}\n </div>\n <a (click)=\"gotoAddressPage(contactDetailsObj)\" class=\"govuk-link right margin-top--size\" >Change</a>\n </td>\n </table>\n <button type=\"submit\" class=\"button govuk-button--secondary over-payment-alignment govuk-font19px\" (click)=\"gotoAddressPage(contactDetailsObj)\">Previous</button>\n <button type=\"submit\"\n [ngClass]='isContinueBtnDisabled ? \"button button--disabled govuk-!-margin-right-1 govuk-font19px\" : \"button govuk-!-margin-right-1 govuk-font19px\"'\n (click)=\"processRefund()\">\n Submit refund\n </button>\n <p>\n <a href=\"javascript:void(0)\" (click)=\"goToCaseTransationPage($event)\" class=\"govuk-link govuk-font19px\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n\n</ng-container>\n<ng-container *ngIf=\"viewStatus === 'refundconfirmationpage' && viewCompStatus !== 'overpayment' && viewCompStatus !== 'overPaymentAddressCapture' && viewCompStatus !== 'overpaymentcheckandanswer'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='RETROREMISSIONREFUNDCONFIRMATIONPAGE'> \n <div class=\"govuk-grid-row\">\n <div >\n <div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Refund submitted\n </h1>\n \n <div class=\"govuk-panel__body\">\n <p class=\"govuk-body white\"><strong>Refund reference: {{refundReference}}</strong></p>\n </div>\n \n </div>\n <h2 class=\"govuk-heading-l\">What happens next</h2>\n <p class=\"govuk-body\">\n A refund request for {{refundAmount | currency:'GBP':'symbol-narrow':'1.2-2' }} has been created and will be passed to a team leader to approve.\n </p>\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"goToCaseTransationPage($event)\" class=\"govuk-link pointer\" data-module=\"govuk-button\">\n Return to case\n </a>\n </p>\n </div>\n </div>\n\n</ng-container>\n</div>\n\n<ng-container *ngIf=\"viewStatus === 'payment-failure'\">\n <div class=\"payment-failure-alignment\">\n <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a href=\"javascript:void(0)\" (click)=\"goBackToPaymentView($event)\" class=\"govuk-back-link\">Back</a>\n </li>\n </ol>\n </div>\n <div class=\"govuk-grid-row\">\n <div class=\"column\">\n <h1 class=\"heading-large govuk-!-margin-top-0\">Failure event details</h1>\n </div>\n </div>\n <table>\n <tbody>\n\n <tr class=\"section\">\n <td class=\"bold\">Failure reference</td>\n <td>\t{{selectedPaymentsStatus.failure_reference}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Failure reason</td>\n <td>\t{{selectedPaymentsStatus.failure_reason}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Payment reference</td>\n <td>{{ selectedPaymentsStatus.payment_reference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Payment amount</td>\n <td> \u00A3{{ paymentGroup?.payments[0]?.amount | number:'.2' }}</td>\n\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Disputed amount</td>\n <td>\t\u00A3{{selectedPaymentsStatus.disputed_amount | number:'.2'}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Additional information</td>\n <td>\t{{selectedPaymentsStatus.additional_reference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Failure type</td>\n <td>\t{{ selectedPaymentsStatus.failure_type }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Failure event date and time</td>\n <td> {{ selectedPaymentsStatus.failure_event_date_time | date:'dd MMM yyyy HH:mm:ss' }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"selectedPaymentsStatus.has_amount_debited\">\n <td class=\"bold\">Has disputed amount debited</td>\n <td>\t{{selectedPaymentsStatus.has_amount_debited}}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"selectedPaymentsStatus.representment_status\">\n <td class=\"bold\">Status following representation of payment</td>\n <td>\t{{(selectedPaymentsStatus.representment_status === 'Yes' || selectedPaymentsStatus.representment_status === 'yes') ? 'Success' : 'Failure'}}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"selectedPaymentsStatus.representment_date\">\n <td class=\"bold\">Date payment represented</td>\n <td>\t{{selectedPaymentsStatus.representment_date | date:'dd MMM yyyy HH:mm:ss'}}</td>\n </tr>\n </tbody>\n </table>\n\n <div>\n </div>\n </div>\n</ng-container>\n",
1647
+ styles: [".payment-view-section .tb-col-w{width:330px}.payment-view-section .tr-border{border-bottom:2px solid}.payment-view-section .payment-view-alignment{margin-left:30px}.payment-view-section .govuk-button{font-size:19px;float:left;margin-top:2em}.payment-view-section .remission{margin-bottom:7em}.payment-view-section .govuk-error-summary__title{font-size:24px!important}.payment-view-section .govuk-table__cell,.payment-view-section .govuk-table__header{padding:0;line-height:1.3;vertical-align:middle}.payment-view-section .govuk-table__row{line-height:1.3}.payment-view-section .govuk-table__cell:last-child{text-align:right}.payment-view-section .text-transform::first-letter{text-transform:capitalize}.payment-view-section .govuk-link{cursor:pointer}.payment-view-section .mar-17{font-size:19px!important}.over-payment .contactDetails-width{width:70%}.over-payment .margin-top10px{margin-top:20px}.over-payment .govuk-font19px{font-size:19px!important}.over-payment .margin-top--size{margin-top:-30px}.over-payment .over-payment-alignment{margin-right:10px}.over-payment .govuk-button{font-size:19px;float:left;margin-top:2em}.over-payment td.govuk-table__cell{width:50%}.over-payment .govuk-label--s,.over-payment .govuk-warning-text__text,.over-payment .hmcts-currency-input__symbol{font-size:19px;font-weight:400}.over-payment .inline-error-class{outline:#a71414 solid 3px;outline-offset:0;border-color:#a71414}.over-payment .inline-error-message{color:#a71414;border-color:#a71414;font-weight:700;margin-top:10px;font-size:20px}.over-payment .govuk-button-group{padding-top:2em}.over-payment .heading-medium{margin-top:.875em}.over-payment .heading-large{margin-top:.25em}.over-payment .govuk-panel--confirmation{color:#fff;background:#00703c}.over-payment .govuk-panel__title{font-size:5rem}.over-payment .govuk-body,.over-payment .govuk-body-m{font-size:2.1875rem}.over-payment .govuk-link{cursor:pointer}.over-payment .govuk-radios__conditional{padding-top:12px!important}.over-payment .right{float:right;cursor:pointer}.over-payment .radio{float:right}.over-payment .white{color:#fff}"]
1538
1648
  }] }
1539
1649
  ];
1540
1650
  /** @nocollapse */
@@ -1668,6 +1778,15 @@ class RefundsService {
1668
1778
  postIssueRefund(body) {
1669
1779
  return this.https.post(`${this.paymentLibService.REFUNDS_API_ROOT}/refund`, body).pipe(catchError(this.errorHandlerService.handleError));
1670
1780
  }
1781
+ /**
1782
+ * @param {?} body
1783
+ * @param {?} refundRef
1784
+ * @param {?} notificationType
1785
+ * @return {?}
1786
+ */
1787
+ putResendOrEdit(body, refundRef, notificationType) {
1788
+ return this.https.put(`${this.paymentLibService.REFUNDS_API_ROOT}/resend/notification/${refundRef}?notificationType=${notificationType}`, body).pipe(catchError(this.errorHandlerService.handleError));
1789
+ }
1671
1790
  /**
1672
1791
  * @param {?} body
1673
1792
  * @param {?} refund_reference
@@ -1746,14 +1865,16 @@ RefundsService.ctorParameters = () => [
1746
1865
  class ProcessRefundComponent {
1747
1866
  /**
1748
1867
  * @param {?} RefundsService
1868
+ * @param {?} paymentViewService
1749
1869
  * @param {?} formBuilder
1750
1870
  * @param {?} OrderslistService
1751
1871
  * @param {?} paymentLibComponent
1752
1872
  * @param {?} router
1753
1873
  * @param {?} activeRoute
1754
1874
  */
1755
- constructor(RefundsService$$1, formBuilder, OrderslistService$$1, paymentLibComponent, router, activeRoute) {
1875
+ constructor(RefundsService$$1, paymentViewService, formBuilder, OrderslistService$$1, paymentLibComponent, router, activeRoute) {
1756
1876
  this.RefundsService = RefundsService$$1;
1877
+ this.paymentViewService = paymentViewService;
1757
1878
  this.formBuilder = formBuilder;
1758
1879
  this.OrderslistService = OrderslistService$$1;
1759
1880
  this.paymentLibComponent = paymentLibComponent;
@@ -1776,6 +1897,7 @@ class ProcessRefundComponent {
1776
1897
  this.isReasonEmpty = false;
1777
1898
  this.isReasonInvalid = false;
1778
1899
  this.successMsg = null;
1900
+ this.cpoDetails = null;
1779
1901
  this.isConfirmButtondisabled = true;
1780
1902
  }
1781
1903
  /**
@@ -1819,6 +1941,20 @@ class ProcessRefundComponent {
1819
1941
  if ((typeof this.paymentLibComponent.TAKEPAYMENT === 'string' && this.paymentLibComponent.TAKEPAYMENT === 'false') || (typeof this.paymentLibComponent.TAKEPAYMENT === 'boolean' && !this.paymentLibComponent.TAKEPAYMENT)) {
1820
1942
  this.isFromRefundListPage = true;
1821
1943
  }
1944
+ this.paymentViewService.getPartyDetails(this.ccdCaseNumber).subscribe((/**
1945
+ * @param {?} response
1946
+ * @return {?}
1947
+ */
1948
+ response => {
1949
+ this.cpoDetails = JSON.parse(response).content[0];
1950
+ }), (/**
1951
+ * @param {?} error
1952
+ * @return {?}
1953
+ */
1954
+ (error) => {
1955
+ this.errorMessage = (/** @type {?} */ (error.replace(/"/g, "")));
1956
+ this.isCPODown = true;
1957
+ }));
1822
1958
  }
1823
1959
  /**
1824
1960
  * @param {?} code
@@ -2031,30 +2167,16 @@ class ProcessRefundComponent {
2031
2167
  this.loadRefundListPage();
2032
2168
  }
2033
2169
  }
2034
- // loadCaseTransactionPage() {
2035
- // this.paymentLibComponent.isRefundStatusView = false;
2036
- // this.paymentLibCo}mponent.TAKEPAYMENT = true;
2037
- // this.paymentLibComponent.viewName = 'case-transactions';
2038
- // this.paymentViewService.getBSfeature().subscribe(
2039
- // features => {
2040
- // let result = JSON.parse(features).filter(feature => feature.uid === BS_ENABLE_FLAG);
2041
- // this.paymentLibComponent.ISBSENABLE = result[0] ? result[0].enable : false;
2042
- // },
2043
- // err => {
2044
- // this.paymentLibComponent.ISBSENABLE = false;
2045
- // }
2046
- // );
2047
- // let partUrl = `selectedOption=${this.paymentLibComponent.SELECTED_OPTION}`;
2048
- // partUrl += this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';
2049
- // partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';
2050
- // partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';
2051
- // partUrl += this.paymentLibComponent.ISSFENABLE ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';
2052
- // partUrl += `&caseType=${this.paymentLibComponent.CASETYPE}`;
2053
- // partUrl += this.isNewPcipalOff ? '&isNewPcipalOff=Enable' : '&isNewPcipalOff=Disable';
2054
- // partUrl += this.isOldPcipalOff ? '&isOldPcipalOff=Enable' : '&isOldPcipalOff=Disable';
2055
- // let url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=true&${partUrl}`;
2056
- // this.router.navigateByUrl(url);
2057
- // }
2170
+ /**
2171
+ * @return {?}
2172
+ */
2173
+ loadCaseTransactionPage() {
2174
+ this.OrderslistService.setnavigationPage('casetransactions');
2175
+ this.OrderslistService.setisFromServiceRequestPage(false);
2176
+ this.paymentLibComponent.viewName = 'case-transactions';
2177
+ this.paymentLibComponent.ISBSENABLE = true;
2178
+ this.paymentLibComponent.isRefundStatusView = false;
2179
+ }
2058
2180
  /**
2059
2181
  * @param {?} vals
2060
2182
  * @param {?} field
@@ -2082,19 +2204,27 @@ class ProcessRefundComponent {
2082
2204
  * @return {?}
2083
2205
  */
2084
2206
  goToCaseReview() {
2085
- this.router.navigate([`/cases/case-details/${this.ccdCaseNumber}`], { relativeTo: this.activeRoute });
2207
+ /** @type {?} */
2208
+ const isPayBubble = this.paymentLibComponent.isFromPayBubble;
2209
+ if (isPayBubble) {
2210
+ this.loadCaseTransactionPage();
2211
+ }
2212
+ else {
2213
+ this.router.navigate([`/cases/case-details/${this.ccdCaseNumber}`], { relativeTo: this.activeRoute });
2214
+ }
2086
2215
  }
2087
2216
  }
2088
2217
  ProcessRefundComponent.decorators = [
2089
2218
  { type: Component, args: [{
2090
2219
  selector: 'ccpay-process-refund',
2091
- template: "<ng-container *ngIf=\"viewStatus === 'RefundProcess'\">\n<div class=\"govuk-width-container\">\n\n <main class=\"govuk-main-wrapper govuk-!-padding-top-0\" [ngClass]=\"{'govuk-radios__conditional--hidden': isSuccesspageEnable}\" id=\"main-content\" role=\"main\">\n <div *ngIf=\"errorMessage.showError\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n {{errorMessage.title}}\n </h2>\n <div class=\"govuk-error-summary__body process-refund-font\">\n {{errorMessage.body}}\n </div>\n </div>\n </div>\n\n <div class=\"payment-view-alignment\">\n\n <div class=\"govuk-grid-row\">\n <div class=\"column\">\n <h1 class=\"heading-large govuk-!-margin-top-0\">Review refund details</h1>\n </div>\n </div>\n <table>\n <tbody>\n\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Payment to be refunded</td>\n <td>\t{{refundlistsource?.refund_reference}} ({{refundlistsource.amount | currency :'GBP':'symbol':'1.2-2' }})</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Reason for refund</td>\n <td>\t{{refundlistsource?.reason}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Amount to be refunded</td>\n <td>{{refundlistsource?.amount | currency :'GBP':'symbol':'1.2-2' }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Submitted by</td>\n <td>{{refundlistsource?.user_full_name}}</td>\n\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Date submitted</td>\n <td>\t{{refundlistsource?.date_created | date:'d MMMM yyyy' }}</td>\n </tr>\n\n </tbody>\n </table>\n\n <div>\n </div>\n </div>\n <div class=\"process-refund__panel\">\n <form [formGroup]=\"processRefundForm\" novalidate>\n <div class=\"\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"sign-in-hint\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <h1 class=\"heading-large\">\n What do you want to do with this refund?\n </h1>\n </legend>\n <div class=\"govuk-radios\" [ngClass]=\"{'form-group-error': refundActionsHasError}\">\n <p class=\"inline-error-message\"\n *ngIf=\"refundActionsHasError\">\n <span *ngIf=\"refundActionsHasError\">Please select an action</span>\n </p>\n <div class=\"govuk-radios__item\" *ngFor=\"let refundAction of refundActionList; let i = index;\">\n <input class=\"govuk-radios__input\" \n id=\"refundAction-{{i}}\" \n name=\"refundActionField\"\n type=\"radio\"\n formControlName=\"refundActionField\"\n (click)=\"checkRefundActions(refundAction.code)\"\n value=\"{{refundAction.code}}\">\n <label class=\"govuk-label govuk-radios__label process-refund-font\" for=\"refundAction-{{i}}\">\n {{refundAction.code}}\n </label>\n <div id=\"sign-in-item-hint\" class=\"govuk-hint govuk-radios__hint process-refund-font\">\n {{refundAction.label}}\n </div>\n </div>\n <div class=\"govuk-radios__conditional\" [ngClass]=\"{'govuk-radios__conditional--hidden': !isSendMeBackClicked}\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label process-refund-font\" for=\"contact-by-text\">\n Add a reason\n </label>\n <p class=\"inline-error-message\"\n *ngIf=\"isReasonFieldEmpty || isReasonFieldInvalid || reasonFieldMinHasError || reasonFieldMaxHasError\">\n <span *ngIf=\"isReasonFieldEmpty\">Add a reason</span>\n <span *ngIf=\"isReasonFieldInvalid\">Add a valid reason</span>\n <span *ngIf=\"reasonFieldMinHasError\">Reason should be at least 3 characters.</span>\n <span *ngIf=\"reasonFieldMaxHasError\">Reason should be 255 characters or under.</span>\n </p>\n <textarea class=\"govuk-textarea govuk-!-width-one-third reason-font\"\n [ngClass]=\"{'inline-error-class': isReasonFieldEmpty || isReasonFieldInvalid || reasonFieldMinHasError || reasonFieldMaxHasError}\"\n id=\"sendmeback\"\n name=\"sendMeBackField\" \n formControlName=\"sendMeBackField\"\n rows=\"5\"></textarea>\n \n </div>\n\n </div>\n \n </div>\n \n </fieldset>\n </div>\n\n <div [ngClass]=\"{'govuk-radios__conditional--hidden': !isRejectClicked}\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <h2 class=\"heading-medium\">\n Why are you rejecting this refund?\n </h2>\n </legend>\n <div class=\"govuk-radios\" [ngClass]=\"{'form-group-error': refundRejectReasonHasError}\">\n <p class=\"inline-error-message\"\n *ngIf=\"refundRejectReasonHasError\">\n <span *ngIf=\"refundRejectReasonHasError\">Please select a reject reason</span>\n </p>\n <div class=\"govuk-radios__item\" *ngFor=\"let refundRejectReason of refundRejectReasonList; let j = index;\">\n <input class=\"govuk-radios__input\" \n id=\"refundRejectReason-{{j}}\"\n formControlName=\"refundRejectReasonField\"\n name=\"refundRejectReasonField\"\n (click)=\"checkRefundActions(refundRejectReason.code)\"\n type=\"radio\" value=\"{{refundRejectReason.code}}\">\n <label class=\"govuk-label govuk-radios__label process-refund-font\" for=\"refundRejectReason-{{j}}\">\n {{refundRejectReason.name}}\n </label>\n </div>\n </div>\n <div class=\"govuk-radios__conditional\" [ngClass]=\"{'govuk-radios__conditional--hidden': !isOtherClicked}\" id=\"conditional-contact-3\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label process-refund-font \" for=\"contact-by-text\">\n Enter reason\n </label>\n <p class=\"inline-error-message\" *ngIf=\"isReasonEmpty || isReasonInvalid\">\n <span *ngIf=\"isReasonEmpty\">Enter reason.</span>\n <span *ngIf=\"isReasonInvalid\">Enter a valid reason</span>\n </p>\n <input class=\"govuk-input govuk-!-width-one-third reason-font\" id=\"otherReason\" \n [ngClass]=\"{'inline-error-class': isReasonEmpty || isReasonInvalid}\"\n formControlName=\"enterReasonField\" name=\"enterReasonField\" type=\"text\"></div>\n \n </div>\n \n </fieldset>\n </div>\n\n <div class=\"govuk-button-group\">\n <button (click)=\"redirecttoRefundListPage()\" class=\"govuk-button govuk-button--secondary marginright\"> Previous</button>\n <button (click)=\"processRefundSubmit()\" class=\"govuk-button button\"\n data-module=\"govuk-button\">\n Submit \n </button>\n <br/><br/>\n </div>\n \n <div *ngIf=\"!isFromRefundListPage\" class=\"govuk-button-group margin\">\n\n <p><a (click)=\"loadRefundsHomePage()\" class=\"govuk-link pointer\" data-module=\"govuk-button\">Cancel</a></p>\n</div>\n</form>\n </div>\n \n\n </main>\n \n <main class=\"govuk-main-wrapper govuk-main-wrapper--l success-page-padding--top25\" [ngClass]=\"{'govuk-radios__conditional--hidden': !isSuccesspageEnable}\" id=\"main-content\" role=\"main\" >\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-panel govuk-panel-refund--confirmation\">\n <h1 class=\"heading-xlarge\">\n {{successMsg}}\n </h1>\n </div>\n <p class=\"govuk-body process-refund-font\">\n <a (click) = \"goToCaseReview()\" class=\"govuk-link pointer\">Return to case</a>\n </p>\n </div>\n </main>\n</div>\n</ng-container>\n\n",
2220
+ template: "<ng-container *ngIf=\"viewStatus === 'RefundProcess'\">\n<div class=\"govuk-width-container\">\n\n <main class=\"govuk-main-wrapper govuk-!-padding-top-0\" [ngClass]=\"{'govuk-radios__conditional--hidden': isSuccesspageEnable}\" id=\"main-content\" role=\"main\">\n <div *ngIf=\"errorMessage.showError\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n {{errorMessage.title}}\n </h2>\n <div class=\"govuk-error-summary__body process-refund-font\">\n {{errorMessage.body}}\n </div>\n </div>\n </div>\n\n <div class=\"payment-view-alignment\">\n\n <div class=\"govuk-grid-row\">\n <div class=\"column\">\n <h1 class=\"heading-large govuk-!-margin-top-0\">Review refund details</h1>\n </div>\n </div>\n <table>\n <tbody>\n\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Payment to be refunded</td>\n <td>\t{{refundlistsource?.refund_reference}} ({{refundlistsource.amount | currency :'GBP':'symbol':'1.2-2' }})</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Reason for refund</td>\n <td>\t{{refundlistsource?.reason}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Amount to be refunded</td>\n <td>{{refundlistsource?.amount | currency :'GBP':'symbol':'1.2-2' }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Sent to</td>\n <td>{{cpoDetails?.responsibleParty}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Sent via</td>\n <td>\n <div *ngIf=\"refundlistsource?.contact_details?.notification_type === 'EMAIL'\" class=\"contactDetails-width font-size-19px\">\n <strong>Email</strong>\n <br/>\n {{refundlistsource?.contact_details?.email}}\n </div>\n <div *ngIf=\"refundlistsource?.contact_details?.notification_type === 'LETTER'\" class=\"contactDetails-width font-size-19px\">\n <strong>Post</strong>\n <br/>\n {{refundlistsource?.contact_details?.address_line}} {{refundlistsource?.contact_details?.city}} {{refundlistsource?.contact_details?.county}} {{refundlistsource?.contact_details?.country}} {{refundlistsource?.contact_details?.postal_code}}\n </div> \n </td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Submitted by</td>\n <td>{{refundlistsource?.user_full_name}}</td>\n\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Date submitted</td>\n <td>\t{{refundlistsource?.date_created | date:'d MMMM yyyy' }}</td>\n </tr>\n\n </tbody>\n </table>\n\n <div>\n </div>\n </div>\n <div class=\"process-refund__panel\">\n <form [formGroup]=\"processRefundForm\" novalidate>\n <div class=\"\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"sign-in-hint\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <h1 class=\"heading-large\">\n What do you want to do with this refund?\n </h1>\n </legend>\n <div class=\"govuk-radios\" [ngClass]=\"{'form-group-error': refundActionsHasError}\">\n <p class=\"inline-error-message\"\n *ngIf=\"refundActionsHasError\">\n <span *ngIf=\"refundActionsHasError\">Please select an action</span>\n </p>\n <div class=\"govuk-radios__item\" *ngFor=\"let refundAction of refundActionList; let i = index;\">\n <input class=\"govuk-radios__input\" \n id=\"refundAction-{{i}}\" \n name=\"refundActionField\"\n type=\"radio\"\n formControlName=\"refundActionField\"\n (click)=\"checkRefundActions(refundAction.code)\"\n value=\"{{refundAction.code}}\">\n <label class=\"govuk-label govuk-radios__label process-refund-font\" for=\"refundAction-{{i}}\">\n {{refundAction.code}}\n </label>\n <div id=\"sign-in-item-hint\" class=\"govuk-hint govuk-radios__hint process-refund-font\">\n {{refundAction.label}}\n </div>\n </div>\n <div class=\"govuk-radios__conditional\" [ngClass]=\"{'govuk-radios__conditional--hidden': !isSendMeBackClicked}\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label process-refund-font\" for=\"contact-by-text\">\n Add a reason\n </label>\n <p class=\"inline-error-message\"\n *ngIf=\"isReasonFieldEmpty || isReasonFieldInvalid || reasonFieldMinHasError || reasonFieldMaxHasError\">\n <span *ngIf=\"isReasonFieldEmpty\">Add a reason</span>\n <span *ngIf=\"isReasonFieldInvalid\">Add a valid reason</span>\n <span *ngIf=\"reasonFieldMinHasError\">Reason should be at least 3 characters.</span>\n <span *ngIf=\"reasonFieldMaxHasError\">Reason should be 255 characters or under.</span>\n </p>\n <textarea class=\"govuk-textarea govuk-!-width-one-third reason-font\"\n [ngClass]=\"{'inline-error-class': isReasonFieldEmpty || isReasonFieldInvalid || reasonFieldMinHasError || reasonFieldMaxHasError}\"\n id=\"sendmeback\"\n name=\"sendMeBackField\" \n formControlName=\"sendMeBackField\"\n rows=\"5\"></textarea>\n \n </div>\n\n </div>\n \n </div>\n \n </fieldset>\n </div>\n\n <div [ngClass]=\"{'govuk-radios__conditional--hidden': !isRejectClicked}\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <h2 class=\"heading-medium\">\n Why are you rejecting this refund?\n </h2>\n </legend>\n <div class=\"govuk-radios\" [ngClass]=\"{'form-group-error': refundRejectReasonHasError}\">\n <p class=\"inline-error-message\"\n *ngIf=\"refundRejectReasonHasError\">\n <span *ngIf=\"refundRejectReasonHasError\">Please select a reject reason</span>\n </p>\n <div class=\"govuk-radios__item\" *ngFor=\"let refundRejectReason of refundRejectReasonList; let j = index;\">\n <input class=\"govuk-radios__input\" \n id=\"refundRejectReason-{{j}}\"\n formControlName=\"refundRejectReasonField\"\n name=\"refundRejectReasonField\"\n (click)=\"checkRefundActions(refundRejectReason.code)\"\n type=\"radio\" value=\"{{refundRejectReason.code}}\">\n <label class=\"govuk-label govuk-radios__label process-refund-font\" for=\"refundRejectReason-{{j}}\">\n {{refundRejectReason.name}}\n </label>\n </div>\n </div>\n <div class=\"govuk-radios__conditional\" [ngClass]=\"{'govuk-radios__conditional--hidden': !isOtherClicked}\" id=\"conditional-contact-3\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label process-refund-font \" for=\"contact-by-text\">\n Enter reason\n </label>\n <p class=\"inline-error-message\" *ngIf=\"isReasonEmpty || isReasonInvalid\">\n <span *ngIf=\"isReasonEmpty\">Enter reason.</span>\n <span *ngIf=\"isReasonInvalid\">Enter a valid reason</span>\n </p>\n <input class=\"govuk-input govuk-!-width-one-third reason-font\" id=\"otherReason\" \n [ngClass]=\"{'inline-error-class': isReasonEmpty || isReasonInvalid}\"\n formControlName=\"enterReasonField\" name=\"enterReasonField\" type=\"text\"></div>\n \n </div>\n \n </fieldset>\n </div>\n\n <div class=\"govuk-button-group\">\n <button (click)=\"redirecttoRefundListPage()\" class=\"govuk-button govuk-button--secondary marginright\"> Previous</button>\n <button (click)=\"processRefundSubmit()\" class=\"govuk-button button\"\n data-module=\"govuk-button\">\n Submit \n </button>\n <br/><br/>\n </div>\n \n <div *ngIf=\"!isFromRefundListPage\" class=\"govuk-button-group margin\">\n\n <p><a (click)=\"loadRefundsHomePage()\" class=\"govuk-link pointer\" data-module=\"govuk-button\">Cancel</a></p>\n</div>\n</form>\n </div>\n \n\n </main>\n \n <main class=\"govuk-main-wrapper govuk-main-wrapper--l success-page-padding--top25\" [ngClass]=\"{'govuk-radios__conditional--hidden': !isSuccesspageEnable}\" id=\"main-content\" role=\"main\" >\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-panel govuk-panel-refund--confirmation\">\n <h1 class=\"heading-xlarge\">\n {{successMsg}}\n </h1>\n </div>\n <p class=\"govuk-body process-refund-font\">\n <a href=\"Javascript:void(0)\" (click)=\"goToCaseReview()\" class=\"govuk-link pointer\">Return to case</a>\n </p>\n </div>\n </main>\n</div>\n</ng-container>\n\n",
2092
2221
  styles: [".tb-col-w{width:330px}.tr-border{border-bottom:2px solid}.payment-view-alignment{margin-left:30px}.govuk-button{float:left!important;font-size:19px;margin-top:2em!important}.remission{margin-bottom:7em}.process-refund-font{font-size:19px!important}.govuk-radios__conditional--hidden{display:none}.inline-error-message{color:#c11717;font-weight:700;margin-top:10px;border-color:#c11717}.inline-error-class{outline:#c11717 solid 3px;outline-offset:0;border-color:#c11717}.form-group-error{border-left:5px solid #c11717;padding-left:15px}.govuk-panel-refund--confirmation{color:#fff;background:#00703c}.process-refund__panel{display:flex;flex-direction:column;margin-left:25px;margin-top:30px}.button-margin--left25{margin-left:25px}.success-page-padding--top25{padding-top:25px}.margin{margin-top:5em}.marginright{margin-right:1.5em}.govuk-textarea{line-height:2.25}.reason-font{font-size:19px!important}.pointer{cursor:pointer}"]
2093
2222
  }] }
2094
2223
  ];
2095
2224
  /** @nocollapse */
2096
2225
  ProcessRefundComponent.ctorParameters = () => [
2097
2226
  { type: RefundsService },
2227
+ { type: PaymentViewService },
2098
2228
  { type: FormBuilder },
2099
2229
  { type: OrderslistService },
2100
2230
  { type: PaymentLibComponent },
@@ -2118,10 +2248,10 @@ class RefundListComponent {
2118
2248
  this.refundService = refundService;
2119
2249
  this.submittedRefundList = [];
2120
2250
  this.rejectedRefundList = [];
2251
+ // approvalStatus = 'Sent for approval';
2252
+ // rejectStatus = 'Update required';
2121
2253
  this.approvalStatus = 'Sent for approval';
2122
2254
  this.rejectStatus = 'Update required';
2123
- // approvalStatus = 'sent for approval';
2124
- // rejectStatus = 'sent back';
2125
2255
  this.errorMessage = null;
2126
2256
  this.isAuthorized = true;
2127
2257
  }
@@ -2377,7 +2507,7 @@ class StatusHistoryComponent {
2377
2507
  StatusHistoryComponent.decorators = [
2378
2508
  { type: Component, args: [{
2379
2509
  selector: 'ccpay-payment-statuses',
2380
- template: "<div class=\"column\">\n <h2 class=\"heading-medium\">{{ pageTitle }}</h2>\n</div>\n\n\n<div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\" *ngIf=\"errorMessage\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Payment status history could not be retrieved\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n</div>\n\n<div *ngIf=\"!errorMessage && statuses\">\n <table>\n <thead>\n <tr>\n <th>Status</th>\n <th *ngIf=\"isTakePayment\">Amount</th>\n <th>Date and time</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let status of statuses.status_histories\">\n <td>{{ status.status }}</td>\n <td *ngIf=\"isTakePayment\">\u00A3{{ statuses.amount | number:'.2' }}</td>\n <td>{{ status.date_created | date:'dd MMMM yyyy HH:mm:ss'}}</td>\n </tr>\n </tbody>\n </table>\n</div>\n",
2510
+ template: "<div class=\"column\">\n <h2 class=\"heading-medium\">{{ pageTitle }}</h2>\n</div>\n\n\n<div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\" *ngIf=\"errorMessage\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Payment status history could not be retrieved\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n</div>\n\n<div *ngIf=\"!errorMessage && statuses\">\n <table>\n <thead>\n <tr>\n <th>Status</th>\n <th *ngIf=\"isTakePayment\">Amount</th>\n <th>Date and time</th>\n </tr>\n </thead> \n <tbody>\n <tr *ngFor=\"let status of statuses.status_histories\">\n <td>{{ status.status }}</td>\n <td *ngIf=\"isTakePayment\">\u00A3{{ statuses.amount | number:'.2' }}</td>\n <td>{{ status.date_created | date:'dd MMMM yyyy hh:mm:ss'}}</td>\n </tr>\n </tbody>\n </table>\n</div>\n",
2381
2511
  styles: [""]
2382
2512
  }] }
2383
2513
  ];
@@ -2394,15 +2524,429 @@ StatusHistoryComponent.propDecorators = {
2394
2524
  * @fileoverview added by tsickle
2395
2525
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2396
2526
  */
2397
- class PbaDetailsComponent {
2398
- constructor() { }
2527
+ class NotificationService {
2528
+ /**
2529
+ * @param {?} http
2530
+ * @param {?} https
2531
+ * @param {?} errorHandlerService
2532
+ * @param {?} paymentLibService
2533
+ */
2534
+ constructor(http, https, errorHandlerService, paymentLibService) {
2535
+ this.http = http;
2536
+ this.https = https;
2537
+ this.errorHandlerService = errorHandlerService;
2538
+ this.paymentLibService = paymentLibService;
2539
+ }
2399
2540
  /**
2541
+ * @param {?} reference
2400
2542
  * @return {?}
2401
2543
  */
2402
- ngOnInit() {
2544
+ getRefundNotification(reference) {
2545
+ return this.http.get(`${this.paymentLibService.NOTIFICATION_API_ROOT}/notifications/${reference}`, {
2546
+ withCredentials: true
2547
+ })
2548
+ .pipe(catchError(this.errorHandlerService.handleError));
2549
+ }
2550
+ /**
2551
+ * @param {?} postcode
2552
+ * @return {?}
2553
+ */
2554
+ getAddressByPostcode(postcode) {
2555
+ return this.http.get(`${this.paymentLibService.NOTIFICATION_API_ROOT}/search/places/v1/postcode?postcode=${postcode}`, {
2556
+ withCredentials: true
2557
+ })
2558
+ .pipe(catchError(this.errorHandlerService.handleError));
2403
2559
  }
2404
2560
  }
2405
- PbaDetailsComponent.decorators = [
2561
+ NotificationService.decorators = [
2562
+ { type: Injectable, args: [{
2563
+ providedIn: 'root'
2564
+ },] }
2565
+ ];
2566
+ /** @nocollapse */
2567
+ NotificationService.ctorParameters = () => [
2568
+ { type: HttpClient },
2569
+ { type: WebComponentHttpClient },
2570
+ { type: ErrorHandlerService },
2571
+ { type: PaymentLibService }
2572
+ ];
2573
+ /** @nocollapse */ NotificationService.ngInjectableDef = defineInjectable({ factory: function NotificationService_Factory() { return new NotificationService(inject(HttpClient), inject(WebComponentHttpClient), inject(ErrorHandlerService), inject(PaymentLibService)); }, token: NotificationService, providedIn: "root" });
2574
+
2575
+ /**
2576
+ * @fileoverview added by tsickle
2577
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2578
+ */
2579
+ class ContactDetailsComponent {
2580
+ /**
2581
+ * @param {?} formBuilder
2582
+ * @param {?} notificationService
2583
+ * @param {?} paymentLibComponent
2584
+ */
2585
+ constructor(formBuilder, notificationService, paymentLibComponent) {
2586
+ this.formBuilder = formBuilder;
2587
+ this.notificationService = notificationService;
2588
+ this.paymentLibComponent = paymentLibComponent;
2589
+ this.assignContactDetails = new EventEmitter();
2590
+ this.assignContactDetailsInFefundsList = new EventEmitter();
2591
+ this.redirectToIssueRefund = new EventEmitter();
2592
+ this.pageTitle = 'Payment status history';
2593
+ this.isEmailSAddressClicked = true;
2594
+ this.isShowPickAddress = false;
2595
+ this.isPostcodeClicked = false;
2596
+ this.isManualAddressClicked = false;
2597
+ this.addressPostcodeList = [];
2598
+ this.isAddressBoxEmpty = false;
2599
+ this.isEmailEmpty = false;
2600
+ this.emailHasError = false;
2601
+ this.isPostcodeEmpty = false;
2602
+ this.postcodeHasError = false;
2603
+ this.isaddressLine1Empty = false;
2604
+ this.addressLine1HasError = false;
2605
+ this.addressLine2HasError = false;
2606
+ this.isTownOrCityEmpty = false;
2607
+ this.townOrCityHasError = false;
2608
+ this.isCountyEmpty = false;
2609
+ this.countyHasError = false;
2610
+ this.isMPostcodeEmpty = false;
2611
+ this.mpostcodeHasError = false;
2612
+ this.isCountryEmpty = false;
2613
+ }
2614
+ /**
2615
+ * @return {?}
2616
+ */
2617
+ ngOnInit() {
2618
+ this.resetForm([false, false, false, false, false, false, false, false, false, false, false, false, false, false], 'all');
2619
+ this.emailAddressForm = this.formBuilder.group({
2620
+ email: new FormControl('', Validators.compose([
2621
+ Validators.required,
2622
+ Validators.pattern('^[a-z0-9._%+-]+@[a-z0-9-]+\\.[a-z]{2,4}$')
2623
+ ]))
2624
+ });
2625
+ this.postCodeForm = this.formBuilder.group({
2626
+ postcode: new FormControl('', Validators.compose([
2627
+ Validators.required,
2628
+ Validators.pattern('^([A-Za-z]{1,2}[0-9]{1,2}[A-Za-z]{0,1} ?[0-9][A-Za-z]{2})')
2629
+ ]))
2630
+ });
2631
+ this.manualAddressForm = this.formBuilder.group({
2632
+ addressl1: new FormControl('', Validators.compose([
2633
+ Validators.required,
2634
+ Validators.pattern('^[a-zA-Z0-9\\s,\'-]*$')
2635
+ ])),
2636
+ addressl2: new FormControl('', Validators.compose([
2637
+ Validators.pattern('^[a-zA-Z0-9\\s,\'-]*$')
2638
+ ])),
2639
+ townorcity: new FormControl('', Validators.compose([
2640
+ Validators.required,
2641
+ Validators.pattern('^[a-zA-Z0-9\\s,\'-]*$')
2642
+ ])),
2643
+ county: new FormControl('', Validators.compose([
2644
+ Validators.pattern('^[a-zA-Z0-9\\s,\'-]*$')
2645
+ ])),
2646
+ mpostcode: new FormControl('', Validators.compose([
2647
+ Validators.required,
2648
+ Validators.pattern('^([A-Za-z]{1,2}[0-9]{1,2}[A-Za-z]{0,1} ?[0-9][A-Za-z]{2})')
2649
+ ])),
2650
+ country: new FormControl('', Validators.compose([
2651
+ Validators.required
2652
+ ]))
2653
+ });
2654
+ if (this.addressObj !== undefined && this.addressObj !== '') {
2655
+ this.setEditDetails();
2656
+ }
2657
+ if (this.isEditOperationInRefundList === undefined) {
2658
+ this.isEditOperationInRefundList = false;
2659
+ }
2660
+ }
2661
+ /**
2662
+ * @return {?}
2663
+ */
2664
+ setEditDetails() {
2665
+ if (this.addressObj.notification_type === 'EMAIL') {
2666
+ this.isEmailSAddressClicked = true;
2667
+ this.isPostcodeClicked = false;
2668
+ this.isManualAddressClicked = false;
2669
+ this.emailAddressForm.setValue({ email: this.addressObj.contact_details.email });
2670
+ }
2671
+ else if (this.addressObj.notification_type === 'LETTER') {
2672
+ this.isEmailSAddressClicked = false;
2673
+ this.isPostcodeClicked = true;
2674
+ this.isManualAddressClicked = true;
2675
+ this.manualAddressForm.patchValue({
2676
+ addressl1: this.addressObj.contact_details.address_line,
2677
+ townorcity: this.addressObj.contact_details.city,
2678
+ county: this.addressObj.contact_details.county,
2679
+ country: this.addressObj.contact_details.country,
2680
+ mpostcode: this.addressObj.contact_details.postal_code
2681
+ });
2682
+ }
2683
+ }
2684
+ /**
2685
+ * @param {?} type
2686
+ * @param {?} isLinkedClied
2687
+ * @return {?}
2688
+ */
2689
+ selectContactOption(type, isLinkedClied) {
2690
+ this.resetForm([false, false, false, false, false, false, false, false, false, false, false, false, false, false, false], 'all');
2691
+ if (type === 'Email' && isLinkedClied === 'false') {
2692
+ this.isEmailSAddressClicked = true;
2693
+ this.isPostcodeClicked = false;
2694
+ this.isManualAddressClicked = false;
2695
+ }
2696
+ else if (type === 'Postcode' && isLinkedClied === 'false') {
2697
+ this.isEmailSAddressClicked = false;
2698
+ this.isPostcodeClicked = true;
2699
+ this.isManualAddressClicked = false;
2700
+ }
2701
+ else if (type === 'Postcode' && isLinkedClied === 'true') {
2702
+ this.isEmailSAddressClicked = false;
2703
+ this.isPostcodeClicked = true;
2704
+ this.isManualAddressClicked = true;
2705
+ }
2706
+ }
2707
+ /**
2708
+ * @return {?}
2709
+ */
2710
+ finalFormSubmit() {
2711
+ this.resetForm([false, false, false, false, false, false, false, false, false, false, false, false, false, false, false], 'all');
2712
+ if (this.isEmailSAddressClicked) {
2713
+ /** @type {?} */
2714
+ const emailField = this.emailAddressForm.controls.email;
2715
+ if (this.emailAddressForm.valid) {
2716
+ if (!this.isEditOperationInRefundList) {
2717
+ this.assignContactDetails.emit({
2718
+ email: emailField.value,
2719
+ notification_type: 'EMAIL'
2720
+ });
2721
+ }
2722
+ else {
2723
+ this.assignContactDetailsInFefundsList.emit({
2724
+ email: emailField.value,
2725
+ notification_type: 'EMAIL'
2726
+ });
2727
+ }
2728
+ }
2729
+ else {
2730
+ if (emailField.value == '') {
2731
+ this.resetForm([true, false, false, false, false, false, false, false, false, false, false, false, false, false], 'email');
2732
+ }
2733
+ if (emailField.value != '' && emailField.invalid) {
2734
+ this.resetForm([false, true, false, false, false, false, false, false, false, false, false, false, false, false], 'email');
2735
+ }
2736
+ }
2737
+ }
2738
+ else if (this.isPostcodeClicked && !this.isManualAddressClicked) {
2739
+ this.postcodeValidation('FS');
2740
+ }
2741
+ else if (this.isPostcodeClicked && this.isManualAddressClicked) {
2742
+ /** @type {?} */
2743
+ const fieldCtrls = this.manualAddressForm.controls;
2744
+ if (this.manualAddressForm.valid) {
2745
+ if (!this.isEditOperationInRefundList) {
2746
+ this.assignContactDetails.emit({
2747
+ address_line: fieldCtrls.addressl1.value + ' ' + fieldCtrls.addressl2.value,
2748
+ city: fieldCtrls.townorcity.value,
2749
+ county: fieldCtrls.county.value,
2750
+ postal_code: fieldCtrls.mpostcode.value,
2751
+ country: fieldCtrls.country.value,
2752
+ notification_type: 'LETTER'
2753
+ });
2754
+ }
2755
+ else {
2756
+ this.assignContactDetailsInFefundsList.emit({
2757
+ address_line: fieldCtrls.addressl1.value + ' ' + fieldCtrls.addressl2.value,
2758
+ city: fieldCtrls.townorcity.value,
2759
+ county: fieldCtrls.county.value,
2760
+ postal_code: fieldCtrls.mpostcode.value,
2761
+ country: fieldCtrls.country.value,
2762
+ notification_type: 'LETTER'
2763
+ });
2764
+ }
2765
+ }
2766
+ else {
2767
+ if (fieldCtrls.addressl1.value == '') {
2768
+ this.resetForm([false, false, false, false, true, false, false, false, false, false, false, false, false, false], 'address1');
2769
+ }
2770
+ if (fieldCtrls.addressl1.value != '' && fieldCtrls.addressl1.invalid) {
2771
+ this.resetForm([false, false, false, false, false, true, false, false, false, false, false, false, false, false], 'address1');
2772
+ }
2773
+ if (fieldCtrls.addressl2.value != '' && fieldCtrls.addressl2.invalid) {
2774
+ this.resetForm([false, false, false, false, false, false, true, false, false, false, false, false, false, false], 'address2');
2775
+ }
2776
+ if (fieldCtrls.townorcity.value == '') {
2777
+ this.resetForm([false, false, false, false, false, false, false, true, false, false, false, false, false, false], 'town');
2778
+ }
2779
+ if (fieldCtrls.townorcity.value != '' && fieldCtrls.townorcity.invalid) {
2780
+ this.resetForm([false, false, false, false, false, false, false, false, true, false, false, false, false, false], 'town');
2781
+ }
2782
+ if (fieldCtrls.county.value == '') {
2783
+ this.resetForm([false, false, false, false, false, false, false, false, false, true, false, false, false, false], 'county');
2784
+ }
2785
+ if (fieldCtrls.county.value != '' && fieldCtrls.county.invalid) {
2786
+ this.resetForm([false, false, false, false, false, false, false, false, false, false, true, false, false, false], 'county');
2787
+ }
2788
+ if (fieldCtrls.mpostcode.value == '') {
2789
+ this.resetForm([false, false, false, false, false, false, false, false, false, false, false, true, false, false], 'mpostcode');
2790
+ }
2791
+ if (fieldCtrls.mpostcode.value != '' && fieldCtrls.mpostcode.invalid) {
2792
+ this.resetForm([false, false, false, false, false, false, false, false, false, false, false, false, true, false], 'mpostcode');
2793
+ }
2794
+ if (fieldCtrls.country.value == '') {
2795
+ this.resetForm([false, false, false, false, false, false, false, false, false, false, false, false, false, true], 'country');
2796
+ }
2797
+ }
2798
+ }
2799
+ }
2800
+ /**
2801
+ * @param {?} str
2802
+ * @return {?}
2803
+ */
2804
+ postcodeValidation(str) {
2805
+ this.resetForm([false, false, false, false, false, false, false, false, false, false, false, false, false, false, false], 'all');
2806
+ /** @type {?} */
2807
+ const postcodeField = this.postCodeForm.controls.postcode;
2808
+ if (this.postCodeForm.valid) {
2809
+ if (str === 'FA') {
2810
+ this.notificationService.getAddressByPostcode(postcodeField.value).subscribe((/**
2811
+ * @param {?} refundsNotification
2812
+ * @return {?}
2813
+ */
2814
+ refundsNotification => {
2815
+ this.addressPostcodeList = refundsNotification['data']['results'];
2816
+ this.isShowPickAddress = refundsNotification['data']['header'].totalresults > 0;
2817
+ if (!this.isShowPickAddress) {
2818
+ this.resetForm([false, false, false, true, false, false, false, false, false, false, false, false, false], 'postcode');
2819
+ }
2820
+ })),
2821
+ (/**
2822
+ * @param {?} error
2823
+ * @return {?}
2824
+ */
2825
+ (error) => {
2826
+ this.isShowPickAddress = false;
2827
+ this.errorMessage = error.replace(/"/g, "");
2828
+ });
2829
+ }
2830
+ else if (str === 'FS') {
2831
+ if (this.postcodeAddress !== undefined && this.postcodeAddress) {
2832
+ this.isAddressBoxEmpty = false;
2833
+ /** @type {?} */
2834
+ let addressLine = "";
2835
+ /** @type {?} */
2836
+ let addressArray = this.postcodeAddress.ADDRESS.split(",");
2837
+ for (let i = 0; i < addressArray.length - 2; i++) {
2838
+ addressLine += addressArray[i];
2839
+ }
2840
+ /** @type {?} */
2841
+ const addressObject = {
2842
+ address_line: addressLine,
2843
+ city: this.postcodeAddress.POST_TOWN,
2844
+ county: this.postcodeAddress.LOCAL_CUSTODIAN_CODE_DESCRIPTION,
2845
+ postal_code: this.postcodeAddress.POSTCODE,
2846
+ country: 'United Kingdom',
2847
+ notification_type: 'LETTER'
2848
+ };
2849
+ if (!this.isEditOperationInRefundList) {
2850
+ this.assignContactDetails.emit(addressObject);
2851
+ }
2852
+ else {
2853
+ this.assignContactDetailsInFefundsList.emit(addressObject);
2854
+ }
2855
+ }
2856
+ else {
2857
+ this.isAddressBoxEmpty = true;
2858
+ }
2859
+ }
2860
+ }
2861
+ else {
2862
+ if (postcodeField.value == '') {
2863
+ this.resetForm([false, false, true, false, false, false, false, false, false, false, false, false, false], 'postcode');
2864
+ }
2865
+ if (postcodeField.value != '' && postcodeField.invalid) {
2866
+ this.resetForm([false, false, false, true, false, false, false, false, false, false, false, false, false], 'postcode');
2867
+ }
2868
+ }
2869
+ }
2870
+ /**
2871
+ * @param {?} event
2872
+ * @return {?}
2873
+ */
2874
+ redirection(event) {
2875
+ this.redirectToIssueRefund.emit(event);
2876
+ }
2877
+ /**
2878
+ * @param {?} val
2879
+ * @param {?} field
2880
+ * @return {?}
2881
+ */
2882
+ resetForm(val, field) {
2883
+ if (field === 'email' || field === 'all') {
2884
+ this.isEmailEmpty = val[0];
2885
+ this.emailHasError = val[1];
2886
+ }
2887
+ if (field === 'postcode' || field === 'all') {
2888
+ this.isPostcodeEmpty = val[2];
2889
+ this.postcodeHasError = val[3];
2890
+ }
2891
+ if (field === 'address1' || field === 'all') {
2892
+ this.isaddressLine1Empty = val[4];
2893
+ this.addressLine1HasError = val[5];
2894
+ }
2895
+ if (field === 'address2' || field === 'all') {
2896
+ this.addressLine2HasError = val[6];
2897
+ }
2898
+ if (field === 'town' || field === 'all') {
2899
+ this.isTownOrCityEmpty = val[7];
2900
+ this.townOrCityHasError = val[8];
2901
+ }
2902
+ if (field === 'county' || field === 'all') {
2903
+ this.isCountyEmpty = val[9];
2904
+ this.countyHasError = val[10];
2905
+ }
2906
+ if (field === 'mpostcode' || field === 'all') {
2907
+ this.isMPostcodeEmpty = val[11];
2908
+ this.mpostcodeHasError = val[12];
2909
+ }
2910
+ if (field === 'country' || field === 'all') {
2911
+ this.isCountryEmpty = val[13];
2912
+ }
2913
+ }
2914
+ }
2915
+ ContactDetailsComponent.decorators = [
2916
+ { type: Component, args: [{
2917
+ selector: 'ccpay-contact-details',
2918
+ template: "<fieldset class=\"govuk-fieldset contact-details--size\">\n <hr class=\"govuk-section-break govuk-section-break--m govuk-section-break--visible\">\n <div class=\"govuk-form-group\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--s govuk-font19px\">\n {{ isEditOperation ? 'Edit contact information' : 'Contact information' }}\n </legend>\n <div id=\"contact-hint\" class=\"govuk-hint govuk-font19px\">\n Notifications will be sent via email or post when this refund is issued or rejected. You can only choose one option.\n </div>\n <div class=\"govuk-form-group\">\n <fieldset class=\"govuk-fieldset\">\n <div class=\"govuk-radios govuk-radios--conditional\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"contact\" name=\"contact\" (click)=\"selectContactOption('Email', 'false')\" type=\"radio\" value=\"email\" [checked]=\"isEmailSAddressClicked\" aria-controls=\"conditional-contact\" aria-expanded=\"true\">\n <label class=\"govuk-label govuk-radios__label govuk-font19px\" for=\"contact\">\n Email\n </label>\n </div>\n <div class=\"govuk-radios__conditional\" id=\"conditional-contact-email\" *ngIf=\"isEmailSAddressClicked\">\n <form [formGroup]=\"emailAddressForm\" novalidate>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label \" for=\"email\">\n <span class=\"govuk-hint govuk-font19px\">Information about this refund will be sent to this email address.</span>\n </label>\n\n <div id=\"email-hint\" class=\"govuk-hint\">\n </div>\n <input class=\"govuk-input govuk-font19px\" id=\"email\" name=\"\" type=\"email\" [ngClass]=\"{ 'inline-error-class': isEmailEmpty || emailHasError }\" value=\"{{addressObj?.contact_details?.email}}\" formControlName=\"email\" aria-describedby=\"email-hint\">\n <p class=\"inline-error-message\" *ngIf=\"isEmailEmpty || emailHasError\">\n <span *ngIf=\"isEmailEmpty\">Enter a email address.</span>\n <span *ngIf=\"emailHasError\">Enter a valid email address.</span>\n </p>\n </div>\n </form>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"contact-2\" name=\"contact\" (click)=\"selectContactOption('Postcode', 'false')\" type=\"radio\" [checked]=\"isPostcodeClicked\" value=\"post\" aria-controls=\"conditional-contact-2\" aria-expanded=\"false\">\n <label class=\"govuk-label govuk-radios__label govuk-font19px\" for=\"contact-2\">\n Post\n </label>\n </div>\n <div class=\"govuk-radios__conditional govuk-radios__conditional--hidden\" id=\"conditional-contact-postcode\" *ngIf=\"isPostcodeClicked && !isManualAddressClicked\">\n <form [formGroup]=\"postCodeForm\" novalidate>\n <label class=\"govuk-label govuk-font19px\" for=\"address-postcode\">\n <span class=\"govuk-hint govuk-font19px\">Information about this refund will be sent to this address.</span>Postcode\n </label>\n <div class=\"postcode-align-css\">\n <div class=\"govuk-form-group govuk-margin-right-10px\">\n <input class=\"govuk-input govuk-input--width-10\" id=\"address-postcode\" name=\"address-postcode\" [ngClass]=\"{ 'inline-error-class': isPostcodeEmpty || postcodeHasError }\" formControlName=\"postcode\" type=\"text\" autocomplete=\"postal-code\">\n <p class=\"inline-error-message\" *ngIf=\"isPostcodeEmpty || postcodeHasError\">\n <span *ngIf=\"isPostcodeEmpty\">Enter a postcode.</span>\n <span *ngIf=\"postcodeHasError\">Enter a valid postcode.</span>\n </p>\n </div>\n <div class=\"govuk-button-group\">\n <button class=\"govuk-button govuk-button--secondary govuk-font19px\" (click)=\"postcodeValidation('FA')\" data-module=\"govuk-button\">\n Find address\n </button>\n </div>\n </div>\n </form>\n <div class=\"govuk-form-group govuk-margin-btm-20px\" *ngIf=\"isShowPickAddress\">\n <label class=\"govuk-label govuk-font19px\" for=\"country\">\n Pick an address\n </label>\n <select class=\"govuk-select govuk-font19px\" [(ngModel)]=\"postcodeAddress\" id=\"postcodeAddress\" [ngClass]=\"{ 'inline-error-class': isAddressBoxEmpty }\" name=\"postcodeAddress\">\n <option *ngFor=\"let address of addressPostcodeList;\" [ngValue]=\"address.DPA\" > {{address.DPA.ADDRESS}}</option>\n </select> \n <p class=\"inline-error-message\" *ngIf=\"isAddressBoxEmpty\">\n <span *ngIf=\"isAddressBoxEmpty\">Please select an address.</span>\n </p>\n </div>\n <details class=\"govuk-details\" data-module=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text govuk-font19px\">\n <a href=\"Javascript:void(0);\" (click)=\"selectContactOption('Postcode', 'true')\"> Enter address manually</a>\n </span>\n </summary>\n </details>\n </div>\n <div class=\"govuk-radios__conditional\" id=\"conditional-contact-manual\" *ngIf=\"isPostcodeClicked && isManualAddressClicked\">\n <form [formGroup]=\"manualAddressForm\" novalidate>\n\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-font19px\" for=\"address-line-1\">\n <span class=\"govuk-hint govuk-font19px\">Information about this refund will be sent to this address.</span>Building and street <span class=\"govuk-visually-hidden\">line 1 of 2</span>\n </label>\n <input class=\"govuk-input govuk-font19px\" id=\"address-line-1\" name=\"address-line-1\" [ngClass]=\"{ 'inline-error-class': isaddressLine1Empty || addressLine1HasError }\" value=\"{{addressObj?.contact_details?.address_line}}\" formControlName=\"addressl1\" type=\"text\" autocomplete=\"address-line1\">\n <p class=\"inline-error-message\" *ngIf=\"isaddressLine1Empty || addressLine1HasError\">\n <span *ngIf=\"isaddressLine1Empty\">Enter a Building and street.</span>\n <span *ngIf=\"addressLine1HasError\">Enter a valid Building and street.</span>\n </p> \n </div>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"address-line-2\">\n <span class=\"govuk-visually-hidden govuk-font19px\">Building and street line 2 of 2</span>\n </label>\n <input class=\"govuk-input govuk-font19px\" id=\"address-line-2\" name=\"address-line-2\" [ngClass]=\"{ 'inline-error-class': addressLine2HasError}\" formControlName=\"addressl2\" type=\"text\" autocomplete=\"address-line2\">\n <p class=\"inline-error-message\" *ngIf=\"addressLine2HasError\">\n <span *ngIf=\"addressLine2HasError\">Enter a valid Building and street line 2 of 2.</span>\n </p> \n </div>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-font19px\" for=\"address-town\">\n Town or city\n </label>\n <input class=\"govuk-input govuk-!-width-two-thirds govuk-font19px\" id=\"address-town\" name=\"address-town\" [ngClass]=\"{ 'inline-error-class': isTownOrCityEmpty || townOrCityHasError}\" value=\"{{addressObj?.contact_details?.city}}\" formControlName=\"townorcity\" type=\"text\" autocomplete=\"address-level2\">\n <p class=\"inline-error-message\" *ngIf=\"isTownOrCityEmpty || townOrCityHasError\">\n <span *ngIf=\"isTownOrCityEmpty\">Enter a town or city.</span>\n <span *ngIf=\"townOrCityHasError\">Enter a town or city.</span>\n </p> \n </div>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-font19px\" for=\"address-county\">\n County\n </label>\n <input class=\"govuk-input govuk-!-width-two-thirds govuk-font19px\" id=\"address-county\" [ngClass]=\"{ 'inline-error-class': isCountyEmpty || countyHasError}\" value=\"{{addressObj?.contact_details?.county}}\" formControlName=\"county\" name=\"address-county\" type=\"text\">\n <p class=\"inline-error-message\" *ngIf=\"isCountyEmpty || countyHasError\">\n <span *ngIf=\"isCountyEmpty\">Enter a County.</span>\n <span *ngIf=\"countyHasError\">Enter a valid County.</span>\n </p> \n </div>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-font19px\" for=\"address-postcode\">\n Postcode\n </label>\n <input class=\"govuk-input govuk-input--width-10 govuk-font19px\" id=\"address-postcode\" formControlName=\"mpostcode\" name=\"address-postcode\" [ngClass]=\"{ 'inline-error-class': isMPostcodeEmpty || mpostcodeHasError}\" value=\"{{addressObj?.contact_details?.postal_code}}\" type=\"text\" autocomplete=\"postal-code\">\n <p class=\"inline-error-message\" *ngIf=\"isMPostcodeEmpty || mpostcodeHasError\">\n <span *ngIf=\"isMPostcodeEmpty\">Enter a postcode.</span>\n <span *ngIf=\"mpostcodeHasError\">Enter a valid postcode.</span>\n </p> \n </div>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-font19px\" for=\"country\">\n Country\n </label>\n <select class=\"govuk-select govuk-font19px\" id=\"country\" name=\"country\" [ngClass]=\"{'inline-error-class': isCountryEmpty}\" formControlName=\"country\">\n <option value=\"\" selected=\"selected\">Please select</option>\n <option value=\"United Kingdom\" selected=\"{{ addressObj?.contact_details?.country ? 'selected' : '' }}\">United Kingdom</option>\n </select>\n <p class=\"inline-error-message\" *ngIf=\"isCountryEmpty\">\n <span *ngIf=\"isCountryEmpty\">Select a Country.</span>\n </p> \n </div>\n </form>\n </div>\n </div>\n </fieldset>\n </div>\n <!---FORM--->\n </div>\n\n<hr class=\"govuk-section-break govuk-section-break--m govuk-section-break--visible\">\n</fieldset>\n<div class=\"govuk-button-group\">\n<button type=\"submit\" class=\"button govuk-button--secondary govuk-font19px\" (click)=\"redirection($event)\"> Previous </button>\n&nbsp;\n<button type=\"submit\" class=\"button govuk-button govuk-font19px\" (click)=\"finalFormSubmit()\">\n Continue\n</button>\n</div>",
2919
+ styles: [".govuk-font19px{font-size:19px}.inline-error-class{outline:#a71414 solid 3px;outline-offset:0}.inline-error-message{color:#a71414;font-weight:700;margin-top:10px}.contact-details--size{width:50%}.postcode-align-css{display:flex;flex-direction:row}.govuk-margin-right-10px{margin-right:10px}.govuk-margin-btm-20px{margin-bottom:20px!important}"]
2920
+ }] }
2921
+ ];
2922
+ /** @nocollapse */
2923
+ ContactDetailsComponent.ctorParameters = () => [
2924
+ { type: FormBuilder },
2925
+ { type: NotificationService },
2926
+ { type: PaymentLibComponent }
2927
+ ];
2928
+ ContactDetailsComponent.propDecorators = {
2929
+ isEditOperation: [{ type: Input, args: ['isEditOperation',] }],
2930
+ isEditOperationInRefundList: [{ type: Input, args: ['isEditOperationInRefundList',] }],
2931
+ addressObj: [{ type: Input, args: ['addressObj',] }],
2932
+ assignContactDetails: [{ type: Output }],
2933
+ assignContactDetailsInFefundsList: [{ type: Output }],
2934
+ redirectToIssueRefund: [{ type: Output }]
2935
+ };
2936
+
2937
+ /**
2938
+ * @fileoverview added by tsickle
2939
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2940
+ */
2941
+ class PbaDetailsComponent {
2942
+ constructor() { }
2943
+ /**
2944
+ * @return {?}
2945
+ */
2946
+ ngOnInit() {
2947
+ }
2948
+ }
2949
+ PbaDetailsComponent.decorators = [
2406
2950
  { type: Component, args: [{
2407
2951
  selector: 'ccpay-pba-details',
2408
2952
  template: "\n <h2 class=\"heading-large\">Payment method</h2>\n <table>\n <tbody>\n <tr>\n <td class=\"bold tb-col-w\">Method</td>\n <td class=\"capitalize\">{{ payment.method | lowercase}}</td>\n </tr>\n <tr>\n <td class=\"bold tb-col-w\">Type</td>\n <td>Credit</td>\n </tr>\n <tr *ngIf=\"payment.organisation_name\">\n <td class=\"bold tb-col-w\">PBA account name</td>\n <td>{{ payment.organisation_name }}</td>\n </tr>\n <tr *ngIf=\"payment.account_number\">\n <td class=\"bold tb-col-w\">PBA number</td>\n <td>{{ payment.account_number }}</td>\n </tr>\n <tr *ngIf=\"payment.customer_reference\">\n <td class=\"bold tb-col-w\">Customer internal reference</td>\n <td>{{ payment.customer_reference }}</td>\n </tr>\n </tbody>\n </table>\n",
@@ -2692,6 +3236,7 @@ class CaseTransactionsComponent {
2692
3236
  this.viewStatus = 'main';
2693
3237
  this.isRemoveBtnDisabled = false;
2694
3238
  this.clAmountDue = 0;
3239
+ this.overPaymentAmount = 0;
2695
3240
  this.isFeeRecordsExist = false;
2696
3241
  this.isGrpOutstandingAmtPositive = false;
2697
3242
  //Order changes
@@ -2789,6 +3334,7 @@ class CaseTransactionsComponent {
2789
3334
  }
2790
3335
  else {
2791
3336
  this.serviceRequestValue = 'false';
3337
+ this.paymentLibComponent.isFromServiceRequestPage = false;
2792
3338
  }
2793
3339
  this.isBulkScanEnable = this.paymentLibComponent.ISBSENABLE;
2794
3340
  this.dcnNumber = this.paymentLibComponent.DCN_NUMBER;
@@ -2990,6 +3536,7 @@ class CaseTransactionsComponent {
2990
3536
  */
2991
3537
  fee => {
2992
3538
  this.orderFeesTotal = this.orderFeesTotal + fee.calculated_amount;
3539
+ this.overPaymentAmount = this.overPaymentAmount + fee.over_payment;
2993
3540
  }));
2994
3541
  }
2995
3542
  if (paymentGroup.remissions) {
@@ -3002,11 +3549,16 @@ class CaseTransactionsComponent {
3002
3549
  }));
3003
3550
  }
3004
3551
  if (paymentGroup.payments) {
3552
+ /** @type {?} */
3553
+ const isFeeOverPaymentExist = this.overPaymentAmount === 0;
3005
3554
  paymentGroup.payments.forEach((/**
3006
3555
  * @param {?} payment
3007
3556
  * @return {?}
3008
3557
  */
3009
3558
  payment => {
3559
+ if (isFeeOverPaymentExist) {
3560
+ this.overPaymentAmount = this.overPaymentAmount + payment.over_payment;
3561
+ }
3010
3562
  if (payment.status.toUpperCase() === 'SUCCESS') {
3011
3563
  this.orderTotalPayments = this.orderTotalPayments + payment.amount;
3012
3564
  }
@@ -3454,19 +4006,17 @@ class CaseTransactionsComponent {
3454
4006
  * @return {?}
3455
4007
  */
3456
4008
  addRefundForRemission(payment, remission, fees) {
3457
- this.viewStatus = 'addrefundforremission';
3458
- this.payment = payment;
3459
- this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe((/**
4009
+ this.paymentViewService.getApportionPaymentDetails(payment.reference).subscribe((/**
3460
4010
  * @param {?} paymentGroup
3461
4011
  * @return {?}
3462
4012
  */
3463
4013
  paymentGroup => {
3464
4014
  this.paymentGroup = paymentGroup;
3465
- this.paymentGroup.payments = this.paymentGroup.payments.filter((/**
4015
+ this.paymentGroup.payments = paymentGroup.payments.filter((/**
3466
4016
  * @param {?} paymentGroupObj
3467
4017
  * @return {?}
3468
4018
  */
3469
- paymentGroupObj => paymentGroupObj['reference'].includes(this.payment.reference)));
4019
+ paymentGroupObj => paymentGroupObj.reference === payment.reference));
3470
4020
  this.payment = this.paymentGroup.payments[0];
3471
4021
  this.remissions = remission;
3472
4022
  this.remissionFeeAmt = fees.filter((/**
@@ -3474,6 +4024,7 @@ class CaseTransactionsComponent {
3474
4024
  * @return {?}
3475
4025
  */
3476
4026
  data => data.code === this.remissions['fee_code']))[0].net_amount;
4027
+ this.viewStatus = 'addrefundforremission';
3477
4028
  // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;
3478
4029
  // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;
3479
4030
  }), (/**
@@ -3685,16 +4236,21 @@ class CaseTransactionsComponent {
3685
4236
  * @return {?}
3686
4237
  */
3687
4238
  chkIssueRefundBtnEnable(payment) {
3688
- if (this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(payment) &&
3689
- payment.method === 'payment by account' && payment.status.toLocaleLowerCase() === 'success') {
3690
- this.isIssueRefunfBtnEnable = true;
3691
- }
3692
- if (this.isIssueRefunfBtnEnable) {
3693
- return true;
4239
+ if (payment !== null && payment !== undefined) {
4240
+ return payment.issue_refund && payment.refund_enable;
3694
4241
  }
3695
4242
  else {
3696
4243
  return false;
3697
4244
  }
4245
+ // if (this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(payment) &&
4246
+ // payment.method === 'payment by account' && payment.status.toLocaleLowerCase() === 'success') {
4247
+ // this.isIssueRefunfBtnEnable = true;
4248
+ // }
4249
+ // if (this.isIssueRefunfBtnEnable) {
4250
+ // return true;
4251
+ // } else {
4252
+ // return false;
4253
+ // };
3698
4254
  }
3699
4255
  /**
3700
4256
  * @return {?}
@@ -3739,7 +4295,7 @@ class CaseTransactionsComponent {
3739
4295
  CaseTransactionsComponent.decorators = [
3740
4296
  { type: Component, args: [{
3741
4297
  selector: 'ccpay-case-transactions',
3742
- template: "<div class=\"govuk-width-container\">\n\n <main class=\"govuk-main-wrapper\">\n <ng-container *ngIf=\"viewStatus === 'main1'\">\n <div *ngIf=\"viewStatus === 'main1'&& !isTurnOff && takePayment\">\n <div *ngIf=\"takePayment\" class=\"govuk-grid-row\">\n\n <div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-xl\">Case transactions</h1>\n </div>\n </div>\n\n <div *ngIf=\"takePayment\" class=\"govuk-grid-row\">\n <div *ngIf='!isExceptionRecord' class=\"govuk-grid-column-two-thirds govuk-!-padding-bottom-6 govuk-!-padding-top-6\">\n <h3 class=\"heading-medium\">CCD reference:</h3>\n <span> {{ ccdCaseNumber | ccdHyphens }}</span>\n </div>\n\n <div *ngIf='isExceptionRecord' class=\"govuk-grid-column-two-thirds govuk-!-padding-bottom-6 govuk-!-padding-top-6\">\n <h3 class=\"heading-medium\">Exception reference:</h3>\n <span> {{ ccdCaseNumber | ccdHyphens }}</span>\n </div>\n <div class=\"govuk-grid-column-full govuk-!-padding-bottom-3\">\n <hr class=\"govuk-section-break govuk-section-break--visible\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Total payments</td>\n <td class=\"govuk-table__header\" scope=\"col\">Total remissions</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount due</td>\n <td class=\"govuk-table__header govuk-table__header--custom\" scope=\"col\" *ngIf=\"isBulkScanEnable\">Unallocated payments</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"totalpayments govuk-table__row\">\n <td class=\"govuk-table__cell summary-table-font\">{{ totalPayments | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell summary-table-font\">{{ totalRemissions | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell summary-table-font\">{{ clAmountDue | currency :'GBP':'symbol':'1.2-2'}}</td>\n <td class=\"govuk-table__cell case-transaction__color summary-table-font\" *ngIf=\"isBulkScanEnable\">{{unprocessedRecordCount}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <div class=\"govuk-grid-column-two-thirds\" *ngIf=\"takePayment\">\n <button type=\"submit\" (click)=\"redirectToFeeSearchPage($event)\"\n [disabled]=\"!isAddFeeBtnEnabled\"\n [ngClass]='!isAddFeeBtnEnabled ? \"govuk-button govuk-button--secondary govuk-button--disabled govuk-!-margin-right-1\" : \"govuk-button govuk-button--secondary govuk-!-margin-right-1\"'>\n Take telephony payment\n </button>\n </div>\n\n </div>\n <div class=\"govuk-grid-row\">\n\n </div>\n <div *ngIf=\"takePayment\" class=\" govuk-!-margin-top-9\">\n\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full\">\n <h3 class=\"heading-medium\">Fees</h3>\n </div>\n <div class=\"govuk-grid-column-full\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Code</td>\n <td class=\"govuk-table__header\" scope=\"col\">Description</td>\n <td class=\"govuk-table__header\" scope=\"col\">Volume</td>\n <td class=\"govuk-table__header\" scope=\"col\">Fee amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Calculated amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount due</td>\n <td class=\"govuk-table__header\" scope=\"col\">Action</td>\n\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngFor=\"let paymentGroup of paymentGroups;\">\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of paymentGroup.fees; let i = index;\">\n <td class=\"govuk-table__cell\">\t{{fee.code}} </td>\n <td class=\"govuk-table__cell\">{{fee.description}}</td>\n <td class=\"govuk-table__cell\">{{fee.volume? fee.volume : '-'}}</td>\n <td class=\"govuk-table__cell\">{{ fee.net_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell\">{{fee.calculated_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\" [attr.rowspan]=\"paymentGroup.fees.length\" *ngIf=\"paymentGroup.old && i==0\"> {{getGroupOutstandingAmount(paymentGroup)| currency:'GBP':'symbol-narrow':'1.2-2'}}* </td>\n <td class=\"govuk-table__cell\" *ngIf=\"!paymentGroup.old\"> {{calculateAmountDue(fee) | currency:'GBP':'symbol-narrow':'1.2-2'}} </td>\n <td class=\"govuk-table__cell\" *ngIf=\"!paymentGroup.old\">\n <a (click)=\"confirmRemoveFee(fee.id)\" [ngClass]='!isCheckAmountdueExist(fee.amount_due) || fee.remissions ? \"disable-link\" : \"\"'>Remove</a>\n </td>\n <td class=\"govuk-table__cell\" *ngIf=\"paymentGroup.old\">\n <a (click)=\"confirmRemoveFee(fee.id)\" [ngClass]='paymentGroup.payments?.length > 0 || paymentGroup.remissions?.length > 0 ? \"disable-link\" : \"\"'>Remove</a>\n </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroups?.length === 0\">\n <tr class=\"govuk-table__row\" >\n <td class=\"govuk-table__cell\" colspan=\"7\">No fees recorded</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n <div class=\"hmcts-banner\" *ngIf=\"isHistoricGroupAvailable\">\n <svg class=\"hmcts-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"25\" width=\"25\">\n <path d=\"M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z\"></path>\n </svg>\n <div class=\"hmcts-banner__message\">\n <span class=\"hmcts-banner__assistive\">information</span>\n * These fees have already been processed offline. Check the notes in CCD for more information.\n </div>\n </div>\n <div class=\"panel panel-no--style\" *ngIf=\"allPayments?.length > 0 || remissions?.length > 0\">\n <!-- payments -->\n <h3 class=\"heading-medium\">Payments</h3>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-28\" scope=\"col\">Payment reference</td>\n <td class=\"govuk-table__header\" scope=\"col\">Date created</td>\n <td class=\"govuk-table__header\" scope=\"col\">Channel</td>\n <td class=\"govuk-table__header\" scope=\"col\">Method</td>\n <td class=\"govuk-table__header col-15\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Allocation status</td>\n <td class=\"govuk-table__header\" scope=\"col\">Payment status</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of allPayments\">\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(payment.paymentGroupReference, payment.reference, payment.method)\">{{ payment.reference }}</a>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"channel govuk-table__cell whitespace-inherit\">{{ payment.channel | lowercase }}</td>\n <td class=\"govuk-table__cell capitalize whitespace-inherit\">{{ payment.method | lowercase}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\"> {{getAllocationStatus(payment)}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.status }}</td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length === 0\">\n <td class=\"govuk-table__cell\" colspan=\"7\">No payments recorded</td>\n </tbody>\n </table>\n\n <!-- remissions -->\n <h3 class=\"heading-medium\">Remissions</h3>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Remission reference</td>\n <td class=\"govuk-table__header\" scope=\"col\">Date created</td>\n <td class=\"govuk-table__header\" scope=\"col\">Remission code</td>\n <td class=\"govuk-table__header\" scope=\"col\">Fee code</td>\n <td class=\"govuk-table__header\" scope=\"col\">Remission amount</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"remissions?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let remission of remissions\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.remission_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.hwf_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.fee_code }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"remissions?.length === 0\">\n <td class=\"govuk-table__cell\" colspan=\"5\">No remissions recorded</td>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n\n <div *ngIf=\"takePayment && isTurnOff\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-xl\">Case transactions</h1>\n </div>\n\n <div class=\"govuk-grid-column-one-third\" align=\"right\" >\n <a [ngClass]=\"{ 'disable': !isAddFeeBtnEnabled} \" (click)=\"redirectToFeeSearchPage($event)\" class=\"button\">Add a new fee</a>\n </div>\n </div>\n\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds govuk-!-padding-bottom-6\">\n <h3 class=\"heading-medium\">CCD reference:</h3>\n <span> {{ ccdCaseNumber | ccdHyphens }}</span>\n </div>\n\n <div class=\"govuk-grid-column-full govuk-!-padding-bottom-3\">\n <hr class=\"govuk-section-break govuk-section-break--visible\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Total payments</td>\n <td class=\"govuk-table__header\" scope=\"col\">Total remissions</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount due</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"totalpayments govuk-table__row\">\n <td class=\"govuk-table__cell\">{{ totalPayments | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell\">{{ totalRemissions | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell\">{{ (totalFees - totalRemissions) - totalPayments | currency :'GBP':'symbol':'1.2-2'}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n\n\n <!-- No fees start -->\n <div *ngIf=\"paymentGroups?.length === 0\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full\">\n <span class=\"heading-small\">Existing fees</span>\n </div>\n\n <div class=\"govuk-grid-column-full\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Code</td>\n <td class=\"govuk-table__header\" scope=\"col\">Description</td>\n <td class=\"govuk-table__header\" scope=\"col\">Volume</td>\n <td class=\"govuk-table__header\" scope=\"col\">Fee amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Calculated amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Group amount outstanding</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No fees recorded</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n\n <!-- No fees end -->\n\n <div *ngFor=\"let paymentGroup of paymentGroups\">\n\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full govuk-grid-column-full--gr\">\n <span class=\"heading-medium\">Group reference: {{paymentGroup.payment_group_reference}}</span>\n </div>\n </div>\n <div class=\"govuk-grid-row\">\n\n <!--New Code start-->\n\n <div class=\"govuk-grid-column-full\">\n <span class=\"heading-small\">Exisiting fees</span>\n </div>\n <div class=feeclass>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Code</td>\n <td class=\"govuk-table__header\" scope=\"col\">Description</td>\n <td class=\"govuk-table__header\" scope=\"col\">Volume</td>\n <td class=\"govuk-table__header\" scope=\"col\">Fee amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Calculated amount</td>\n <td class=\"groupamount govuk-table__header\" scope=\"col\">Group amount outstanding</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" >\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of paymentGroup.fees; let i = index;\">\n <td class=\"govuk-table__cell govuk-table__cell--col1\">{{fee.code}}</td>\n <td class=\"govuk-table__cell govuk-table__cell--col2\"> {{fee.description}} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col3 align-center\"> {{fee.volume? fee.volume : '-'}} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col4\"> {{ fee.net_amount | currency:'GBP':'symbol-narrow':'1.2-2' }} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col5\"> {{fee.calculated_amount | currency:'GBP':'symbol-narrow':'1.2-2' }} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col6 govuk-table__custom--col6\" [attr.rowspan]=\"paymentGroup.fees.length\" *ngIf=\"i==0\">\n {{getGroupOutstandingAmount(paymentGroup) | currency:'GBP':'symbol-narrow':'1.2-2' }} </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.fees.length==0\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No payments recorded</td>\n </tbody>\n </table>\n </div>\n </div>\n <div class=\"govuk-inset-text govuk-inset-text__no-border\" *ngIf=\"paymentGroup.payments || paymentGroup.remissions\">\n <details>\n <summary class=\"govuk-hidetext\">\n <span class=\"summary\">Allocated payments and remissions</span>\n </summary>\n\n <div class=\"panel panel-border-narrow\">\n <!-- payments -->\n <span class=\"heading-medium\">Payments</span>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Payment reference</td>\n <td class=\"govuk-table__header\" scope=\"col\">Date created</td>\n <td class=\"govuk-table__header\" scope=\"col\">Channel</td>\n <td class=\"govuk-table__header\" scope=\"col\">Method</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Allocation status</td>\n <td class=\"govuk-table__header\" scope=\"col\">Status</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.payments?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of paymentGroup.payments\">\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(paymentGroup.payment_group_reference, payment.reference, payment.method)\">{{ payment.reference }}</a>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"channel govuk-table__cell whitespace-inherit\">{{ payment.channel | lowercase }}</td>\n <td class=\"govuk-table__cell capitalize whitespace-inherit\">{{ payment.method | lowercase}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.amount }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\"> {{getAllocationStatus(payment)}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.status }}</td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.payments?.length === 0\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No payments recorded</td>\n </tbody>\n </table>\n\n <!-- remissions -->\n <span class=\"heading-medium\">Remissions</span>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Remission reference</td>\n <td class=\"govuk-table__header\" scope=\"col\">Date created</td>\n <td class=\"govuk-table__header\" scope=\"col\">Remission code</td>\n <td class=\"govuk-table__header\" scope=\"col\">Fee applied against</td>\n <td class=\"govuk-table__header\" scope=\"col\">Remission amount</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.remissions?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let remission of paymentGroup.remissions\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.remission_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.date_created | date:'dd MMM' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.hwf_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.fee_code }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.hwf_amount }}</td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.remissions?.length === 0\">\n <td class=\"govuk-table__cell\" colspan=\"5\">No remissions recorded</td>\n </tbody>\n </table>\n </div>\n </details>\n\n\n <div *ngIf=\"takePayment\">\n <button type=\"submit\" (click)=\"loadFeeSummaryPage(paymentGroup)\"\n [disabled]=\"(getGroupOutstandingAmount(paymentGroup) <= 0 || isUnprocessedRecordSelected)\"\n [ngClass]='(getGroupOutstandingAmount(paymentGroup) <= 0 || isUnprocessedRecordSelected) ? \"govuk-button govuk-button--secondary govuk-button--disabled govuk-!-margin-right-1\" : \"govuk-button govuk-button--secondary govuk-!-margin-right-1\"'>\n Add telephone payment\n </button>\n </div>\n </div>\n </div>\n <ccpay-app-unprocessed-payments\n *ngIf=\"isBulkScanEnable\"\n [IS_BUTTON_ENABLE]=\"takePayment\"\n [LEVEL]=\"5\"\n [PAYMENTSLENGTH]=\"allPayments?.length\"\n [PAYMENTREF]=\"paymentRef\"\n [ISTURNOFF]=\"isTurnOff\"\n [ISSFENABLE]=\"isStrategicFixEnable\"\n [FEE_RECORDS_EXISTS]=\"isFeeRecordsExist\"\n (getUnprocessedFeeCount) = \"getUnprocessedFeeCount($event)\"\n [IS_OS_AMT_AVAILABLE]=\"isGrpOutstandingAmtPositive\"\n (selectedUnprocessedFeeEvent) = \"selectedUnprocessedFeeEvent($event)\">\n </ccpay-app-unprocessed-payments>\n <div class=\"govuk-grid-row govuk-grid__surplus-payments\" *ngIf=\"totalRefundAmount > 0 && takePayment\">\n <div class=\"govuk-grid-column-full govuk-grid__surplus-payments-col1\">\n <h3 class=\"heading-medium\">Surplus payments</h3>\n </div>\n <div class=\"govuk-grid-column-full\">\n Total surplus payments received: {{totalRefundAmount | currency :'GBP':'symbol':'1.2-2'}}\n </div>\n </div>\n </div>\n\n <div *ngIf=\"takePayment\">\n <ccpay-app-unprocessed-payments\n *ngIf=\"isBulkScanEnable && !takePayment\"\n [IS_BUTTON_ENABLE]=\"takePayment\"\n [LEVEL]=\"1\"\n [ISTURNOFF]=\"isTurnOff\"\n [ISSFENABLE]=\"isStrategicFixEnable\"\n [FEE_RECORDS_EXISTS]=\"isFeeRecordsExist\"\n [IS_OS_AMT_AVAILABLE]=\"isGrpOutstandingAmtPositive\"\n (getUnprocessedFeeCount) = \"getUnprocessedFeeCount($event)\"\n [PAYMENTSLENGTH]=\"allPayments?.length\"\n [PAYMENTREF]=\"paymentRef\"\n (selectedUnprocessedFeeEvent) = \"selectedUnprocessedFeeEvent($event)\">\n </ccpay-app-unprocessed-payments>\n </div>\n\n <div *ngIf=\"!takePayment\" class=\"govuk-grid-row govuk-grid__surplus-payments\">\n\n <div class=\"govuk-grid-column-full\">\n\n <span class=\"heading-medium\">Payments</span>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-13\" scope=\"col\">Status</td>\n <td class=\"govuk-table__header col-10\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header col-14\" scope=\"col\">Date allocated</td>\n <td class=\"govuk-table__header col-20\" scope=\"col\">Request reference</td>\n <td class=\"govuk-table__header col-9\" scope=\"col\"></td>\n <td class=\"govuk-table__header\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of allPayments\">\n <td class=\"govuk-table__cell col-13 whitespace-inherit\">{{ payment.status }}</td>\n <td class=\"govuk-table__cell col-10 whitespace-inherit\">{{ payment.amount | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell col-17 whitespace-inherit\">{{ payment.date_created | date:'dd MMM yyyy HH:mm:ss' }}</td>\n <td class=\"govuk-table__cell col-24 whitespace-inherit\">{{ payment.paymentGroupReference }}</td>\n <td class=\"govuk-table__cell col-13 whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(payment.paymentGroupReference, payment.reference, payment.method)\">Review</a>\n </td>\n </tr>\n </tbody>\n\n </table>\n <ccpay-app-unprocessed-payments class=\"govuk-table\"\n *ngIf=\"isBulkScanEnable && !takePayment\"\n [IS_BUTTON_ENABLE]=\"takePayment\"\n [LEVEL]=\"2\"\n [ISTURNOFF]=\"isTurnOff\"\n [ISSFENABLE]=\"isStrategicFixEnable\"\n [FEE_RECORDS_EXISTS]=\"isFeeRecordsExist\"\n [IS_OS_AMT_AVAILABLE]=\"isGrpOutstandingAmtPositive\"\n [PAYMENTSLENGTH]=\"allPayments?.length\"\n [PAYMENTREF]=\"paymentRef\"\n (getUnprocessedFeeCount) = \"getUnprocessedFeeCount($event)\"\n (selectedUnprocessedFeeEvent) = \"selectedUnprocessedFeeEvent($event)\">\n </ccpay-app-unprocessed-payments>\n </div>\n </div>\n </ng-container>\n\n<!--Order Case Transactions Page-->\n <ng-container *ngIf=\"viewStatus === 'main' && !isTurnOff && takePayment\">\n <div>\n\n <div>\n <h1 class=\"govuk-grid-column-two-thirds govuk-heading-l govuk-!-margin-top-0\">Case transactions</h1>\n <ng-container *ngIf='!isExceptionRecord' class=\" govuk-!-margin-bottom-6 alignself\">\n <b> Case reference: </b>{{ ccdCaseNumber | ccdHyphens }}\n </ng-container>\n <ng-container *ngIf='isExceptionRecord' class=\"govuk-!-margin-bottom-3 col-55 alignself\" >\n <b> Exception reference:</b>{{ ccdCaseNumber | ccdHyphens }}\n </ng-container>\n <div>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-25\" scope=\"col\">Total payments</td>\n <td class=\"govuk-table__header govuk-table__header--custom col-25\" scope=\"col\" *ngIf=\"isBulkScanEnable\">Unallocated payments</td>\n <td class=\"govuk-table__header col-25\" scope=\"col\">Total remissions</td>\n <td class=\"govuk-table__header col-25\" scope=\"col\">Amount due</td>\n\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"totalpayments govuk-table__row\">\n <td class=\"govuk-table__cell summary-table-font\">{{ totalPayments | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell case-transaction__color summary-table-font\" *ngIf=\"isBulkScanEnable\">{{unprocessedRecordCount}}</td>\n\n <td class=\"govuk-table__cell summary-table-font\">{{ totalRemissions | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell summary-table-font\">{{ clAmountDue | currency :'GBP':'symbol':'1.2-2'}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ORDERIDDETAILS'>\n\n <!--Payment Request-->\n <div class=\"paymentrequest\">\n <span class=\"heading-medium\">Service requests</span>\n <ng-container>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-14\" scope=\"col\">Status</td>\n <td class=\"govuk-table__header col-10\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header col-18\" scope=\"col\">Party</td>\n <td class=\"govuk-table__header col-21\" scope=\"col\">Request reference</td>\n <td class=\"govuk-table__header col-9\" scope=\"col\"></td>\n <td class=\"govuk-table__header col\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"orderLevelFees?.length > 0\">\n <tr *ngFor=\"let orderRef of orderLevelFees;let i = index;\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderRef.orderStatus}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ orderRef.orderTotalFees | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td *ngIf=\"cpoDetails !== null\" class=\"govuk-table__cell whitespace-inherit\">{{cpoDetails['responsibleParty']}}</td>\n <td *ngIf=\"cpoDetails === null\" class=\"govuk-table__cell whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderRef.orderRefId}}</td>\n <td class=\"govuk-table__cell\">\n <a href=\"javascript:void(0)\" (click)=\"goToOrderViewDetailSection(orderRef)\">Review</a>\n </td>\n <td class=\"alignright\">\n\n <button type=\"submit\" (click)=\"redirectToOrderFeeSearchPage($event,orderRef)\"\n [disabled]=\"!orderRef.orderAddBtnEnable\"\n [ngClass]='!orderRef.orderAddBtnEnable ? \"govuk-button govuk-button--secondary govuk-button--disabled govuk-!-margin-right-1\" : \"govuk-button govuk-button--secondary govuk-!-margin-right-1\"'>\n Take telephony payment\n </button></td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body alignleft\" *ngIf=\"orderLevelFees?.length === 0\">\n <td colspan=\"6\">No service requests on this case.</td>\n </tbody>\n </table>\n </ng-container>\n <!-- <ng-container *ngIf=\"orderLevelFees?.length === 0\">\n <br/>No service requests on this case.<br/>\n </ng-container> -->\n <span>\n <br/>\n <a (click)=\"redirectToFeeSearchPage($event)\"\n [class.disabled]=\"!isAddFeeBtnEnabled\">Create service request and pay</a><br/>\n </span>\n </div>\n <div>\n <span class=\"heading-medium\"><br/>Payments</span>\n <ccpay-app-unprocessed-payments\n *ngIf=\"isBulkScanEnable\"\n [IS_BUTTON_ENABLE]=\"takePayment\"\n [LEVEL]=\"3\"\n [PAYMENTSLENGTH]=\"allPayments?.length\"\n [ISTURNOFF]=\"isTurnOff\"\n [ISSFENABLE]=\"isStrategicFixEnable\"\n [PAYMENTREF]=\"paymentRef\"\n [FEE_RECORDS_EXISTS]=\"isFeeRecordsExist\"\n (getUnprocessedFeeCount) = \"getUnprocessedFeeCount($event)\"\n [IS_OS_AMT_AVAILABLE]=\"isGrpOutstandingAmtPositive\"\n (selectedUnprocessedFeeEvent) = \"selectedUnprocessedFeeEvent($event)\">\n </ccpay-app-unprocessed-payments>\n\n <ng-container>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of allPayments\">\n <td class=\"govuk-table__cell col-14 whitespace-inherit\">{{ payment.status }}</td>\n <td class=\"govuk-table__cell col-10 whitespace-inherit\">{{ payment.amount | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell col-17 whitespace-inherit\">{{ payment.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"govuk-table__cell col-24 whitespace-inherit\">{{ payment.paymentGroupReference }}</td>\n <td class=\"govuk-table__cell col-13 whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(payment.paymentGroupReference, payment.reference, payment.method)\">Review</a>\n </td>\n </tr>\n </tbody>\n\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length === 0 && unprocessedRecordCount <= 0\">\n <td colspan=\"6\">No payments recorded</td>\n </tbody>\n </table>\n\n </ng-container>\n\n </div>\n <div *ngIf=\"!check4AllowedRoles2AccessPBApayment()\">\n <span class=\"heading-medium\"><br/>Refunds</span>\n <ccpay-refund-status\n [ccdCaseNumber]=\"ccdCaseNumber\"\n [isTurnOff]=\"isTurnOff\"\n [LOGGEDINUSERROLES]=\"LOGGEDINUSERROLES\" \n [isEliginbleToAccess] = check4AllowedRoles2AccessRefund()\n ></ccpay-refund-status>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!takePayment && viewStatus === 'main'\">\n <div class=\"govuk-grid-column-full\" [ngClass]='serviceRequestValue!== \"false\" ? \"govuk-margin-btm-20px\" : \"\"'>\n <!-- <span *ngIf=\"serviceRequestValue === 'false'\" class=\"heading-medium\">Service requests</span> -->\n <ng-container *ngIf=\"!(orderLevelFees?.length === 0 && !isAnyFeeGroupAvilable) && serviceRequestValue !== 'false' \">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-14\" scope=\"col\">Status</td>\n <td class=\"govuk-table__header col-18\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header col-18\" scope=\"col\">Party</td>\n <td class=\"govuk-table__header col-24\" scope=\"col\">Request reference\t</td>\n <td class=\"govuk-table__header col-9\" scope=\"col\"></td>\n <td class=\"govuk-table__header\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"orderLevelFees?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let orderRef of orderLevelFees;let i = index;\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderRef.orderStatus}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderRef.orderTotalFees | currency :'GBP':'symbol':'1.2-2'}}</td>\n <td *ngIf=\"cpoDetails !== null\" class=\"govuk-table__cell whitespace-inherit\">{{cpoDetails['responsibleParty']}}</td>\n <td *ngIf=\"cpoDetails === null\" class=\"govuk-table__cell whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderRef.orderRefId}}</td>\n <td class=\"govuk-table__cell of-visible\"> <a href=\"javascript:void(0)\" (click)=\"loadPBAAccountPage(orderRef)\" *ngIf=\"serviceRequestValue !== 'false' && check4AllowedRoles2AccessPBApayment() && orderRef.orderStatus === 'Not paid'\"> Pay now</a></td>\n <td class=\"govuk-table__cell\">\n <a href=\"javascript:void(0)\" (click)=\"goToOrderViewDetailSection(orderRef)\">Review</a>\n </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"orderLevelFees?.length === 0 && serviceRequestValue === 'false'\">\n <tr class=\"govuk-table__row\" >\n <td class=\"alignleft\" colspan=\"7\">No service requests on this case.</td>\n </tr>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"orderLevelFees?.length === 0 && serviceRequestValue !== 'false' && !isAnyFeeGroupAvilable\">\n <h1 class=\"govuk-heading-l govuk-heading-lw\">If you are expecting to pay and are not able to see a service request,</h1>\n <p>please refresh and try in some time.</p>\n </ng-container>\n\n <!-- </div> -->\n\n </div>\n\n <div class=\"govuk-grid-column-full\">\n <div *ngIf=\"serviceRequestValue === 'false'\">\n <span class=\"heading-medium\"><br/>Payments</span>\n <ng-container >\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-14\" scope=\"col\">Status</td>\n <td class=\"govuk-table__header col-10\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header col-17\" scope=\"col\">Date</td>\n <td class=\"govuk-table__header col-24\" scope=\"col\">Payment reference</td>\n <td class=\"govuk-table__header col-13\" scope=\"col\"></td>\n <td class=\"govuk-table__header\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of allPayments\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.status }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.amount | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment?.reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(payment.paymentGroupReference, payment.reference, payment.method)\">Review</a>\n </td>\n </tr>\n </tbody>\n\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length === 0\">\n <td colspan=\"6\">No payments recorded</td>\n </tbody>\n </table>\n <ccpay-app-unprocessed-payments class=\"govuk-table\"\n *ngIf=\"isBulkScanEnable && !takePayment\"\n [IS_BUTTON_ENABLE]=\"takePayment\"\n [LEVEL]=\"4\"\n [ISTURNOFF]=\"isTurnOff\"\n [ISSFENABLE]=\"isStrategicFixEnable\"\n [PAYMENTSLENGTH]=\"allPayments?.length\"\n [PAYMENTREF]=\"paymentRef\"\n (getUnprocessedFeeCount) = \"getUnprocessedFeeCount($event)\"\n [FEE_RECORDS_EXISTS]=\"isAnyFeeGroupAvilable\"\n [IS_OS_AMT_AVAILABLE]=\"isGrpOutstandingAmtPositive\"\n (selectedUnprocessedFeeEvent) = \"selectedUnprocessedFeeEvent($event)\">\n </ccpay-app-unprocessed-payments>\n </ng-container>\n\n </div>\n </div>\n <div class=\"govuk-grid-column-full\" *ngIf=\"!check4AllowedRoles2AccessPBApayment()\">\n <span class=\"heading-medium\"><br/>Refunds</span>\n <ccpay-refund-status \n [ccdCaseNumber]=\"ccdCaseNumber\"\n [isEliginbleToAccess] = check4AllowedRoles2AccessRefund()\n ></ccpay-refund-status>\n </div>\n\n </ng-container>\n\n\n<input #myInput type='hidden' id='iFrameDrivenImageValue' value='FEEREMOVALCONFIRMATION_2'>\n\n<!-- Order Full View Details-->\n<ng-container *ngIf=\"viewStatus === 'order-full-view'\">\n <ccpay-service-request\n [viewStatus] = \"viewStatus\"\n [orderRef] = \"orderRef\"\n [orderStatus] = \"orderStatus\"\n [orderCreated] = \"orderCreated\"\n [orderParty] = \"orderParty\"\n [orderCCDEvent] = \"orderCCDEvent\"\n [orderDetail] = \"orderDetail\"\n [LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n [ccdCaseNumber] = \"ccdCaseNumber\"\n [orderFeesTotal] = \"orderFeesTotal\"\n [orderTotalPayments] = \"orderTotalPayments\"\n [orderRemissionTotal] = \"orderRemissionTotal\"\n [isServiceRequest] = \"serviceRequestValue\"\n (goToServiceRquestComponent) = \"goToServiceRequestPage()\"\n ></ccpay-service-request>\n\n</ng-container>\n<ccpay-add-remission *ngIf=\"viewStatus === 'addremission' && feeId\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[fee]=\"feeId\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[paymentGroupRef]=\"orderRef\"\n[isFromServiceRequestPage] = \"true\"\n[payment] = \"payment\"\n[ccdCaseNumber]=\"ccdCaseNumber\"></ccpay-add-remission>\n\n<ccpay-add-remission *ngIf=\"viewStatus === 'issuerefund' && payment\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[isFromServiceRequestPage] = \"true\"\n[payment]=\"payment\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[paymentGroupRef]=\"orderRef\"\n[ccdCaseNumber]=\"ccdCaseNumber\"></ccpay-add-remission>\n\n<ccpay-add-remission *ngIf=\"viewStatus === 'addrefundforremission' && payment\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[payment]=\"payment\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[feeamount]=\"remissionFeeAmt\"\n[remission] = \"remissions\"\n[isFromServiceRequestPage]=\"true\"\n[ccdCaseNumber]=\"ccdCaseNumber\"></ccpay-add-remission>\n\n<ng-container *ngIf=\"viewStatus === 'feeRemovalConfirmation'\">\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n Are you sure you want to delete this fee?\n </strong>\n </div>\n <div class=\"govuk-button-grb\">\n <form novalidate>\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"cancelRemoval()\">\n Cancel\n </button>\n <button type=\"submit\" class=\"button\"\n [disabled]=\"isRemoveBtnDisabled\"\n [ngClass]='isRemoveBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"removeFee(feeId)\">\n Remove\n </button>\n </form>\n </div>\n</ng-container>\n\n</main>\n</div>\n",
4298
+ template: "<div class=\"govuk-width-container\">\n\n <main class=\"govuk-main-wrapper\">\n <ng-container *ngIf=\"viewStatus === 'main1'\">\n <div *ngIf=\"viewStatus === 'main1'&& !isTurnOff && takePayment\">\n <div *ngIf=\"takePayment\" class=\"govuk-grid-row\">\n\n <div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-xl\">Case transactions</h1>\n </div>\n </div>\n\n <div *ngIf=\"takePayment\" class=\"govuk-grid-row\">\n <div *ngIf='!isExceptionRecord' class=\"govuk-grid-column-two-thirds govuk-!-padding-bottom-6 govuk-!-padding-top-6\">\n <h3 class=\"heading-medium\">CCD reference:</h3>\n <span> {{ ccdCaseNumber | ccdHyphens }}</span>\n </div>\n\n <div *ngIf='isExceptionRecord' class=\"govuk-grid-column-two-thirds govuk-!-padding-bottom-6 govuk-!-padding-top-6\">\n <h3 class=\"heading-medium\">Exception reference:</h3>\n <span> {{ ccdCaseNumber | ccdHyphens }}</span>\n </div>\n <div class=\"govuk-grid-column-full govuk-!-padding-bottom-3\">\n <hr class=\"govuk-section-break govuk-section-break--visible\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Total payments</td>\n <td class=\"govuk-table__header\" scope=\"col\">Total remissions</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount due</td>\n <td class=\"govuk-table__header govuk-table__header--custom\" scope=\"col\" *ngIf=\"isBulkScanEnable\">Unallocated payments</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"totalpayments govuk-table__row\">\n <td class=\"govuk-table__cell summary-table-font\">{{ totalPayments | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell summary-table-font\">{{ totalRemissions | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell summary-table-font\">{{ clAmountDue | currency :'GBP':'symbol':'1.2-2'}}</td>\n <td class=\"govuk-table__cell case-transaction__color summary-table-font\" *ngIf=\"isBulkScanEnable\">{{unprocessedRecordCount}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <div class=\"govuk-grid-column-two-thirds\" *ngIf=\"takePayment\">\n <button type=\"submit\" (click)=\"redirectToFeeSearchPage($event)\"\n [disabled]=\"!isAddFeeBtnEnabled\"\n [ngClass]='!isAddFeeBtnEnabled ? \"govuk-button govuk-button--secondary govuk-button--disabled govuk-!-margin-right-1\" : \"govuk-button govuk-button--secondary govuk-!-margin-right-1\"'>\n Take telephony payment\n </button>\n </div>\n\n </div>\n <div class=\"govuk-grid-row\">\n\n </div>\n <div *ngIf=\"takePayment\" class=\" govuk-!-margin-top-9\">\n\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full\">\n <h3 class=\"heading-medium\">Fees</h3>\n </div>\n <div class=\"govuk-grid-column-full\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Code</td>\n <td class=\"govuk-table__header\" scope=\"col\">Description</td>\n <td class=\"govuk-table__header\" scope=\"col\">Volume</td>\n <td class=\"govuk-table__header\" scope=\"col\">Fee amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Calculated amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount due</td>\n <td class=\"govuk-table__header\" scope=\"col\">Action</td>\n\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngFor=\"let paymentGroup of paymentGroups;\">\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of paymentGroup.fees; let i = index;\">\n <td class=\"govuk-table__cell\">\t{{fee.code}} </td>\n <td class=\"govuk-table__cell\">{{fee.description}}</td>\n <td class=\"govuk-table__cell\">{{fee.volume? fee.volume : '-'}}</td>\n <td class=\"govuk-table__cell\">{{ fee.net_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell\">{{fee.calculated_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\" [attr.rowspan]=\"paymentGroup.fees.length\" *ngIf=\"paymentGroup.old && i==0\"> {{getGroupOutstandingAmount(paymentGroup)| currency:'GBP':'symbol-narrow':'1.2-2'}}* </td>\n <td class=\"govuk-table__cell\" *ngIf=\"!paymentGroup.old\"> {{calculateAmountDue(fee) | currency:'GBP':'symbol-narrow':'1.2-2'}} </td>\n <td class=\"govuk-table__cell\" *ngIf=\"!paymentGroup.old\">\n <a (click)=\"confirmRemoveFee(fee.id)\" [ngClass]='!isCheckAmountdueExist(fee.amount_due) || fee.remissions ? \"disable-link\" : \"\"'>Remove</a>\n </td>\n <td class=\"govuk-table__cell\" *ngIf=\"paymentGroup.old\">\n <a (click)=\"confirmRemoveFee(fee.id)\" [ngClass]='paymentGroup.payments?.length > 0 || paymentGroup.remissions?.length > 0 ? \"disable-link\" : \"\"'>Remove</a>\n </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroups?.length === 0\">\n <tr class=\"govuk-table__row\" >\n <td class=\"govuk-table__cell\" colspan=\"7\">No fees recorded</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n <div class=\"hmcts-banner\" *ngIf=\"isHistoricGroupAvailable\">\n <svg class=\"hmcts-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"25\" width=\"25\">\n <path d=\"M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z\"></path>\n </svg>\n <div class=\"hmcts-banner__message\">\n <span class=\"hmcts-banner__assistive\">information</span>\n * These fees have already been processed offline. Check the notes in CCD for more information.\n </div>\n </div>\n <div class=\"panel panel-no--style\" *ngIf=\"allPayments?.length > 0 || remissions?.length > 0\">\n <!-- payments -->\n <h3 class=\"heading-medium\">Payments</h3>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-28\" scope=\"col\">Payment reference</td>\n <td class=\"govuk-table__header\" scope=\"col\">Date created</td>\n <td class=\"govuk-table__header\" scope=\"col\">Channel</td>\n <td class=\"govuk-table__header\" scope=\"col\">Method</td>\n <td class=\"govuk-table__header col-15\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Allocation status</td>\n <td class=\"govuk-table__header\" scope=\"col\">Payment status</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of allPayments\">\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(payment.paymentGroupReference, payment.reference, payment.method)\">{{ payment.reference }}</a>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"channel govuk-table__cell whitespace-inherit\">{{ payment.channel | lowercase }}</td>\n <td class=\"govuk-table__cell capitalize whitespace-inherit\">{{ payment.method | lowercase}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\"> {{getAllocationStatus(payment)}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.status }}</td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length === 0\">\n <td class=\"govuk-table__cell\" colspan=\"7\">No payments recorded</td>\n </tbody>\n </table>\n\n <!-- remissions -->\n <h3 class=\"heading-medium\">Remissions</h3>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Remission reference</td>\n <td class=\"govuk-table__header\" scope=\"col\">Date created</td>\n <td class=\"govuk-table__header\" scope=\"col\">Remission code</td>\n <td class=\"govuk-table__header\" scope=\"col\">Fee code</td>\n <td class=\"govuk-table__header\" scope=\"col\">Remission amount</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"remissions?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let remission of remissions\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.remission_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.hwf_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.fee_code }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"remissions?.length === 0\">\n <td class=\"govuk-table__cell\" colspan=\"5\">No remissions recorded</td>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n\n <div *ngIf=\"takePayment && isTurnOff\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-xl\">Case transactions</h1>\n </div>\n\n <div class=\"govuk-grid-column-one-third\" align=\"right\" >\n <a [ngClass]=\"{ 'disable': !isAddFeeBtnEnabled} \" (click)=\"redirectToFeeSearchPage($event)\" class=\"button\">Add a new fee</a>\n </div>\n </div>\n\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds govuk-!-padding-bottom-6\">\n <h3 class=\"heading-medium\">CCD reference:</h3>\n <span> {{ ccdCaseNumber | ccdHyphens }}</span>\n </div>\n\n <div class=\"govuk-grid-column-full govuk-!-padding-bottom-3\">\n <hr class=\"govuk-section-break govuk-section-break--visible\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Total payments</td>\n <td class=\"govuk-table__header\" scope=\"col\">Total remissions</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount due</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"totalpayments govuk-table__row\">\n <td class=\"govuk-table__cell\">{{ totalPayments | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell\">{{ totalRemissions | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell\">{{ (totalFees - totalRemissions) - totalPayments | currency :'GBP':'symbol':'1.2-2'}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n\n\n <!-- No fees start -->\n <div *ngIf=\"paymentGroups?.length === 0\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full\">\n <span class=\"heading-small\">Existing fees</span>\n </div>\n\n <div class=\"govuk-grid-column-full\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Code</td>\n <td class=\"govuk-table__header\" scope=\"col\">Description</td>\n <td class=\"govuk-table__header\" scope=\"col\">Volume</td>\n <td class=\"govuk-table__header\" scope=\"col\">Fee amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Calculated amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Group amount outstanding</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No fees recorded</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n\n <!-- No fees end -->\n\n <div *ngFor=\"let paymentGroup of paymentGroups\">\n\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full govuk-grid-column-full--gr\">\n <span class=\"heading-medium\">Group reference: {{paymentGroup.payment_group_reference}}</span>\n </div>\n </div>\n <div class=\"govuk-grid-row\">\n\n <!--New Code start-->\n\n <div class=\"govuk-grid-column-full\">\n <span class=\"heading-small\">Exisiting fees</span>\n </div>\n <div class=feeclass>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Code</td>\n <td class=\"govuk-table__header\" scope=\"col\">Description</td>\n <td class=\"govuk-table__header\" scope=\"col\">Volume</td>\n <td class=\"govuk-table__header\" scope=\"col\">Fee amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Calculated amount</td>\n <td class=\"groupamount govuk-table__header\" scope=\"col\">Group amount outstanding</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" >\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of paymentGroup.fees; let i = index;\">\n <td class=\"govuk-table__cell govuk-table__cell--col1\">{{fee.code}}</td>\n <td class=\"govuk-table__cell govuk-table__cell--col2\"> {{fee.description}} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col3 align-center\"> {{fee.volume? fee.volume : '-'}} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col4\"> {{ fee.net_amount | currency:'GBP':'symbol-narrow':'1.2-2' }} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col5\"> {{fee.calculated_amount | currency:'GBP':'symbol-narrow':'1.2-2' }} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col6 govuk-table__custom--col6\" [attr.rowspan]=\"paymentGroup.fees.length\" *ngIf=\"i==0\">\n {{getGroupOutstandingAmount(paymentGroup) | currency:'GBP':'symbol-narrow':'1.2-2' }} </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.fees.length==0\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No payments recorded</td>\n </tbody>\n </table>\n </div>\n </div>\n <div class=\"govuk-inset-text govuk-inset-text__no-border\" *ngIf=\"paymentGroup.payments || paymentGroup.remissions\">\n <details>\n <summary class=\"govuk-hidetext\">\n <span class=\"summary\">Allocated payments and remissions</span>\n </summary>\n\n <div class=\"panel panel-border-narrow\">\n <!-- payments -->\n <span class=\"heading-medium\">Payments</span>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Payment reference</td>\n <td class=\"govuk-table__header\" scope=\"col\">Date created</td>\n <td class=\"govuk-table__header\" scope=\"col\">Channel</td>\n <td class=\"govuk-table__header\" scope=\"col\">Method</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Allocation status</td>\n <td class=\"govuk-table__header\" scope=\"col\">Status</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.payments?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of paymentGroup.payments\">\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(paymentGroup.payment_group_reference, payment.reference, payment.method)\">{{ payment.reference }}</a>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"channel govuk-table__cell whitespace-inherit\">{{ payment.channel | lowercase }}</td>\n <td class=\"govuk-table__cell capitalize whitespace-inherit\">{{ payment.method | lowercase}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.amount }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\"> {{getAllocationStatus(payment)}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.status }}</td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.payments?.length === 0\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No payments recorded</td>\n </tbody>\n </table>\n\n <!-- remissions -->\n <span class=\"heading-medium\">Remissions</span>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Remission reference</td>\n <td class=\"govuk-table__header\" scope=\"col\">Date created</td>\n <td class=\"govuk-table__header\" scope=\"col\">Remission code</td>\n <td class=\"govuk-table__header\" scope=\"col\">Fee applied against</td>\n <td class=\"govuk-table__header\" scope=\"col\">Remission amount</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.remissions?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let remission of paymentGroup.remissions\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.remission_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.date_created | date:'dd MMM' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.hwf_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.fee_code }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.hwf_amount }}</td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.remissions?.length === 0\">\n <td class=\"govuk-table__cell\" colspan=\"5\">No remissions recorded</td>\n </tbody>\n </table>\n </div>\n </details>\n\n\n <div *ngIf=\"takePayment\">\n <button type=\"submit\" (click)=\"loadFeeSummaryPage(paymentGroup)\"\n [disabled]=\"(getGroupOutstandingAmount(paymentGroup) <= 0 || isUnprocessedRecordSelected)\"\n [ngClass]='(getGroupOutstandingAmount(paymentGroup) <= 0 || isUnprocessedRecordSelected) ? \"govuk-button govuk-button--secondary govuk-button--disabled govuk-!-margin-right-1\" : \"govuk-button govuk-button--secondary govuk-!-margin-right-1\"'>\n Add telephone payment\n </button>\n </div>\n </div>\n </div>\n <ccpay-app-unprocessed-payments\n *ngIf=\"isBulkScanEnable\"\n [IS_BUTTON_ENABLE]=\"takePayment\"\n [LEVEL]=\"5\"\n [PAYMENTSLENGTH]=\"allPayments?.length\"\n [PAYMENTREF]=\"paymentRef\"\n [ISTURNOFF]=\"isTurnOff\"\n [ISSFENABLE]=\"isStrategicFixEnable\"\n [FEE_RECORDS_EXISTS]=\"isFeeRecordsExist\"\n (getUnprocessedFeeCount) = \"getUnprocessedFeeCount($event)\"\n [IS_OS_AMT_AVAILABLE]=\"isGrpOutstandingAmtPositive\"\n (selectedUnprocessedFeeEvent) = \"selectedUnprocessedFeeEvent($event)\">\n </ccpay-app-unprocessed-payments>\n <div class=\"govuk-grid-row govuk-grid__surplus-payments\" *ngIf=\"totalRefundAmount > 0 && takePayment\">\n <div class=\"govuk-grid-column-full govuk-grid__surplus-payments-col1\">\n <h3 class=\"heading-medium\">Surplus payments</h3>\n </div>\n <div class=\"govuk-grid-column-full\">\n Total surplus payments received: {{totalRefundAmount | currency :'GBP':'symbol':'1.2-2'}}\n </div>\n </div>\n </div>\n\n <div *ngIf=\"takePayment\">\n <ccpay-app-unprocessed-payments\n *ngIf=\"isBulkScanEnable && !takePayment\"\n [IS_BUTTON_ENABLE]=\"takePayment\"\n [LEVEL]=\"1\"\n [ISTURNOFF]=\"isTurnOff\"\n [ISSFENABLE]=\"isStrategicFixEnable\"\n [FEE_RECORDS_EXISTS]=\"isFeeRecordsExist\"\n [IS_OS_AMT_AVAILABLE]=\"isGrpOutstandingAmtPositive\"\n (getUnprocessedFeeCount) = \"getUnprocessedFeeCount($event)\"\n [PAYMENTSLENGTH]=\"allPayments?.length\"\n [PAYMENTREF]=\"paymentRef\"\n (selectedUnprocessedFeeEvent) = \"selectedUnprocessedFeeEvent($event)\">\n </ccpay-app-unprocessed-payments>\n </div>\n\n <div *ngIf=\"!takePayment\" class=\"govuk-grid-row govuk-grid__surplus-payments\">\n\n <div class=\"govuk-grid-column-full\">\n\n <span class=\"heading-medium\">Payments</span>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-13\" scope=\"col\">Status</td>\n <td class=\"govuk-table__header col-10\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header col-14\" scope=\"col\">Date allocated</td>\n <td class=\"govuk-table__header col-20\" scope=\"col\">Request reference</td>\n <td class=\"govuk-table__header col-9\" scope=\"col\"></td>\n <td class=\"govuk-table__header\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of allPayments\">\n <td class=\"govuk-table__cell col-13 whitespace-inherit\">{{ payment.status }}</td>\n <td class=\"govuk-table__cell col-10 whitespace-inherit\">{{ payment.amount | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell col-17 whitespace-inherit\">{{ payment.date_created | date:'dd MMM yyyy HH:mm:ss' }}</td>\n <td class=\"govuk-table__cell col-24 whitespace-inherit\">{{ payment.paymentGroupReference }}</td>\n <td class=\"govuk-table__cell col-13 whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(payment.paymentGroupReference, payment.reference, payment.method)\">Review</a>\n </td>\n </tr>\n </tbody>\n\n </table>\n <ccpay-app-unprocessed-payments class=\"govuk-table\"\n *ngIf=\"isBulkScanEnable && !takePayment\"\n [IS_BUTTON_ENABLE]=\"takePayment\"\n [LEVEL]=\"2\"\n [ISTURNOFF]=\"isTurnOff\"\n [ISSFENABLE]=\"isStrategicFixEnable\"\n [FEE_RECORDS_EXISTS]=\"isFeeRecordsExist\"\n [IS_OS_AMT_AVAILABLE]=\"isGrpOutstandingAmtPositive\"\n [PAYMENTSLENGTH]=\"allPayments?.length\"\n [PAYMENTREF]=\"paymentRef\"\n (getUnprocessedFeeCount) = \"getUnprocessedFeeCount($event)\"\n (selectedUnprocessedFeeEvent) = \"selectedUnprocessedFeeEvent($event)\">\n </ccpay-app-unprocessed-payments>\n </div>\n </div>\n </ng-container>\n\n<!--Order Case Transactions Page-->\n <ng-container *ngIf=\"viewStatus === 'main' && !isTurnOff && takePayment\">\n <div>\n\n <div>\n <h1 class=\"govuk-grid-column-two-thirds govuk-heading-l govuk-!-margin-top-0\">Case transactions</h1>\n <ng-container *ngIf='!isExceptionRecord' class=\" govuk-!-margin-bottom-6 alignself\">\n <b> Case reference: </b>{{ ccdCaseNumber | ccdHyphens }}\n </ng-container>\n <ng-container *ngIf='isExceptionRecord' class=\"govuk-!-margin-bottom-3 col-55 alignself\" >\n <b> Exception reference:</b>{{ ccdCaseNumber | ccdHyphens }}\n </ng-container>\n <div>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-25\" scope=\"col\">Total payments</td>\n <td class=\"govuk-table__header govuk-table__header--custom col-25\" scope=\"col\" *ngIf=\"isBulkScanEnable\">Unallocated payments</td>\n <td class=\"govuk-table__header col-25\" scope=\"col\">Total remissions</td>\n <td class=\"govuk-table__header col-20\" scope=\"col\">Amount due</td>\n <td class=\"govuk-table__header col-20\" scope=\"col\">Over payment</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"totalpayments govuk-table__row\">\n <td class=\"govuk-table__cell summary-table-font\">{{ totalPayments | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell case-transaction__color summary-table-font\" *ngIf=\"isBulkScanEnable\">{{unprocessedRecordCount}}</td>\n\n <td class=\"govuk-table__cell summary-table-font\">{{ totalRemissions | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell summary-table-font\">{{ clAmountDue | currency :'GBP':'symbol':'1.2-2'}}</td>\n <td class=\"govuk-table__cell summary-table-font\">{{ overPaymentAmount | currency :'GBP':'symbol':'1.2-2'}}</td>\n\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ORDERIDDETAILS'>\n\n <!--Payment Request-->\n <div class=\"paymentrequest\">\n <span class=\"heading-medium\">Service requests</span>\n <ng-container>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-14\" scope=\"col\">Status</td>\n <td class=\"govuk-table__header col-10\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header col-18\" scope=\"col\">Party</td>\n <td class=\"govuk-table__header col-21\" scope=\"col\">Request reference</td>\n <td class=\"govuk-table__header col-9\" scope=\"col\"></td>\n <td class=\"govuk-table__header col\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"orderLevelFees?.length > 0\">\n <tr *ngFor=\"let orderRef of orderLevelFees;let i = index;\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderRef.orderStatus}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ orderRef.orderTotalFees | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td *ngIf=\"cpoDetails !== null\" class=\"govuk-table__cell whitespace-inherit\">{{cpoDetails['responsibleParty']}}</td>\n <td *ngIf=\"cpoDetails === null\" class=\"govuk-table__cell whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderRef.orderRefId}}</td>\n <td class=\"govuk-table__cell\">\n <a href=\"javascript:void(0)\" (click)=\"goToOrderViewDetailSection(orderRef)\">Review</a>\n </td>\n <td class=\"alignright\">\n\n <button type=\"submit\" (click)=\"redirectToOrderFeeSearchPage($event,orderRef)\"\n [disabled]=\"!orderRef.orderAddBtnEnable\"\n [ngClass]='!orderRef.orderAddBtnEnable ? \"govuk-button govuk-button--secondary govuk-button--disabled govuk-!-margin-right-1\" : \"govuk-button govuk-button--secondary govuk-!-margin-right-1\"'>\n Take telephony payment\n </button></td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body alignleft\" *ngIf=\"orderLevelFees?.length === 0\">\n <td colspan=\"6\">No service requests on this case.</td>\n </tbody>\n </table>\n </ng-container>\n <!-- <ng-container *ngIf=\"orderLevelFees?.length === 0\">\n <br/>No service requests on this case.<br/>\n </ng-container> -->\n <span>\n <br/>\n <a (click)=\"redirectToFeeSearchPage($event)\"\n [class.disabled]=\"!isAddFeeBtnEnabled\">Create service request and pay</a><br/>\n </span>\n </div>\n <div>\n <span class=\"heading-medium\"><br/>Payments</span>\n <ccpay-app-unprocessed-payments\n *ngIf=\"isBulkScanEnable\"\n [IS_BUTTON_ENABLE]=\"takePayment\"\n [LEVEL]=\"3\"\n [PAYMENTSLENGTH]=\"allPayments?.length\"\n [ISTURNOFF]=\"isTurnOff\"\n [ISSFENABLE]=\"isStrategicFixEnable\"\n [PAYMENTREF]=\"paymentRef\"\n [FEE_RECORDS_EXISTS]=\"isFeeRecordsExist\"\n (getUnprocessedFeeCount) = \"getUnprocessedFeeCount($event)\"\n [IS_OS_AMT_AVAILABLE]=\"isGrpOutstandingAmtPositive\"\n (selectedUnprocessedFeeEvent) = \"selectedUnprocessedFeeEvent($event)\">\n </ccpay-app-unprocessed-payments>\n\n <ng-container>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of allPayments\">\n <td class=\"govuk-table__cell col-14 whitespace-inherit\">{{ payment.status }}</td>\n <td class=\"govuk-table__cell col-10 whitespace-inherit\">{{ payment.amount | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell col-17 whitespace-inherit\">{{ payment.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"govuk-table__cell col-24 whitespace-inherit\">{{ payment.paymentGroupReference }}</td>\n <td class=\"govuk-table__cell col-13 whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(payment.paymentGroupReference, payment.reference, payment.method)\">Review</a>\n </td>\n </tr>\n </tbody>\n\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length === 0 && unprocessedRecordCount <= 0\">\n <td colspan=\"6\">No payments recorded</td>\n </tbody>\n </table>\n\n </ng-container>\n\n </div>\n <div *ngIf=\"!check4AllowedRoles2AccessPBApayment() && serviceRequestValue !== 'true'\">\n <span class=\"heading-medium\"><br/>Refunds</span>\n <ccpay-refund-status\n [ccdCaseNumber]=\"ccdCaseNumber\"\n [isTurnOff]=\"isTurnOff\"\n [orderParty]=\"orderParty\"\n [LOGGEDINUSERROLES]=\"LOGGEDINUSERROLES\" \n [isEliginbleToAccess] = check4AllowedRoles2AccessRefund()\n ></ccpay-refund-status>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!takePayment && viewStatus === 'main'\">\n <div class=\"govuk-grid-column-full\" [ngClass]='serviceRequestValue!== \"false\" ? \"govuk-margin-btm-20px\" : \"\"'>\n <!-- <span *ngIf=\"serviceRequestValue === 'false'\" class=\"heading-medium\">Service requests</span> -->\n <ng-container *ngIf=\"!(orderLevelFees?.length === 0 && !isAnyFeeGroupAvilable) && serviceRequestValue !== 'false' \">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-14\" scope=\"col\">Status</td>\n <td class=\"govuk-table__header col-18\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header col-18\" scope=\"col\">Party</td>\n <td class=\"govuk-table__header col-24\" scope=\"col\">Request reference\t</td>\n <td class=\"govuk-table__header col-9\" scope=\"col\"></td>\n <td class=\"govuk-table__header\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"orderLevelFees?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let orderRef of orderLevelFees;let i = index;\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderRef.orderStatus}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderRef.orderTotalFees | currency :'GBP':'symbol':'1.2-2'}}</td>\n <td *ngIf=\"cpoDetails !== null\" class=\"govuk-table__cell whitespace-inherit\">{{cpoDetails['responsibleParty']}}</td>\n <td *ngIf=\"cpoDetails === null\" class=\"govuk-table__cell whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderRef.orderRefId}}</td>\n <td class=\"govuk-table__cell of-visible\"> <a href=\"javascript:void(0)\" (click)=\"loadPBAAccountPage(orderRef)\" *ngIf=\"serviceRequestValue !== 'false' && check4AllowedRoles2AccessPBApayment() && orderRef.orderStatus === 'Not paid'\"> Pay now</a></td>\n <td class=\"govuk-table__cell\">\n <a href=\"javascript:void(0)\" (click)=\"goToOrderViewDetailSection(orderRef)\">Review</a>\n </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"orderLevelFees?.length === 0 && serviceRequestValue === 'false'\">\n <tr class=\"govuk-table__row\" >\n <td class=\"alignleft\" colspan=\"7\">No service requests on this case.</td>\n </tr>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"orderLevelFees?.length === 0 && serviceRequestValue !== 'false' && !isAnyFeeGroupAvilable\">\n <h1 class=\"govuk-heading-l govuk-heading-lw\">If you are expecting to pay and are not able to see a service request,</h1>\n <p>please refresh and try in some time.</p>\n </ng-container>\n\n <!-- </div> -->\n\n </div>\n\n <div class=\"govuk-grid-column-full\">\n <div *ngIf=\"serviceRequestValue === 'false'\">\n <span class=\"heading-medium\"><br/>Payments</span>\n <ng-container >\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-14\" scope=\"col\">Status</td>\n <td class=\"govuk-table__header col-10\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header col-17\" scope=\"col\">Date</td>\n <td class=\"govuk-table__header col-24\" scope=\"col\">Payment reference</td>\n <td class=\"govuk-table__header col-13\" scope=\"col\"></td>\n <td class=\"govuk-table__header\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of allPayments\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.status }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.amount | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment?.reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(payment.paymentGroupReference, payment.reference, payment.method)\">Review</a>\n </td>\n </tr>\n </tbody>\n\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length === 0\">\n <td colspan=\"6\">No payments recorded</td>\n </tbody>\n </table>\n <ccpay-app-unprocessed-payments class=\"govuk-table\"\n *ngIf=\"isBulkScanEnable && !takePayment\"\n [IS_BUTTON_ENABLE]=\"takePayment\"\n [LEVEL]=\"4\"\n [ISTURNOFF]=\"isTurnOff\"\n [ISSFENABLE]=\"isStrategicFixEnable\"\n [PAYMENTSLENGTH]=\"allPayments?.length\"\n [PAYMENTREF]=\"paymentRef\"\n (getUnprocessedFeeCount) = \"getUnprocessedFeeCount($event)\"\n [FEE_RECORDS_EXISTS]=\"isAnyFeeGroupAvilable\"\n [IS_OS_AMT_AVAILABLE]=\"isGrpOutstandingAmtPositive\"\n (selectedUnprocessedFeeEvent) = \"selectedUnprocessedFeeEvent($event)\">\n </ccpay-app-unprocessed-payments>\n </ng-container>\n\n </div>\n </div>\n <div class=\"govuk-grid-column-full\" *ngIf=\"!check4AllowedRoles2AccessPBApayment() && serviceRequestValue !== 'true'\">\n <span class=\"heading-medium\"><br/>Refunds</span>\n <ccpay-refund-status \n [ccdCaseNumber]=\"ccdCaseNumber\"\n [orderParty] =\"orderParty\"\n [isEliginbleToAccess] = check4AllowedRoles2AccessRefund()\n ></ccpay-refund-status>\n </div>\n\n </ng-container>\n\n\n<input #myInput type='hidden' id='iFrameDrivenImageValue' value='FEEREMOVALCONFIRMATION_2'>\n\n<!-- Order Full View Details-->\n<ng-container *ngIf=\"viewStatus === 'order-full-view'\">\n <ccpay-service-request\n [viewStatus] = \"viewStatus\"\n [orderRef] = \"orderRef\"\n [orderStatus] = \"orderStatus\"\n [orderCreated] = \"orderCreated\"\n [orderParty] = \"orderParty\"\n [orderCCDEvent] = \"orderCCDEvent\"\n [orderDetail] = \"orderDetail\"\n [paymentGroupList] = \"paymentGroups\"\n [LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n [ccdCaseNumber] = \"ccdCaseNumber\"\n [orderFeesTotal] = \"orderFeesTotal\"\n [orderTotalPayments] = \"orderTotalPayments\"\n [orderRemissionTotal] = \"orderRemissionTotal\"\n [isServiceRequest] = \"serviceRequestValue\"\n (goToServiceRquestComponent) = \"goToServiceRequestPage()\"\n ></ccpay-service-request>\n\n</ng-container>\n<ccpay-add-remission *ngIf=\"viewStatus === 'addremission' && feeId\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[fee]=\"feeId\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[paymentGroupRef]=\"orderRef\"\n[isFromServiceRequestPage] = \"true\"\n[payment] = \"payment\"\n[ccdCaseNumber]=\"ccdCaseNumber\"></ccpay-add-remission>\n\n<ccpay-add-remission *ngIf=\"viewStatus === 'issuerefund' && payment\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[isFromServiceRequestPage] = \"true\"\n[payment]=\"payment\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[paymentGroupRef]=\"orderRef\"\n[ccdCaseNumber]=\"ccdCaseNumber\"></ccpay-add-remission>\n<ccpay-add-remission *ngIf=\"viewStatus === 'addrefundforremission' && payment\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[payment]=\"payment\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[feeamount]=\"remissionFeeAmt\"\n[remission] = \"remissions\"\n[isFromServiceRequestPage]=\"true\"\n[ccdCaseNumber]=\"ccdCaseNumber\"></ccpay-add-remission>\n\n<ng-container *ngIf=\"viewStatus === 'feeRemovalConfirmation'\">\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n Are you sure you want to delete this fee?\n </strong>\n </div>\n <div class=\"govuk-button-grb\">\n <form novalidate>\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"cancelRemoval()\">\n Cancel\n </button>\n <button type=\"submit\" class=\"button\"\n [disabled]=\"isRemoveBtnDisabled\"\n [ngClass]='isRemoveBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"removeFee(feeId)\">\n Remove\n </button>\n </form>\n </div>\n</ng-container>\n</main>\n</div>\n",
3743
4299
  styles: [".govuk-grid-column-full--gr{position:relative;margin-bottom:10px}.disable{text-decoration:none;cursor:default;color:#fff;background-color:grey;pointer-events:none}.govuk-grid__surplus-payments{margin:20px 0}.govuk-grid__surplus-payments>.govuk-grid-column-full{padding:0}.govuk-grid__surplus-payments-col1{margin-bottom:10px}.govuk-inset-text__no-border{border-left:0}.govuk-hidetext{font-size:22px;padding-bottom:10px}.lowercase{text-transform:lowercase}.channel::first-letter{text-transform:uppercase}.govuk-heading-xl{font-size:48px;margin-bottom:1px}.govuk-section-break--visible{border-bottom:2px solid #000}.totalpayments.govuk-table__row{border-bottom:2px solid #000!important}.govuk-inset-text{margin-left:1em}.govuk-button{font-size:19px;margin-bottom:0!important}.govuk-table__cell.govuk-table__cell--col6.govuk-table__custom--col6,.groupamount.govuk-table__header{text-align:right}.feeclass{padding-left:.7em}.align-center{text-align:center}details summary{display:list-item}.case-transaction__color{color:#a71414;font-weight:700;text-align:center}.capitalize::first-letter{text-transform:uppercase}.govuk-inset-text__no-left-margin{margin-left:0;padding-left:0}.whitespace-inherit{white-space:inherit!important}.govuk-section-records-break{margin:10px;border-bottom:2px solid #000!important}.exisitng-fees{margin-left:12px}.add-telephony-payment{margin-top:-2em;margin-left:-2em}.govuk-table__header--custom{text-align:center}.disable-link{cursor:default;pointer-events:none;color:#8e8c8c}.panel-no--style{border-left-style:none}.col-28{width:28%!important}.col-8{width:8%!important}.col-60{width:60%!important}.col-32{width:32%!important}.col-34{width:34%!important}.col-15{width:15%!important;padding-right:0!important;padding-left:0!important}.col-16{width:16%!important}.col-14{width:14%!important}.col-17{width:17%!important}.col-12{width:12%!important}.col-9{width:9%!important}.col-10{width:10%!important}.col-11{width:11%!important}.col-13{width:13%!important}.col-21{width:21%!important}.col-20{width:20%!important}.col-24{width:24%!important}.govuk-table__cell,.govuk-table__header{padding:10px 10px 10px 0}.col-27{width:27%!important}td{white-space:nowrap;overflow:hidden!important}.col-19{width:19%!important;padding-left:0!important}.col-18{width:18%!important;padding-left:0!important;padding-right:0!important}.col-37{width:37%!important}.col-55{width:55%!important}.govuk-table{margin-bottom:1px}.hmcts-banner>.hmcts-banner__message{font-size:19px;line-height:1.25}.summary-table-font{font-size:36px}.order-class{padding-top:3em}.govuk-table__cell:last-child,.govuk-table__header:last-child{text-align:right}.govuk-grid-column-two-thirds{width:64%!important;padding:0!important}.govuk-heading-l{font-size:36px;margin-bottom:10px}.govuk-heading-lw{width:70%}.paymentrequest{margin-top:1em}.mar-17{margin-left:17px}.col-61{width:61px!important;padding:0!important}.error{width:960px;margin:auto}.summarypage{padding-left:36em;margin-top:2em}.summarypagealign{width:100%;text-align:right;margin-top:2em}.govuk-inset-text{font-size:2.1875rem}table{table-layout:fixed;width:100%}td,th{word-wrap:break-word}.totalPay{padding-right:14px;float:right;margin-top:2em}.govuk-back-link{font-size:1.5rem!important}.totalfees{float:right;margin-top:2em}.refundBtn{text-align:right;width:18%}.col-25{width:25%!important}.of-visible{overflow:visible!important}.col-51{width:51%!important}.alignright{text-align:right}.alignleft{text-align:left}.alignself{align-self:flex-end}.maxwidth{width:100%}.govuk-padding-btm{padding-bottom:50px}.govuk-margin-btm-20px{margin-bottom:20px}"]
3744
4300
  }] }
3745
4301
  ];
@@ -3754,7 +4310,8 @@ CaseTransactionsComponent.ctorParameters = () => [
3754
4310
  ];
3755
4311
  CaseTransactionsComponent.propDecorators = {
3756
4312
  LOGGEDINUSERROLES: [{ type: Input, args: ['LOGGEDINUSERROLES',] }],
3757
- isTakePayment: [{ type: Input }]
4313
+ isTakePayment: [{ type: Input }],
4314
+ isFromServiceRequestPage: [{ type: Input }]
3758
4315
  };
3759
4316
 
3760
4317
  /**
@@ -3952,19 +4509,24 @@ class FeeSummaryComponent {
3952
4509
  if (fee.calculated_amount === 0) {
3953
4510
  this.isFeeAmountZero = true;
3954
4511
  }
3955
- this.isRemissionsMatch = false;
3956
- paymentGroup.remissions.forEach((/**
3957
- * @param {?} rem
3958
- * @return {?}
3959
- */
3960
- rem => {
3961
- if (rem.fee_code === fee.code) {
3962
- this.isRemissionsMatch = true;
3963
- fee['remissions'] = rem;
4512
+ if (paymentGroup.remissions) {
4513
+ this.isRemissionsMatch = false;
4514
+ paymentGroup.remissions.forEach((/**
4515
+ * @param {?} rem
4516
+ * @return {?}
4517
+ */
4518
+ rem => {
4519
+ if (rem.fee_code === fee.code) {
4520
+ this.isRemissionsMatch = true;
4521
+ fee['remissions'] = rem;
4522
+ fees.push(fee);
4523
+ }
4524
+ }));
4525
+ if (!this.isRemissionsMatch) {
3964
4526
  fees.push(fee);
3965
4527
  }
3966
- }));
3967
- if (!this.isRemissionsMatch) {
4528
+ }
4529
+ else {
3968
4530
  fees.push(fee);
3969
4531
  }
3970
4532
  }));
@@ -4129,7 +4691,7 @@ class FeeSummaryComponent {
4129
4691
  FeeSummaryComponent.decorators = [
4130
4692
  { type: Component, args: [{
4131
4693
  selector: 'ccpay-fee-summary',
4132
- template: "\n<div class=\"govuk-breadcrumbs\" *ngIf=\"isBackButtonEnable\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\" *ngIf=\"!isTurnOff\">\n <a (click)=\"loadCaseTransactionPage()\" class=\"govuk-back-link govuk-label\">Back</a>\n </li>\n <li class=\"govuk-breadcrumbs__list-item\" *ngIf=\"isTurnOff\">\n <a (click)=\"redirectToFeeSearchPage($event,'summary')\" class=\"govuk-back-link govuk-label\">Back</a>\n </li>\n </ol>\n</div>\n<div class=\"fee-summary\" *ngIf=\"viewStatus === 'main'\">\n <main class=\"govuk-main-wrapper\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='FEESUMMARY'>\n <div class=\"summaryheader\">\n <h1 class=\"heading-large govuk-!-margin-top-3 govuk-!-margin-bottom-4\">Summary </h1>\n <p class=\"govuk-!-margin-top-5 caseref\">Case reference:{{ccdCaseNumber | ccdHyphens}}</p>\n </div>\n\n <!-- <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"heading-xlarge\">Fee Summary</h1>\n </div>\n\n\n \u00A0<div\u00A0class=\"govuk-grid-column-one-third\"\u00A0align=\"right\">\n \u00A0\u00A0\u00A0\u00A0\u00A0\u00A0<button\u00A0 *ngIf=\"!isTurnOff\" (click)=\"redirectToFeeSearchPage($event,'summary')\"\n \u00A0\u00A0\u00A0\u00A0\u00A0\u00A0[disabled]=\"isPaymentExist\"\n \u00A0\u00A0\u00A0\u00A0\u00A0\u00A0[ngClass]='isPaymentExist ?\u00A0\"button\u00A0button--disabled govuk-!-margin-right-1\"\u00A0:\u00A0\"button govuk-!-margin-right-1\"'>\n Add a new fee\n </button>\n\n <a *ngIf=\"isTurnOff\" (click)=\"redirectToFeeSearchPage($event,'summary')\" class=\"button\">Add a new fee</a>\n </div>\n </div> -->\n\n\n <div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Payment Group details could not be retrieved\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n </div>\n\n <!-- <table class=\"govuk-table\" *ngIf=\"!errorMessage && paymentGroup\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header govuk-!-font-weight-bold\" scope=\"col\">Fee Code</th>\n <th class=\"govuk-table__header govuk-!-font-weight-bold\" scope=\"col\">Fee description</th>\n <th class=\"govuk-table__header govuk-!-font-weight-bold\" scope=\"col\">Remission code</th>\n <th class=\"govuk-table__header govuk-!-font-weight-bold\" scope=\"col\"></th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.fees\">\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of paymentGroup.fees; let i = index;\">\n <td class=\"govuk-table__cell\">{{ fee.code }}</td>\n <td class=\"govuk-table__cell\">{{ fee.description }}</td>\n <td class=\"govuk-table__cell\">{{ getRemissionByFeeCode(fee.code)?.hwf_reference }}</td>\n <td class=\"govuk-table__cell grey-text\">\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"no-border grey-text subcolumn-1\">Fee amount:</td>\n <td class=\"no-border subcolumn-2\">{{ fee.fee_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"no-border subcolumn-3\" *ngIf=\"!isTurnOff\">\n <a (click)=\"confirmRemoveFee(fee.id)\" [ngClass]='isPaymentExist || fee.remissions ? \"disable-link\" : \"\"'>remove fee</a>\n </td>\n <td class=\"no-border subcolumn-3\" *ngIf=\"isTurnOff\">\n <a (click)=\"confirmRemoveFee(fee.id)\">remove fee</a>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"fee.volume && fee.volume > 0\">\n <td class=\"no-border grey-text subcolumn-1\">Volume:</td>\n <td class=\"no-border subcolumn-2\">{{ fee.volume }}</td>\n <td class=\"no-border subcolumn-3\"></td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"no-border grey-text subcolumn-1\">Fee total:</td>\n <td class=\"no-border subcolumn-2\">{{ fee.calculated_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"no-border subcolumn-3\"></td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"no-border grey-text subcolumn-1\">Remission amount:</td>\n <td class=\"no-border subcolumn-2\">{{ getRemissionByFeeCode(fee.code)?.hwf_amount? ( getRemissionByFeeCode(fee.code)?.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2') : '-' }}</td>\n <td class=\"no-border subcolumn-3\" *ngIf=\"!isTurnOff\">\n <a (click)=\"addRemission(fee)\" *ngIf=\"(getRemissionByFeeCode(fee.code)?.hwf_amount === 0 || !getRemissionByFeeCode(fee.code)?.hwf_amount) && !isPaymentExist\">\n Deduct remission\n </a>\n </td>\n <td class=\"no-border subcolumn-3\" *ngIf=\"isTurnOff\">\n <a (click)=\"addRemission(fee)\" *ngIf=\"getRemissionByFeeCode(fee.code)?.hwf_amount === 0 || !getRemissionByFeeCode(fee.code)?.hwf_amount\">\n Deduct remission\n </a>\n </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"no-border grey-text subcolumn-1\">Total after remission:</td>\n <td class=\"no-border subcolumn-2\">{{ fee.net_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"no-border subcolumn-3\"></td>\n </tr>\n </table>\n </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"no-border\"></td>\n <td class=\"no-border\"></td>\n <td class=\"no-border\"></td>\n <td class=\"no-border\">\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"no-border govuk-!-font-weight-bold subcolumn-1\">Total payment</td>\n <td class=\"no-border subcolumn-2\">{{ totalAfterRemission - outStandingAmount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n <td class=\"no-border subcolumn-3\"></td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"no-border govuk-!-font-weight-bold subcolumn-1\">Total outstanding amount</td>\n <td class=\"no-border subcolumn-2\">{{ outStandingAmount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n <td class=\"no-border subcolumn-3\"></td>\n </tr>\n </table>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"!bsPaymentDcnNumber && isOldPcipalOff && isNewPcipalOff\">\n <td class=\"no-border\"></td>\n <td class=\"no-border\"></td>\n <td class=\"no-border\"></td>\n <td class=\"no-border\">\n <div class=\"govuk-form-group govuk-form-group--mg\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n <span class=\"govuk-fieldset__heading govuk-fieldset__heading--fz\">\n Which system are you using to take the payment?\n </span>\n </legend>\n <div class=\"govuk-radios govuk-radios--small\">\n <div class=\"govuk-radios__item\">\n <input id=\"changed-name\" class=\"govuk-radios__input\" [(ngModel)]=\"platForm\" type=\"radio\" aria-label=\"8x8\" value=\"8x8\">\n <label class=\"govuk-label govuk-radios__label\" for=\"changed-name\">\n 8x8\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input id=\"changed-name-2\" class=\"govuk-radios__input\" [(ngModel)]=\"platForm\" type=\"radio\" aria-label=\"Antenna\" value=\"Antenna\">\n <label class=\"govuk-label govuk-radios__label\" for=\"changed-name-2\">\n Antenna\n </label>\n </div>\n </div>\n </fieldset>\n </div>\n </td>\n </tr>\n </tbody>\n <tr class=\"govuk-table__row\">\n <td class=\"no-border\"></td>\n <td class=\"no-border\"></td>\n <td class=\"no-border\"></td>\n <td class=\"no-border\">\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"no-border subcolumn-2\">\n <button *ngIf=\"!bsPaymentDcnNumber\" type=\"submit\" (click)=\"takePayment()\"\n [disabled]=\"totalFee <= 0 || !platForm || isConfirmationBtnDisabled\"\n [ngClass]='totalFee <= 0 || !platForm || isConfirmationBtnDisabled? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'>\n Take payment\n </button>\n <button *ngIf=\"bsPaymentDcnNumber\" type=\"button\" (click)=\"goToAllocatePage(outStandingAmount, isFeeAmountZero)\" class=\"button govuk-!-margin-right-1\">\n <span *ngIf=\"outStandingAmount > 0 || (isFeeAmountZero && outStandingAmount === 0)\">\n Allocate payment\n </span>\n <span *ngIf=\"outStandingAmount < 0 || (!isFeeAmountZero && outStandingAmount === 0)\">\n Continue\n </span>\n </button>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </tbody>\n </table> -->\n\n <div class=\"govuk-!-margin-top-3\">\n <table class=\"govuk-table govuk-!-margin-bottom-2\" *ngIf=\"!errorMessage && paymentGroup\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\" class=\"class600\">Description</th>\n <th class=\"govuk-table__header\" scope=\"col\" class=\"class60\">Quantity</th>\n <th class=\"govuk-table__header\" scope=\"col\" class=\"class80\"></th>\n <th class=\"govuk-table__header\" scope=\"col\" class=\"class100\">Amount</th>\n </tr>\n </thead>\n\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.fees\">\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of paymentGroup.fees; let i = index;\">\n <td class=\"govuk-table__cell\">{{ fee.description }}\n\n <span class=\"no-border\" *ngIf=\"(isPaymentExist || (getRemissionByFeeCode(fee.code)?.hwf_amount === 0 || !getRemissionByFeeCode(fee.code)?.hwf_amount)) && !isTurnOff\">\n\n\n <a (click)=\"confirmRemoveFee(fee.id)\" *ngIf=\"(!isPaymentExist || !fee.remissions)\" [ngClass]='isPaymentExist || fee.remissions? \"disable-link\" : \"\"'> <br>Remove</a>\n </span>\n\n <span class=\"no-border\" *ngIf=\"(!isPaymentExist || (getRemissionByFeeCode(fee.code)?.hwf_amount === 0 || !getRemissionByFeeCode(fee.code)?.hwf_amount)) && isTurnOff \">\n <a (click)=\"confirmRemoveFee(fee.id)\">Remove</a>\n </span>\n\n <a (click)=\"addRemission(fee)\" class=\"remissionActive\" *ngIf=\"(getRemissionByFeeCode(fee.code)?.hwf_amount === 0 || !getRemissionByFeeCode(fee.code)?.hwf_amount) && !isPaymentExist && !isTurnOff\">\n Add help with fees or remission\n </a>\n <a (click)=\"addRemission(fee)\" class=\"remissionActive\" *ngIf=\"(getRemissionByFeeCode(fee.code)?.hwf_amount === 0 || !getRemissionByFeeCode(fee.code)?.hwf_amount) && isTurnOff\">\n Add help with fees or remission\n </a>\n <span *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">\n <br>\n <div class=\"govuk-table__cell_border\" *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">Remission,{{ getRemissionByFeeCode(fee.code)?.hwf_reference }}</div>\n </span>\n </td>\n\n <td class=\"govuk-table__cell\" *ngIf=\"fee.volume && fee.volume > 0\">\n {{ fee.volume }}\n <span *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">\n <br>\n <div class=\"govuk-table__cell_border\">1</div>\n </span>\n </td>\n\n <td class=\"govuk-table__cell alignright\">\n <br>\n <div *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\" class=\"govuk-table__cell_border\"> <br><br></div>\n </td>\n <td class=\"govuk-table__cell alignright\" >\n {{ fee.calculated_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}\n <span *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">\n <br>\n <div class=\"govuk-table__cell_rmborder alignright\">\n -{{ getRemissionByFeeCode(fee.code)?.hwf_amount? ( getRemissionByFeeCode(fee.code)?.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2') : '-' }}\n </div>\n </span>\n </td>\n\n\n </tr>\n <!-- <tr>\n <td *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">\n <br>\n <div class=\"govuk-table__cell_border\" *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">Remission,{{ getRemissionByFeeCode(fee.code)?.hwf_reference }}</div>\n </td>\n <td *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount ===''\">\n <div class=\"govuk-table__cell_border\"></div>\n </td>\n <td *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount === ''\">\n <br>\n <div class=\"govuk-table__cell_border\" *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount === ''\"></div>\n </td>\n <td>\n <br>\n <div class=\"govuk-table__cell_border\" style=\"text-align: right;\">\n -{{ getRemissionByFeeCode(fee.code)?.hwf_amount? ( getRemissionByFeeCode(fee.code)?.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2') : '-' }}\n </div>\n </td>\n </tr> -->\n </tbody>\n </table>\n </div>\n <div class=\"addfee\">\n <button *ngIf=\"!isTurnOff\" (click)=\"redirectToFeeSearchPage($event,'summary')\"\n [disabled]=\"isPaymentExist\"\n [ngClass]='isPaymentExist ? \"govuk-button govuk-button--secondary button--disabled\" : \"govuk-button govuk-button--secondary\"'>\n Add fee\n </button>\n <a *ngIf=\"isTurnOff\" (click)=\"redirectToFeeSearchPage($event,'summary')\" class=\"govuk-button govuk-button--secondary\">Add a new fee</a>\n <div class=\"feeAddButton\">\n <p class=\"paddigleft govuk-!-margin-top-2\">Total to pay: {{ outStandingAmount | currency:'GBP':'symbol-narrow':'1.2-2'}}</p>\n </div>\n </div>\n<!--\n <div class=\"govuk-form-group govuk-form-group--mg\" *ngIf=\"!bsPaymentDcnNumber\">\n <label class=\"govuk-label custom-govuk-label govuk-fieldset__heading--fz\" for=\"responsibleOffice\">\n <strong>What service is this fee for?</strong>\n </label>\n <select class=\"govuk-select govuk-select--custom\" id=\"responsibleOffice\" [(ngModel)]=\"service\" name=\"responsibleOffice\">\n <option value=\"\" selected='selected'>Please select</option>\n <option value=\"AA07\">Divorce</option>\n <option value=\"AA09\">Financial Remedy</option>\n <option value=\"AA08\">Probate</option>\n </select>\n </div> -->\n\n <div>\n <button *ngIf=\"!bsPaymentDcnNumber\" type=\"submit\" (click)=\"takePayment()\"\n [disabled]=\"totalFee <= 0 || isConfirmationBtnDisabled\"\n [ngClass]='totalFee <= 0 || !platForm || !service || isConfirmationBtnDisabled? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'>\n Take payment\n </button>\n <button *ngIf=\"bsPaymentDcnNumber\" type=\"button\" (click)=\"goToAllocatePage(outStandingAmount, isFeeAmountZero)\" class=\"button govuk-!-margin-right-1\">\n <span *ngIf=\"outStandingAmount > 0 || (isFeeAmountZero && outStandingAmount === 0)\">\n Allocate payment\n </span>\n <span *ngIf=\"outStandingAmount < 0 || (!isFeeAmountZero && outStandingAmount === 0)\">\n Continue\n </span>\n </button>\n </div>\n\n</main>\n</div>\n\n <ng-container *ngIf=\"viewStatus === 'feeRemovalConfirmation'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='FEEREMOVALCONFIRMATION_1'>\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n Are you sure you want to delete this fee?\n </strong>\n </div>\n <div class=\"govuk-button-grb\">\n <form novalidate>\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"cancelRemission()\">\n Cancel\n </button>\n <button type=\"submit\" class=\"button\"\n *ngIf =\"!isRemoveBtnDisabled\"\n [ngClass]='isRemoveBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"removeFee(currentFee)\">\n Remove\n </button>\n </form>\n </div>\n </ng-container>\n<ccpay-add-remission *ngIf=\"viewStatus === 'add_remission' && currentFee\"\n [isTurnOff]=\"isTurnOff\"\n [isStrategicFixEnable]=\"isStrategicFixEnable\"\n [fee]=\"currentFee\"\n [caseType]=\"caseType\"\n [ccdCaseNumber]=\"ccdCaseNumber\"\n [paymentGroupRef]=\"paymentGroupRef\"\n (cancelRemission)=\"cancelRemission()\"></ccpay-add-remission>\n <input *ngIf=\"viewStatus === 'payhub_view' && payhubHtml\" #myInput type='hidden' id='iFrameDrivenImageValue' value='PCIPAL'>\n",
4694
+ template: "\n<div class=\"govuk-breadcrumbs\" *ngIf=\"isBackButtonEnable\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\" *ngIf=\"!isTurnOff\">\n <a (click)=\"loadCaseTransactionPage()\" class=\"govuk-back-link govuk-label\">Back</a>\n </li>\n <li class=\"govuk-breadcrumbs__list-item\" *ngIf=\"isTurnOff\">\n <a (click)=\"redirectToFeeSearchPage($event,'summary')\" class=\"govuk-back-link govuk-label\">Back</a>\n </li>\n </ol>\n</div>\n<div class=\"fee-summary\" *ngIf=\"viewStatus === 'main'\">\n <main class=\"govuk-main-wrapper\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='FEESUMMARY'>\n <div class=\"summaryheader\">\n <h1 class=\"heading-large govuk-!-margin-top-3 govuk-!-margin-bottom-4\">Summary </h1>\n <p class=\"govuk-!-margin-top-5 caseref\">Case reference:{{ccdCaseNumber | ccdHyphens}}</p>\n </div>\n\n <!-- <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"heading-xlarge\">Fee Summary</h1>\n </div>\n\n\n \u00A0<div\u00A0class=\"govuk-grid-column-one-third\"\u00A0align=\"right\">\n \u00A0\u00A0\u00A0\u00A0\u00A0\u00A0<button\u00A0 *ngIf=\"!isTurnOff\" (click)=\"redirectToFeeSearchPage($event,'summary')\"\n \u00A0\u00A0\u00A0\u00A0\u00A0\u00A0[disabled]=\"isPaymentExist\"\n \u00A0\u00A0\u00A0\u00A0\u00A0\u00A0[ngClass]='isPaymentExist ?\u00A0\"button\u00A0button--disabled govuk-!-margin-right-1\"\u00A0:\u00A0\"button govuk-!-margin-right-1\"'>\n Add a new fee\n </button>\n\n <a *ngIf=\"isTurnOff\" (click)=\"redirectToFeeSearchPage($event,'summary')\" class=\"button\">Add a new fee</a>\n </div>\n </div> -->\n\n\n <div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Payment Group details could not be retrieved\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n </div>\n\n <div class=\"govuk-!-margin-top-3\">\n <table class=\"govuk-table govuk-!-margin-bottom-2\" *ngIf=\"!errorMessage && paymentGroup\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\" class=\"class600\">Description</th>\n <th class=\"govuk-table__header\" scope=\"col\" class=\"class60\">Quantity</th>\n <th class=\"govuk-table__header\" scope=\"col\" class=\"class80\"></th>\n <th class=\"govuk-table__header\" scope=\"col\" class=\"class100\">Amount</th>\n </tr>\n </thead>\n\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.fees\">\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of paymentGroup.fees; let i = index;\">\n <td class=\"govuk-table__cell\">{{ fee.description }}\n\n <span class=\"no-border\" *ngIf=\"(isPaymentExist || (getRemissionByFeeCode(fee.code)?.hwf_amount === 0 || !getRemissionByFeeCode(fee.code)?.hwf_amount)) && !isTurnOff\">\n\n\n <a (click)=\"confirmRemoveFee(fee.id)\" *ngIf=\"(!isPaymentExist || !fee.remissions)\" [ngClass]='isPaymentExist || fee.remissions? \"disable-link\" : \"\"'> <br>Remove</a>\n </span>\n\n <span class=\"no-border\" *ngIf=\"(!isPaymentExist || (getRemissionByFeeCode(fee.code)?.hwf_amount === 0 || !getRemissionByFeeCode(fee.code)?.hwf_amount)) && isTurnOff \">\n <a (click)=\"confirmRemoveFee(fee.id)\">Remove</a>\n </span>\n\n <a (click)=\"addRemission(fee)\" class=\"remissionActive\" *ngIf=\"(getRemissionByFeeCode(fee.code)?.hwf_amount === 0 || !getRemissionByFeeCode(fee.code)?.hwf_amount) && !isPaymentExist && !isTurnOff\">\n Add help with fees or remission\n </a>\n <a (click)=\"addRemission(fee)\" class=\"remissionActive\" *ngIf=\"(getRemissionByFeeCode(fee.code)?.hwf_amount === 0 || !getRemissionByFeeCode(fee.code)?.hwf_amount) && isTurnOff\">\n Add help with fees or remission\n </a>\n <span *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">\n <br>\n <div class=\"govuk-table__cell_border\" *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">Remission,{{ getRemissionByFeeCode(fee.code)?.hwf_reference }}</div>\n </span>\n </td>\n\n <td class=\"govuk-table__cell\" *ngIf=\"fee.volume && fee.volume > 0\">\n {{ fee.volume }}\n <span *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">\n <br>\n <div class=\"govuk-table__cell_border\">1</div>\n </span>\n </td>\n\n <td class=\"govuk-table__cell alignright\">\n <br>\n <div *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\" class=\"govuk-table__cell_border\"> <br><br></div>\n </td>\n <td class=\"govuk-table__cell alignright\" >\n {{ fee.calculated_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}\n <span *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">\n <br>\n <div class=\"govuk-table__cell_rmborder alignright\">\n -{{ getRemissionByFeeCode(fee.code)?.hwf_amount? ( getRemissionByFeeCode(fee.code)?.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2') : '-' }}\n </div>\n </span>\n </td>\n\n\n </tr>\n <!-- <tr>\n <td *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">\n <br>\n <div class=\"govuk-table__cell_border\" *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">Remission,{{ getRemissionByFeeCode(fee.code)?.hwf_reference }}</div>\n </td>\n <td *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount ===''\">\n <div class=\"govuk-table__cell_border\"></div>\n </td>\n <td *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount === ''\">\n <br>\n <div class=\"govuk-table__cell_border\" *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount === ''\"></div>\n </td>\n <td>\n <br>\n <div class=\"govuk-table__cell_border\" style=\"text-align: right;\">\n -{{ getRemissionByFeeCode(fee.code)?.hwf_amount? ( getRemissionByFeeCode(fee.code)?.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2') : '-' }}\n </div>\n </td>\n </tr> -->\n </tbody>\n </table>\n </div>\n <div class=\"addfee\">\n <button *ngIf=\"!isTurnOff\" (click)=\"redirectToFeeSearchPage($event,'summary')\"\n [disabled]=\"isPaymentExist\"\n [ngClass]='isPaymentExist ? \"govuk-button govuk-button--secondary button--disabled\" : \"govuk-button govuk-button--secondary\"'>\n Add fee\n </button>\n <a *ngIf=\"isTurnOff\" (click)=\"redirectToFeeSearchPage($event,'summary')\" class=\"govuk-button govuk-button--secondary\">Add a new fee</a>\n <div class=\"feeAddButton\">\n <p class=\"paddigleft govuk-!-margin-top-2\">Total to pay: {{ outStandingAmount | currency:'GBP':'symbol-narrow':'1.2-2'}}</p>\n </div>\n </div>\n<!--\n <div class=\"govuk-form-group govuk-form-group--mg\" *ngIf=\"!bsPaymentDcnNumber\">\n <label class=\"govuk-label custom-govuk-label govuk-fieldset__heading--fz\" for=\"responsibleOffice\">\n <strong>What service is this fee for?</strong>\n </label>\n <select class=\"govuk-select govuk-select--custom\" id=\"responsibleOffice\" [(ngModel)]=\"service\" name=\"responsibleOffice\">\n <option value=\"\" selected='selected'>Please select</option>\n <option value=\"AA07\">Divorce</option>\n <option value=\"AA09\">Financial Remedy</option>\n <option value=\"AA08\">Probate</option>\n </select>\n </div> -->\n\n <div>\n <button *ngIf=\"!bsPaymentDcnNumber\" type=\"submit\" (click)=\"takePayment()\"\n [disabled]=\"totalFee <= 0 || isConfirmationBtnDisabled\"\n [ngClass]='totalFee <= 0 || !platForm || !service || isConfirmationBtnDisabled? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'>\n Take payment\n </button>\n <button *ngIf=\"bsPaymentDcnNumber\" type=\"button\" (click)=\"goToAllocatePage(outStandingAmount, isFeeAmountZero)\" class=\"button govuk-!-margin-right-1\">\n <span *ngIf=\"outStandingAmount > 0 || (isFeeAmountZero && outStandingAmount === 0)\">\n Allocate payment\n </span>\n <span *ngIf=\"outStandingAmount < 0 || (!isFeeAmountZero && outStandingAmount === 0)\">\n Continue\n </span>\n </button>\n </div>\n\n</main>\n</div>\n\n <ng-container *ngIf=\"viewStatus === 'feeRemovalConfirmation'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='FEEREMOVALCONFIRMATION_1'>\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n Are you sure you want to delete this fee?\n </strong>\n </div>\n <div class=\"govuk-button-grb\">\n <form novalidate>\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"cancelRemission()\">\n Cancel\n </button>\n <button type=\"submit\" class=\"button\"\n *ngIf =\"!isRemoveBtnDisabled\"\n [ngClass]='isRemoveBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"removeFee(currentFee)\">\n Remove\n </button>\n </form>\n </div>\n </ng-container>\n<ccpay-add-remission *ngIf=\"viewStatus === 'add_remission' && currentFee\"\n [isTurnOff]=\"isTurnOff\"\n [isStrategicFixEnable]=\"isStrategicFixEnable\"\n [fee]=\"currentFee\"\n [caseType]=\"caseType\"\n [ccdCaseNumber]=\"ccdCaseNumber\"\n [paymentGroupRef]=\"paymentGroupRef\"\n (cancelRemission)=\"cancelRemission()\"></ccpay-add-remission>\n <input *ngIf=\"viewStatus === 'payhub_view' && payhubHtml\" #myInput type='hidden' id='iFrameDrivenImageValue' value='PCIPAL'>\n",
4133
4695
  styles: [".fee-summary .grey-text{color:#6b7376;font-weight:500}.fee-summary .govuk-table{margin-bottom:0}.fee-summary .no-border{border:none;border-bottom:none}.fee-summary table td,.fee-summary table th{font-size:19px;vertical-align:top}.fee-summary table td .no-padding,.fee-summary table th .no-padding{padding:0}.fee-summary table td .subcolumn-1,.fee-summary table th .subcolumn-1{width:45%}.fee-summary table td .subcolumn-2,.fee-summary table th .subcolumn-2{width:25%;text-align:right}.fee-summary table td .subcolumn-3,.fee-summary table th .subcolumn-3{width:30%;text-align:center}table th{font-weight:700}.govuk-button-grb{padding-bottom:20px}.govuk-button-grb .govuk-button--secondary{background-color:#dee0e2;box-shadow:0 2px 0 #858688;color:#0b0c0c;margin-right:10px}.govuk-form-group--mg{margin-top:10px!important}.govuk-fieldset__heading--fz{font-size:16px}.remissionDisable{color:grey;cursor:default}.heading-xlarge{margin:0 0 14px -20px}.govuk-select--custom{width:50%}.disable-link{cursor:default;pointer-events:none;color:#8e8c8c}.govuk-table__cell_border,.govuk-table__header{padding:10px 0 0;border-top:1px solid #bfc1c3;text-align:left}.govuk-table__cell,.govuk-table__header{padding:10px 0}.govuk-table__cell_rmborder,.govuk-table__header{padding:10px 0 0;border-top:1px solid #bfc1c3;text-align:left}.govuk-table__fessheader{font-weight:700}.govuk-button{font-size:19px}.feeAddButton{padding-left:65rem}.remissionActive{padding-left:10px}.paddigleft{padding-left:2em}.govuk-back-link{font-size:1.5rem!important}.govuk-warning-text__text{font-size:19px}.summaryheader{display:flex;flex-direction:row;justify-content:space-between;width:960px}.class600{width:600px}.class60{width:60px}.class80{width:80px;text-align:right}.class100{width:100px;text-align:right}.alignright{text-align:right}.caseref{align-self:flex-end}.addfee{display:flex;flex-direction:row}"]
4134
4696
  }] }
4135
4697
  ];
@@ -5274,7 +5836,7 @@ class AllocatePaymentsComponent {
5274
5836
  amount: 0
5275
5837
  };
5276
5838
  this.siteID = null;
5277
- this.errorMessage = this.errorHandlerService.getServerErrorMessage(false);
5839
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');
5278
5840
  this.paymentGroups = [];
5279
5841
  this.isMoreDetailsBoxHide = true;
5280
5842
  this.isConfirmButtondisabled = false;
@@ -5394,7 +5956,7 @@ class AllocatePaymentsComponent {
5394
5956
  * @return {?}
5395
5957
  */
5396
5958
  paymentGroup => {
5397
- this.errorMessage = this.errorHandlerService.getServerErrorMessage(false);
5959
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');
5398
5960
  this.paymentGroup = paymentGroup;
5399
5961
  this.saveAndContinue();
5400
5962
  }), (/**
@@ -5402,7 +5964,7 @@ class AllocatePaymentsComponent {
5402
5964
  * @return {?}
5403
5965
  */
5404
5966
  (error) => {
5405
- this.errorMessage = this.errorHandlerService.getServerErrorMessage(true);
5967
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');
5406
5968
  }));
5407
5969
  }
5408
5970
  else {
@@ -5411,7 +5973,7 @@ class AllocatePaymentsComponent {
5411
5973
  * @return {?}
5412
5974
  */
5413
5975
  paymentGroups => {
5414
- this.errorMessage = this.errorHandlerService.getServerErrorMessage(false);
5976
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');
5415
5977
  this.paymentGroups = paymentGroups['payment_groups'].filter((/**
5416
5978
  * @param {?} paymentGroup
5417
5979
  * @return {?}
@@ -5437,7 +5999,7 @@ class AllocatePaymentsComponent {
5437
5999
  * @return {?}
5438
6000
  */
5439
6001
  (error) => {
5440
- this.errorMessage = this.errorHandlerService.getServerErrorMessage(true);
6002
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');
5441
6003
  }));
5442
6004
  }
5443
6005
  }
@@ -5589,7 +6151,7 @@ class AllocatePaymentsComponent {
5589
6151
  * @return {?}
5590
6152
  */
5591
6153
  res => {
5592
- this.errorMessage = this.errorHandlerService.getServerErrorMessage(false);
6154
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');
5593
6155
  /** @type {?} */
5594
6156
  let response = JSON.parse(res);
5595
6157
  if (response.success) {
@@ -5600,7 +6162,7 @@ class AllocatePaymentsComponent {
5600
6162
  * @return {?}
5601
6163
  */
5602
6164
  (error) => {
5603
- this.errorMessage = this.errorHandlerService.getServerErrorMessage(true);
6165
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');
5604
6166
  window.scrollTo(0, 0);
5605
6167
  this.isConfirmButtondisabled = false;
5606
6168
  }));
@@ -5611,7 +6173,7 @@ class AllocatePaymentsComponent {
5611
6173
  * @return {?}
5612
6174
  */
5613
6175
  res1 => {
5614
- this.errorMessage = this.errorHandlerService.getServerErrorMessage(false);
6176
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');
5615
6177
  /** @type {?} */
5616
6178
  let response1 = JSON.parse(res1);
5617
6179
  if (response1.success) {
@@ -5622,7 +6184,7 @@ class AllocatePaymentsComponent {
5622
6184
  * @return {?}
5623
6185
  */
5624
6186
  res2 => {
5625
- this.errorMessage = this.errorHandlerService.getServerErrorMessage(false);
6187
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');
5626
6188
  /** @type {?} */
5627
6189
  let response2 = JSON.parse(res2);
5628
6190
  /** @type {?} */
@@ -5633,7 +6195,7 @@ class AllocatePaymentsComponent {
5633
6195
  * @return {?}
5634
6196
  */
5635
6197
  res3 => {
5636
- this.errorMessage = this.errorHandlerService.getServerErrorMessage(false);
6198
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');
5637
6199
  /** @type {?} */
5638
6200
  let response3 = JSON.parse(res3);
5639
6201
  if (response3.success) {
@@ -5645,7 +6207,7 @@ class AllocatePaymentsComponent {
5645
6207
  */
5646
6208
  (error) => {
5647
6209
  this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference, 'COMPLETE').subscribe();
5648
- this.errorMessage = this.errorHandlerService.getServerErrorMessage(true);
6210
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');
5649
6211
  window.scrollTo(0, 0);
5650
6212
  this.isConfirmButtondisabled = false;
5651
6213
  }));
@@ -5656,7 +6218,7 @@ class AllocatePaymentsComponent {
5656
6218
  */
5657
6219
  (error) => {
5658
6220
  this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference, 'COMPLETE').subscribe();
5659
- this.errorMessage = this.errorHandlerService.getServerErrorMessage(true);
6221
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');
5660
6222
  window.scrollTo(0, 0);
5661
6223
  this.isConfirmButtondisabled = false;
5662
6224
  }));
@@ -5666,7 +6228,7 @@ class AllocatePaymentsComponent {
5666
6228
  * @return {?}
5667
6229
  */
5668
6230
  (error) => {
5669
- this.errorMessage = this.errorHandlerService.getServerErrorMessage(true);
6231
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');
5670
6232
  window.scrollTo(0, 0);
5671
6233
  this.isConfirmButtondisabled = false;
5672
6234
  }));
@@ -5718,7 +6280,7 @@ class AllocatePaymentsComponent {
5718
6280
  * @return {?}
5719
6281
  */
5720
6282
  unassignedPayments => {
5721
- this.errorMessage = this.errorHandlerService.getServerErrorMessage(false);
6283
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');
5722
6284
  this.unAllocatedPayment = unassignedPayments['data'].payments.filter((/**
5723
6285
  * @param {?} payment
5724
6286
  * @return {?}
@@ -5741,7 +6303,7 @@ class AllocatePaymentsComponent {
5741
6303
  * @return {?}
5742
6304
  */
5743
6305
  (error) => {
5744
- this.errorMessage = this.errorHandlerService.getServerErrorMessage(true);
6306
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');
5745
6307
  }));
5746
6308
  }
5747
6309
  /**
@@ -5835,21 +6397,6 @@ class AddRetroRemissionRequest {
5835
6397
  }
5836
6398
  }
5837
6399
 
5838
- /**
5839
- * @fileoverview added by tsickle
5840
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5841
- */
5842
- class PostRefundRetroRemission {
5843
- /**
5844
- * @param {?} payment_reference
5845
- * @param {?} refund_reason
5846
- */
5847
- constructor(payment_reference, refund_reason) {
5848
- this.payment_reference = payment_reference;
5849
- this.refund_reason = refund_reason;
5850
- }
5851
- }
5852
-
5853
6400
  /**
5854
6401
  * @fileoverview added by tsickle
5855
6402
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -5857,9 +6404,11 @@ class PostRefundRetroRemission {
5857
6404
  class PostIssueRefundRetroRemission {
5858
6405
  /**
5859
6406
  * @param {?} remissionReference
6407
+ * @param {?} contactDeatils
5860
6408
  */
5861
- constructor(remissionReference) {
6409
+ constructor(remissionReference, contactDeatils) {
5862
6410
  this.remissionReference = remissionReference;
6411
+ this.contact_details = contactDeatils;
5863
6412
  }
5864
6413
  }
5865
6414
 
@@ -5889,6 +6438,7 @@ class AddRemissionComponent {
5889
6438
  //@Output() refundListReason: EventEmitter<any> = new EventEmitter({reason:string, code:string});
5890
6439
  this.refundListReason = new EventEmitter();
5891
6440
  this.refundListAmount = new EventEmitter();
6441
+ this.refundFees = new EventEmitter();
5892
6442
  this.refund = {
5893
6443
  reason: {
5894
6444
  duplicate: 'Duplicate payment',
@@ -5917,11 +6467,15 @@ class AddRemissionComponent {
5917
6467
  this.isRemissionApplied = false;
5918
6468
  // refundReasons: any[] = [];
5919
6469
  this.commonRefundReasons = [];
6470
+ this.class = '';
6471
+ this.errorMsg = new Array();
5920
6472
  }
5921
6473
  /**
5922
6474
  * @return {?}
5923
6475
  */
5924
6476
  ngOnInit() {
6477
+ this.errorMessage = '';
6478
+ this.errorMsg = [];
5925
6479
  this.default = 'Select a different reason';
5926
6480
  this.pattern1 = '^([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})$';
5927
6481
  this.pattern2 = '^([A-Za-z]{2}[0-9]{2})-([0-9]{6})$';
@@ -5933,6 +6487,7 @@ class AddRemissionComponent {
5933
6487
  this.amount = (this.fee.volume * this.fee.calculated_amount);
5934
6488
  }
5935
6489
  if (this.payment) {
6490
+ this.paymentReference = this.payment.reference;
5936
6491
  this.remessionPayment = this.payment;
5937
6492
  if (this.payment.status === 'Success') {
5938
6493
  this.isPaymentSuccess = true;
@@ -5951,48 +6506,242 @@ class AddRemissionComponent {
5951
6506
  ])),
5952
6507
  refundReason: new FormControl('', Validators.compose([Validators.required])),
5953
6508
  refundDDReason: new FormControl('', Validators.compose([Validators.required])),
5954
- reason: new FormControl()
6509
+ reason: new FormControl(),
6510
+ feeAmount: new FormControl(),
6511
+ feesList: this.formBuilder.array([])
5955
6512
  });
5956
6513
  /** @type {?} */
5957
6514
  const remissionctrls = this.remissionForm.controls;
5958
6515
  remissionctrls['refundDDReason'].setValue('Select a different reason', { onlySelf: true });
5959
- if (this.viewCompStatus === '') {
5960
- this.viewStatus = 'main';
6516
+ if (this.refundPaymentReference !== undefined && this.refundPaymentReference.length > 0) {
6517
+ this.paymentReference = this.refundPaymentReference;
5961
6518
  }
5962
- if (this.viewCompStatus === 'issuerefund') {
5963
- this.refundService.getRefundReasons().subscribe((/**
5964
- * @param {?} refundReasons
6519
+ else {
6520
+ this.paymentReference = (this.payment !== undefined) ? this.payment.reference : '';
6521
+ }
6522
+ if (this.isFromServiceRequestPage) {
6523
+ this.paymentViewService.getApportionPaymentDetails(this.paymentReference).subscribe((/**
6524
+ * @param {?} paymentGroup
5965
6525
  * @return {?}
5966
6526
  */
5967
- refundReasons => {
5968
- this.refundReasons = refundReasons.filter((/**
5969
- * @param {?} data
5970
- * @return {?}
5971
- */
5972
- (data) => data.recently_used === false));
5973
- this.refundReasons = this.refundReasons.filter((/**
5974
- * @param {?} data
5975
- * @return {?}
5976
- */
5977
- (data) => data.name !== 'Retrospective remission'));
5978
- this.cd.detectChanges();
5979
- this.commonRefundReasons = refundReasons.filter((/**
5980
- * @param {?} data
5981
- * @return {?}
5982
- */
5983
- (data) => data.recently_used === true));
5984
- this.commonRefundReasons.sort((/**
5985
- * @param {?} a
5986
- * @param {?} b
6527
+ paymentGroup => {
6528
+ /** @type {?} */
6529
+ let fees = [];
6530
+ paymentGroup.fees.forEach((/**
6531
+ * @param {?} fee
5987
6532
  * @return {?}
5988
6533
  */
5989
- (a, b) => a.toString().localeCompare(b)));
5990
- this.cd.detectChanges();
5991
- }));
6534
+ fee => {
6535
+ this.isRemissionsMatch = false;
6536
+ paymentGroup.remissions.forEach((/**
6537
+ * @param {?} rem
6538
+ * @return {?}
6539
+ */
6540
+ rem => {
6541
+ if (rem.fee_code === fee.code) {
6542
+ this.isRemissionsMatch = true;
6543
+ fee['remissions'] = rem;
6544
+ fees.push(fee);
6545
+ }
6546
+ }));
6547
+ if (!this.isRemissionsMatch) {
6548
+ fees.push(fee);
6549
+ }
6550
+ }));
6551
+ paymentGroup.fees = fees;
6552
+ this.paymentFees = fees;
6553
+ this.fees = fees;
6554
+ this.paymentGroup = paymentGroup;
6555
+ this.paymentGroup.payments = this.paymentGroup.payments.filter((/**
6556
+ * @param {?} paymentGroupObj
6557
+ * @return {?}
6558
+ */
6559
+ paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference)));
6560
+ // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;
6561
+ // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;
6562
+ this.refundFeesList();
6563
+ }), (/**
6564
+ * @param {?} error
6565
+ * @return {?}
6566
+ */
6567
+ (error) => this.errorMessage = error));
6568
+ }
6569
+ if (this.fees && this.viewCompStatus === 'issuerefund') {
6570
+ this.refundFeesList();
6571
+ }
6572
+ if (this.viewCompStatus === '') {
6573
+ this.viewStatus = 'main';
6574
+ }
6575
+ if (this.viewCompStatus === 'issuerefundpage1') {
6576
+ this.refundService.getRefundReasons().subscribe((/**
6577
+ * @param {?} refundReasons
6578
+ * @return {?}
6579
+ */
6580
+ refundReasons => {
6581
+ this.refundReasons = refundReasons.filter((/**
6582
+ * @param {?} data
6583
+ * @return {?}
6584
+ */
6585
+ (data) => data.recently_used === false));
6586
+ this.refundReasons = this.refundReasons.filter((/**
6587
+ * @param {?} data
6588
+ * @return {?}
6589
+ */
6590
+ (data) => data.name !== 'Retrospective remission' && data.name !== 'Overpayment'));
6591
+ this.cd.detectChanges();
6592
+ this.commonRefundReasons = refundReasons.filter((/**
6593
+ * @param {?} data
6594
+ * @return {?}
6595
+ */
6596
+ (data) => data.recently_used === true));
6597
+ this.commonRefundReasons.sort((/**
6598
+ * @param {?} a
6599
+ * @param {?} b
6600
+ * @return {?}
6601
+ */
6602
+ (a, b) => a.toString().localeCompare(b)));
6603
+ this.cd.detectChanges();
6604
+ }));
6605
+ this.refundReason = this.changeRefundReason;
5992
6606
  }
5993
6607
  if (this.viewCompStatus === 'processretroremissonpage' && this.isFromRefundListPage) {
5994
6608
  this.viewStatus = 'processretroremissonpage';
5995
6609
  }
6610
+ if (this.orderDetail !== undefined) {
6611
+ this.paymentViewService.getApportionPaymentDetails(this.orderDetail[0].payments[0].reference).subscribe((/**
6612
+ * @param {?} paymentGroup
6613
+ * @return {?}
6614
+ */
6615
+ paymentGroup => {
6616
+ this.fees = paymentGroup.fees;
6617
+ this.paymentReference = paymentGroup.payments[0].reference;
6618
+ }), (/**
6619
+ * @param {?} error
6620
+ * @return {?}
6621
+ */
6622
+ (error) => this.errorMessage = error));
6623
+ }
6624
+ }
6625
+ /**
6626
+ * @return {?}
6627
+ */
6628
+ goToPaymentViewComponent() {
6629
+ this.paymentLibComponent.paymentMethod = this.payment.method;
6630
+ this.paymentLibComponent.paymentGroupReference = this.paymentGroupRef;
6631
+ this.paymentLibComponent.paymentReference = this.paymentReference;
6632
+ //this.PaymentViewComponent.viewCompStatus = 'overpayment';
6633
+ this.paymentLibComponent.viewName = 'payment-view';
6634
+ }
6635
+ /**
6636
+ * @return {?}
6637
+ */
6638
+ refundFeesList() {
6639
+ /** @type {?} */
6640
+ const creds = (/** @type {?} */ (this.remissionForm.controls.feesList));
6641
+ // if(creds.controls.length > 0) {
6642
+ for (var i = 0; i < this.fees.length; i++) {
6643
+ creds.push(this.formBuilder.group({
6644
+ id: this.fees[i].id,
6645
+ code: this.fees[i].code,
6646
+ volume: this.fees[i].volume,
6647
+ calculated_amount: this.fees[i].calculated_amount,
6648
+ apportion_amount: this.fees[i].apportion_amount,
6649
+ ccd_case_number: this.fees[i].ccd_case_number,
6650
+ description: this.fees[i].description,
6651
+ net_amount: this.fees[i].net_amount,
6652
+ version: this.fees[i].version,
6653
+ refund_amount: [''],
6654
+ selected: [''],
6655
+ updated_volume: this.fees[i].volume
6656
+ }));
6657
+ }
6658
+ this.cd.detectChanges();
6659
+ //}
6660
+ }
6661
+ /**
6662
+ * @return {?}
6663
+ */
6664
+ get feesList() {
6665
+ /** @type {?} */
6666
+ const dd = (/** @type {?} */ (this.remissionForm.get('feesList')));
6667
+ return (/** @type {?} */ (this.remissionForm.get('feesList')));
6668
+ }
6669
+ /**
6670
+ * @return {?}
6671
+ */
6672
+ noneSelected() {
6673
+ if (this.isFullyRefund) {
6674
+ return false;
6675
+ }
6676
+ else {
6677
+ if (!this.feesList.controls.some((/**
6678
+ * @param {?} item
6679
+ * @return {?}
6680
+ */
6681
+ item => item.get('selected').value === true))) {
6682
+ this.errorMsg = [];
6683
+ [].forEach.call(document.querySelectorAll('input'), (/**
6684
+ * @param {?} el
6685
+ * @return {?}
6686
+ */
6687
+ function (el) {
6688
+ el.classList.remove('inline-error-class');
6689
+ }));
6690
+ }
6691
+ return !this.feesList.controls.some((/**
6692
+ * @param {?} item
6693
+ * @return {?}
6694
+ */
6695
+ item => item.get('selected').value === true));
6696
+ }
6697
+ }
6698
+ /**
6699
+ * @param {?} i
6700
+ * @param {?} v1
6701
+ * @param {?} AppAmt
6702
+ * @param {?} Volume
6703
+ * @return {?}
6704
+ */
6705
+ check_en(i, v1, AppAmt, Volume) {
6706
+ /** @type {?} */
6707
+ const ele = (/** @type {?} */ (document.getElementById(v1)));
6708
+ /** @type {?} */
6709
+ const formArray = (/** @type {?} */ (this.remissionForm.controls.feesList));
6710
+ if (ele.checked) {
6711
+ formArray.at(i).get('refund_amount').setValue(AppAmt);
6712
+ formArray.at(i).get('volume').setValue(Volume);
6713
+ formArray.at(i).get('selected').setValue(true);
6714
+ formArray.at(i).get('updated_volume').setValue(Volume);
6715
+ ((/** @type {?} */ (document.getElementById('feeAmount_' + v1)))).value = AppAmt;
6716
+ document.getElementById('feeAmount_' + v1).removeAttribute("disabled");
6717
+ if (Volume === 1) {
6718
+ ((/** @type {?} */ (document.getElementById('VolumeUpdated_' + v1)))).value = Volume;
6719
+ }
6720
+ else {
6721
+ ((/** @type {?} */ (document.getElementById('feeVolumeUpdated_' + v1)))).value = Volume;
6722
+ }
6723
+ if (document.getElementById('feeVolumeUpdated_' + v1) !== null) {
6724
+ document.getElementById('feeAmount_' + v1).removeAttribute("disabled");
6725
+ document.getElementById('feeVolumeUpdated_' + v1).removeAttribute("disabled");
6726
+ }
6727
+ this.cd.detectChanges();
6728
+ }
6729
+ else {
6730
+ this.errorMsg = [];
6731
+ document.getElementById('feeAmount_' + v1).setAttribute("disabled", "true");
6732
+ this.remissionForm.value.feesList[i]["refund_amount"] = '';
6733
+ this.remissionForm.value.feesList[i]["volume"] = '';
6734
+ this.remissionForm.value.feesList[i]["selected"] = false;
6735
+ ((/** @type {?} */ (document.getElementById('feeAmount_' + v1)))).value = '';
6736
+ if (Volume > 1) {
6737
+ this.remissionForm.value.feesList[i]["volume"] = '';
6738
+ ((/** @type {?} */ (document.getElementById('feeVolumeUpdated_' + v1)))).value = '';
6739
+ }
6740
+ if (document.getElementById('feeVolumeUpdated_' + v1) !== null) {
6741
+ document.getElementById('feeVolumeUpdated_' + v1).removeAttribute("disabled");
6742
+ }
6743
+ this.cd.detectChanges();
6744
+ }
5996
6745
  }
5997
6746
  /**
5998
6747
  * @return {?}
@@ -6100,6 +6849,8 @@ class AddRemissionComponent {
6100
6849
  */
6101
6850
  addRemissionCode() {
6102
6851
  this.errorMessage = false;
6852
+ // this.isFromCheckAnsPage = true;
6853
+ this.errorMsg = [];
6103
6854
  this.viewStatus = '';
6104
6855
  this.isRefundRemission = false;
6105
6856
  this.resetRemissionForm([false, false, false, false, false, false], 'All');
@@ -6112,8 +6863,14 @@ class AddRemissionComponent {
6112
6863
  this.remissionForm.controls['refundDDReason'].setErrors(null);
6113
6864
  this.remissionForm.controls['amount'].setErrors(null);
6114
6865
  if (this.remissionForm.dirty && this.remissionForm.valid) {
6115
- this.viewCompStatus = '';
6116
- this.viewStatus = "processretroremissonpage";
6866
+ if (!this.isFromCheckAnsPage) {
6867
+ this.viewCompStatus = '';
6868
+ this.viewStatus = "processretroremissonpage";
6869
+ }
6870
+ else {
6871
+ this.viewCompStatus = '';
6872
+ this.viewStatus = 'checkretroremissionpage';
6873
+ }
6117
6874
  }
6118
6875
  else {
6119
6876
  if (remissionctrls['remissionCode'].value == '') {
@@ -6141,6 +6898,8 @@ class AddRemissionComponent {
6141
6898
  */
6142
6899
  gotoAddRetroRemissionCodePage() {
6143
6900
  this.errorMessage = false;
6901
+ this.isFromCheckAnsPage = false;
6902
+ this.errorMsg = [];
6144
6903
  if (this.isRefundRemission) {
6145
6904
  this.paymentLibComponent.iscancelClicked = true;
6146
6905
  this.refundListAmount.emit();
@@ -6158,6 +6917,7 @@ class AddRemissionComponent {
6158
6917
  this.viewCompStatus = "addremission";
6159
6918
  this.isRefundRemission = true;
6160
6919
  this.errorMessage = '';
6920
+ this.errorMsg = [];
6161
6921
  if (this.isFromPaymentDetailPage) {
6162
6922
  this.paymentLibComponent.viewName = 'payment-view';
6163
6923
  }
@@ -6206,14 +6966,40 @@ class AddRemissionComponent {
6206
6966
  //}
6207
6967
  }
6208
6968
  }
6969
+ /**
6970
+ * @return {?}
6971
+ */
6972
+ gotoAmountRetroRemission() {
6973
+ this.isFromCheckAnsPage = false;
6974
+ this.viewStatus = 'processretroremissonpage';
6975
+ this.viewCompStatus = '';
6976
+ // this.isRefundRemission = true;
6977
+ this.errorMessage = '';
6978
+ }
6209
6979
  /**
6210
6980
  * @return {?}
6211
6981
  */
6212
6982
  gotoProcessRetroRemissionPage() {
6983
+ this.isFromCheckAnsPage = true;
6213
6984
  this.viewStatus = '';
6214
6985
  this.viewCompStatus = 'addremission';
6215
6986
  this.isRefundRemission = true;
6216
6987
  this.errorMessage = '';
6988
+ this.errorMsg = [];
6989
+ }
6990
+ /**
6991
+ * @param {?=} note
6992
+ * @return {?}
6993
+ */
6994
+ gotoProcessRetroRemission(note) {
6995
+ if (note) {
6996
+ this.notification = { contact_details: note, notification_type: note.notification_type };
6997
+ }
6998
+ this.isFromCheckAnsPage = true;
6999
+ this.viewStatus = 'remissionAddressPage';
7000
+ this.viewCompStatus = '';
7001
+ this.isRefundRemission = true;
7002
+ this.errorMessage = '';
6217
7003
  }
6218
7004
  /**
6219
7005
  * @return {?}
@@ -6251,6 +7037,7 @@ class AddRemissionComponent {
6251
7037
  */
6252
7038
  processRefund() {
6253
7039
  this.errorMessage = '';
7040
+ this.errorMsg = [];
6254
7041
  this.isConfirmationBtnDisabled = true;
6255
7042
  if (this.isRefundRemission) {
6256
7043
  this.retroRemission = true;
@@ -6259,7 +7046,7 @@ class AddRemissionComponent {
6259
7046
  this.remissionReference = this.remission.remission_reference;
6260
7047
  }
6261
7048
  /** @type {?} */
6262
- const requestBody = new PostIssueRefundRetroRemission(this.remissionReference);
7049
+ const requestBody = new PostIssueRefundRetroRemission(this.remissionReference, this.contactDetailsObj);
6263
7050
  this.paymentViewService.postRefundRetroRemission(requestBody).subscribe((/**
6264
7051
  * @param {?} response
6265
7052
  * @return {?}
@@ -6290,7 +7077,14 @@ class AddRemissionComponent {
6290
7077
  if (this.paymentLibComponent.REFUNDLIST === "true") {
6291
7078
  this.isFromRefundListPage = true;
6292
7079
  }
7080
+ this.totalRefundAmount = this.remissionForm.value.feesList.reduce((/**
7081
+ * @param {?} a
7082
+ * @param {?} c
7083
+ * @return {?}
7084
+ */
7085
+ (a, c) => a + c.refund_amount * c.selected), 0);
6293
7086
  this.errorMessage = '';
7087
+ this.errorMsg = [];
6294
7088
  this.refundReason = this.remissionForm.controls['refundReason'].value === null ? this.remissionForm.controls['refundDDReason'].value : this.remissionForm.controls['refundReason'].value;
6295
7089
  if (!this.refundReason || this.refundReason === 'Select a different reason') {
6296
7090
  this.refundHasError = true;
@@ -6306,19 +7100,43 @@ class AddRemissionComponent {
6306
7100
  this.refundListReason.emit({ reason: this.displayRefundReason, code: this.refundReason });
6307
7101
  }
6308
7102
  else {
7103
+ if (this.isFromCheckAnsPage) {
7104
+ this.totalRefundAmount = this.remissionForm.value.feesList.reduce((/**
7105
+ * @param {?} a
7106
+ * @param {?} c
7107
+ * @return {?}
7108
+ */
7109
+ (a, c) => a + c.refund_amount * c.selected), 0);
7110
+ this.isFromCheckAnsPage = false;
7111
+ this.viewStatus = 'checkissuerefundpage';
7112
+ this.viewCompStatus = '';
7113
+ return;
7114
+ }
6309
7115
  this.viewCompStatus = '';
6310
- this.viewStatus = 'checkissuerefundpage';
7116
+ this.viewStatus = 'contactDetailsPage';
6311
7117
  }
6312
7118
  }
6313
7119
  else {
6314
7120
  this.displayRefundReason = this.selectedRefundReason;
7121
+ if (this.isFromCheckAnsPage) {
7122
+ this.totalRefundAmount = this.remissionForm.value.feesList.reduce((/**
7123
+ * @param {?} a
7124
+ * @param {?} c
7125
+ * @return {?}
7126
+ */
7127
+ (a, c) => a + c.refund_amount * c.selected), 0);
7128
+ this.isFromCheckAnsPage = false;
7129
+ this.viewStatus = 'checkissuerefundpage';
7130
+ this.viewCompStatus = '';
7131
+ return;
7132
+ }
6315
7133
  if (this.isFromRefundListPage) {
6316
7134
  this.paymentLibComponent.isFromRefundStatusPage = true;
6317
7135
  this.refundListReason.emit({ reason: this.selectedRefundReason, code: this.refundReason });
6318
7136
  }
6319
7137
  else {
6320
7138
  this.viewCompStatus = '';
6321
- this.viewStatus = 'checkissuerefundpage';
7139
+ this.viewStatus = 'contactDetailsPage';
6322
7140
  }
6323
7141
  }
6324
7142
  }
@@ -6331,80 +7149,275 @@ class AddRemissionComponent {
6331
7149
  this.viewStatus = '';
6332
7150
  this.isRefundRemission = true;
6333
7151
  this.errorMessage = false;
7152
+ this.errorMsg = [];
6334
7153
  this.refundHasError = false;
6335
7154
  this.isReasonEmpty = false;
6336
7155
  }
6337
7156
  /**
7157
+ * @param {?} isFullyRefund
6338
7158
  * @return {?}
6339
7159
  */
6340
- changeIssueRefundReason() {
6341
- // this.remissionForm.controls['refundReason'].setValue('Duplicate payment');
6342
- this.errorMessage = '';
6343
- this.refundHasError = false;
6344
- this.isReasonEmpty = false;
6345
- this.viewCompStatus = 'issuerefund';
6346
- this.viewStatus = '';
6347
- this.isRefundRemission = true;
7160
+ gotoIssuePage(isFullyRefund) {
7161
+ if (isFullyRefund) {
7162
+ this.viewCompStatus = 'issuerefundpage1';
7163
+ this.getRefundReasons();
7164
+ }
7165
+ else {
7166
+ [].forEach.call(document.querySelectorAll('input'), (/**
7167
+ * @param {?} el
7168
+ * @return {?}
7169
+ */
7170
+ function (el) {
7171
+ el.classList.remove('inline-error-class');
7172
+ }));
7173
+ /** @type {?} */
7174
+ var checkboxs = document.getElementsByTagName('input');
7175
+ this.errorMessage = '';
7176
+ this.totalRefundAmount = 0;
7177
+ this.errorMsg = [];
7178
+ for (var j = 0; j < checkboxs.length; j++) {
7179
+ if (checkboxs[j].checked) {
7180
+ this.fullRefund = false;
7181
+ /** @type {?} */
7182
+ let quantity = +((/** @type {?} */ (document.getElementById('feeVolume_' + checkboxs[j].value)))).value;
7183
+ /** @type {?} */
7184
+ let amountToRefund = +((/** @type {?} */ (document.getElementById('feeAmount_' + checkboxs[j].value)))).value;
7185
+ /** @type {?} */
7186
+ let apportionAmount = +((/** @type {?} */ (document.getElementById('feeApportionAmount_' + checkboxs[j].value)))).value;
7187
+ /** @type {?} */
7188
+ let calculatedAmount = +((/** @type {?} */ (document.getElementById('calculatedAmount_' + checkboxs[j].value)))).value;
7189
+ if (amountToRefund === apportionAmount) {
7190
+ this.fullRefund = true;
7191
+ }
7192
+ if (amountToRefund === 0) {
7193
+ this.elementId = 'feeAmount_' + checkboxs[j].value;
7194
+ this.errorMsg.push('You need to enter a refund amount');
7195
+ this.getErrorClass(this.elementId);
7196
+ }
7197
+ if (quantity === 1) {
7198
+ if (amountToRefund > 0 && amountToRefund > apportionAmount) {
7199
+ this.elementId = 'feeAmount_' + checkboxs[j].value;
7200
+ this.errorMsg.push('The amount you want to refund is more than the amount paid');
7201
+ this.getErrorClass(this.elementId);
7202
+ }
7203
+ }
7204
+ if (quantity > 1) {
7205
+ this.quantityUpdated = +((/** @type {?} */ (document.getElementById('feeVolumeUpdated_' + checkboxs[j].value)))).value;
7206
+ if (this.quantityUpdated === 0) {
7207
+ this.elementId = 'feeVolumeUpdated_' + checkboxs[j].value;
7208
+ this.errorMsg.push('You need to enter quantity');
7209
+ this.getErrorClass(this.elementId);
7210
+ }
7211
+ if (this.fullRefund && quantity !== this.quantityUpdated) {
7212
+ this.elementId = 'feeVolumeUpdated_' + checkboxs[j].value;
7213
+ this.errorMsg.push('The quantity you want to refund should be maximun available quantity');
7214
+ this.getErrorClass(this.elementId);
7215
+ }
7216
+ if (!this.fullRefund && this.quantityUpdated > 0 && amountToRefund > 0) {
7217
+ this.refundAmtForFeeVolumes = +((/** @type {?} */ (document.getElementById('feeVOl_' + checkboxs[j].value)))).innerText;
7218
+ this.allowedRefundAmount = this.quantityUpdated * this.refundAmtForFeeVolumes;
7219
+ if (this.allowedRefundAmount !== amountToRefund) {
7220
+ this.elementId = 'feeAmount_' + checkboxs[j].value;
7221
+ this.errorMsg.push('The Amount to Refund should be equal to the product of Fee Amount and quantity');
7222
+ this.getErrorClass(this.elementId);
7223
+ }
7224
+ }
7225
+ if (!this.fullRefund && amountToRefund > apportionAmount) {
7226
+ this.elementId = 'feeAmount_' + checkboxs[j].value;
7227
+ this.errorMsg.push('The amount you want to refund is more than the amount paid');
7228
+ this.getErrorClass(this.elementId);
7229
+ }
7230
+ if (!this.fullRefund && this.quantityUpdated > 0 && this.quantityUpdated > quantity) {
7231
+ this.elementId = 'feeVolumeUpdated_' + checkboxs[j].value;
7232
+ this.errorMsg.push('The quantity you want to refund is more than the available quantity');
7233
+ this.getErrorClass(this.elementId);
7234
+ }
7235
+ }
7236
+ //this.remissionForm.value.feesList.find(id=>id=checkboxs[j].value)['refund_amount'] = apportionAmount;
7237
+ }
7238
+ }
7239
+ if (this.errorMsg.length === 0) {
7240
+ if (this.isFromCheckAnsPage) {
7241
+ this.isFromCheckAnsPage = false;
7242
+ this.totalRefundAmount = this.remissionForm.value.feesList.reduce((/**
7243
+ * @param {?} a
7244
+ * @param {?} c
7245
+ * @return {?}
7246
+ */
7247
+ (a, c) => a + c.refund_amount * c.selected), 0);
7248
+ this.fees = this.remissionForm.value.feesList.filter((/**
7249
+ * @param {?} value
7250
+ * @return {?}
7251
+ */
7252
+ value => value.selected === true));
7253
+ this.viewStatus = 'checkissuerefundpage';
7254
+ this.viewCompStatus = '';
7255
+ return;
7256
+ }
7257
+ else if (this.isFromRefundStatusPage) {
7258
+ /** @type {?} */
7259
+ var remissionctrls = this.remissionForm.controls;
7260
+ this.totalRefundAmount = this.remissionForm.value.feesList.reduce((/**
7261
+ * @param {?} a
7262
+ * @param {?} c
7263
+ * @return {?}
7264
+ */
7265
+ (a, c) => a + c.refund_amount * c.selected), 0);
7266
+ this.refundListAmount.emit(this.totalRefundAmount.toString());
7267
+ this.fees = this.remissionForm.value.feesList.filter((/**
7268
+ * @param {?} value
7269
+ * @return {?}
7270
+ */
7271
+ value => value.selected === true));
7272
+ this.refundFees.emit(this.fees);
7273
+ return;
7274
+ }
7275
+ this.viewCompStatus = 'issuerefundpage1';
7276
+ this.getRefundReasons();
7277
+ }
7278
+ }
6348
7279
  }
6349
7280
  /**
7281
+ * @param {?} value
7282
+ * @param {?} amount
7283
+ * @param {?} volume
7284
+ * @param {?} i
6350
7285
  * @return {?}
6351
7286
  */
6352
- confirmIssueRefund() {
6353
- this.isConfirmationBtnDisabled = true;
6354
- this.errorMessage = '';
6355
- if (this.isRefundRemission) {
6356
- this.retroRemission = true;
6357
- }
7287
+ calAmtToRefund(value, amount, volume, i) {
6358
7288
  /** @type {?} */
6359
- const requestBody = new PostRefundRetroRemission(this.payment.reference, this.refundReason);
6360
- this.paymentViewService.postRefundsReason(requestBody).subscribe((/**
6361
- * @param {?} response
6362
- * @return {?}
6363
- */
6364
- response => {
6365
- if (JSON.parse(response)) {
6366
- this.viewCompStatus = '';
6367
- this.viewStatus = 'refundconfirmationpage';
6368
- this.refundReference = JSON.parse(response).refund_reference;
6369
- if (JSON.parse(response).refund_amount) {
6370
- this.refundAmount = JSON.parse(response).refund_amount;
6371
- }
6372
- }
6373
- }), (/**
6374
- * @param {?} error
6375
- * @return {?}
6376
- */
6377
- (error) => {
6378
- this.errorMessage = error;
6379
- this.isConfirmationBtnDisabled = false;
6380
- this.cd.detectChanges();
6381
- }));
7289
+ const volumeFee = amount / volume;
7290
+ /** @type {?} */
7291
+ const amtToRefund = value * volumeFee;
7292
+ /** @type {?} */
7293
+ const formArray = (/** @type {?} */ (this.remissionForm.controls.feesList));
7294
+ formArray.at(i).get('refund_amount').setValue(amtToRefund);
7295
+ // formArray.at(i).get('volume').setValue(value);
7296
+ // (<HTMLInputElement>document.getElementById('feeAmount_'+i)).value = +amtToRefund;
7297
+ // const formControl = this.remissionForm.controls.feesList['volume'].at(i);
7298
+ // formControl.setValue(value);
6382
7299
  }
6383
- // Retro Refund
6384
7300
  /**
7301
+ * @param {?=} note
6385
7302
  * @return {?}
6386
7303
  */
6387
- confirmRetroRefund() {
6388
- this.isConfirmationBtnDisabled = true;
6389
- this.errorMessage = '';
6390
- if (this.isRefundRemission) {
6391
- this.retroRemission = true;
7304
+ gotoContactDetailsPage(note) {
7305
+ if (note) {
7306
+ this.notification = { contact_details: note, notification_type: note.notification_type };
6392
7307
  }
6393
- /** @type {?} */
6394
- const requestBody = new PostRefundRetroRemission(this.payment.reference, 'RR004-Retrospective remission');
6395
- this.paymentViewService.postRefundsReason(requestBody).subscribe((/**
6396
- * @param {?} response
6397
- * @return {?}
6398
- */
6399
- response => {
6400
- if (JSON.parse(response)) {
6401
- this.viewCompStatus = '';
6402
- this.viewStatus = 'retrorefundconfirmationpage';
6403
- this.refundReference = JSON.parse(response).refund_reference;
6404
- if (JSON.parse(response).refund_amount) {
6405
- this.refundAmount = JSON.parse(response).refund_amount;
6406
- }
6407
- }
7308
+ this.errorMessage = '';
7309
+ this.viewCompStatus = '';
7310
+ this.viewStatus = 'contactDetailsPage';
7311
+ this.isRefundRemission = true;
7312
+ this.errorMessage = false;
7313
+ }
7314
+ /**
7315
+ * @return {?}
7316
+ */
7317
+ getRefundReasons() {
7318
+ if (this.viewCompStatus === 'issuerefundpage1') {
7319
+ this.refundService.getRefundReasons().subscribe((/**
7320
+ * @param {?} refundReasons
7321
+ * @return {?}
7322
+ */
7323
+ refundReasons => {
7324
+ this.refundReasons = refundReasons.filter((/**
7325
+ * @param {?} data
7326
+ * @return {?}
7327
+ */
7328
+ (data) => data.recently_used === false));
7329
+ this.refundReasons = this.refundReasons.filter((/**
7330
+ * @param {?} data
7331
+ * @return {?}
7332
+ */
7333
+ (data) => data.name !== 'Retrospective remission'));
7334
+ this.cd.detectChanges();
7335
+ this.commonRefundReasons = refundReasons.filter((/**
7336
+ * @param {?} data
7337
+ * @return {?}
7338
+ */
7339
+ (data) => data.recently_used === true));
7340
+ this.commonRefundReasons.sort((/**
7341
+ * @param {?} a
7342
+ * @param {?} b
7343
+ * @return {?}
7344
+ */
7345
+ (a, b) => a.toString().localeCompare(b)));
7346
+ this.cd.detectChanges();
7347
+ }));
7348
+ }
7349
+ }
7350
+ /**
7351
+ * @param {?} elementId
7352
+ * @return {?}
7353
+ */
7354
+ getErrorClass(elementId) {
7355
+ if (this.errorMsg.length > 0) {
7356
+ /** @type {?} */
7357
+ const ele = document.getElementById(elementId);
7358
+ ele.classList.add('inline-error-class');
7359
+ }
7360
+ }
7361
+ /**
7362
+ * @return {?}
7363
+ */
7364
+ changeIssueRefundReason() {
7365
+ this.isFromCheckAnsPage = true;
7366
+ this.errorMessage = '';
7367
+ this.errorMsg = [];
7368
+ this.refundHasError = false;
7369
+ this.isReasonEmpty = false;
7370
+ this.viewCompStatus = 'issuerefundpage1';
7371
+ this.viewStatus = '';
7372
+ this.isRefundRemission = true;
7373
+ }
7374
+ /**
7375
+ * @param {?} isFullyRefund
7376
+ * @return {?}
7377
+ */
7378
+ confirmIssueRefund(isFullyRefund) {
7379
+ this.isConfirmationBtnDisabled = true;
7380
+ this.errorMessage = '';
7381
+ this.errorMsg = [];
7382
+ if (this.isRefundRemission) {
7383
+ this.retroRemission = true;
7384
+ }
7385
+ if (isFullyRefund) {
7386
+ this.totalRefundAmount = this.payment.amount;
7387
+ }
7388
+ if (!isFullyRefund) {
7389
+ this.fees = this.remissionForm.value.feesList.filter((/**
7390
+ * @param {?} value
7391
+ * @return {?}
7392
+ */
7393
+ value => value.selected === true));
7394
+ }
7395
+ this.fees = this.fees.map((/**
7396
+ * @param {?} obj
7397
+ * @return {?}
7398
+ */
7399
+ obj => ({ id: obj.id,
7400
+ code: obj.code,
7401
+ version: obj.version,
7402
+ apportion_amount: obj.apportion_amount,
7403
+ calculated_amount: obj.calculated_amount,
7404
+ updated_volume: obj.updated_volume ? obj.updated_volume : obj.volume,
7405
+ refund_amount: obj.refund_amount ? obj.refund_amount : this.totalRefundAmount })));
7406
+ /** @type {?} */
7407
+ const requestBody = new PostRefundRetroRemission(this.contactDetailsObj, this.fees, this.payment.reference, this.refundReason, this.totalRefundAmount, 'op');
7408
+ this.paymentViewService.postRefundsReason(requestBody).subscribe((/**
7409
+ * @param {?} response
7410
+ * @return {?}
7411
+ */
7412
+ response => {
7413
+ if (JSON.parse(response)) {
7414
+ this.viewCompStatus = '';
7415
+ this.viewStatus = 'refundconfirmationpage';
7416
+ this.refundReference = JSON.parse(response).refund_reference;
7417
+ if (JSON.parse(response).refund_amount) {
7418
+ this.refundAmount = JSON.parse(response).refund_amount;
7419
+ }
7420
+ }
6408
7421
  }), (/**
6409
7422
  * @param {?} error
6410
7423
  * @return {?}
@@ -6412,8 +7425,41 @@ class AddRemissionComponent {
6412
7425
  (error) => {
6413
7426
  this.errorMessage = error;
6414
7427
  this.isConfirmationBtnDisabled = false;
7428
+ this.cd.detectChanges();
6415
7429
  }));
6416
7430
  }
7431
+ /**
7432
+ * @return {?}
7433
+ */
7434
+ gotoRefundReasonPage() {
7435
+ this.viewStatus = '';
7436
+ this.viewCompStatus = 'issuerefundpage1';
7437
+ }
7438
+ // Retro Refund
7439
+ // confirmRetroRefund() {
7440
+ // this.isConfirmationBtnDisabled = true;
7441
+ // this.errorMessage = '';
7442
+ // this.errorMsg = [];
7443
+ // if( this.isRefundRemission) {
7444
+ // this.retroRemission = true;
7445
+ // }
7446
+ // const requestBody = new PostRefundRetroRemission(this.payment.reference,'RR004-Retrospective remission', this.contactDetailsObj);
7447
+ // this.paymentViewService.postRefundsReason(requestBody).subscribe(
7448
+ // response => {
7449
+ // if (JSON.parse(response)) {
7450
+ // this.viewCompStatus = '';
7451
+ // this.viewStatus = 'retrorefundconfirmationpage';
7452
+ // this.refundReference =JSON.parse(response).refund_reference;
7453
+ // if(JSON.parse(response).refund_amount) {
7454
+ // this.refundAmount = JSON.parse(response).refund_amount;
7455
+ // }
7456
+ // }
7457
+ // },
7458
+ // (error: any) => {
7459
+ // this.errorMessage = error;
7460
+ // this.isConfirmationBtnDisabled = false;
7461
+ // });
7462
+ // }
6417
7463
  /**
6418
7464
  * @param {?} key
6419
7465
  * @param {?} value
@@ -6427,6 +7473,7 @@ class AddRemissionComponent {
6427
7473
  remissionctrls['reason'].reset();
6428
7474
  this.isRefundReasonsSelected = true;
6429
7475
  this.errorMessage = false;
7476
+ this.errorMsg = [];
6430
7477
  this.isReasonEmpty = false;
6431
7478
  this.showReasonText = false;
6432
7479
  this.refundHasError = false;
@@ -6457,13 +7504,51 @@ class AddRemissionComponent {
6457
7504
  this.refundReason = args.target.options[args.target.options.selectedIndex].id;
6458
7505
  }
6459
7506
  }
7507
+ /**
7508
+ * @param {?} obj
7509
+ * @param {?} type
7510
+ * @return {?}
7511
+ */
7512
+ getContactDetails(obj, type) {
7513
+ this.contactDetailsObj = obj;
7514
+ this.viewCompStatus = '';
7515
+ this.viewStatus = type;
7516
+ }
7517
+ /**
7518
+ * @return {?}
7519
+ */
7520
+ gotoPartialFeeRefundScreen() {
7521
+ if (this.isFromRefundStatusPage) {
7522
+ /** @type {?} */
7523
+ var remissionctrls = this.remissionForm.controls;
7524
+ this.refundListReason.emit({ reason: this.displayRefundReason, code: this.refundReason });
7525
+ return;
7526
+ }
7527
+ this.refundHasError = false;
7528
+ this.viewCompStatus = 'issuerefund';
7529
+ this.viewStatus = '';
7530
+ }
6460
7531
  /**
6461
7532
  * @param {?} event
6462
7533
  * @return {?}
6463
7534
  */
6464
7535
  gotoServiceRequestPage(event) {
6465
7536
  this.errorMessage = '';
7537
+ this.errorMsg = [];
7538
+ this.isFromCheckAnsPage = false;
6466
7539
  event.preventDefault();
7540
+ if (this.isFromRefundStatusPage) {
7541
+ /** @type {?} */
7542
+ var remissionctrls = this.remissionForm.controls;
7543
+ this.totalRefundAmount = this.remissionForm.value.feesList.reduce((/**
7544
+ * @param {?} a
7545
+ * @param {?} c
7546
+ * @return {?}
7547
+ */
7548
+ (a, c) => a + c.refund_amount * c.selected), 0);
7549
+ this.refundListAmount.emit(this.totalRefundAmount.toString());
7550
+ return;
7551
+ }
6467
7552
  if (this.isFromServiceRequestPage && !this.isFromPaymentDetailPage) {
6468
7553
  this.viewStatus = 'order-full-view';
6469
7554
  this.viewCompStatus = '';
@@ -6498,64 +7583,32 @@ class AddRemissionComponent {
6498
7583
  }
6499
7584
  this.viewCompStatus = '';
6500
7585
  }
6501
- // if (this.paymentLibComponent.TAKEPAYMENT === undefined && this.paymentLibComponent.SERVICEREQUEST === undefined) {
6502
- // this.paymentLibComponent.SERVICEREQUEST = 'false';
6503
- // this.paymentLibComponent.TAKEPAYMENT = false;
6504
- // }
6505
- // if (this.isFromServiceRequestPage) {
6506
- // //this.paymentLibComponent.TAKEPAYMENT = false;
6507
- // this.paymentLibComponent.isFromRefundStatusPage = false;
6508
- // this.viewStatus = 'main'
6509
- // this.paymentLibComponent.viewName = 'case-transactions';
6510
- // this.OrderslistService.setisFromServiceRequestPage(true);
6511
- // this.OrderslistService.setnavigationPage('servicerequestpage');
6512
- // }
6513
- // if ( this.isFromRefundListPage ) {
6514
- // this.paymentLibComponent.iscancelClicked = true;
6515
- // this.refundListReason.emit({reason: this.selectedRefundReason, code: this.refundReason});
6516
- // this.paymentLibComponent.isFromRefundStatusPage = true;
6517
- // }
6518
- // if(!this.paymentLibComponent.isFromRefundStatusPage) {
6519
- // if(this.payment) {
6520
- // this.OrderslistService.setpaymentPageView({method: this.payment.method,payment_group_reference: this.paymentGroupRef, reference:this.payment.reference});
6521
- // }
6522
- // if (this.isFromServiceRequestPage) {
6523
- // this.OrderslistService.setnavigationPage('servicerequestpage');
6524
- // } else {
6525
- // this.OrderslistService.setnavigationPage('paymentdetailspage');
6526
- // }
6527
- // this.errorMessage = '';
6528
- // this.paymentLibComponent.viewName = 'case-transactions';
6529
- // // this.paymentLibComponent.TAKEPAYMENT = true;
6530
- // this.paymentLibComponent.ISTURNOFF = this.isTurnOff;
6531
- // this.paymentLibComponent.isFromServiceRequestPage = true;
6532
- // this.paymentLibComponent.ISBSENABLE = true;
6533
- // let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';
6534
- // partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';
6535
- // partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';
6536
- // partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';
6537
- // partUrl += `&caseType=${this.caseType}`;
6538
- // if(this.isFromPaymentDetailPage) {
6539
- // partUrl += this.paymentLibComponent.isFromPaymentDetailPage
6540
- // }
6541
- // if(!this.paymentLibComponent.TAKEPAYMENT) {
6542
- // this.paymentLibComponent.TAKEPAYMENT = undefined;
6543
- // }
6544
- // if ( this.paymentLibComponent.SERVICEREQUEST) {
6545
- // const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&selectedOption=${this.option}${partUrl}`;
6546
- // this.router.routeReuseStrategy.shouldReuseRoute = () => false;
6547
- // this.router.onSameUrlNavigation = 'reload';
6548
- // this.router.navigateByUrl(url);
6549
- // } else {
6550
- // const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;
6551
- // this.router.routeReuseStrategy.shouldReuseRoute = () => false;
6552
- // this.router.onSameUrlNavigation = 'reload';
6553
- // this.router.navigateByUrl(url);
6554
- // }
6555
- // } else {
6556
- // this.paymentLibComponent.viewName === 'refundstatuslist';
6557
- // this.paymentLibComponent.isFromRefundStatusPage = true;
6558
- // }
7586
+ }
7587
+ /**
7588
+ * @param {?=} note
7589
+ * @return {?}
7590
+ */
7591
+ gotoAddressPage(note) {
7592
+ if (note) {
7593
+ this.notification = { contact_details: note, notification_type: note.notification_type };
7594
+ }
7595
+ this.errorMessage = '';
7596
+ this.viewCompStatus = 'addrefundforremission';
7597
+ this.viewStatus = '';
7598
+ this.isRefundRemission = true;
7599
+ this.errorMessage = false;
7600
+ }
7601
+ /**
7602
+ * @param {?} event
7603
+ * @return {?}
7604
+ */
7605
+ gotoRemissionSuccess(event) {
7606
+ event.preventDefault();
7607
+ this.errorMessage = '';
7608
+ this.viewCompStatus = '';
7609
+ this.viewStatus = 'retroremissionconfirmationpage';
7610
+ this.isRefundRemission = true;
7611
+ this.errorMessage = false;
6559
7612
  }
6560
7613
  /**
6561
7614
  * @return {?}
@@ -6563,6 +7616,7 @@ class AddRemissionComponent {
6563
7616
  gotoCasetransationPage() {
6564
7617
  this.OrderslistService.setnavigationPage('casetransactions');
6565
7618
  this.errorMessage = '';
7619
+ this.errorMsg = [];
6566
7620
  this.paymentLibComponent.viewName = 'case-transactions';
6567
7621
  this.paymentLibComponent.VIEW = 'case-transactions';
6568
7622
  this.paymentLibComponent.ISTURNOFF = this.isTurnOff;
@@ -6589,28 +7643,35 @@ class AddRemissionComponent {
6589
7643
  */
6590
7644
  gotoCasetransationPageCancelBtnClicked(event) {
6591
7645
  event.preventDefault();
6592
- if (!this.paymentLibComponent.isFromServiceRequestPage) {
7646
+ this.errorMsg = [];
7647
+ if (this.paymentLibComponent.isFromServiceRequestPage !== undefined && !this.paymentLibComponent.isFromServiceRequestPage) {
7648
+ this.OrderslistService.setnavigationPage('casetransactions');
7649
+ this.OrderslistService.setisFromServiceRequestPage(false);
7650
+ this.paymentLibComponent.VIEW = 'case-transactions';
7651
+ this.paymentLibComponent.viewName = 'case-transactions';
7652
+ this.paymentLibComponent.ISBSENABLE = true;
7653
+ this.paymentLibComponent.isRefundStatusView = false;
6593
7654
  this.OrderslistService.setnavigationPage('casetransactions');
6594
7655
  this.OrderslistService.setisFromServiceRequestPage(false);
6595
7656
  this.paymentLibComponent.VIEW = 'case-transactions';
6596
7657
  this.paymentLibComponent.viewName = 'case-transactions';
6597
7658
  this.paymentLibComponent.ISBSENABLE = true;
6598
7659
  this.paymentLibComponent.isRefundStatusView = false;
6599
- // this.OrderslistService.setnavigationPage('casetransactions');
6600
- // this.OrderslistService.setisFromServiceRequestPage(false);
6601
- // this.paymentLibComponent.VIEW ='case-transactions';
6602
- // this.paymentLibComponent.viewName = 'case-transactions';
6603
- // this.paymentLibComponent.ISBSENABLE = true;
6604
- // this.paymentLibComponent.isRefundStatusView = false;
6605
- // this.resetOrderData(); let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';
6606
- // partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';
6607
- // partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';
6608
- // partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';
6609
- // partUrl += `&caseType=${this.caseType}`;
6610
- // const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;
6611
- // this.router.routeReuseStrategy.shouldReuseRoute = () => false;
6612
- // this.router.onSameUrlNavigation = 'reload';
6613
- // this.router.navigateByUrl(url);
7660
+ this.resetOrderData();
7661
+ /** @type {?} */
7662
+ let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';
7663
+ partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';
7664
+ partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';
7665
+ partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';
7666
+ partUrl += `&caseType=${this.caseType}`;
7667
+ /** @type {?} */
7668
+ const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;
7669
+ this.router.routeReuseStrategy.shouldReuseRoute = (/**
7670
+ * @return {?}
7671
+ */
7672
+ () => false);
7673
+ this.router.onSameUrlNavigation = 'reload';
7674
+ this.router.navigateByUrl(url);
6614
7675
  }
6615
7676
  else {
6616
7677
  if (this.paymentLibComponent.REFUNDLIST) {
@@ -6672,6 +7733,14 @@ class AddRemissionComponent {
6672
7733
  this.OrderslistService.setorderRemissionTotal(null);
6673
7734
  this.OrderslistService.setorderFeesTotal(null);
6674
7735
  }
7736
+ /**
7737
+ * @return {?}
7738
+ */
7739
+ changeRefundAmount() {
7740
+ this.isFromCheckAnsPage = true;
7741
+ this.viewCompStatus = 'issuerefund';
7742
+ this.viewStatus = '';
7743
+ }
6675
7744
  /**
6676
7745
  * @param {?} currency
6677
7746
  * @return {?}
@@ -6686,8 +7755,8 @@ class AddRemissionComponent {
6686
7755
  AddRemissionComponent.decorators = [
6687
7756
  { type: Component, args: [{
6688
7757
  selector: 'ccpay-add-remission',
6689
- template: "<div class=\"add-remission pagesize\">\n <div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Error in processing the request\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"viewStatus === 'main' && !isRefundRemission \">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ADDREMISSION'>\n <h1 class=\"heading-large\">Add remission </h1>\n <form novalidate>\n <div class=\"govuk-form-group\">\n <form [formGroup]=\"remissionForm\" novalidate>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-label--s\" for=\"remission-code\">\n Add remission to {{ fee?.code }}: {{ fee?.description }}\n <span class=\"form-hint\">Enter remission for reference. For example: HWF-A1B-23C OR PA21-123456</span>\n </label>\n <input [ngClass]=\"{'inline-error-class': isRemissionCodeEmpty || remissionCodeHasError}\" class=\"govuk-input govuk-input--width-20 govuk-!-margin-right-1\" id=\"remissionCode\" aria-label=\"remissionCode\" name=\"remissionCode\" type=\"text\" formControlName=\"remissionCode\">\n <p class=\"inline-error-message\" *ngIf=\"isRemissionCodeEmpty || remissionCodeHasError\">\n <span *ngIf=\"isRemissionCodeEmpty\">Enter a remission code</span>\n <span *ngIf=\"remissionCodeHasError\">Enter a vaild remission code</span>\n </p>\n </div>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-label--s\" for=\"amount\">\n How much does the applicant need to pay?\n </label>\n\n <div id=\"amount-currency\" class=\"govuk-visually-hidden\">in pounds</div>\n <div class=\"hmcts-currency-input\">\n <div class=\"hmcts-currency-input__symbol\" aria-hidden=\"true\">\u00A3</div>\n <input class=\"govuk-input govuk-input--width-10\" [ngClass]=\"{'inline-error-class': isAmountEmpty || amountHasError || isRemissionLessThanFeeError}\" id=\"amount\" aria-label=\"amount\" name=\"amount\" type=\"text\" aria-describedby=\"amount-currency\" formControlName=\"amount\">\n <p class=\"inline-error-message\" *ngIf=\"isAmountEmpty || amountHasError || isRemissionLessThanFeeError\">\n <span *ngIf=\"isAmountEmpty\">Enter a amount</span>\n <span *ngIf=\"amountHasError\">Enter a vaild amount</span>\n <span *ngIf=\"isRemissionLessThanFeeError\">The remission amount must be less than the total fee</span>\n </p>\n </div>\n </div>\n </form>\n <button class=\"button\" type=\"submit\" (click)=\"addRemission()\">\n Submit\n </button>\n </div>\n </form>\n </ng-container>\n\n <ng-container *ngIf=\"viewStatus === 'confirmation'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ADDREMISSIONCONFIRMATION'>\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n Are you sure you want to add remission to this fee?\n </strong>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Remission code:</td>\n <td class=\"govuk-table__cell\">{{ remissionForm.controls.remissionCode.value }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee code:</td>\n <td class=\"govuk-table__cell\">{{ fee.code }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee description:</td>\n <td class=\"govuk-table__cell\">{{ fee.description }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Amount the applicant must pay:</td>\n <td class=\"govuk-table__cell\">{{ remissionForm.controls.amount.value | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n </tr>\n </table>\n\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"cancelRemission.emit()\">\n Cancel\n </button>\n <button type=\"submit\"\n [disabled]=\"isConfirmationBtnDisabled\"\n [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"confirmRemission()\">\n Confirm\n </button>\n\n </ng-container>\n\n <!-- Add retro remission changes-->\n\n <ng-container *ngIf=\"viewCompStatus === 'addremission'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='PROCESSADDRETROREMISSIONPAGE'>\n <h1 class=\"heading-large\">Process remission</h1>\n <h1 class=\"heading-medium\">#{{ccdCaseNumber | ccdHyphens}}</h1>\n <h1 class=\"heading-large\">Enter help with fees or remission reference</h1>\n <form novalidate>\n <div class=\"govuk-form-group\">\n <form [formGroup]=\"remissionForm\" novalidate>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-label--s\" for=\"remission-code\">\n <span class=\"form-hint\">For example: HWF-A1B-23C OR PA21-123456</span>\n </label>\n <p class=\"inline-error-message\" *ngIf=\"isRemissionCodeEmpty || remissionCodeHasError\">\n <span *ngIf=\"isRemissionCodeEmpty\">Enter a remission code</span>\n <span *ngIf=\"remissionCodeHasError\">Enter a vaild remission code</span>\n </p>\n <input [ngClass]=\"{'inline-error-class': isRemissionCodeEmpty || remissionCodeHasError}\" class=\"govuk-input govuk-input--width-20 govuk-!-margin-right-1\" id=\"remissionCode\" aria-label=\"remissionCode\" name=\"remissionCode\" type=\"text\" formControlName=\"remissionCode\">\n\n </div>\n\n </form>\n <div class=\"govuk-button-group\">\n <button (click)=\"gotoServiceRequestPage($event)\" class=\"govuk-button govuk-button--secondary\"> Previous</button>\n <button (click)=\"addRemissionCode()\" class=\"govuk-button\"> Continue</button>\n </div>\n <p><a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link pointer\" data-module=\"govuk-button\">Cancel</a></p>\n </div>\n </form>\n\n </ng-container>\n\n <ng-container *ngIf=\"viewStatus === 'processretroremissonpage'\" >\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='PROCESSRETROREMISSIONPAGE'>\n <h1 class=\"heading-large\">Process remission</h1>\n <h1 class=\"heading-medium\">#{{ccdCaseNumber | ccdHyphens }}</h1>\n <div class=\"govuk-form-group\">\n <form novalidate>\n <div class=\"govuk-form-group\">\n <form [formGroup]=\"remissionForm\" novalidate>\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n <h1 *ngIf=\"remessionPayment?.status === 'Success' || isFromRefundListPage\" class=\"heading-medium\">\n Enter the amount to be refunded\n </h1>\n <h1 *ngIf=\"remessionPayment?.status !== 'Success' && !isFromRefundListPage\" class=\"heading-medium\">\n Enter the remission amount\n </h1>\n <h1 *ngIf=\"remessionPayment?.status === 'undefined'\" class=\"heading-medium\">\n Enter the amount\n </h1>\n </legend>\n <div id=\"amount-currency\" class=\"govuk-visually-hidden\">in pounds</div>\n <p class=\"inline-error-message\" *ngIf=\"isAmountEmpty || amountHasError || isRemissionLessThanFeeError\">\n <span *ngIf=\"isAmountEmpty\">Enter a amount</span>\n <span *ngIf=\"amountHasError\">Enter a vaild amount</span>\n <span *ngIf=\"isRemissionLessThanFeeError\">You cannot add a remission that's more than the fee amount.</span>\n </p>\n <div class=\"hmcts-currency-input\">\n\n <div class=\"hmcts-currency-input__symbol\" aria-hidden=\"true\">\u00A3</div>\n <input class=\"govuk-input govuk-input--width-10\" [ngClass]=\"{'inline-error-class': isAmountEmpty || amountHasError || isRemissionLessThanFeeError}\" id=\"amount\" aria-label=\"amount\" name=\"amount\" type=\"number\" aria-describedby=\"amount-currency\" formControlName=\"amount\">\n\n\n </div>\n </fieldset>\n </form>\n\n <div class=\"govuk-button-group\">\n <button (click)=\"gotoAddRetroRemissionCodePage()\" class=\"govuk-button govuk-button--secondary\"> Previous</button>\n <button (click)=\"gotoCheckRetroRemissionPage(payment)\" class=\"govuk-button\"> Continue</button>\n\n </div>\n <p>\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">Cancel</a>\n </p>\n </div>\n\n </form>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"viewStatus === 'checkretroremissionpage'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='CHECKRETROREMISSIONCONFIRMATION'>\n <div class=\"govuk-warning-text\">\n <h1 class=\"heading-large\"> Check your answers</h1>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\">{{remessionPayment ? remessionPayment.reference: ' '}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment amount</td>\n <td class=\"govuk-table__cell\">\u00A3{{ remessionPayment ? getFormattedCurrency(remessionPayment.amount): ' ' | currency :'GBP':'symbol':'1.2-2'}} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment status</td>\n <td class=\"govuk-table__cell\">{{remessionPayment ? remessionPayment.status: ''}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee</td>\n <td class=\"govuk-table__cell\">{{ fee.code }} - {{ fee.description }} ({{ fee.calculated_amount/fee.volume| currency:'GBP':'symbol-narrow':'1.2-2' }}) </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Help with fees or remission reference</td>\n <td class=\"govuk-table__cell\"> {{ remissionForm.controls.remissionCode.value }}\n <a (click)=\"gotoProcessRetroRemissionPage()\" class=\"govuk-link right\" >Change</a>\n </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td *ngIf=\"remessionPayment.status === 'Success'\" class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td *ngIf=\"remessionPayment.status !== 'Success'\" class=\"govuk-table__cell govuk-!-font-weight-bold\">Remission amount</td>\n <td class=\"govuk-table__cell\">{{remissionForm.controls.amount.value | currency:'GBP':'symbol-narrow':'1.2-2' }}\n <a (click)=\"addRemissionCode()\" class=\"govuk-link right\" >Change</a>\n </td>\n </tr>\n </table>\n\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"addRemissionCode()\">Previous</button>\n <button type=\"submit\" [disabled]=\"isConfirmationBtnDisabled\" [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"' (click)=\"confirmRetroRemission()\"> Add remission </button>\n <p> <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\"> Cancel</a> </p>\n\n </ng-container>\n\n <ng-container *ngIf=\"viewStatus === 'retroremissionconfirmationpage'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='RETROREMISSIONCONFIRMATIONPAGE'>\n <div class=\"govuk-grid-row\">\n <div >\n <div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Remission added\n </h1>\n <div *ngIf=\"remessionPayment.status === 'Success'\" class=\"govuk-panel__body\">\n <p class=\"govuk-body white\"><strong>The amount to be refunded should be {{remissionForm.controls.amount.value | currency:'GBP':'symbol-narrow':'1.2-2' }}</strong></p>\n\n </div>\n </div>\n <div *ngIf=\"remessionPayment.status === 'Success'\" >\n <button type=\"submit\" [disabled]=\"!isRemissionApplied\" [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"' (click)=\"processRefund()\">Submit refund </button>\n </div>\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link pointer\" data-module=\"govuk-button\">\n Return to case\n </a>\n </p>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"viewStatus === 'refundconfirmationpage'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='RETROREMISSIONREFUNDCONFIRMATIONPAGE'>\n <div class=\"govuk-grid-row\">\n <div >\n <div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Refund submitted\n </h1>\n\n <div class=\"govuk-panel__body\">\n <p class=\"govuk-body white\"><strong>Refund reference: {{refundReference}}</strong></p>\n </div>\n\n </div>\n <div *ngIf=\"isPaymentSuccess\">\n <h2 class=\"govuk-heading-l\">What happens next</h2>\n <p class=\"govuk-body\">\n A refund request for {{refundAmount | currency:'GBP':'symbol-narrow':'1.2-2' }} has been created and will be passed to a team leader to approve.\n </p>\n </div>\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link pointer\" data-module=\"govuk-button\">\n Return to case\n </a>\n </p>\n </div>\n </div>\n\n </ng-container>\n\n <!-- Issue Refund Section -->\n\n <ng-container *ngIf=\"viewCompStatus === 'issuerefund' && isRefundRemission\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ISSUEREFUNDPAGE'>\n <h1 class=\"heading-large\">Process refund</h1>\n <h1 class=\"heading-medium\">#{{ccdCaseNumber | ccdHyphens }}</h1>\n <h1 class=\"heading-large\">Why are you making this refund?\n </h1>\n\n\n <div class=\"govuk-form-group\">\n <form novalidate>\n <div class=\"govuk-form-group\">\n <form [formGroup]=\"remissionForm\" novalidate>\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"how-contacted-conditional-hint\">\n\n <div\n [ngClass]=\"refundHasError ? 'govuk-radios govuk-radios--conditional form-group-error' : 'govuk-radios govuk-radios--conditional'\"\n data-module=\"govuk-radios\" >\n <p class=\"inline-error-message\" *ngIf=\"refundHasError\">\n <span *ngIf=\"refundHasError\">Select a reason why you\u2019re making this refund</span>\n </p>\n\n\n\n <div class = \"container-fluid\">\n <div class=\"row\">\n <div class=\"govuk-radios__item col-md-4\" *ngFor=\"let refund of commonRefundReasons; let i = index;\">\n <!-- <div *ngIf = \"{{refund.name}} !== 'Retrospective remission'\"> -->\n <input class=\"govuk-radios__input\" id=\"{{refund.name}}\" name=\"refundReason\" type=\"radio\"\n formControlName=\"refundReason\" value={{refund.code}}\n (change)=\"selectRadioButton(refund.name, refund.name)\">\n <label class=\"govuk-label--s govuk-radios__label govuk-font__custom\" for=\"how-contacted-conditional\">\n {{refund.name}}\n </label>\n\n <div class=\"govuk-radios__conditional\" *ngIf=\"isRefundReasonsSelected && showReasonText && selectedRefundReason === refund.name \" >\n <label class=\"govuk-label govuk-label--m\" for=\"{{refund.name}}\">\n Enter reason\n </label>\n <div [ngClass]=\"{'form-group-error': isReasonEmpty}\">\n <p class=\"inline-error-message\" *ngIf=\"isReasonEmpty\">\n <span *ngIf=\"isReasonEmpty\">Enter a reason why you\u2019re making this refund</span>\n </p>\n\n <input class=\"govuk-input govuk-input--width-10\" [ngClass]=\"{'inline-error-class': isReasonEmpty}\" id=\"reason\" aria-label=\"reason\" name=\"reason\" type=\"text\" aria-describedby=\"reason\" maxlength=\"30\" formControlName=\"reason\">\n </div>\n </div>\n <!-- </div> -->\n </div>\n </div>\n </div>\n <br/>\n <div>\n <select formControlName=\"refundDDReason\" class=\"govuk-select\" id=\"sort\" (change)=\"selectchange($event)\">\n <option selected='selected' [defaultSelected]=true [value]=\"default\" >{{default}}</option>\n <!-- <option value=\"\" selected='selected'>Select a different reason</option> -->\n <option *ngFor=\"let refund of refundReasons;\" id=\"{{refund.name}}\" value=\"{{refund.code}}\">{{refund.name}}</option>\n </select>\n\n </div>\n <br/>\n <div class=\"govuk-radios__conditional\" *ngIf=\"showReasonText && !isRefundReasonsSelected\" >\n <div [ngClass]=\"{'form-group-error': isReasonEmpty}\">\n <label class=\"govuk-label govuk-label--m\" for=\"amount\">\n Enter reason\n </label>\n <p class=\"inline-error-message\" *ngIf=\"isReasonEmpty\">\n <span *ngIf=\"isReasonEmpty\">Enter a reason why you\u2019re making this refund</span>\n </p>\n <input class=\"govuk-input govuk-input--width-10\" [ngClass]=\"{'inline-error-class': isReasonEmpty}\" id=\"reason\" aria-label=\"reason\" name=\"reason\" type=\"text\" aria-describedby=\"reason\" maxlength=\"{{reasonLength}}\" formControlName=\"reason\">\n </div>\n </div>\n\n\n </div>\n </fieldset>\n </form>\n </div>\n </form>\n </div>\n <div class=\"govuk-button-group\">\n <button (click)=\"gotoServiceRequestPage($event)\" class=\"govuk-button govuk-button--secondary\"> Previous</button>\n <button (click)=\"gotoIssueRefundConfirmation(payment)\" class=\"govuk-button\"> Continue</button>\n </div>\n <p>\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n\n </ng-container>\n\n <ng-container *ngIf=\"viewStatus === 'checkissuerefundpage'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='CHECKISSUEREFUNDPAGE'>\n <div class=\"govuk-warning-text\">\n\n <h1 class=\"heading-large\"> Check your answers</h1>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Reason for refund</td>\n <td class=\"govuk-table__cell\"> {{ displayRefundReason }}\n <a (click)=\"changeIssueRefundReason()\" class=\"govuk-link right\" >Change</a>\n </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\">{{this.payment.reference}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment amount</td>\n <td class=\"govuk-table__cell\">{{this.payment.amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n </table>\n <div class=\"govuk-button-group\">\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"gotoIssueRefundPage()\"> Previous </button>\n <button type=\"submit\"\n [disabled]=\"isConfirmationBtnDisabled\"\n [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"confirmIssueRefund()\">\n Submit refund\n </button>\n </div>\n <p>\n <a (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n\n </ng-container>\n\n <!--Retro Refund-->\n <ng-container *ngIf=\"viewCompStatus === 'addrefundforremission'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ADDREFUNDFORREMISSION'>\n <div class=\"govuk-warning-text\">\n\n <h1 class=\"heading-large\"> Check your answers</h1>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Reason for refund</td>\n <td class=\"govuk-table__cell\"> Retrospective remission </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\">{{this.payment.reference}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td class=\"govuk-table__cell\">{{this.remission.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee code</td>\n <td class=\"govuk-table__cell\">{{this.remission.fee_code}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee amount</td>\n <td class=\"govuk-table__cell\">{{feeamount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n </table>\n <div class=\"govuk-button-group\">\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"gotoServiceRequestPage($event)\">Previous</button>\n <button type=\"submit\"\n [disabled]=\"isConfirmationBtnDisabled\"\n [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"processRefund()\">\n Submit refund\n </button>\n </div>\n <p>\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n\n </ng-container>\n\n <ng-container *ngIf=\"viewStatus === 'retrorefundconfirmationpage'\">\n <div class=\"govuk-grid-row\">\n <div >\n <div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Refund submitted\n </h1>\n\n <div class=\"govuk-panel__body\">\n <p class=\"govuk-body white\"><strong>Refund reference: {{refundReference}}</strong></p>\n </div>\n\n </div>\n <div *ngIf=\"isPaymentSuccess\">\n <h2 class=\"govuk-heading-l\">What happens next</h2>\n <p class=\"govuk-body\">\n A refund request for {{ refundAmount| currency:'GBP':'symbol-narrow':'1.2-2'}} has been passed to a team leader to approve.\n </p>\n </div>\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link pointer\" data-module=\"govuk-button\">\n Return to case\n </a>\n </p>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"viewStatus === 'order-full-view'\">\n <ccpay-service-request\n [viewStatus] = \"viewStatus\"\n [orderRef] = \"orderRef\"\n [orderStatus] = \"orderStatus\"\n [orderCreated] = \"orderCreated\"\n [orderParty] = \"orderParty\"\n [orderCCDEvent] = \"orderCCDEvent\"\n [orderDetail] = \"orderDetail\"\n [LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n [takePayment] = \"takePayment\"\n [ccdCaseNumber] = \"ccdCaseNumber\"\n [orderFeesTotal] = \"orderFeesTotal\"\n [orderTotalPayments] = \"orderTotalPayments\"\n [orderRemissionTotal] = \"orderRemissionTotal\">\n </ccpay-service-request>\n </ng-container>\n\n <ng-container *ngIf=\"viewStatus === 'payment-view'\">\n <ccpay-payment-view\n [LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n [isTurnOff] = \"isTurnOff\"\n [isTakePayment] = \"takePayment\"\n [caseType] = \"caseType\"\n [orderRef] = \"orderRef\"\n [orderStatus] = \"orderStatus\"\n [orderCreated] = \"orderCreated\"\n [orderParty] = \"orderParty\"\n [orderCCDEvent] = \"orderCCDEvent\"\n [orderDetail] = \"orderDetail\"\n [orderFeesTotal] = \"orderFeesTotal\"\n [orderTotalPayments] = \"orderTotalPayments\"\n [orderRemissionTotal] = \"orderRemissionTotal\"\n >\n </ccpay-payment-view>\n </ng-container>\n\n</div>\n\n\n\n",
6690
- styles: [".add-remission .button{padding:.5em;font-size:19px;font-weight:200;margin:20px 2px}.add-remission td.govuk-table__cell{width:50%}.add-remission .govuk-button--secondary{background-color:#dee0e2;box-shadow:0 2px 0 #858688;color:#0b0c0c;margin-right:.5em}.add-remission .right{cursor:pointer}.add-remission .govuk-label--s,.add-remission .govuk-warning-text__text,.add-remission .hmcts-currency-input__symbol{font-size:19px;font-weight:400}.add-remission .inline-error-class{outline:#a71414 solid 3px;outline-offset:0;border-color:#a71414}.add-remission .inline-error-message{color:#a71414;border-color:#a71414;font-weight:700;margin-top:10px;font-size:20px}.add-remission .govuk-button,.add-remission .govuk-link{margin-right:1em;font-size:19px;font-weight:200}.add-remission .govuk-button-group{padding-top:2em}.add-remission .heading-medium{margin-top:.875em}.add-remission .heading-large{margin-top:.25em}.add-remission .govuk-panel--confirmation{color:#fff;background:#00703c}.add-remission .govuk-panel__title{font-size:5rem}.add-remission .govuk-body,.add-remission .govuk-body-m{font-size:2.1875rem}.add-remission .govuk-radios__item{clear:initial!important;display:inline-block;width:45%!important}.add-remission .govuk-radios__conditional{padding-top:12px!important}.add-remission .radio,.add-remission .right{float:right}.govuk-input{font-size:19px}.govuk-select{font-size:19px;font-weight:400}.govuk-input--width-10{max-width:50ex}.govuk-label--m{font-size:19px;font-weight:400}.govuk-error-summary__body{font-size:19px!important}.govuk-error-summary__title{font-size:24px!important}.white{color:#fff}.pagesize{margin:2em;width:97%}.right{cursor:pointer}.form-hint{font-size:19px!important}"]
7758
+ template: "<div class=\"add-remission pagesize\">\n <div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Error in processing the request\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n </div>\n <div *ngIf=\"errorMsg.length > 0\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Error in processing the request\n </h2>\n <div *ngFor=\"let err of errorMsg; let i = index\" class=\"govuk-error-summary__body\">\n \n <li>{{err}}</li>\n </div>\n </div>\n </div>\n\n<ng-container *ngIf=\"viewStatus === 'main' && !isRefundRemission \">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ADDREMISSION'>\n <h1 class=\"heading-large\">Add remission </h1>\n <form novalidate>\n <div class=\"govuk-form-group\">\n <form [formGroup]=\"remissionForm\" novalidate>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-label--s\" for=\"remission-code\">\n Add remission to {{ fee?.code }}: {{ fee?.description }}\n <span class=\"form-hint\">Enter remission for reference. For example: HWF-A1B-23C OR PA21-123456</span>\n </label>\n <input [ngClass]=\"{'inline-error-class': isRemissionCodeEmpty || remissionCodeHasError}\" class=\"govuk-input govuk-input--width-20 govuk-!-margin-right-1\" id=\"remissionCode\" aria-label=\"remissionCode\" name=\"remissionCode\" type=\"text\" formControlName=\"remissionCode\">\n <p class=\"inline-error-message\" *ngIf=\"isRemissionCodeEmpty || remissionCodeHasError\">\n <span *ngIf=\"isRemissionCodeEmpty\">Enter a remission code</span>\n <span *ngIf=\"remissionCodeHasError\">Enter a vaild remission code</span>\n </p>\n </div>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-label--s\" for=\"amount\">\n How much does the applicant need to pay?\n </label>\n\n <div id=\"amount-currency\" class=\"govuk-visually-hidden\">in pounds</div>\n <div class=\"hmcts-currency-input\">\n <div class=\"hmcts-currency-input__symbol\" aria-hidden=\"true\">\u00A3</div>\n <input class=\"govuk-input govuk-input--width-10\" [ngClass]=\"{'inline-error-class': isAmountEmpty || amountHasError || isRemissionLessThanFeeError}\" id=\"amount\" aria-label=\"amount\" name=\"amount\" type=\"text\" aria-describedby=\"amount-currency\" formControlName=\"amount\">\n <p class=\"inline-error-message\" *ngIf=\"isAmountEmpty || amountHasError || isRemissionLessThanFeeError\">\n <span *ngIf=\"isAmountEmpty\">Enter a amount</span>\n <span *ngIf=\"amountHasError\">Enter a vaild amount</span>\n <span *ngIf=\"isRemissionLessThanFeeError\">The remission amount must be less than the total fee</span>\n </p>\n </div>\n </div>\n </form>\n <button class=\"button\" type=\"submit\" (click)=\"addRemission()\">\n Submit\n </button>\n </div>\n </form>\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'confirmation'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ADDREMISSIONCONFIRMATION'> \n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n Are you sure you want to add remission to this fee?\n </strong>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Remission code:</td>\n <td class=\"govuk-table__cell\">{{ remissionForm.controls.remissionCode.value }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee code:</td>\n <td class=\"govuk-table__cell\">{{ fee.code }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee description:</td>\n <td class=\"govuk-table__cell\">{{ fee.description }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Amount the applicant must pay:</td>\n <td class=\"govuk-table__cell\">{{ remissionForm.controls.amount.value | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n </tr>\n </table>\n\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"cancelRemission.emit()\">\n Cancel\n </button>\n <button type=\"submit\"\n [disabled]=\"isConfirmationBtnDisabled\"\n [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"confirmRemission()\">\n Confirm\n </button>\n\n</ng-container>\n\n<!-- Add retro remission changes-->\n\n<ng-container *ngIf=\"viewCompStatus === 'addremission'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='PROCESSADDRETROREMISSIONPAGE'> \n <h1 class=\"heading-large\">Process remission</h1>\n <h1 class=\"heading-medium\">#{{ccdCaseNumber | ccdHyphens}}</h1>\n <h1 class=\"heading-large\">Enter help with fees or remission reference</h1>\n <form novalidate>\n <div class=\"govuk-form-group\">\n <form [formGroup]=\"remissionForm\" novalidate>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-label--s\" for=\"remission-code\">\n <span class=\"form-hint\">For example: HWF-A1B-23C OR PA21-123456</span>\n </label>\n <p class=\"inline-error-message\" *ngIf=\"isRemissionCodeEmpty || remissionCodeHasError\">\n <span *ngIf=\"isRemissionCodeEmpty\">Enter a remission code</span>\n <span *ngIf=\"remissionCodeHasError\">Enter a vaild remission code</span>\n </p>\n <input [ngClass]=\"{'inline-error-class': isRemissionCodeEmpty || remissionCodeHasError}\" class=\"govuk-input govuk-input--width-20 govuk-!-margin-right-1\" id=\"remissionCode\" aria-label=\"remissionCode\" name=\"remissionCode\" type=\"text\" formControlName=\"remissionCode\">\n \n </div>\n \n </form>\n <div class=\"govuk-button-group\">\n <button (click)=\"gotoServiceRequestPage($event)\" class=\"govuk-button govuk-button--secondary\"> Previous</button>\n <button (click)=\"addRemissionCode()\" class=\"govuk-button\"> Continue</button>\n </div>\n <p><a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link pointer\" data-module=\"govuk-button\">Cancel</a></p>\n </div>\n </form>\n\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'processretroremissonpage'\" >\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='PROCESSRETROREMISSIONPAGE'> \n <h1 class=\"heading-large\">Process remission</h1>\n <h1 class=\"heading-medium\">#{{ccdCaseNumber | ccdHyphens }}</h1>\n <div class=\"govuk-form-group\">\n <form novalidate>\n <div class=\"govuk-form-group\">\n <form [formGroup]=\"remissionForm\" novalidate>\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\"> \n <h1 *ngIf=\"remessionPayment?.status === 'Success' || isFromRefundListPage\" class=\"heading-medium\">\n Enter the amount to be refunded\n </h1> \n <h1 *ngIf=\"remessionPayment?.status !== 'Success' && !isFromRefundListPage\" class=\"heading-medium\">\n Enter the remission amount\n </h1> \n <h1 *ngIf=\"remessionPayment?.status === 'undefined'\" class=\"heading-medium\">\n Enter the amount\n </h1> \n </legend>\n <div id=\"amount-currency\" class=\"govuk-visually-hidden\">in pounds</div>\n <p class=\"inline-error-message\" *ngIf=\"isAmountEmpty || amountHasError || isRemissionLessThanFeeError\">\n <span *ngIf=\"isAmountEmpty\">Enter a amount</span>\n <span *ngIf=\"amountHasError\">Enter a vaild amount</span>\n <span *ngIf=\"isRemissionLessThanFeeError\">You cannot add a remission that's more than the fee amount.</span>\n </p>\n <div class=\"hmcts-currency-input\">\n \n <div class=\"hmcts-currency-input__symbol\" aria-hidden=\"true\">\u00A3</div>\n <input class=\"govuk-input govuk-input--width-10\" [ngClass]=\"{'inline-error-class': isAmountEmpty || amountHasError || isRemissionLessThanFeeError}\" id=\"amount\" aria-label=\"amount\" name=\"amount\" type=\"number\" aria-describedby=\"amount-currency\" formControlName=\"amount\">\n \n \n </div>\n </fieldset>\n </form>\n \n <div class=\"govuk-button-group\">\n <button (click)=\"gotoAddRetroRemissionCodePage()\" class=\"govuk-button govuk-button--secondary\"> Previous</button>\n <button (click)=\"gotoCheckRetroRemissionPage(payment)\" class=\"govuk-button\"> Continue</button>\n \n </div>\n <p>\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">Cancel</a>\n </p>\n </div>\n \n </form>\n </div>\n</ng-container>\n<ng-container *ngIf=\"viewStatus === 'checkretroremissionpage'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='CHECKRETROREMISSIONCONFIRMATION'> \n <div class=\"govuk-warning-text\">\n <h1 class=\"heading-large\"> Check your answers</h1>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\">{{remessionPayment ? remessionPayment.reference: ' '}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment amount</td>\n <td class=\"govuk-table__cell\">\u00A3{{ remessionPayment ? getFormattedCurrency(remessionPayment.amount): ' ' | currency :'GBP':'symbol':'1.2-2'}} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment status</td>\n <td class=\"govuk-table__cell\">{{remessionPayment ? remessionPayment.status: ''}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee</td>\n <td class=\"govuk-table__cell\">{{ fee.code }} - {{ fee.description }} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee amount</td>\n <td class=\"govuk-table__cell\">{{ fee.calculated_amount/fee.volume| currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Help with fees or remission reference</td>\n <td class=\"govuk-table__cell\"> {{ remissionForm.controls.remissionCode.value }}\n <a (click)=\"gotoProcessRetroRemissionPage()\" class=\"govuk-link right\" >Change</a>\n </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td *ngIf=\"remessionPayment.status === 'Success'\" class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td *ngIf=\"remessionPayment.status !== 'Success'\" class=\"govuk-table__cell govuk-!-font-weight-bold\">Remission amount</td>\n <td class=\"govuk-table__cell\">{{remissionForm.controls.amount.value | currency:'GBP':'symbol-narrow':'1.2-2' }}\n <a (click)=\"gotoAmountRetroRemission()\" class=\"govuk-link right\" >Change</a>\n </td>\n </tr>\n </table>\n\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"gotoAmountRetroRemission()\">Previous</button>\n <button type=\"submit\" [disabled]=\"isConfirmationBtnDisabled\" [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"' (click)=\"confirmRetroRemission()\"> Add remission </button>\n <p> <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\"> Cancel</a> </p>\n\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'retroremissionconfirmationpage'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='RETROREMISSIONCONFIRMATIONPAGE'> \n <div class=\"govuk-grid-row\">\n <div >\n <div class=\"govuk-panel govuk-panel-border--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Remission added\n </h1>\n <div *ngIf=\"remessionPayment.status === 'Success'\" class=\"govuk-panel__body\">\n <p class=\"govuk-body\"><strong>The amount to be refunded should be {{remissionForm.controls.amount.value | currency:'GBP':'symbol-narrow':'1.2-2' }}</strong></p>\n \n </div>\n </div>\n <div *ngIf=\"remessionPayment.status === 'Success'\" >\n <button type=\"submit\" [disabled]=\"!isRemissionApplied\" [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"' (click)=\"gotoProcessRetroRemission()\">Continue </button>\n </div>\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link pointer\" data-module=\"govuk-button\">\n Return to case\n </a>\n </p>\n </div>\n </div>\n</ng-container>\n\n\n<ng-container *ngIf=\"viewStatus === 'remissionAddressPage'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ADDRESSDETAILSRETROREMISSIONPAGE'> \n <h1 class=\"govuk-heading-l\">Process refund</h1>\n <h2 class=\"govuk-heading-m govuk-font19px\">Case reference: {{ccdCaseNumber | ccdHyphens }}</h2>\n <ccpay-contact-details\n [addressObj] = notification\n (assignContactDetails)=\"getContactDetails($event, 'checkaddRefundpage')\"\n (redirectToIssueRefund)=\"gotoRemissionSuccess($event)\" ></ccpay-contact-details>\n <p>\n <a (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'checkaddRefundpage'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='CHECKRETROREMISSIONCONFIRMATION'> \n <div class=\"govuk-warning-text\">\n <h1 class=\"heading-large\"> Check your answers</h1>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\">{{remessionPayment ? remessionPayment.reference: ' '}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment amount</td>\n <td class=\"govuk-table__cell\">\u00A3{{ remessionPayment ? getFormattedCurrency(remessionPayment.amount): ' ' | currency :'GBP':'symbol':'1.2-2'}} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment status</td>\n <td class=\"govuk-table__cell\">{{remessionPayment ? remessionPayment.status: ''}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee</td>\n <td class=\"govuk-table__cell\">{{ fee.code }} - {{ fee.description }} ({{ fee.calculated_amount/fee.volume| currency:'GBP':'symbol-narrow':'1.2-2' }}) </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Help with fees or remission reference</td>\n <td class=\"govuk-table__cell\"> {{ remissionForm.controls.remissionCode.value }}\n </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td *ngIf=\"remessionPayment.status === 'Success'\" class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td *ngIf=\"remessionPayment.status !== 'Success'\" class=\"govuk-table__cell govuk-!-font-weight-bold\">Remission amount</td>\n <td class=\"govuk-table__cell\">{{remissionForm.controls.amount.value | currency:'GBP':'symbol-narrow':'1.2-2' }}\n </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send to</td>\n <td class=\"govuk-table__cell\">{{orderParty}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send via</td>\n <td class=\"govuk-table__cell\">\n <div *ngIf=\"contactDetailsObj?.notification_type === 'EMAIL'\" class=\"contactDetails-width\">\n <strong>Email</strong>\n <br/>\n {{contactDetailsObj?.email}}\n </div>\n <div *ngIf=\"contactDetailsObj?.notification_type === 'LETTER'\" class=\"contactDetails-width\">\n <strong>Post</strong>\n <br/>\n {{contactDetailsObj?.address_line}}&nbsp;{{contactDetailsObj?.city}}&nbsp;{{contactDetailsObj?.county}}&nbsp;{{contactDetailsObj?.country}}&nbsp;{{contactDetailsObj?.postal_code}}\n </div>\n <a (click)=\"gotoProcessRetroRemission(contactDetailsObj)\" class=\"govuk-link right margin-top--size\" >Change</a>\n </td>\n </tr>\n </table>\n\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"gotoProcessRetroRemission(contactDetailsObj)\">Previous</button>\n <button type=\"submit\" [disabled]=\"isConfirmationBtnDisabled\" [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"' (click)=\"processRefund()\"> Submit refund </button>\n <p> <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\"> Cancel</a> </p>\n\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'refundconfirmationpage'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='RETROREMISSIONREFUNDCONFIRMATIONPAGE'> \n <div class=\"govuk-grid-row\">\n <div >\n <div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Refund submitted\n </h1>\n\n <div class=\"govuk-panel__body\">\n <p class=\"govuk-body white\"><strong>Refund reference: {{refundReference}}</strong></p>\n </div>\n\n </div>\n <div *ngIf=\"isPaymentSuccess\">\n <h2 class=\"govuk-heading-l\">What happens next</h2>\n <p class=\"govuk-body\">\n A refund request for {{refundAmount | currency:'GBP':'symbol-narrow':'1.2-2' }} has been created and will be passed to a team leader to approve.\n </p>\n </div>\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link pointer\" data-module=\"govuk-button\">\n Return to case\n </a>\n </p>\n </div>\n </div>\n \n</ng-container>\n\n<!-- Issue Refund Section -->\n<ng-container *ngIf=\"viewCompStatus === 'issuerefund' && isRefundRemission\">\n <div class=\"govuk-form-group\">\n <form [formGroup]=\"remissionForm\" novalidate>\n <h1 class=\"heading-large\">Issue refund</h1>\n <h2 class=\"heading-medium\">Case reference:#{{ccdCaseNumber | ccdHyphens }}</h2>\n <span id=\"how-contacted-conditional-hint\" class=\"form-hint govuk-font19px\">\n Payment reference: {{paymentReference}}\n </span>\n <h3 class=\"heading-small\">Select fees to be refunded</h3>\n <!--TABLE-->\n <div>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-1\" scope=\"col\">Select</td>\n <td class=\"govuk-table__header col-18\" scope=\"col\">Fee description</td>\n <td class=\"govuk-table__header col-6\" scope=\"col\">Fee amount</td>\n <td class=\"govuk-table__header col-6\" scope=\"col\">Total paid</td>\n <td class=\"govuk-table__header col-6\" scope=\"col\">Quantity</td>\n <td class=\"govuk-table__header col-8\" scope=\"col\">Amount to refund</td>\n <td class=\"govuk-table__header\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"!isFullyRefund\">\n <tr class=\"govuk-table__row\" formArrayName=\"feesList\" *ngFor=\"let fee of feesList?.controls; let i = index\">\n <td class=\"govuk-table__cell\">\n <div [formGroupName]=\"i\" class=\"govuk-checkboxes govuk-checkboxes--large\" data-module=\"govuk-checkboxes\">\n <div class=\"govuk-checkboxes__item\">\n\n <input\n class=\"govuk-checkboxes__input\" \n (click)=\"check_en(i,fee.controls['id'].value,fee.controls['apportion_amount'].value,fee.controls['volume'].value)\" \n id=\"{{fee.controls['id'].value}}\" \n name=\"organisation\" \n type=\"checkbox\" \n value=\"{{fee.controls['id'].value}}\" \n formControlName=\"selected\" >\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"{{fee.controls['id'].value}}\">\n <span style=\"display:none\">Select</span>\n </label>\n </div>\n </div>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{fee.controls['description'].value}} </td>\n <td class=\"govuk-table__cell whitespace-inherit left\" >\n <div type=\"hidden\" style=\"display:none;background-color:white;\" id=\"feeVOl_{{fee.controls['id'].value}}\">{{ fee.controls['calculated_amount'].value / fee.controls['volume'].value }}</div>\n {{ fee.controls['calculated_amount'].value / fee.controls['volume'].value | currency:'GBP':'symbol-narrow':'1.2-2' }}\n </td>\n <td class=\"govuk-table__cell whitespace-inherit left\" >{{ fee.controls['apportion_amount'].value | currency:'GBP':'symbol-narrow':'1.2-2'}} </td>\n <td class=\"govuk-table__cell whitespace-inherit left\" *ngIf=\"fee.controls['volume'].value >1\">\n <div [formGroupName]=\"i\">\n <input disabled=\"disabled\" class=\"govuk-input govuk-input--width-4 center\" id=\"feeVolumeUpdated_{{fee.controls['id'].value}}\" (keyup)=\"calAmtToRefund($event.target.value,fee.controls['calculated_amount'].value,fee.controls['volume'].value,i)\" value=\"{{fee.controls['updated_volume'].value}}\" name=\"feeVolumeUpdated_{{fee.controls['id'].value}}\" formControlName=\"updated_volume\" type=\"text\" >\n </div>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit left\" *ngIf=\"fee.controls['volume'].value ===1\">\n <input disabled=\"disabled\" class=\"govuk-input govuk-input--width-4 center\" id=\"VolumeUpdated_{{fee.controls['id'].value}}\" name=\"VolumeUpdated_{{fee.controls['id'].value}}\" type=\"text\" value=\"{{fee.controls['volume'].value}}\">\n </td>\n <td class=\"govuk-table__cell whitespace-inherit center\" scope=\"row\">\n \n <div [formGroupName]=\"i\" class=\"hmcts-currency-input\">\n \n <div class=\"hmcts-currency-input__symbol\" aria-hidden=\"true\">\u00A3</div>\n <input disabled=\"disabled\" class=\"govuk-input govuk-input--width-10\" id=\"feeAmount_{{fee.controls['id'].value}}\" name=\"feeAmount_{{fee.controls['id'].value}}\" type=\"text\" aria-describedby=\"amount-currency \" pattern=\"[0-9]*\" formControlName=\"refund_amount\">\n <input id=\"feeVolume_{{fee.controls['id'].value}}\" name=\"feeVolume_{{fee.controls['id'].value}}\" value= \"{{fee.controls['volume'].value}}\" type=\"hidden\" formControlName=\"volume\">\n <input id=\"feeApportionAmount_{{fee.controls['id'].value}}\" name=\"feeApportionAmount_{{fee.controls['id'].value}}\" value= \"{{fee.controls['apportion_amount'].value}}\" type=\"hidden\" formControlName=\"apportion_amount\">\n <input id=\"calculatedAmount_{{fee.controls['id'].value}}\" name=\"calculatedAmount_{{fee.controls['id'].value}}\" value= \"{{fee.controls['calculated_amount'].value}}\" type=\"hidden\" formControlName=\"calculated_amount\">\n </div> \n \n </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"isFullyRefund\">\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of fees; let i = index\">\n <td class=\"govuk-table__cell\">\n <div class=\"govuk-checkboxes govuk-checkboxes--large\" data-module=\"govuk-checkboxes\">\n <div class=\"govuk-checkboxes__item\">\n <input \n class=\"govuk-checkboxes__input\" \n \n id=\"{{fee.id}}\" \n name=\"organisation\" \n type=\"checkbox\" \n value=\"{{fee.id}}\"\n disabled=\"disabled\"\n [checked]=\"true\" >\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"{{fee.id}}\">\n <span style=\"display:none\">Select</span>\n </label>\n </div>\n </div>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{fee.description}} </td>\n <td class=\"govuk-table__cell whitespace-inherit left\" >\n <div type=\"hidden\" style=\"display:none;background-color:white;\" id=\"feeVOl_{{fee.id}}\">{{ fee.calculated_amount / fee.volume }}</div>\n {{ fee.calculated_amount / fee.volume| currency:'GBP':'symbol-narrow':'1.2-2' }}\n </td>\n <td class=\"govuk-table__cell whitespace-inherit left\" >{{ payment.amount | currency:'GBP':'symbol-narrow':'1.2-2'}} </td>\n <td class=\"govuk-table__cell whitespace-inherit left\">\n <div >\n <input disabled=\"disabled\" class=\"govuk-input govuk-input--width-4 center\" id=\"feeVolumeUpdated_{{fee.id}}\" value=\"{{fee.volume}}\" name=\"feeVolumeUpdated_{{fee.id}}\" type=\"text\" >\n </div>\n </td>\n \n <td class=\"govuk-table__cell whitespace-inherit center\" scope=\"row\">\n \n <div class=\"hmcts-currency-input\">\n \n <div class=\"hmcts-currency-input__symbol\" aria-hidden=\"true\">\u00A3</div>\n <input disabled=\"disabled\" class=\"govuk-input govuk-input--width-10\" id=\"feeAmount_{{fee.id}}\" name=\"feeAmount_{{fee.id}}\" type=\"text\" aria-describedby=\"amount-currency \" value=\"{{ payment.amount | currency:'GBP':'symbol-narrow':'1.2-2'}}\" pattern=\"[0-9]*\" >\n </div> \n \n </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"fees?.length === 0\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No fees recorded</td>\n </tbody>\n </table>\n </div>\n <div class=\"govuk-button-group\">\n\n \n <a (click)=\"gotoServiceRequestPage($event)\" *ngIf=\"!isFullyRefund\" draggable=\"false\" class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\">\n Previous\n </a>\n <a (click)=\"goToPaymentViewComponent()\" *ngIf=\"isFullyRefund\" draggable=\"false\" class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\">\n Previous\n </a>\n \n <button [disabled] = \"noneSelected()\" (click)=\"gotoIssuePage(isFullyRefund)\" class=\"govuk-button\">\n Continue\n </button>\n \n </div>\n <p>\n <a (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">Cancel</a>\n </p>\n </form>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"viewCompStatus === 'issuerefundpage1' && isRefundRemission\">\n\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ISSUEREFUNDPAGE'> \n <h1 class=\"heading-large\">Process refund</h1>\n <h1 class=\"heading-medium\">Case reference: {{ccdCaseNumber | ccdHyphens }}</h1>\n <span id=\"how-contacted-conditional-hint govuk-font19px\" *ngIf=\"payment\" class=\"form-hint\">\n Payment reference: {{paymentReference}}\n </span>\n <span id=\"how-contacted-conditional-hint govuk-font19px\" *ngIf=\"refundPaymentReference\" class=\"form-hint\">\n Payment reference: {{refundPaymentReference}}\n </span>\n <h1 class=\"heading-large\">Why are you making this refund?\n </h1>\n \n\n <div class=\"govuk-form-group\">\n <form novalidate>\n <div class=\"govuk-form-group\">\n <form [formGroup]=\"remissionForm\" novalidate>\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"how-contacted-conditional-hint\">\n \n <div\n [ngClass]=\"refundHasError ? 'govuk-radios govuk-radios--conditional form-group-error' : 'govuk-radios govuk-radios--conditional'\"\n data-module=\"govuk-radios\" >\n <p class=\"inline-error-message\" *ngIf=\"refundHasError\">\n <span *ngIf=\"refundHasError\">Select a reason why you\u2019re making this refund</span>\n </p>\n\n \n\n <div class = \"container-fluid\">\n <div class=\"row\">\n <div class=\"govuk-radios__item col-md-4\" *ngFor=\"let refund of commonRefundReasons; let i = index;\">\n <!-- <div *ngIf = \"{{refund.name}} !== 'Retrospective remission'\"> -->\n <input class=\"govuk-radios__input\" id=\"{{refund.name}}\" name=\"refundReason\" type=\"radio\"\n formControlName=\"refundReason\" value={{refund.code}}\n (change)=\"selectRadioButton(refund.name, refund.name)\">\n <label class=\"govuk-label--s govuk-radios__label govuk-font__custom\" for=\"how-contacted-conditional\">\n {{refund.name}}\n </label>\n\n <div class=\"govuk-radios__conditional\" *ngIf=\"isRefundReasonsSelected && showReasonText && selectedRefundReason === refund.name \" >\n <label class=\"govuk-label govuk-label--m\" for=\"{{refund.name}}\">\n Enter reason\n </label>\n <div [ngClass]=\"{'form-group-error': isReasonEmpty}\">\n <p class=\"inline-error-message\" *ngIf=\"isReasonEmpty\">\n <span *ngIf=\"isReasonEmpty\">Enter a reason why you\u2019re making this refund</span>\n </p>\n \n <input class=\"govuk-input govuk-input--width-10\" [ngClass]=\"{'inline-error-class': isReasonEmpty}\" id=\"reason\" aria-label=\"reason\" name=\"reason\" type=\"text\" aria-describedby=\"reason\" maxlength=\"30\" formControlName=\"reason\">\n </div>\n </div>\n <!-- </div> -->\n </div>\n </div>\n </div>\n <br/>\n <div>\n <select formControlName=\"refundDDReason\" class=\"govuk-select\" id=\"sort\" (change)=\"selectchange($event)\">\n <option selected='selected' [defaultSelected]=true [value]=\"default\" >{{default}}</option> \n <!-- <option value=\"\" selected='selected'>Select a different reason</option> -->\n <option *ngFor=\"let refund of refundReasons;\" id=\"{{refund.name}}\" value=\"{{refund.code}}\">{{refund.name}}</option>\n </select>\n \n </div>\n <br/>\n <div class=\"govuk-radios__conditional\" *ngIf=\"showReasonText && !isRefundReasonsSelected\" >\n <div [ngClass]=\"{'form-group-error': isReasonEmpty}\">\n <label class=\"govuk-label govuk-label--m\" for=\"amount\">\n Enter reason\n </label>\n <p class=\"inline-error-message\" *ngIf=\"isReasonEmpty\">\n <span *ngIf=\"isReasonEmpty\">Enter a reason why you\u2019re making this refund</span>\n </p>\n <input class=\"govuk-input govuk-input--width-10\" [ngClass]=\"{'inline-error-class': isReasonEmpty}\" id=\"reason\" aria-label=\"reason\" name=\"reason\" type=\"text\" aria-describedby=\"reason\" maxlength=\"{{reasonLength}}\" formControlName=\"reason\">\n </div>\n </div>\n\n \n </div>\n </fieldset>\n </form>\n </div>\n </form>\n </div>\n <div class=\"govuk-button-group\">\n <button (click)=\"gotoPartialFeeRefundScreen()\" class=\"govuk-button govuk-button--secondary\"> Previous</button>\n <button (click)=\"gotoIssueRefundConfirmation(payment)\" class=\"govuk-button\"> Continue</button>\n </div>\n <p>\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n \n</ng-container>\n<ng-container *ngIf=\"viewStatus === 'contactDetailsPage'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='CAPTUREADDRESSDETAILSPAGE'> \n <h1 class=\"govuk-heading-l\">Process refund</h1>\n <h2 class=\"govuk-heading-m govuk-font19px\">Case reference: {{ccdCaseNumber | ccdHyphens }}</h2>\n <span id=\"how-contacted-conditional-hint\" class=\"govuk-hint govuk-font19px\">\n Payment reference: {{paymentReference}}\n </span>\n <ccpay-contact-details\n [addressObj] = notification\n (assignContactDetails)=\"getContactDetails($event, 'checkissuerefundpage')\"\n (redirectToIssueRefund)=\"gotoRefundReasonPage()\" ></ccpay-contact-details>\n <p>\n <a (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'checkissuerefundpage'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='CHECKISSUEREFUNDPAGE'> \n <div class=\"govuk-warning-text\">\n \n <h1 class=\"heading-large\"> Check your answers</h1>\n </div>\n <table class=\"govuk-table\">\n \n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\">{{paymentReference}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment amount</td>\n <td class=\"govuk-table__cell\">{{payment.amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr>\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Reason for refund</td>\n <td class=\"govuk-table__cell\"> {{ displayRefundReason }} \n <a (click)=\"changeIssueRefundReason()\" class=\"govuk-link right\" >Change</a>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"!isFullyRefund\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td class=\"govuk-table__cell\">{{totalRefundAmount | currency:'GBP':'symbol-narrow':'1.2-2'}}\n <a (click)=\"changeRefundAmount()\" class=\"govuk-link right\" >Change</a>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"isFullyRefund\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td class=\"govuk-table__cell\">{{payment.amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send to</td>\n <td class=\"govuk-table__cell\">{{orderParty}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send via</td>\n <td class=\"govuk-table__cell\">\n <div *ngIf=\"contactDetailsObj?.notification_type === 'EMAIL'\" class=\"contactDetails-width\">\n <strong>Email</strong>\n <br/>\n {{contactDetailsObj?.email}}\n </div>\n <div *ngIf=\"contactDetailsObj?.notification_type === 'LETTER'\" class=\"contactDetails-width\">\n <strong>Post</strong>\n <br/>\n {{contactDetailsObj?.address_line}}&nbsp;{{contactDetailsObj?.city}}&nbsp;{{contactDetailsObj?.county}}&nbsp;{{contactDetailsObj?.country}}&nbsp;{{contactDetailsObj?.postal_code}}\n </div>\n <a (click)=\"gotoContactDetailsPage(contactDetailsObj)\" class=\"govuk-link right margin-top--size\" >Change</a>\n </td>\n </tr>\n </table>\n <div class=\"govuk-button-group\">\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"gotoContactDetailsPage(contactDetailsObj)\"> Previous </button>\n <button type=\"submit\"\n [disabled]=\"isConfirmationBtnDisabled\"\n [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"confirmIssueRefund(isFullyRefund)\">\n Submit refund\n </button>\n </div>\n <p>\n <a (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n\n</ng-container>\n\n<!--Retro Refund-->\n<ng-container *ngIf=\"viewCompStatus === 'addrefundforremission'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ADDRESSDETAILSRETROREMISSIONPAGE'> \n <h1 class=\"govuk-heading-l\">Process refund</h1>\n <h2 class=\"govuk-heading-m govuk-font19px\">Case reference: {{ccdCaseNumber | ccdHyphens }}</h2>\n <span id=\"how-contacted-conditional-hint\" class=\"govuk-hint govuk-font19px\">\n Payment reference: {{paymentReference}}\n </span>\n<ccpay-contact-details \n[addressObj] = notification\n(assignContactDetails)=\"getContactDetails($event, 'addrefundcheckandanswer')\"\n(redirectToIssueRefund)=\"gotoServiceRequestPage($event)\" ></ccpay-contact-details>\n<p>\n <a (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n</p>\n</ng-container>\n<ng-container *ngIf=\"viewStatus === 'addrefundcheckandanswer'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ADDREFUNDFORREMISSION'> \n <div class=\"govuk-warning-text\">\n \n <h1 class=\"heading-large\"> Check your answers</h1>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Reason for refund</td>\n <td class=\"govuk-table__cell\"> Retrospective remission </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\">{{paymentReference}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td class=\"govuk-table__cell\">{{remission.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee code</td>\n <td class=\"govuk-table__cell\">{{remission.fee_code}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee amount</td>\n <td class=\"govuk-table__cell\">{{feeamount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send to</td>\n <td class=\"govuk-table__cell\">{{orderParty}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send via</td>\n <td class=\"govuk-table__cell\">\n <div *ngIf=\"contactDetailsObj?.notification_type === 'EMAIL'\" class=\"contactDetails-width\">\n <strong>Email</strong>\n <br/>\n {{contactDetailsObj?.email}}\n </div>\n <div *ngIf=\"contactDetailsObj?.notification_type === 'LETTER'\" class=\"contactDetails-width\">\n <strong>Post</strong>\n <br/>\n {{contactDetailsObj?.address_line}}&nbsp;{{contactDetailsObj?.city}}&nbsp;{{contactDetailsObj?.county}}&nbsp;{{contactDetailsObj?.country}}&nbsp;{{contactDetailsObj?.postal_code}}\n </div>\n <a (click)=\"gotoAddressPage(contactDetailsObj)\" class=\"govuk-link right margin-top--size\" >Change</a>\n </td>\n </table>\n <div class=\"govuk-button-group\">\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"gotoAddressPage(contactDetailsObj)\">Previous</button>\n <button type=\"submit\"\n [disabled]=\"isConfirmationBtnDisabled\"\n [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"processRefund()\">\n Submit refund\n </button>\n </div>\n <p>\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'retrorefundconfirmationpage'\">\n <div class=\"govuk-grid-row\">\n <div >\n <div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Refund submitted\n </h1>\n \n <div class=\"govuk-panel__body\">\n <p class=\"govuk-body white\"><strong>Refund reference: {{refundReference}}</strong></p>\n </div>\n \n </div>\n <div *ngIf=\"isPaymentSuccess\">\n <h2 class=\"govuk-heading-l\">What happens next</h2>\n <p class=\"govuk-body\">\n A refund request for {{ refundAmount| currency:'GBP':'symbol-narrow':'1.2-2'}} has been passed to a team leader to approve.\n </p>\n </div>\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link pointer\" data-module=\"govuk-button\">\n Return to case\n </a>\n </p>\n </div>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'order-full-view'\">\n <ccpay-service-request\n [viewStatus] = \"viewStatus\"\n [orderRef] = \"orderRef\"\n [isServiceRequest]=\"isServiceRequest\"\n [orderStatus] = \"orderStatus\"\n [orderCreated] = \"orderCreated\"\n [orderParty] = \"orderParty\"\n [orderCCDEvent] = \"orderCCDEvent\"\n [orderDetail] = \"orderDetail\"\n [LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n [takePayment] = \"takePayment\"\n [ccdCaseNumber] = \"ccdCaseNumber\"\n [orderFeesTotal] = \"orderFeesTotal\"\n [orderTotalPayments] = \"orderTotalPayments\"\n [orderRemissionTotal] = \"orderRemissionTotal\">\n</ccpay-service-request>\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'payment-view'\">\n <ccpay-payment-view \n [LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n [isTurnOff] = \"isTurnOff\" \n [isTakePayment] = \"takePayment\" \n [caseType] = \"caseType\"\n [isServiceRequest]=\"isServiceRequest\"\n [orderRef] = \"orderRef\"\n [orderStatus] = \"orderStatus\"\n [orderCreated] = \"orderCreated\"\n [orderParty] = \"orderParty\"\n [orderCCDEvent] = \"orderCCDEvent\"\n [orderDetail] = \"orderDetail\"\n [orderFeesTotal] = \"orderFeesTotal\"\n [orderTotalPayments] = \"orderTotalPayments\"\n [orderRemissionTotal] = \"orderRemissionTotal\"\n >\n</ccpay-payment-view>\n</ng-container>\n\n</div>",
7759
+ styles: [".add-remission .button{padding:.5em;font-size:19px;font-weight:200;margin:20px 2px}.add-remission td.govuk-table__cell{width:50%}.add-remission .govuk-button--secondary{background-color:#dee0e2;box-shadow:0 2px 0 #858688;color:#0b0c0c;margin-right:.5em}.add-remission .govuk-label--s,.add-remission .govuk-warning-text__text,.add-remission .hmcts-currency-input__symbol{font-size:19px;font-weight:400}.add-remission .inline-error-class{outline:#a71414 solid 3px;outline-offset:0;border-color:#a71414}.add-remission .inline-error-message{color:#a71414;border-color:#a71414;font-weight:700;margin-top:10px;font-size:20px}.add-remission .govuk-button,.add-remission .govuk-link{margin-right:1em;font-size:19px;font-weight:200}.add-remission .govuk-button-group{padding-top:2em}.add-remission .heading-medium{margin-top:.875em}.add-remission .heading-large{margin-top:.25em}.add-remission .govuk-panel--confirmation{color:#fff;background:#00703c}.add-remission .govuk-panel__title{font-size:5rem}.add-remission .govuk-body,.add-remission .govuk-body-m{font-size:2.1875rem}.add-remission .govuk-radios__item{clear:initial!important;display:inline-block;width:45%!important}.add-remission .govuk-radios__conditional{padding-top:12px!important}.add-remission .right{float:right;cursor:pointer}.add-remission .radio{float:right}.govuk-font19px,.govuk-input{font-size:19px}.govuk-select{font-size:19px;font-weight:400}.govuk-input--width-10{max-width:50ex}.govuk-label--m{font-size:19px;font-weight:400}.govuk-error-summary__body{font-size:19px!important}.govuk-error-summary__title{font-size:24px!important}.white{color:#fff}.pagesize{margin:2em;width:97%}.pointer{cursor:pointer}.col-18{min-width:18em}.col-6{min-width:6em}.col-8{min-width:8em}.col-1{min-width:1em}.col-25{width:25%!important}.col-24{width:24%!important}.left{text-align:left}.center{text-align:center}.col-60{width:60%;text-align:left}.margin-top--size{margin-top:-30px}.contactDetails-width{width:70%}.right{cursor:pointer}.form-hint{font-size:19px!important}.govuk-panel-border--confirmation{color:#0b0c0c;border:5px solid #00703c}"]
6691
7760
  }] }
6692
7761
  ];
6693
7762
  /** @nocollapse */
@@ -6702,6 +7771,7 @@ AddRemissionComponent.ctorParameters = () => [
6702
7771
  ];
6703
7772
  AddRemissionComponent.propDecorators = {
6704
7773
  fee: [{ type: Input }],
7774
+ fees: [{ type: Input }],
6705
7775
  payment: [{ type: Input }],
6706
7776
  remission: [{ type: Input }],
6707
7777
  ccdCaseNumber: [{ type: Input }],
@@ -6715,7 +7785,12 @@ AddRemissionComponent.propDecorators = {
6715
7785
  isFromRefundListPage: [{ type: Input }],
6716
7786
  isFromPaymentDetailPage: [{ type: Input }],
6717
7787
  isFromServiceRequestPage: [{ type: Input }],
7788
+ isFullyRefund: [{ type: Input, args: ['isFullyRefund',] }],
6718
7789
  feeamount: [{ type: Input }],
7790
+ refundPaymentReference: [{ type: Input }],
7791
+ isFromRefundStatusPage: [{ type: Input }],
7792
+ changeRefundReason: [{ type: Input }],
7793
+ isServiceRequest: [{ type: Input, args: ["isServiceRequest",] }],
6719
7794
  LOGGEDINUSERROLES: [{ type: Input, args: ['LOGGEDINUSERROLES',] }],
6720
7795
  orderDetail: [{ type: Input, args: ['orderDetail',] }],
6721
7796
  orderRef: [{ type: Input, args: ['orderRef',] }],
@@ -6729,7 +7804,8 @@ AddRemissionComponent.propDecorators = {
6729
7804
  orderRemissionTotal: [{ type: Input, args: ['orderRemissionTotal',] }],
6730
7805
  cancelRemission: [{ type: Output }],
6731
7806
  refundListReason: [{ type: Output }],
6732
- refundListAmount: [{ type: Output }]
7807
+ refundListAmount: [{ type: Output }],
7808
+ refundFees: [{ type: Output }]
6733
7809
  };
6734
7810
 
6735
7811
  /**
@@ -6874,6 +7950,11 @@ class XlFileService {
6874
7950
  worksheet = this.setProcessedUnallocatedReportHeaders(worksheet);
6875
7951
  worksheet = this.autoFitColumns(worksheet, json);
6876
7952
  }
7953
+ else if (excelFileName.match('Payment failure') !== null) {
7954
+ worksheet = utils.json_to_sheet(json, { header: ['payment_reference', 'ccd_reference', 'org_id', 'service_name', 'failure_reference', 'failure_reason', 'disputed_amount', 'event_name', 'event_date', 'representment_status', 'representment_date', 'refund_reference', 'refund_amount', 'refund_date'] });
7955
+ worksheet = this.setPaymentFailureReportHeaders(worksheet);
7956
+ worksheet = this.autoFitColumns(worksheet, json);
7957
+ }
6877
7958
  else {
6878
7959
  worksheet = utils.json_to_sheet(json, { header: ['resp_service_id', 'resp_service_name', 'surplus_shortfall', 'balance', 'payment_amount', 'ccd_case_reference', 'ccd_exception_reference', 'processed_date', 'reason', 'explanation', 'user_name'] });
6879
7960
  worksheet = this.setShortFallReportHeaders(worksheet);
@@ -6978,6 +8059,28 @@ class XlFileService {
6978
8059
  worksheet.N1.v = "Amount";
6979
8060
  return worksheet;
6980
8061
  }
8062
+ /**
8063
+ * @private
8064
+ * @param {?} worksheet
8065
+ * @return {?}
8066
+ */
8067
+ setPaymentFailureReportHeaders(worksheet) {
8068
+ worksheet.A1.v = "Payment reference";
8069
+ worksheet.B1.v = "CCD reference";
8070
+ worksheet.C1.v = "OrgID";
8071
+ worksheet.D1.v = "Service name";
8072
+ worksheet.E1.v = "Failure reference";
8073
+ worksheet.F1.v = "Failure reason";
8074
+ worksheet.G1.v = "Disputed amount";
8075
+ worksheet.H1.v = "Event name";
8076
+ worksheet.I1.v = "Event date";
8077
+ worksheet.J1.v = "Representment status";
8078
+ worksheet.K1.v = "Representment date";
8079
+ worksheet.L1.v = "Refund reference";
8080
+ worksheet.M1.v = "Refund amount";
8081
+ worksheet.N1.v = "Refund date";
8082
+ return worksheet;
8083
+ }
6981
8084
  /**
6982
8085
  * @private
6983
8086
  * @param {?} worksheet
@@ -7035,10 +8138,13 @@ class ReportsComponent {
7035
8138
  this.formBuilder = formBuilder;
7036
8139
  this.bulkScaningPaymentService = bulkScaningPaymentService;
7037
8140
  this.paymentViewService = paymentViewService;
8141
+ this.fmt = 'dd/MM/yyyy';
8142
+ this.loc = 'en-US';
7038
8143
  this.isDownLoadButtondisabled = false;
7039
8144
  this.isStartDateLesthanEndDate = false;
8145
+ this.isDateBetwnMonth = false;
7040
8146
  this.isDateRangeBetnWeek = false;
7041
- this.errorMessage = this.errorHandlerService.getServerErrorMessage(false);
8147
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');
7042
8148
  this.paymentGroups = [];
7043
8149
  }
7044
8150
  /**
@@ -7070,16 +8176,26 @@ class ReportsComponent {
7070
8176
  const selectedEndDate = this.tranformDate(this.reportsForm.get('endDate').value);
7071
8177
  /** @type {?} */
7072
8178
  const isDateRangeMoreThanWeek = ((/** @type {?} */ (new Date(selectedStartDate))) - (/** @type {?} */ (new Date(selectedEndDate)))) / (1000 * 3600 * -24) > 7;
8179
+ /** @type {?} */
8180
+ const isDateRangeMoreThanMonth = ((/** @type {?} */ (new Date(selectedStartDate))) - (/** @type {?} */ (new Date(selectedEndDate)))) / (1000 * 3600 * -24) > 30;
7073
8181
  if (new Date(selectedStartDate) > new Date(selectedEndDate) && selectedEndDate !== '') {
7074
8182
  this.reportsForm.get('startDate').setValue('');
7075
8183
  this.isDateRangeBetnWeek = false;
8184
+ this.isDateBetwnMonth = false;
7076
8185
  this.isStartDateLesthanEndDate = true;
7077
8186
  }
7078
8187
  else if (reportName && reportName === 'SURPLUS_AND_SHORTFALL' && isDateRangeMoreThanWeek) {
7079
8188
  this.isDateRangeBetnWeek = true;
8189
+ this.isDateBetwnMonth = false;
8190
+ this.isStartDateLesthanEndDate = false;
8191
+ }
8192
+ else if (reportName && reportName === 'PAYMENT_FAILURE_EVENT' && isDateRangeMoreThanMonth) {
8193
+ this.isDateRangeBetnWeek = false;
8194
+ this.isDateBetwnMonth = true;
7080
8195
  this.isStartDateLesthanEndDate = false;
7081
8196
  }
7082
8197
  else {
8198
+ this.isDateBetwnMonth = false;
7083
8199
  this.isDateRangeBetnWeek = false;
7084
8200
  this.isStartDateLesthanEndDate = false;
7085
8201
  }
@@ -7119,7 +8235,7 @@ class ReportsComponent {
7119
8235
  * @return {?}
7120
8236
  */
7121
8237
  response => {
7122
- this.errorMessage = this.errorHandlerService.getServerErrorMessage(false);
8238
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');
7123
8239
  /** @type {?} */
7124
8240
  const result = JSON.parse(response);
7125
8241
  /** @type {?} */
@@ -7160,15 +8276,49 @@ class ReportsComponent {
7160
8276
  */
7161
8277
  (error) => {
7162
8278
  this.isDownLoadButtondisabled = false;
7163
- this.errorMessage = this.errorHandlerService.getServerErrorMessage(true);
8279
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');
8280
+ }));
8281
+ }
8282
+ else if (selectedReportName === 'PAYMENT_FAILURE_EVENT') {
8283
+ this.paymentViewService.downloadFailureReport(selectedStartDate, selectedEndDate).subscribe((/**
8284
+ * @param {?} response
8285
+ * @return {?}
8286
+ */
8287
+ response => {
8288
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');
8289
+ /** @type {?} */
8290
+ const result = { data: JSON.parse(response)['payment_failure_report_list'] };
8291
+ /** @type {?} */
8292
+ let res = { data: this.applyDateFormat(result) };
8293
+ if (result['data'].length > 0) {
8294
+ for (var i = 0; i < res['data'].length; i++) {
8295
+ if (res['data'][i]["disputed_amount"] !== undefined) {
8296
+ res['data'][i]['disputed_amount'] = this.convertToFloatValue(res['data'][i]["disputed_amount"]);
8297
+ }
8298
+ if (res['data'][i]["representment_status"] !== undefined) {
8299
+ res['data'][i]['representment_status'] = res['data'][i]["representment_status"].toLowerCase() === 'yes' ? 'Success' : 'Failure';
8300
+ }
8301
+ }
8302
+ }
8303
+ this.isDownLoadButtondisabled = false;
8304
+ this.xlFileService.exportAsExcelFile(res['data'], this.getFileName(this.reportsForm.get('selectedreport').value, selectedStartDate, selectedEndDate));
8305
+ }), (/**
8306
+ * @param {?} error
8307
+ * @return {?}
8308
+ */
8309
+ (error) => {
8310
+ this.isDownLoadButtondisabled = false;
8311
+ /** @type {?} */
8312
+ const errorContent = error.replace(/[^a-zA-Z ]/g, '').trim();
8313
+ /** @type {?} */
8314
+ const statusCode = error.replace(/[^a-zA-Z0-9 ]/g, '').trim().split(' ')[0];
8315
+ if (statusCode === '404') {
8316
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, true, errorContent);
8317
+ }
8318
+ else {
8319
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');
8320
+ }
7164
8321
  }));
7165
- // }else if(selectedReportName === 'PAYMENT_FAILURE_EVENT') {
7166
- // this.paymentViewService.downloadFailureReport(selectedStartDate,selectedEndDate).subscribe(
7167
- // response => {
7168
- // },
7169
- // (error: any) => {
7170
- // })
7171
- // }
7172
8322
  }
7173
8323
  else {
7174
8324
  this.bulkScaningPaymentService.downloadSelectedReport(selectedReportName, selectedStartDate, selectedEndDate).subscribe((/**
@@ -7176,7 +8326,7 @@ class ReportsComponent {
7176
8326
  * @return {?}
7177
8327
  */
7178
8328
  response => {
7179
- this.errorMessage = this.errorHandlerService.getServerErrorMessage(false);
8329
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');
7180
8330
  /** @type {?} */
7181
8331
  const result = JSON.parse(response);
7182
8332
  /** @type {?} */
@@ -7206,7 +8356,7 @@ class ReportsComponent {
7206
8356
  */
7207
8357
  (error) => {
7208
8358
  this.isDownLoadButtondisabled = false;
7209
- this.errorMessage = this.errorHandlerService.getServerErrorMessage(true);
8359
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');
7210
8360
  }));
7211
8361
  }
7212
8362
  }
@@ -7294,21 +8444,46 @@ class ReportsComponent {
7294
8444
  * @return {?}
7295
8445
  */
7296
8446
  applyDateFormat(res) {
7297
- /** @type {?} */
7298
- const fmt = 'dd/MM/yyyy';
7299
- /** @type {?} */
7300
- const loc = 'en-US';
7301
8447
  return res['data'].map((/**
7302
8448
  * @param {?} value
7303
8449
  * @return {?}
7304
8450
  */
7305
8451
  value => {
7306
8452
  if (value['date_banked']) {
7307
- value['date_banked'] = formatDate(value['date_banked'], fmt, loc);
8453
+ value['date_banked'] = formatDate(value['date_banked'], this.fmt, this.loc);
8454
+ }
8455
+ if (value['event_date'] && value['event_date'].indexOf(',') === -1) {
8456
+ value['event_date'] = formatDate(value['event_date'], this.fmt, this.loc);
8457
+ }
8458
+ else if (value['event_date'] && value['event_date'].indexOf(',') !== -1) {
8459
+ value['event_date'] = this.multiDateFormater(value['event_date']);
8460
+ }
8461
+ if (value['representment_date'] && value['representment_date'].indexOf(',') === -1) {
8462
+ value['representment_date'] = formatDate(value['representment_date'], this.fmt, this.loc);
8463
+ }
8464
+ else if (value['representment_date'] && value['representment_date'].indexOf(',') !== -1) {
8465
+ value['representment_date'] = this.multiDateFormater(value['representment_date']);
8466
+ }
8467
+ if (value['refund_date'] && value['refund_date'].indexOf(',') === -1) {
8468
+ value['refund_date'] = formatDate(value['refund_date'], this.fmt, this.loc);
8469
+ }
8470
+ else if (value['refund_date'] && value['refund_date'].indexOf(',') !== -1) {
8471
+ value['refund_date'] = this.multiDateFormater(value['refund_date']);
7308
8472
  }
7309
8473
  return value;
7310
8474
  }));
7311
8475
  }
8476
+ /**
8477
+ * @param {?} dateStr
8478
+ * @return {?}
8479
+ */
8480
+ multiDateFormater(dateStr) {
8481
+ return dateStr.split(',').map((/**
8482
+ * @param {?} date
8483
+ * @return {?}
8484
+ */
8485
+ (date) => formatDate(date, this.fmt, this.loc))).join(',');
8486
+ }
7312
8487
  /**
7313
8488
  * @param {?} amt
7314
8489
  * @return {?}
@@ -7320,7 +8495,7 @@ class ReportsComponent {
7320
8495
  ReportsComponent.decorators = [
7321
8496
  { type: Component, args: [{
7322
8497
  selector: 'ccpay-reports',
7323
- template: "<div class=\"header\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='REPORTS'>\n <ccpay-error-banner *ngIf=\"errorMessage.showError\" [errorMessage]=\"errorMessage\"></ccpay-error-banner>\n <legend class=\"govuk-fieldset__legend--xl\">\n <h1 class=\"govuk-fieldset__heading\"> Choose the report type and date range</h1>\n </legend>\n</div>\n<form [formGroup]=\"reportsForm\">\n <div class=\"govuk-form-group\">\n <div class=\"govuk-radios govuk-radios--conditional\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input \n required\n id=\"DataLoss\"\n class=\"govuk-radios__input\"\n formControlName=\"selectedreport\"\n (click)=\"validateDates('DATA_LOSS')\"\n name=\"selectedreport\"\n type=\"radio\"\n value=\"DATA_LOSS\" \n data-aria-controls=\"DataLoss\"/>\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"DataLoss\">Data loss</label>\n <span class=\"form-hint\">Missing transactions where data has been received from only either of Exela or Bulk scan</span>\n </div>\n\n <div class=\"govuk-radios__item\">\n <input \n id=\"UnprocessedTransactions\"\n class=\"govuk-radios__input\"\n formControlName=\"selectedreport\"\n (click)=\"validateDates('UNPROCESSED')\"\n name=\"selectedreport\"\n type=\"radio\"\n value=\"UNPROCESSED\" \n data-aria-controls=\"UnprocessedTransactions\"/>\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"UnprocessedTransactions\">Unprocessed transactions</label>\n <span class=\"form-hint\">Transaction records that are still unprocessed by staff.</span>\n </div>\n\n <div class=\"govuk-radios__item\">\n <input \n id=\"ProcessedUnallocated\"\n class=\"govuk-radios__input\"\n formControlName=\"selectedreport\"\n name=\"selectedreport\"\n (click)=\"validateDates('PROCESSED_UNALLOCATED')\"\n type=\"radio\"\n value=\"PROCESSED_UNALLOCATED\" \n data-aria-controls=\"ProcessedUnallocated\"/>\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"ProcessedUnallocated\">Processed unallocated</label>\n <span class=\"form-hint\">Payments that are marked as \u2018Unidentified\u2019 or \u2018Transferred\u2019 (Unsolicited requests)</span>\n </div>\n\n <div class=\"govuk-radios__item\">\n <input \n id=\"ShortfallsandSurplus\"\n class=\"govuk-radios__input\"\n formControlName=\"selectedreport\"\n name=\"selectedreport\"\n (click)=\"validateDates('SURPLUS_AND_SHORTFALL')\"\n type=\"radio\"\n value=\"SURPLUS_AND_SHORTFALL\" \n data-aria-controls=\"ShortfallsandSurplus\"/>\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"ShortfallsandSurplus\">Under payment and Over payment</label>\n <span class=\"form-hint\">Requests where balances are marked as Under payment/Over payment further case management.\n E.g: Refund approval, Customer contact</span>\n </div>\n <!-- <div class=\"govuk-radios__item\">\n <input \n id=\"PaymentFailureEvent\"\n class=\"govuk-radios__input\"\n formControlName=\"selectedreport\"\n name=\"selectedreport\"\n (click)=\"validateDates('PAYMENT_FAILURE_EVENT')\"\n type=\"radio\"\n value=\"PAYMENT_FAILURE_EVENT\" \n data-aria-controls=\"PaymentFailureEvent\"/>\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"PaymentFailureEvent\">Payment failure event</label>\n <span class=\"form-hint\">Failed payment transaction details</span>\n </div> -->\n </div>\n </div>\n <div class=\"govuk-form-group\">\n <div class=\"datefrom\">\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"date-from\">Date from</label>\n <input (change)=\"getSelectedFromDate()\" [max]=\"getToday()\" class=\"form-control\" id=\"date-from\" name=\"date-from\" type=\"date\" formControlName=\"startDate\" required/>\n </div>\n\n <div class=\"dateto\">\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"date-to\">Date to</label>\n <input (change)=\"getSelectedFromDate()\" [max]=\"getToday()\" class=\"form-control\" id=\"date-to\" name=\"search\" type=\"date\" formControlName=\"endDate\" required/>\n </div>\n </div>\n <p class=\"inline-error-message\" *ngIf=\"isStartDateLesthanEndDate || isDateRangeBetnWeek\">\n <span *ngIf=\"isStartDateLesthanEndDate\">Please select 'Date From' less than or equal to 'Date To'</span>\n <span *ngIf=\"isDateRangeBetnWeek\"> Please select the date range between 7 days</span>\n </p>\n <div class=\"btnsubmit\">\n <button type=\"submit\" (click)=\"downloadReport()\" class=\"button\" [disabled]=\"!reportsForm.valid || isDownLoadButtondisabled || isStartDateLesthanEndDate || isDateRangeBetnWeek\">Download report</button>\n </div>\n </form>\n \n",
8498
+ template: "<div class=\"header\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='REPORTS'>\n <ccpay-error-banner *ngIf=\"errorMessage.showError\" [errorMessage]=\"errorMessage\"></ccpay-error-banner>\n <legend class=\"govuk-fieldset__legend--xl\">\n <h1 class=\"govuk-fieldset__heading\"> Choose the report type and date range</h1>\n </legend>\n</div>\n<form [formGroup]=\"reportsForm\">\n <div class=\"govuk-form-group\">\n <div class=\"govuk-radios govuk-radios--conditional\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input \n required\n id=\"DataLoss\"\n class=\"govuk-radios__input\"\n formControlName=\"selectedreport\"\n (click)=\"validateDates('DATA_LOSS')\"\n name=\"selectedreport\"\n type=\"radio\"\n value=\"DATA_LOSS\" \n data-aria-controls=\"DataLoss\"/>\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"DataLoss\">Data loss</label>\n <span class=\"form-hint\">Missing transactions where data has been received from only either of Exela or Bulk scan</span>\n </div>\n\n <div class=\"govuk-radios__item\">\n <input \n id=\"UnprocessedTransactions\"\n class=\"govuk-radios__input\"\n formControlName=\"selectedreport\"\n (click)=\"validateDates('UNPROCESSED')\"\n name=\"selectedreport\"\n type=\"radio\"\n value=\"UNPROCESSED\" \n data-aria-controls=\"UnprocessedTransactions\"/>\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"UnprocessedTransactions\">Unprocessed transactions</label>\n <span class=\"form-hint\">Transaction records that are still unprocessed by staff.</span>\n </div>\n\n <div class=\"govuk-radios__item\">\n <input \n id=\"ProcessedUnallocated\"\n class=\"govuk-radios__input\"\n formControlName=\"selectedreport\"\n name=\"selectedreport\"\n (click)=\"validateDates('PROCESSED_UNALLOCATED')\"\n type=\"radio\"\n value=\"PROCESSED_UNALLOCATED\" \n data-aria-controls=\"ProcessedUnallocated\"/>\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"ProcessedUnallocated\">Processed unallocated</label>\n <span class=\"form-hint\">Payments that are marked as \u2018Unidentified\u2019 or \u2018Transferred\u2019 (Unsolicited requests)</span>\n </div>\n\n <div class=\"govuk-radios__item\">\n <input \n id=\"ShortfallsandSurplus\"\n class=\"govuk-radios__input\"\n formControlName=\"selectedreport\"\n name=\"selectedreport\"\n (click)=\"validateDates('SURPLUS_AND_SHORTFALL')\"\n type=\"radio\"\n value=\"SURPLUS_AND_SHORTFALL\" \n data-aria-controls=\"ShortfallsandSurplus\"/>\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"ShortfallsandSurplus\">Under payment and Over payment</label>\n <span class=\"form-hint\">Requests where balances are marked as Under payment/Over payment further case management.\n E.g: Refund approval, Customer contact</span>\n </div>\n <div class=\"govuk-radios__item\" *ngIf=\"ISPAYMENTSTATUSENABLED\">\n <input \n id=\"PaymentFailureEvent\"\n class=\"govuk-radios__input\"\n formControlName=\"selectedreport\"\n name=\"selectedreport\"\n (click)=\"validateDates('PAYMENT_FAILURE_EVENT')\"\n type=\"radio\"\n value=\"PAYMENT_FAILURE_EVENT\" \n data-aria-controls=\"PaymentFailureEvent\"/>\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"PaymentFailureEvent\">Payment failure event</label>\n <span class=\"form-hint\">Failed payment transaction details</span>\n </div>\n </div>\n </div>\n <div class=\"govuk-form-group\">\n <div class=\"datefrom\">\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"date-from\">Date from</label>\n <input (change)=\"getSelectedFromDate()\" [max]=\"getToday()\" class=\"form-control\" id=\"date-from\" name=\"date-from\" type=\"date\" formControlName=\"startDate\" required/>\n </div>\n\n <div class=\"dateto\">\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"date-to\">Date to</label>\n <input (change)=\"getSelectedFromDate()\" [max]=\"getToday()\" class=\"form-control\" id=\"date-to\" name=\"search\" type=\"date\" formControlName=\"endDate\" required/>\n </div>\n </div>\n <p class=\"inline-error-message\" *ngIf=\"isStartDateLesthanEndDate || isDateRangeBetnWeek || isDateBetwnMonth\">\n <span *ngIf=\"isStartDateLesthanEndDate\">Please select 'Date From' less than or equal to 'Date To'</span>\n <span *ngIf=\"isDateRangeBetnWeek\"> Please select the date range between 7 days</span>\n <span *ngIf=\"isDateBetwnMonth\"> Please select the date range between 30 days</span>\n </p>\n <div class=\"btnsubmit\">\n <button type=\"submit\" (click)=\"downloadReport()\" class=\"button\" [disabled]=\"!reportsForm.valid || isDownLoadButtondisabled || isStartDateLesthanEndDate || isDateRangeBetnWeek\">Download report</button>\n </div>\n </form>\n \n",
7324
8499
  styles: [".govuk-radios__input:focus+.govuk-radios__label::before{border-width:4px;box-shadow:0 0 0 4px #ffaf00}.datefrom{width:50%;float:left}.dateto{width:50%;float:right}.govuk-label--m{font-size:large}.form-hint{padding-left:.7em}.header{margin-top:10px;margin-bottom:15px}.btnsubmit{margin-bottom:30px}.inline-error-message{color:#a71414;font-weight:700;margin-top:10px}"]
7325
8500
  }] }
7326
8501
  ];
@@ -7332,6 +8507,9 @@ ReportsComponent.ctorParameters = () => [
7332
8507
  { type: BulkScaningPaymentService },
7333
8508
  { type: PaymentViewService }
7334
8509
  ];
8510
+ ReportsComponent.propDecorators = {
8511
+ ISPAYMENTSTATUSENABLED: [{ type: Input }]
8512
+ };
7335
8513
 
7336
8514
  /**
7337
8515
  * @fileoverview added by tsickle
@@ -7376,13 +8554,26 @@ class TableComponent {
7376
8554
  */
7377
8555
  (r, { user_full_name }) => (r[user_full_name] = '', r)), {});
7378
8556
  this.userLst = Object.keys(this.userLst);
8557
+ this.userLst.sort((/**
8558
+ * @param {?} a
8559
+ * @param {?} b
8560
+ * @return {?}
8561
+ */
8562
+ (a, b) => a.toString().localeCompare(b)));
8563
+ this.serviceLst = this.refundList.reduce((/**
8564
+ * @param {?} r
8565
+ * @param {?} __1
8566
+ * @return {?}
8567
+ */
8568
+ (r, { service_type }) => (r[service_type] = '', r)), {});
8569
+ this.serviceLst = Object.keys(this.serviceLst);
8570
+ this.serviceLst.sort((/**
8571
+ * @param {?} a
8572
+ * @param {?} b
8573
+ * @return {?}
8574
+ */
8575
+ (a, b) => a.toString().localeCompare(b)));
7379
8576
  }
7380
- this.userLst.sort((/**
7381
- * @param {?} a
7382
- * @param {?} b
7383
- * @return {?}
7384
- */
7385
- (a, b) => a.toString().localeCompare(b)));
7386
8577
  }
7387
8578
  /**
7388
8579
  * Set the paginator and sort after the view init since this component will
@@ -7451,8 +8642,8 @@ class TableComponent {
7451
8642
  TableComponent.decorators = [
7452
8643
  { type: Component, args: [{
7453
8644
  selector: 'ccpay-table',
7454
- template: "<div class=\"add-remission\">\n <div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Error in processing the request\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n </div>\n\n<div *ngIf=\"dataSource.data.length > 0\" class=\"govuk-form-group\" style=\"float: right\">\n <label class=\"govuk-label dropdpwn\" for=\"sort\" >\n Filter by caseworker:\n </label>\n <select class=\"govuk-select\" id=\"sort\" name=\"sort\" (change)=\"selectchange($event)\">\n <option value=\"\" selected='selected'>All caseworkers</option>\n <option *ngFor=\"let name of userLst;\" value=\"{{name}}\">{{name}}</option>\n </select>\n </div>\n \n<div *ngIf=\"dataSource.data.length > 0\" class=\"example-container\">\n\n <mat-table [dataSource]=\"dataSource\" matSort>\n\n <ng-container matColumnDef=\"ccd_case_number\">\n <mat-header-cell *matHeaderCellDef >Case reference </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" class=\"whitespace-inherit\"> {{row.ccd_case_number | ccdHyphens }} </mat-cell>\n </ng-container>\n\n <ng-container matColumnDef=\"refund_reference\">\n <mat-header-cell *matHeaderCellDef > Refund reference </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" class=\"whitespace-inherit\"> {{row.refund_reference}} </mat-cell>\n </ng-container>\n\n <ng-container matColumnDef=\"user_full_name\">\n <mat-header-cell *matHeaderCellDef > Submitted by </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [style.color]=\"row.color\" class=\"whitespace-inherit\"> {{row.user_full_name }} </mat-cell>\n </ng-container>\n\n <ng-container matColumnDef=\"date_created\">\n <mat-header-cell *matHeaderCellDef mat-sort-header> Date created </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" class=\"whitespace-inherit\"> {{row.date_created | date:'d MMMM yyyy'}} </mat-cell>\n </ng-container>\n\n <ng-container matColumnDef=\"date_updated\">\n <mat-header-cell *matHeaderCellDef mat-sort-header> Last updated</mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [style.color]=\"row.color\" class=\"whitespace-inherit\"> {{row.date_updated | date:'d MMMM yyyy'}} </mat-cell>\n </ng-container>\n\n <ng-container *ngIf=\"isApprovalFlow\" matColumnDef=\"Action\">\n <mat-header-cell *matHeaderCellDef> Action </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [style.color]=\"row.color\" > <a href=\"javascript:void(0)\" (click)=\"goToCaseReview(row.ccd_case_number, row)\">Review case</a>&nbsp;<a href=\"javascript:void(0)\" (click)=\"goToRefundProcessComponent(row.refund_reference, row)\">Process refund</a></mat-cell>\n </ng-container>\n \n <ng-container *ngIf=\"!isApprovalFlow\" matColumnDef=\"Action\">\n <mat-header-cell *matHeaderCellDef > Action </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [style.color]=\"row.color\"> <a href=\"javascript:void(0)\" (click)=\"goToRefundViewComponent(row.refund_reference, row)\">Review refund</a></mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns;\">\n </mat-row>\n </mat-table>\n <mat-paginator [pageSizeOptions]=\"[5, 10, 25, 100]\"></mat-paginator>\n</div>\n\n<div class=\"govuk-label dropdpwn\" *ngIf=\"dataSource.data.length === 0\">No records to display</div>\n",
7455
- styles: [".mat-header-row{min-height:27px}.mat-cell{padding:0 10px 0 0;text-align:left;word-wrap:break-word;white-space:inherit!important;font-size:19px;line-height:25px;font-family:nta,Arial,sans-serif;font-weight:400}.mat-table{color:#0b0c0c;display:table;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;margin-bottom:1px;box-sizing:border-box;text-indent:initial;border-spacing:0;border-collapse:collapse;font-size:1.1875rem;line-height:1.31578947;table-layout:fixed;width:102%}.mat-header-cell{text-align:left;font-weight:700;padding:10px 10px 10px 0;word-wrap:break-word;font-size:19px;line-height:25px;color:#0b0c0c;cursor:pointer;font-family:inherit}.dropdpwn{display:inline-block;margin-right:10px;font-size:19px}.mat-column-ccdCaseNumber{flex:3em}.mat-column-refundReference{flex:6em}.mat-column-reason{flex:2em}.govuk-select{font-size:19px;font-weight:400}.govuk-error-summary__title{font-size:24px!important}"]
8645
+ template: "<div class=\"add-remission\">\n <div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Error in processing the request\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n </div>\n\n \n\n<div *ngIf=\"dataSource.data.length > 0\" class=\"govuk-form-group float-right\">\n <label class=\"govuk-label dropdpwn\" for=\"sort\" >\n Filter by caseworker:\n </label>\n <select class=\"govuk-select\" id=\"sort\" name=\"sort\" (change)=\"selectchange($event)\">\n <option value=\"\" selected='selected'>All caseworkers</option>\n <option *ngFor=\"let name of userLst;\" value=\"{{name}}\">{{name}}</option>\n </select>\n</div>\n\n <div *ngIf=\"dataSource.data.length > 0\" class=\"govuk-form-group float-right-padding\">\n <label class=\"govuk-label dropdpwn\" for=\"sort\" >\n Filter by service:\n </label>\n <select class=\"govuk-select\" id=\"sort\" name=\"sort\" (change)=\"selectchange($event)\">\n <option value=\"\" selected='selected'>All services</option>\n <option *ngFor=\"let name of serviceLst;\" value=\"{{name}}\">{{name}}</option>\n </select>\n </div>\n\n <div *ngIf=\"dataSource.data.length > 0\" class=\"govuk-form-group float-left-padding\">\n <label class=\"govuk-label dropdpwn\" for=\"sort\" >\n Filter by service:\n </label>\n <select class=\"govuk-select\" id=\"sort\" name=\"sort\" (change)=\"selectchange($event)\">\n <option value=\"\" selected='selected'>All services</option>\n <option *ngFor=\"let name of serviceLst;\" value=\"{{name}}\">{{name}}</option>\n </select>\n </div>\n \n<div *ngIf=\"dataSource.data.length > 0\" class=\"example-container\">\n\n <mat-table [dataSource]=\"dataSource\" matSort>\n\n <ng-container matColumnDef=\"ccd_case_number\">\n <mat-header-cell *matHeaderCellDef >Case reference </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" class=\"whitespace-inherit\"> {{row.ccd_case_number | ccdHyphens }} </mat-cell>\n </ng-container>\n\n <ng-container matColumnDef=\"refund_reference\">\n <mat-header-cell *matHeaderCellDef > Refund reference </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" class=\"whitespace-inherit\"> {{row.refund_reference}} </mat-cell>\n </ng-container>\n\n <ng-container matColumnDef=\"user_full_name\">\n <mat-header-cell *matHeaderCellDef > Submitted by </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [style.color]=\"row.color\" class=\"whitespace-inherit\"> {{row.user_full_name }} </mat-cell>\n </ng-container>\n\n <ng-container matColumnDef=\"date_created\">\n <mat-header-cell *matHeaderCellDef mat-sort-header> Date created </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" class=\"whitespace-inherit\"> {{row.date_created | date:'d MMMM yyyy'}} </mat-cell>\n </ng-container>\n\n <ng-container matColumnDef=\"date_updated\">\n <mat-header-cell *matHeaderCellDef mat-sort-header> Last updated</mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [style.color]=\"row.color\" class=\"whitespace-inherit\"> {{row.date_updated | date:'d MMMM yyyy'}} </mat-cell>\n </ng-container>\n\n <ng-container *ngIf=\"isApprovalFlow\" matColumnDef=\"Action\">\n <mat-header-cell *matHeaderCellDef> Action </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [style.color]=\"row.color\" > <a href=\"javascript:void(0)\" (click)=\"goToCaseReview(row.ccd_case_number, row)\">Review case</a>&nbsp;<a href=\"javascript:void(0)\" (click)=\"goToRefundProcessComponent(row.refund_reference, row)\">Process refund</a></mat-cell>\n </ng-container>\n \n <ng-container *ngIf=\"!isApprovalFlow\" matColumnDef=\"Action\">\n <mat-header-cell *matHeaderCellDef > Action </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [style.color]=\"row.color\"> <a href=\"javascript:void(0)\" (click)=\"goToRefundViewComponent(row.refund_reference, row)\">Review refund</a></mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns;\">\n </mat-row>\n </mat-table>\n <mat-paginator [pageSizeOptions]=\"[5, 10, 25, 100]\"></mat-paginator>\n</div>\n\n<div class=\"govuk-label dropdpwn\" *ngIf=\"dataSource.data.length === 0\">No records to display</div>\n",
8646
+ styles: [".mat-header-row{min-height:27px}.mat-cell{padding:0 10px 0 0;text-align:left;word-wrap:break-word;white-space:inherit!important;font-size:19px;line-height:25px;font-family:nta,Arial,sans-serif;font-weight:400}.mat-table{color:#0b0c0c;display:table;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;margin-bottom:1px;box-sizing:border-box;text-indent:initial;border-spacing:0;border-collapse:collapse;font-size:1.1875rem;line-height:1.31578947;table-layout:fixed;width:102%}.mat-header-cell{text-align:left;font-weight:700;padding:10px 10px 10px 0;word-wrap:break-word;font-size:19px;line-height:25px;color:#0b0c0c;cursor:pointer;font-family:inherit}.dropdpwn{display:inline-block;margin-right:10px;font-size:19px}.mat-column-ccdCaseNumber{flex:3em}.mat-column-refundReference{flex:6em}.mat-column-reason{flex:2em}.govuk-select{font-size:19px;font-weight:400}.govuk-error-summary__title{font-size:24px!important}.float-right{float:right}.float-right-padding{float:right;padding-right:2em}.float-left-padding{padding-left:12em}"]
7456
8647
  }] }
7457
8648
  ];
7458
8649
  /** @nocollapse */
@@ -7471,6 +8662,25 @@ TableComponent.propDecorators = {
7471
8662
  sort: [{ type: ViewChild, args: [MatSort,] }]
7472
8663
  };
7473
8664
 
8665
+ /**
8666
+ * @fileoverview added by tsickle
8667
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
8668
+ */
8669
+ class IPutNotificationRequest {
8670
+ /**
8671
+ * @param {?} contactDetails
8672
+ * @param {?} notificationType
8673
+ */
8674
+ constructor(contactDetails, notificationType) {
8675
+ if (notificationType === 'EMAIL') {
8676
+ this.recipient_email_address = contactDetails;
8677
+ }
8678
+ else if (notificationType === 'LETTER') {
8679
+ this.recipient_postal_address = contactDetails;
8680
+ }
8681
+ }
8682
+ }
8683
+
7474
8684
  /**
7475
8685
  * @fileoverview added by tsickle
7476
8686
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -7479,10 +8689,14 @@ class IResubmitRefundRequest {
7479
8689
  /**
7480
8690
  * @param {?} refund_reason
7481
8691
  * @param {?} amount
8692
+ * @param {?} contact_details
8693
+ * @param {?} refund_fees
7482
8694
  */
7483
- constructor(refund_reason, amount) {
8695
+ constructor(refund_reason, amount, contact_details, refund_fees) {
7484
8696
  this.refund_reason = refund_reason;
7485
8697
  this.amount = amount;
8698
+ this.contact_details = contact_details;
8699
+ this.refund_fees = refund_fees;
7486
8700
  }
7487
8701
  }
7488
8702
 
@@ -7494,24 +8708,22 @@ class RefundStatusComponent {
7494
8708
  /**
7495
8709
  * @param {?} formBuilder
7496
8710
  * @param {?} refundService
8711
+ * @param {?} notificationService
7497
8712
  * @param {?} paymentLibComponent
7498
- * @param {?} paymentViewService
7499
- * @param {?} router
7500
8713
  * @param {?} OrderslistService
8714
+ * @param {?} paymentViewService
7501
8715
  */
7502
- constructor(formBuilder, refundService, paymentLibComponent, paymentViewService, router, OrderslistService$$1) {
8716
+ constructor(formBuilder, refundService, notificationService, paymentLibComponent, OrderslistService$$1, paymentViewService) {
7503
8717
  this.formBuilder = formBuilder;
7504
8718
  this.refundService = refundService;
8719
+ this.notificationService = notificationService;
7505
8720
  this.paymentLibComponent = paymentLibComponent;
7506
- this.paymentViewService = paymentViewService;
7507
- this.router = router;
7508
8721
  this.OrderslistService = OrderslistService$$1;
8722
+ this.paymentViewService = paymentViewService;
7509
8723
  this.LOGGEDINUSERROLES = [];
7510
8724
  this.rejectedRefundList = [];
7511
8725
  this.approvalStatus = 'Sent for approval';
7512
8726
  this.rejectStatus = 'Update required';
7513
- // approvalStatus = 'sent for approval';
7514
- // rejectStatus = 'sent back';
7515
8727
  this.errorMessage = null;
7516
8728
  this.refundButtonState = '';
7517
8729
  this.isAmountEmpty = false;
@@ -7520,9 +8732,13 @@ class RefundStatusComponent {
7520
8732
  this.isRemissionLessThanFeeError = false;
7521
8733
  this.refundHasError = false;
7522
8734
  this.refundReasons = [];
8735
+ this.isResendOperationSuccess = false;
8736
+ this.isEditDetailsClicked = false;
8737
+ this.isEditAddressDeatilsClicked = false;
7523
8738
  this.isRefundBtnDisabled = true;
7524
8739
  this.isLastUpdatedByCurrentUser = true;
7525
8740
  this.isProcessRefund = false;
8741
+ this.allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];
7526
8742
  this.isFromPayBubble = (/**
7527
8743
  * @return {?}
7528
8744
  */
@@ -7534,13 +8750,9 @@ class RefundStatusComponent {
7534
8750
  * @return {?}
7535
8751
  */
7536
8752
  ngOnInit() {
7537
- // if (this.check4AllowedRoles2AccessRefund()) {
7538
8753
  this.resetRemissionForm([false, false, false, false], 'All');
7539
8754
  this.bsPaymentDcnNumber = this.paymentLibComponent.bspaymentdcn;
7540
8755
  this.isCallFromRefundList = this.paymentLibComponent.isCallFromRefundList;
7541
- // if(this.paymentLibComponent.isFromRefundStatusPage) {
7542
- // this.viewName = 'reviewandsubmitview';
7543
- // }
7544
8756
  if (this.paymentLibComponent.isRefundStatusView) {
7545
8757
  this.viewName = 'refundview';
7546
8758
  this.OrderslistService.getRefundView().subscribe((/**
@@ -7585,6 +8797,7 @@ class RefundStatusComponent {
7585
8797
  reason: new FormControl()
7586
8798
  });
7587
8799
  if (this.refundlist !== undefined) {
8800
+ this.getRefundsNotification();
7588
8801
  this.getRefundsStatusHistoryList();
7589
8802
  if (this.LOGGEDINUSERROLES.some((/**
7590
8803
  * @param {?} i
@@ -7604,7 +8817,6 @@ class RefundStatusComponent {
7604
8817
  this.refundButtonState = this.refundlist.refund_status.name;
7605
8818
  }
7606
8819
  }
7607
- //}
7608
8820
  }
7609
8821
  /**
7610
8822
  * @return {?}
@@ -7629,13 +8841,32 @@ class RefundStatusComponent {
7629
8841
  }
7630
8842
  }
7631
8843
  /**
7632
- * @param {?} refundlist
7633
- * @param {?} navigationpage
7634
8844
  * @return {?}
7635
8845
  */
7636
- goToRefundView(refundlist, navigationpage) {
7637
- this.OrderslistService.setRefundView(refundlist);
7638
- this.OrderslistService.setCCDCaseNumber(this.ccdCaseNumber);
8846
+ getRefundsNotification() {
8847
+ this.notificationService.getRefundNotification(this.refundlist.refund_reference).subscribe((/**
8848
+ * @param {?} refundsNotification
8849
+ * @return {?}
8850
+ */
8851
+ refundsNotification => {
8852
+ this.notificationList = refundsNotification['notifications'];
8853
+ })),
8854
+ (/**
8855
+ * @param {?} error
8856
+ * @return {?}
8857
+ */
8858
+ (error) => {
8859
+ this.errorMessage = error.replace(/"/g, "");
8860
+ });
8861
+ }
8862
+ /**
8863
+ * @param {?} refundlist
8864
+ * @param {?} navigationpage
8865
+ * @return {?}
8866
+ */
8867
+ goToRefundView(refundlist, navigationpage) {
8868
+ this.OrderslistService.setRefundView(refundlist);
8869
+ this.OrderslistService.setCCDCaseNumber(this.ccdCaseNumber);
7639
8870
  this.paymentLibComponent.viewName = 'refundstatuslist';
7640
8871
  this.paymentLibComponent.isRefundStatusView = true;
7641
8872
  this.refundlist = refundlist;
@@ -7698,15 +8929,17 @@ class RefundStatusComponent {
7698
8929
  }));
7699
8930
  }
7700
8931
  /**
8932
+ * @param {?} refundReason
7701
8933
  * @return {?}
7702
8934
  */
7703
- gotoRefundReasonPage() {
8935
+ gotoRefundReasonPage(refundReason) {
7704
8936
  this.isRefundBtnDisabled = false;
7705
8937
  this.paymentLibComponent.REFUNDLIST = "true";
7706
8938
  this.paymentLibComponent.isFromRefundStatusPage = true;
7707
8939
  this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;
7708
8940
  this.errorMessage = false;
7709
- this.viewName = 'issuerefund';
8941
+ this.changeRefundReason = refundReason;
8942
+ this.viewName = 'issuerefundpage1';
7710
8943
  }
7711
8944
  /**
7712
8945
  * @return {?}
@@ -7717,7 +8950,12 @@ class RefundStatusComponent {
7717
8950
  this.isRefundBtnDisabled = false;
7718
8951
  this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;
7719
8952
  this.paymentLibComponent.isFromRefundStatusPage = true;
7720
- this.viewName = 'processretroremissonpage';
8953
+ if (this.refundlist.reason == 'Retrospective remission') {
8954
+ this.viewName = 'processretroremissonpage';
8955
+ }
8956
+ else {
8957
+ this.viewName = 'issuerefund';
8958
+ }
7721
8959
  }
7722
8960
  /**
7723
8961
  * @return {?}
@@ -7782,6 +9020,7 @@ class RefundStatusComponent {
7782
9020
  getRefundListReason(refundListReason) {
7783
9021
  if (this.paymentLibComponent.isFromRefundStatusPage && !this.paymentLibComponent.iscancelClicked) {
7784
9022
  this.refundlist.reason = refundListReason.reason;
9023
+ this.refundlist.code = refundListReason.code;
7785
9024
  this.refundCode = refundListReason.code;
7786
9025
  }
7787
9026
  else {
@@ -7807,15 +9046,31 @@ class RefundStatusComponent {
7807
9046
  this.viewName = 'reviewandsubmitview';
7808
9047
  this.paymentLibComponent.CCD_CASE_NUMBER = this.ccdCaseNumber;
7809
9048
  }
9049
+ /**
9050
+ * @param {?} fees
9051
+ * @return {?}
9052
+ */
9053
+ getRefundFees(fees) {
9054
+ this.fees = fees;
9055
+ this.refundFees = this.fees.map((/**
9056
+ * @param {?} obj
9057
+ * @return {?}
9058
+ */
9059
+ obj => ({ fee_id: obj.id, code: obj.code, version: obj.version, volume: obj.volume, refund_amount: obj.refund_amount })));
9060
+ }
7810
9061
  /**
7811
9062
  * @return {?}
7812
9063
  */
7813
9064
  gotoReviewRefundConfirmationPage() {
7814
- if (this.oldRefundReason === this.refundlist.reason) {
7815
- this.refundCode = '';
9065
+ // if (this.oldRefundReason === this.refundlist.reason) {
9066
+ // this.refundCode = '';
9067
+ // }
9068
+ if (this.refundFees === undefined) {
9069
+ this.refundFees = this.refundlist['refund_fees'];
7816
9070
  }
9071
+ this.refundCode = this.refundlist.code;
7817
9072
  /** @type {?} */
7818
- const resubmitRequest = new IResubmitRefundRequest(this.refundCode, this.changedAmount);
9073
+ const resubmitRequest = new IResubmitRefundRequest(this.refundCode, this.changedAmount, this.refundlist.contact_details, this.refundFees);
7819
9074
  this.refundService.patchResubmitRefund(resubmitRequest, this.refundlist.refund_reference).subscribe((/**
7820
9075
  * @param {?} response
7821
9076
  * @return {?}
@@ -7834,6 +9089,115 @@ class RefundStatusComponent {
7834
9089
  this.errorMessage = error.replace(/"/g, "");
7835
9090
  }));
7836
9091
  }
9092
+ /**
9093
+ * @param {?} note
9094
+ * @return {?}
9095
+ */
9096
+ gotoEditAddressDetails(note) {
9097
+ this.notification = note;
9098
+ this.isEditDetailsClicked = true;
9099
+ this.viewName = 'refundEditView';
9100
+ }
9101
+ /**
9102
+ * @param {?} obj
9103
+ * @return {?}
9104
+ */
9105
+ getContactDetails(obj) {
9106
+ this.addressDetails = obj;
9107
+ this.viewName = 'revieweditdetailsconfirmationpage';
9108
+ }
9109
+ /**
9110
+ * @param {?} obj
9111
+ * @return {?}
9112
+ */
9113
+ getContactDetailsForRefundList(obj) {
9114
+ this.refundlist.contact_details = obj;
9115
+ this.isEditDetailsClicked = false;
9116
+ this.isRefundBtnDisabled = false;
9117
+ this.viewName = 'reviewandsubmitview';
9118
+ }
9119
+ /**
9120
+ * @param {?=} note
9121
+ * @return {?}
9122
+ */
9123
+ gotoEditDetailsPage(note) {
9124
+ if (note) {
9125
+ this.notification = { contact_details: note, notification_type: note.notification_type };
9126
+ }
9127
+ this.isEditDetailsClicked = true;
9128
+ this.viewName = 'refundEditView';
9129
+ }
9130
+ /**
9131
+ * @return {?}
9132
+ */
9133
+ submitEditDetail() {
9134
+ this.isResendOperationSuccess = false;
9135
+ /** @type {?} */
9136
+ const contactDetails = this.addressDetails.notification_type === 'EMAIL' ? this.addressDetails.email :
9137
+ {
9138
+ address_line: this.addressDetails.address_line,
9139
+ city: this.addressDetails.city,
9140
+ county: this.addressDetails.county,
9141
+ country: this.addressDetails.country,
9142
+ postal_code: this.addressDetails.postal_code,
9143
+ };
9144
+ /** @type {?} */
9145
+ const resendRequest = new IPutNotificationRequest(contactDetails, this.addressDetails.notification_type);
9146
+ this.refundService.putResendOrEdit(resendRequest, this.refundlist.refund_reference, this.addressDetails.notification_type).subscribe((/**
9147
+ * @param {?} response
9148
+ * @return {?}
9149
+ */
9150
+ (response) => {
9151
+ this.isResendOperationSuccess = response;
9152
+ }), (/**
9153
+ * @param {?} error
9154
+ * @return {?}
9155
+ */
9156
+ (error) => {
9157
+ this.isResendOperationSuccess = false;
9158
+ this.errorMessage = error.replace(/"/g, "");
9159
+ }));
9160
+ }
9161
+ /**
9162
+ * @param {?} notification
9163
+ * @return {?}
9164
+ */
9165
+ putResend(notification) {
9166
+ this.isResendOperationSuccess = false;
9167
+ /** @type {?} */
9168
+ const contactDetails = notification.notification_type === 'EMAIL' ? notification.contact_details.email :
9169
+ {
9170
+ address_line: notification.contact_details.address_line,
9171
+ city: notification.contact_details.city,
9172
+ county: notification.contact_details.county,
9173
+ country: notification.contact_details.country,
9174
+ postal_code: notification.contact_details.postal_code,
9175
+ };
9176
+ /** @type {?} */
9177
+ const resendRequest = new IPutNotificationRequest(contactDetails, notification.notification_type);
9178
+ this.refundService.putResendOrEdit(resendRequest, this.refundlist.refund_reference, notification.notification_type).subscribe((/**
9179
+ * @param {?} response
9180
+ * @return {?}
9181
+ */
9182
+ (response) => {
9183
+ this.isResendOperationSuccess = response;
9184
+ }), (/**
9185
+ * @param {?} error
9186
+ * @return {?}
9187
+ */
9188
+ (error) => {
9189
+ this.isResendOperationSuccess = false;
9190
+ this.errorMessage = error.replace(/"/g, "");
9191
+ }));
9192
+ }
9193
+ /**
9194
+ * @param {?} Event
9195
+ * @return {?}
9196
+ */
9197
+ gotoCasetransationPageCancelBtnClicked(Event) {
9198
+ event.preventDefault();
9199
+ this.viewName = 'refundstatuslist';
9200
+ }
7837
9201
  /**
7838
9202
  * @param {?} refundReference
7839
9203
  * @param {?} refundList
@@ -7842,30 +9206,32 @@ class RefundStatusComponent {
7842
9206
  goToRefundProcessComponent(refundReference, refundList) {
7843
9207
  this.paymentLibComponent.refundlistsource = refundList;
7844
9208
  this.paymentLibComponent.refundReference = refundReference;
9209
+ this.paymentLibComponent.isFromPayBubble = true;
7845
9210
  this.paymentLibComponent.viewName = 'process-refund';
7846
9211
  }
7847
9212
  }
7848
9213
  RefundStatusComponent.decorators = [
7849
9214
  { type: Component, args: [{
7850
9215
  selector: 'ccpay-refund-status',
7851
- template: "\n<div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Error in processing the request\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n</div>\n<ng-container *ngIf=\"viewName==='refundstatuslist' && rejectedRefundList\">\n <!-- payments -->\n\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-16\" scope=\"col\">Status</td>\n <td class=\"govuk-table__header col-11\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header col-18\" scope=\"col\">Date</td>\n <td class=\"govuk-table__header col-25\" scope=\"col\">Refund reference</td>\n <td class=\"govuk-table__header col-24 \" scope=\"col\">Reason</td>\n <td class=\"govuk-table__header\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"rejectedRefundList?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let refundList of rejectedRefundList\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ refundList?.refund_status['name'] }}</td>\n <td class=\"channel govuk-table__cell whitespace-inherit\">\u00A3{{ refundList?.amount | number:'.2' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ refundList?.date_updated | date:'dd MMM yyyy'}}\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ refundList?.refund_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\"> {{refundList?.reason}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToRefundView(refundList,'casetransactions')\">Review</a>\n </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"rejectedRefundList?.length === 0\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No refunds recorded</td>\n </tbody>\n </table>\n</ng-container>\n\n<ng-container *ngIf=\"viewName==='refundview'\">\n <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a href=\"javascript:void(0)\" (click)=\"loadRefundListPage()\" class=\"govuk-back-link govuk-label\">Back</a>\n </li>\n </ol>\n </div>\n <h2 class=\"govuk-heading-l\">Refund details</h2>\n <table>\n \n <tbody>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Refund reference</td>\n <td>{{ refundlist?.refund_reference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Payment to be refunded</td>\n <td>{{refundlist?.payment_reference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Reason for refund</td>\n <td>{{ refundlist?.reason }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Amount refunded</td>\n <td>\u00A3{{refundlist?.amount | number:'.2' }}</td>\n </tr>\n\n </tbody>\n </table>\n\n <!-- Status history -->\n <div>\n <br />\n <h2 class=\"govuk-heading-m\">Refund status history</h2>\n <div *ngIf=\"refundStatusHistories\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-24 whitespace-inherit\" scope=\"col\">Status</td>\n <td class=\"govuk-table__header col-27 whitespace-inherit\" scope=\"col\">Date and time</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Users</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Notes</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngFor=\"let refundStatusHistory of refundStatusHistories;\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{refundStatusHistory.status}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{refundStatusHistory.date_created | date:'d MMMM yyyy\n hh:mm:ss'}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{refundStatusHistory.created_by}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{refundStatusHistory.notes}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n </div>\n\n <ng-container *ngIf=\"viewName === 'refundview' && !isFromPayBubble\">\n <div *ngIf=\"refundButtonState==='Update required'\">\n <!-- <div *ngIf=\"refundButtonState==='sent back'\"> -->\n <br />\n <button type=\"submit\" class=\"button govuk-button--secondary btnmargin\"\n (click)=\"gotoReviewAndReSubmitPage()\">Resubmit\n refund</button>\n </div>\n <div *ngIf=\"isProcessRefund && !isLastUpdatedByCurrentUser && refundButtonState==='Sent for approval'\" >\n <!-- <div *ngIf=\"isProcessRefund && !isLastUpdatedByCurrentUser && refundButtonState==='sent for approval'\"> -->\n <br />\n <button type=\"submit\" class=\"button govuk-button--secondary\"\n (click)=\"goToRefundProcessComponent(refundlist.refund_reference,refundlist)\">Process refund</button>\n </div>\n </ng-container>\n\n\n</ng-container>\n\n<ng-container *ngIf=\"viewName==='reviewandsubmitview'\">\n <!-- <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a (click)=\"gotoReviewDetailsPage($event)\" class=\"govuk-back-link govuk-label\">Back</a>\n </li>\n </ol>\n </div> -->\n <div class=\"govuk-warning-text\">\n <h1 class=\"heading-large\">Review and resubmit refund</h1>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Reason for rejection</td>\n <td class=\"govuk-table__cell\">{{refundreason}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund reference</td>\n <td class=\"govuk-table__cell\">{{ refundlist?.refund_reference}} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Reason for refund</td>\n <td class=\"govuk-table__cell\"> {{ refundlist?.reason}}\n <a (click)=\"gotoRefundReasonPage()\" *ngIf=\"refundlist?.reason !== 'Retrospective remission'\"\n class=\"govuk-link right\">Change</a>\n </td>\n\n <!-- <td class=\"govuk-table__cell\">{{ refundlist?.reason }}</td>\n <a (click)=\"gotoRefundReasonPage()\" class=\"govuk-link right\">Change</a> -->\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\">{{ refundlist?.payment_reference}} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td *ngIf=\"refundlist?.reason === 'Retrospective remission'\" class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td *ngIf=\"refundlist?.reason !== 'Retrospective remission'\" class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment amount</td>\n <td class=\"govuk-table__cell\"> \u00A3{{ changedAmount | number:'.2' }}\n <a (click)=\"gotoAmountPage()\" *ngIf=\"refundlist?.reason === 'Retrospective remission'\"\n class=\"govuk-link right\">Change</a>\n </td>\n\n </tr>\n </table>\n <div class=\"govuk-button-group\">\n <button (click)=\"gotoReviewDetailsPage($event)\" class=\"govuk-button govuk-button--secondary\"> Previous</button>\n <button [disabled]=\"isRefundBtnDisabled\" (click)=\"gotoReviewRefundConfirmationPage()\" class=\"govuk-button button\"\n data-module=\"govuk-button\">\n Submit refund\n </button>\n</div>\n<p><a href=\"javascript:void(0)\" (click)=\"loadRefundListPage()\" class=\"govuk-link\" data-module=\"govuk-button\">Cancel</a></p>\n <!-- <div class=\"govuk-button-group\">\n <button [disabled]=\"isRefundBtnDisabled\" (click)=\"gotoReviewRefundConfirmationPage()\" class=\"govuk-button button\"\n data-module=\"govuk-button\">\n Submit refund\n </button>\n </div> -->\n <!-- <p>\n <a (click)=\"loadRefundListPage()\" href=\"\" class=\"cancelbtn\">Cancel</a>\n </p> -->\n</ng-container>\n\n<ng-container *ngIf=\"viewName === 'issuerefund'\">\n <ccpay-add-remission [isFromRefundListPage]=\"true\" [viewCompStatus]=\"viewName\" [isRefundRemission]=\"true\"\n [ccdCaseNumber]=\"ccdCaseNumber\" (refundListReason)=\"getRefundListReason($event)\"></ccpay-add-remission>\n</ng-container>\n\n<ng-container *ngIf=\"viewName === 'processretroremissonpage'\">\n <ccpay-add-remission [isFromRefundListPage]=\"true\" [viewCompStatus]=\"viewName\" [isRefundRemission]=\"true\"\n [ccdCaseNumber]=\"ccdCaseNumber\" (refundListAmount)=\"getRefundAmount($event)\"></ccpay-add-remission>\n</ng-container>\n\n<ng-container *ngIf=\"viewName === 'reviewrefundconfirmationpage'\">\n <div class=\"govuk-grid-row pagesize\">\n <div>\n <div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Refund submitted\n </h1>\n\n <div class=\"govuk-panel__body\">\n <p class=\"govuk-body white\"><strong>Refund reference:{{refundReference}} </strong></p>\n </div>\n\n </div>\n\n <h2 class=\"govuk-heading-l\">What happens next</h2>\n <p class=\"govuk-body\">\n A refund request for {{refundAmount| currency:'GBP':'symbol-narrow':'1.2-2'}} has been created and will be passed to a team leader to approve.\n </p>\n\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"loadRefundListPage()\" class=\"govuk-link\">Return to case</a>\n </p>\n </div>\n </div>\n</ng-container>\n",
7852
- styles: [".right{float:right!important}.button{margin-bottom:3em;font-size:19px}.cancelbtn{font-size:19px;font-weight:400}.btnmargin{margin-bottom:2em}.govuk-button--secondary{background-color:#dee0e2;box-shadow:0 2px 0 #858688;color:#0b0c0c;margin-right:.5em}.govuk-label--s,.govuk-warning-text__text,.hmcts-currency-input__symbol{font-size:19px;font-weight:400}.inline-error-class{outline:#a71414 solid 3px;outline-offset:0}.inline-error-message{color:#a71414;font-weight:700;margin-top:10px;font-size:20px}.govuk-button,.govuk-link{margin-right:1em;font-size:19px;font-weight:200}.govuk-button-group{padding-top:2em}.heading-medium{margin-top:.875em}.heading-large{margin-top:.25em}.govuk-panel--confirmation{color:#fff;background:#00703c}.govuk-heading-l{font-size:36px}.govuk-heading-m{font-size:24px}.govuk-panel__title{font-size:5rem}.govuk-body,.govuk-body-m{font-size:2.1875rem}.govuk-input--width-10{max-width:36ex}.col-14{width:14%!important}.col-10{width:10%!important}.col-11{width:11%!important}.col-18{width:18%!important}.col-21{width:21%!important}.col-9{width:9%!important}.col-15{width:15%!important}.col-16{width:16%!important}.col-25{width:25%!important}.col-24{width:24%!important}.govuk-error-summary__title{font-size:24px!important}.govuk-error-summary__body{font-size:19px!important}.white{color:#fff}.pagesize{margin:2em;width:97%}.govuk-link{cursor:pointer}"]
9216
+ template: "\n<div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Error in processing the request\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n</div>\n\n<ng-container *ngIf=\"viewName==='refundstatuslist' && rejectedRefundList && !isResendOperationSuccess && !isEditDetailsClicked\">\n <!-- payments -->\n\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-16\" scope=\"col\">Status</td>\n <td class=\"govuk-table__header col-11\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header col-18\" scope=\"col\">Date</td>\n <td class=\"govuk-table__header col-25\" scope=\"col\">Refund reference</td>\n <td class=\"govuk-table__header col-24 \" scope=\"col\">Reason</td>\n <td class=\"govuk-table__header\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"rejectedRefundList?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let refundList of rejectedRefundList\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ refundList?.refund_status['name'] }}</td>\n <td class=\"channel govuk-table__cell whitespace-inherit\">\u00A3{{ refundList?.amount | number:'.2' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ refundList?.date_updated | date:'dd MMM yyyy'}}\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ refundList?.refund_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\"> {{refundList?.reason}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToRefundView(refundList,'casetransactions')\">Review</a>\n </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"rejectedRefundList?.length === 0\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No refunds recorded</td>\n </tbody>\n </table>\n</ng-container>\n\n<ng-container *ngIf=\"viewName==='refundview' && !isResendOperationSuccess && !isEditDetailsClicked\">\n <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a href=\"javascript:void(0)\" (click)=\"loadRefundListPage()\" class=\"govuk-back-link govuk-label\">Back</a>\n </li>\n </ol>\n </div>\n <h2 class=\"govuk-heading-l\">Refund details</h2>\n <table>\n \n <tbody>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Refund reference</td>\n <td>{{ refundlist?.refund_reference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Payment to be refunded</td>\n <td>{{refundlist?.payment_reference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Reason for refund</td>\n <td>{{ refundlist?.reason }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Amount refunded</td>\n <td>\u00A3{{refundlist?.amount | number:'.2' }}</td>\n </tr>\n\n </tbody>\n </table>\n\n\n <!-- Notification sent details -->\n <div>\n <br />\n <h2 class=\"govuk-heading-m\">Notifications sent</h2>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-24 whitespace-inherit\" scope=\"col\">Date and time</td>\n <td class=\"govuk-table__header col-27 whitespace-inherit\" scope=\"col\">Sent to</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Sent via</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Actions</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"notificationList\">\n <tr class=\"govuk-table__row\" *ngFor=\"let notification of notificationList; let i = index;\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{notification.date_created | date:'dd MMMM yyyy hh:mm:ss'}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderParty}}</td>\n <td class=\"govuk-table__cell whitespace-inherit col-40\">\n <div *ngIf=\"notification?.notification_type === 'EMAIL'\">\n <strong>Email</strong><br>\n {{notification?.contact_details?.email}}\n </div>\n <div *ngIf=\"notification?.notification_type === 'LETTER'\">\n <strong>Post</strong><br>\n {{notification?.contact_details?.address_line}} {{notification?.contact_details?.city}} {{notification?.contact_details?.county}} {{notification?.contact_details?.country}} {{notification?.contact_details?.postal_code}}\n </div>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\" *ngIf=\"i === 0\"><a href=\"Javascript:void(0);\" (click)=\"putResend(notification)\">Resend</a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"Javascript:void(0);\" (click)=\"gotoEditAddressDetails(notification)\">Edit details</a></td>\n <td class=\"govuk-table__cell whitespace-inherit\" *ngIf=\"i > 0\"> &nbsp; </td>\n\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"!notificationList\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell whitespace-inherit\" colspan=\"4\">No record found ... </td>\n </tr>\n </tbody>\n </table> \n </div>\n <!-- Status history -->\n <div>\n <br />\n <h2 class=\"govuk-heading-m\">Refund status history</h2>\n <div *ngIf=\"refundStatusHistories\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-24 whitespace-inherit\" scope=\"col\">Status</td>\n <td class=\"govuk-table__header col-27 whitespace-inherit\" scope=\"col\">Date and time</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Users</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Notes</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngFor=\"let refundStatusHistory of refundStatusHistories;\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{refundStatusHistory.status}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{refundStatusHistory.date_created | date:'d MMMM yyyy\n hh:mm:ss'}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{refundStatusHistory.created_by}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{refundStatusHistory.notes}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n </div>\n\n <ng-container *ngIf=\"viewName==='refundview' && !isFromPayBubble && !isResendOperationSuccess && !isEditDetailsClicked\">\n <div *ngIf=\"refundButtonState==='Update required'\" >\n <!-- <div *ngIf=\"refundButtonState==='sent back'\"> -->\n <br />\n <button type=\"submit\" class=\"button govuk-button--secondary btnmargin\"\n (click)=\"gotoReviewAndReSubmitPage()\">Change refund details</button>\n </div>\n <div *ngIf=\"isProcessRefund && !isLastUpdatedByCurrentUser && refundButtonState==='Sent for approval'\" >\n <!-- <div *ngIf=\"isProcessRefund && !isLastUpdatedByCurrentUser && refundButtonState==='sent for approval'\"> -->\n <br />\n <button type=\"submit\" class=\"button govuk-button--secondary\"\n (click)=\"goToRefundProcessComponent(refundlist.refund_reference,refundlist)\">Process refund</button>\n </div>\n </ng-container>\n\n\n</ng-container>\n\n<ng-container *ngIf=\"viewName==='reviewandsubmitview' && !isResendOperationSuccess && !isEditDetailsClicked\">\n <!-- <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a (click)=\"gotoReviewDetailsPage($event)\" class=\"govuk-back-link govuk-label\">Back</a>\n </li>\n </ol>\n </div> -->\n <div class=\"govuk-warning-text\">\n <h1 class=\"heading-large\">Check your answers</h1>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Reason for return</td>\n <td class=\"govuk-table__cell\">{{refundreason}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund reference</td>\n <td class=\"govuk-table__cell\">{{ refundlist?.refund_reference}} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Reason for refund</td>\n <td class=\"govuk-table__cell\"> {{ refundlist?.reason}}\n <a (click)=\"gotoRefundReasonPage(refundlist?.reason)\" *ngIf=\"refundlist?.reason !== 'Retrospective remission' && refundlist?.reason !== 'Overpayment'\"\n class=\"govuk-link right\">Change</a>\n </td>\n\n <!-- <td class=\"govuk-table__cell\">{{ refundlist?.reason }}</td>\n <a (click)=\"gotoRefundReasonPage()\" class=\"govuk-link right\">Change</a> -->\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\">{{ refundlist?.payment_reference}} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td *ngIf=\"refundlist?.reason === 'Retrospective remission'\" class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td *ngIf=\"refundlist?.reason !== 'Retrospective remission'\" class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment amount</td>\n <td class=\"govuk-table__cell\"> \u00A3{{ changedAmount ? changedAmount : refundlist?.amount | number:'.2' }}\n <a (click)=\"gotoAmountPage()\" *ngIf=\"refundlist?.reason !== 'Overpayment'\"\n class=\"govuk-link right\">Change</a>\n </td>\n\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send to</td>\n <td class=\"govuk-table__cell\">{{orderParty}} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send via</td>\n <td class=\"govuk-table__cell\">\n <div *ngIf=\"refundlist?.contact_details?.notification_type === 'EMAIL'\" class=\"contactDetails-width font-size-19px\">\n <strong>Email</strong>\n <br/>\n {{refundlist?.contact_details?.email}}\n </div>\n <div *ngIf=\"refundlist?.contact_details?.notification_type === 'LETTER'\" class=\"contactDetails-width font-size-19px\">\n <strong>Post</strong>\n <br/>\n {{refundlist?.contact_details?.address_line}} {{refundlist?.contact_details?.city}} {{refundlist?.contact_details?.county}} {{refundlist?.contact_details?.country}} {{refundlist?.contact_details?.postal_code}}\n </div> \n <a class=\"govuk-link\" href=\"Javascript:void(0)\" *ngIf=\"refundlist?.contact_details !=null\" class=\"govuk-link right\" (click)=\"gotoEditDetailsPage(refundlist?.contact_details)\">\n Change\n </a>\n </td>\n </tr> \n </table>\n <div class=\"govuk-button-group\">\n <button (click)=\"gotoReviewDetailsPage($event)\" class=\"govuk-button govuk-button--secondary\"> Previous</button>\n <button [disabled]=\"isRefundBtnDisabled\" (click)=\"gotoReviewRefundConfirmationPage()\" class=\"govuk-button button\"\n data-module=\"govuk-button\">\n Submit refund\n </button>\n</div>\n<p><a href=\"javascript:void(0)\" (click)=\"loadRefundListPage()\" class=\"govuk-link\" data-module=\"govuk-button\">Cancel</a></p>\n <!-- <div class=\"govuk-button-group\">\n <button [disabled]=\"isRefundBtnDisabled\" (click)=\"gotoReviewRefundConfirmationPage()\" class=\"govuk-button button\"\n data-module=\"govuk-button\">\n Submit refund\n </button>\n </div> -->\n <!-- <p>\n <a (click)=\"loadRefundListPage()\" href=\"\" class=\"cancelbtn\">Cancel</a>\n </p> -->\n</ng-container>\n\n<ng-container *ngIf=\"viewName === 'issuerefundpage1' && !isResendOperationSuccess && !isEditDetailsClicked\">\n <ccpay-add-remission [isFromRefundListPage]=\"true\" [viewCompStatus]=\"viewName\" [isRefundRemission]=\"true\" [isFromRefundStatusPage] = \"true\"\n [changeRefundReason]= \"changeRefundReason\" [ccdCaseNumber]=\"ccdCaseNumber\" (refundListReason)=\"getRefundListReason($event)\" [refundPaymentReference]= \"refundlist?.payment_reference\" ></ccpay-add-remission>\n</ng-container>\n\n<ng-container *ngIf=\"viewName === 'processretroremissonpage' && !isResendOperationSuccess && !isEditDetailsClicked\">\n <ccpay-add-remission [isFromRefundListPage]=\"true\" [viewCompStatus]=\"viewName\" [isRefundRemission]=\"true\"\n [ccdCaseNumber]=\"ccdCaseNumber\" [refundPaymentReference]= \"refundlist?.payment_reference\" (refundListAmount)=\"getRefundAmount($event)\"></ccpay-add-remission>\n</ng-container>\n\n<ng-container *ngIf=\"viewName === 'issuerefund' && !isResendOperationSuccess && !isEditDetailsClicked\">\n <ccpay-add-remission [isFromRefundListPage]=\"true\" [viewCompStatus]=\"viewName\" [isRefundRemission]=\"true\" [isFromServiceRequestPage] = \"true\"\n [ccdCaseNumber]=\"ccdCaseNumber\" [refundPaymentReference]= \"refundlist?.payment_reference\" [isFromRefundStatusPage]=\"true\" (refundListAmount)=\"getRefundAmount($event)\" (refundFees)=\"getRefundFees($event)\"></ccpay-add-remission>\n</ng-container>\n\n<ng-container *ngIf=\"viewName === 'reviewrefundconfirmationpage' && !isResendOperationSuccess && !isEditDetailsClicked\">\n <div class=\"govuk-grid-row\">\n <div>\n <div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Refund submitted\n </h1>\n\n <div class=\"govuk-panel__body\">\n <p class=\"govuk-body white\"><strong>Refund reference:{{refundReference}} </strong></p>\n </div>\n\n </div>\n\n <h2 class=\"govuk-heading-l\">What happens next</h2>\n <p class=\"govuk-body\">\n A refund request for {{refundAmount| currency:'GBP':'symbol-narrow':'1.2-2'}} has been created and will be passed to a team leader to approve.\n </p>\n\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"loadRefundListPage()\" class=\"govuk-link\">Return to case</a>\n </p>\n </div>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"isResendOperationSuccess\">\n <div class=\"govuk-grid-row\">\n <div>\n <div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Notification sent\n </h1>\n\n <div class=\"govuk-panel__body\">\n <p class=\"govuk-body white\"><strong>Refund reference: {{ refundlist?.refund_reference}} </strong></p>\n </div>\n\n </div>\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"loadRefundListPage()\" class=\"govuk-link\">Return to case</a>\n </p>\n </div>\n </div>\n</ng-container>\n<ng-container *ngIf=\"viewName === 'refundEditView' && isEditDetailsClicked\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='EDITDETAILSPAGE'> \n <h1 class=\"govuk-heading-l\">Edit contact details</h1>\n <h2 class=\"govuk-heading-m govuk-font19px\">Case reference: {{ccdCaseNumber | ccdHyphens }}</h2>\n <span class=\"govuk-hint font-size-19px\">\n Refund reference: {{ refundlist?.refund_reference}}\n </span>\n <ccpay-contact-details\n [isEditOperationInRefundList] = isEditDetailsClicked\n [addressObj] = notification\n (assignContactDetailsInFefundsList)=\"getContactDetails($event)\"\n (redirectToIssueRefund)=\"gotoCasetransationPageCancelBtnClicked($event)\" ></ccpay-contact-details>\n <p>\n <a (click)=\"loadRefundListPage()\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n\n</ng-container>\n<ng-container *ngIf=\"viewName === 'revieweditdetailsconfirmationpage' && !isResendOperationSuccess && isEditDetailsClicked\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='EDITDETAILSCHECKANDANSWERPAGE'> \n <h1 class=\"govuk-heading-l\">Check your answers</h1>\n <dl class=\"govuk-summary-list\">\n <div class=\"govuk-summary-list__row font-size-19px\">\n <dt class=\"govuk-summary-list__key\">\n Refund reference\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ refundlist?.refund_reference}}\n </dd>\n <span class=\"govuk-summary-list__actions\"></span> \n </div>\n <div class=\"govuk-summary-list__row font-size-19px\">\n <dt class=\"govuk-summary-list__key\">\n Send via\n <br/>\n </dt>\n <dd class=\"govuk-summary-list__value\">\n <div *ngIf=\"addressDetails?.notification_type === 'EMAIL'\" class=\"contactDetails-width font-size-19px\">\n <strong>Email</strong>\n <br/>\n {{addressDetails?.email}}\n </div>\n <div *ngIf=\"addressDetails?.notification_type === 'LETTER'\" class=\"contactDetails-width font-size-19px\">\n <strong>Post</strong>\n <br/>\n {{addressDetails?.address_line}} {{addressDetails?.city}} {{addressDetails?.county}} {{addressDetails?.country}} {{addressDetails?.postal_code}}\n </div> \n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a class=\"govuk-link\" href=\"Javascript:void(0)\" (click)=\"gotoEditDetailsPage(addressDetails)\">\n Change\n </a>\n </dd>\n </div>\n </dl>\n <div class=\"govuk-button-group\">\n <button (click)=\"gotoEditDetailsPage(addressDetails)\" class=\"govuk-button govuk-button--secondary\"> Previous</button>\n <button (click)=\"submitEditDetail()\" class=\"govuk-button button\"\n data-module=\"govuk-button\">\n Send notification\n </button>\n </div>\n <p>\n <a (click)=\"loadRefundListPage()\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n\n</ng-container>\n",
9217
+ styles: [".right{float:right!important}.button{margin-bottom:3em;font-size:19px}.cancelbtn{font-size:19px;font-weight:400}.btnmargin{margin-bottom:2em}.govuk-button--secondary{background-color:#dee0e2;box-shadow:0 2px 0 #858688;color:#0b0c0c;margin-right:.5em}.govuk-label--s,.govuk-warning-text__text,.hmcts-currency-input__symbol{font-size:19px;font-weight:400}.inline-error-class{outline:#a71414 solid 3px;outline-offset:0}.inline-error-message{color:#a71414;font-weight:700;margin-top:10px;font-size:20px}.govuk-button,.govuk-link{margin-right:1em;font-size:19px;font-weight:200}.govuk-button-group{padding-top:2em}.heading-medium{margin-top:.875em}.heading-large{margin-top:.25em}.govuk-panel--confirmation{color:#fff;background:#00703c}.govuk-heading-l{font-size:36px}.govuk-heading-m{font-size:24px}.govuk-panel__title{font-size:5rem}.govuk-body,.govuk-body-m{font-size:2.1875rem}.govuk-input--width-10{max-width:36ex}.col-14{width:14%!important}.col-10{width:10%!important}.col-11{width:11%!important}.col-18{width:18%!important}.col-21{width:21%!important}.col-9{width:9%!important}.col-40{width:40%!important}.col-15{width:15%!important}.col-16{width:16%!important}.col-25{width:25%!important}.col-24{width:24%!important}.govuk-error-summary__title{font-size:24px!important}.govuk-error-summary__body{font-size:19px!important}.font-size-19px{font-size:19px}.white{color:#fff}.pagesize{margin:2em;width:97%}.govuk-link{cursor:pointer}.contactDetails-width{width:70%}"]
7853
9218
  }] }
7854
9219
  ];
7855
9220
  /** @nocollapse */
7856
9221
  RefundStatusComponent.ctorParameters = () => [
7857
9222
  { type: FormBuilder },
7858
9223
  { type: RefundsService },
9224
+ { type: NotificationService },
7859
9225
  { type: PaymentLibComponent },
7860
- { type: PaymentViewService },
7861
- { type: Router },
7862
- { type: OrderslistService }
9226
+ { type: OrderslistService },
9227
+ { type: PaymentViewService }
7863
9228
  ];
7864
9229
  RefundStatusComponent.propDecorators = {
7865
9230
  LOGGEDINUSERROLES: [{ type: Input, args: ['LOGGEDINUSERROLES',] }],
7866
9231
  API_ROOT: [{ type: Input, args: ['API_ROOT',] }],
7867
9232
  ccdCaseNumber: [{ type: Input }],
7868
9233
  isTurnOff: [{ type: Input }],
9234
+ orderParty: [{ type: Input }],
7869
9235
  isEliginbleToAccess: [{ type: Input }]
7870
9236
  };
7871
9237
 
@@ -7878,12 +9244,14 @@ class ServiceRequestComponent {
7878
9244
  * @param {?} paymentLibComponent
7879
9245
  * @param {?} paymentViewService
7880
9246
  * @param {?} OrderslistService
9247
+ * @param {?} cd
7881
9248
  * @param {?} router
7882
9249
  */
7883
- constructor(paymentLibComponent, paymentViewService, OrderslistService$$1, router) {
9250
+ constructor(paymentLibComponent, paymentViewService, OrderslistService$$1, cd, router) {
7884
9251
  this.paymentLibComponent = paymentLibComponent;
7885
9252
  this.paymentViewService = paymentViewService;
7886
9253
  this.OrderslistService = OrderslistService$$1;
9254
+ this.cd = cd;
7887
9255
  this.router = router;
7888
9256
  this.goToServiceRquestComponent = new EventEmitter();
7889
9257
  this.paymentGroups = [];
@@ -7891,7 +9259,6 @@ class ServiceRequestComponent {
7891
9259
  this.nonPayments = [];
7892
9260
  this.allPayments = [];
7893
9261
  this.remissions = [];
7894
- this.fees = [];
7895
9262
  this.isRefundRemission = true;
7896
9263
  this.isAddFeeBtnEnabled = true;
7897
9264
  this.isExceptionRecord = false;
@@ -7911,33 +9278,14 @@ class ServiceRequestComponent {
7911
9278
  this.isAddRemissionBtnEnabled = false;
7912
9279
  this.isRefundRemissionBtnEnable = false;
7913
9280
  this.allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];
7914
- this.check4AllowedRoles2AccessRefund = (/**
7915
- * @return {?}
7916
- */
7917
- () => {
7918
- return this.allowedRolesToAccessRefund.some((/**
7919
- * @param {?} role
7920
- * @return {?}
7921
- */
7922
- role => this.LOGGEDINUSERROLES.indexOf(role) !== -1));
7923
- });
7924
- this.allowFurtherAccessAfter4Days = (/**
7925
- * @param {?} payment
7926
- * @return {?}
7927
- */
7928
- (payment) => {
7929
- if (payment !== null && payment !== undefined) {
7930
- /** @type {?} */
7931
- let tmp4DayAgo = new Date();
7932
- tmp4DayAgo.setDate(tmp4DayAgo.getDate() - 4);
7933
- return tmp4DayAgo >= new Date(payment.date_created);
7934
- }
7935
- });
9281
+ this.isContinueBtnDisabled = true;
7936
9282
  }
7937
9283
  /**
7938
9284
  * @return {?}
7939
9285
  */
7940
9286
  ngOnInit() {
9287
+ this.isTurnOff = this.paymentLibComponent.ISTURNOFF;
9288
+ this.isServiceRequest = 'false';
7941
9289
  if (this.viewStatus === undefined) {
7942
9290
  this.viewStatus = this.paymentLibComponent.viewName;
7943
9291
  }
@@ -7985,9 +9333,9 @@ class ServiceRequestComponent {
7985
9333
  (data) => this.orderTotalPayments = data));
7986
9334
  }
7987
9335
  }
7988
- // if (this.takePayment) {
7989
- // this.paymentLibComponent.TAKEPAYMENT = this.takePayment;
7990
- // }
9336
+ if (this.paymentLibComponent.isFromServiceRequestPage && this.paymentLibComponent.TAKEPAYMENT) {
9337
+ this.isServiceRequest = 'false';
9338
+ }
7991
9339
  }
7992
9340
  /**
7993
9341
  * @return {?}
@@ -8009,7 +9357,7 @@ class ServiceRequestComponent {
8009
9357
  if (this.takePayment) {
8010
9358
  this.paymentLibComponent.isTakePayment = this.takePayment;
8011
9359
  }
8012
- this.paymentLibComponent.SERVICEREQUEST = "true";
9360
+ //this.paymentLibComponent.SERVICEREQUEST = "true";
8013
9361
  this.paymentLibComponent.isFromServiceRequestPage = false;
8014
9362
  if (this.isServiceRequest !== 'false') {
8015
9363
  this.paymentLibComponent.isFromServiceRequestPage = true;
@@ -8035,62 +9383,12 @@ class ServiceRequestComponent {
8035
9383
  this.router.onSameUrlNavigation = 'reload';
8036
9384
  this.router.navigateByUrl(url);
8037
9385
  }
8038
- /**
8039
- * @param {?} feeCode
8040
- * @return {?}
8041
- */
8042
- chkForAddRemission(feeCode) {
8043
- if (this.chkForPBAPayment() && this.check4AllowedRoles2AccessRefund()) {
8044
- if (this.orderDetail[0]['remissions'].length > 0) {
8045
- for (const remission of this.orderDetail[0]['remissions']) {
8046
- if (remission.fee_code === feeCode) {
8047
- return false;
8048
- }
8049
- }
8050
- }
8051
- return true;
8052
- }
8053
- else {
8054
- return false;
8055
- }
8056
- }
8057
- /**
8058
- * @return {?}
8059
- */
8060
- chkForPBAPayment() {
8061
- if (this.orderDetail !== null && this.orderDetail !== undefined) {
8062
- this.orderDetail.forEach((/**
8063
- * @param {?} orderDetail
8064
- * @return {?}
8065
- */
8066
- orderDetail => {
8067
- if (orderDetail.payments) {
8068
- orderDetail.payments.forEach((/**
8069
- * @param {?} payment
8070
- * @return {?}
8071
- */
8072
- payment => {
8073
- if (payment.method.toLocaleLowerCase() === 'payment by account' && this.allowFurtherAccessAfter4Days(payment)) {
8074
- this.paymentLibComponent.paymentReference = payment.reference;
8075
- this.isPBA = true;
8076
- }
8077
- }));
8078
- }
8079
- }));
8080
- if (this.isPBA) {
8081
- return true;
8082
- }
8083
- else {
8084
- return false;
8085
- }
8086
- }
8087
- }
8088
9386
  /**
8089
9387
  * @param {?} fee
8090
9388
  * @return {?}
8091
9389
  */
8092
9390
  addRemission(fee) {
8093
- if (this.chkForAddRemission(fee.code)) {
9391
+ if (this.chkIsAddRemissionBtnEnable(fee)) {
8094
9392
  this.feeId = fee;
8095
9393
  this.viewStatus = 'addremission';
8096
9394
  this.payment = this.orderDetail[0].payments[0];
@@ -8106,8 +9404,8 @@ class ServiceRequestComponent {
8106
9404
  */
8107
9405
  paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference)));
8108
9406
  this.payment = this.paymentGroup.payments[0];
8109
- // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;
8110
- // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;
9407
+ // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;
9408
+ // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;
8111
9409
  }), (/**
8112
9410
  * @param {?} error
8113
9411
  * @return {?}
@@ -8122,9 +9420,8 @@ class ServiceRequestComponent {
8122
9420
  * @return {?}
8123
9421
  */
8124
9422
  addRefundForRemission(payment, remission, fees) {
8125
- this.viewStatus = 'addrefundforremission';
8126
- this.payment = payment;
8127
- this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe((/**
9423
+ this.paymentLibComponent.isFromServiceRequestPage = true;
9424
+ this.paymentViewService.getApportionPaymentDetails(payment.reference).subscribe((/**
8128
9425
  * @param {?} paymentGroup
8129
9426
  * @return {?}
8130
9427
  */
@@ -8134,7 +9431,7 @@ class ServiceRequestComponent {
8134
9431
  * @param {?} paymentGroupObj
8135
9432
  * @return {?}
8136
9433
  */
8137
- paymentGroupObj => paymentGroupObj['reference'].includes(this.payment.reference)));
9434
+ paymentGroupObj => paymentGroupObj.reference === payment.reference));
8138
9435
  this.payment = this.paymentGroup.payments[0];
8139
9436
  this.remissions = remission;
8140
9437
  this.remissionFeeAmt = fees.filter((/**
@@ -8142,6 +9439,7 @@ class ServiceRequestComponent {
8142
9439
  * @return {?}
8143
9440
  */
8144
9441
  data => data.code === this.remissions['fee_code']))[0].net_amount;
9442
+ this.viewStatus = 'addrefundforremission';
8145
9443
  // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;
8146
9444
  // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;
8147
9445
  }), (/**
@@ -8177,64 +9475,42 @@ class ServiceRequestComponent {
8177
9475
  this.isRemoveBtnDisabled = false;
8178
9476
  }));
8179
9477
  }
8180
- /**
8181
- * @param {?} payment
8182
- * @return {?}
8183
- */
8184
- chkIssueRefundBtnEnable(payment) {
8185
- if (this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(payment) &&
8186
- payment.method === 'payment by account' && payment.status.toLocaleLowerCase() === 'success') {
8187
- this.isIssueRefunfBtnEnable = true;
8188
- }
8189
- if (this.isIssueRefunfBtnEnable) {
8190
- return true;
8191
- }
8192
- else {
8193
- return false;
8194
- }
8195
- }
8196
- /**
8197
- * @return {?}
8198
- */
8199
- chkIsRefundRemissionBtnEnable() {
8200
- if (this.orderDetail !== null && this.orderDetail !== undefined) {
8201
- this.paymentLibComponent.isFromServiceRequestPage = true;
8202
- this.orderDetail.forEach((/**
8203
- * @param {?} orderDetail
8204
- * @return {?}
8205
- */
8206
- orderDetail => {
8207
- if (orderDetail.payments) {
8208
- orderDetail.payments.forEach((/**
8209
- * @param {?} payment
8210
- * @return {?}
8211
- */
8212
- payment => {
8213
- if (payment.method.toLocaleLowerCase() === 'payment by account' && payment.status.toLocaleLowerCase() === 'success' && this.allowFurtherAccessAfter4Days(payment)) {
8214
- this.isRefundRemissionBtnEnable = true;
8215
- }
8216
- }));
8217
- }
8218
- }));
8219
- if (this.isRefundRemissionBtnEnable) {
8220
- return true;
8221
- }
8222
- else {
8223
- return false;
8224
- }
8225
- }
8226
- }
8227
9478
  /**
8228
9479
  * @param {?} payment
8229
9480
  * @return {?}
8230
9481
  */
8231
9482
  issueRefund(payment) {
8232
9483
  if (payment !== null && payment !== undefined) {
8233
- if (this.chkIssueRefundBtnEnable(payment)) {
8234
- this.viewStatus = 'issuerefund';
8235
- this.payment = payment;
8236
- this.paymentLibComponent.isFromServiceRequestPage = true;
8237
- this.isRefundRemission = true;
9484
+ if (this.chkIsIssueRefundBtnEnable(payment)) {
9485
+ this.paymentViewService.getApportionPaymentDetails(payment.reference).subscribe((/**
9486
+ * @param {?} paymentGroup
9487
+ * @return {?}
9488
+ */
9489
+ paymentGroup => {
9490
+ paymentGroup.payments = paymentGroup.payments.filter((/**
9491
+ * @param {?} paymentGroupObj
9492
+ * @return {?}
9493
+ */
9494
+ paymentGroupObj => paymentGroupObj['reference'].includes(payment.reference)));
9495
+ if (payment.over_payment > 0) {
9496
+ this.viewStatus = '';
9497
+ this.payment = payment;
9498
+ this.paymentGroupList = paymentGroup;
9499
+ this.viewCompStatus = 'overpayment';
9500
+ }
9501
+ else {
9502
+ this.viewStatus = 'issuerefund';
9503
+ this.viewCompStatus = '';
9504
+ this.paymentFees = paymentGroup.fees;
9505
+ this.payment = payment;
9506
+ this.paymentLibComponent.isFromServiceRequestPage = true;
9507
+ this.isRefundRemission = true;
9508
+ }
9509
+ }), (/**
9510
+ * @param {?} error
9511
+ * @return {?}
9512
+ */
9513
+ (error) => this.errorMessage = error));
8238
9514
  }
8239
9515
  }
8240
9516
  }
@@ -8266,6 +9542,42 @@ class ServiceRequestComponent {
8266
9542
  this.OrderslistService.setorderFeesTotal(this.orderFeesTotal);
8267
9543
  this.viewStatus = 'payment-view';
8268
9544
  }
9545
+ /**
9546
+ * @param {?} payment
9547
+ * @return {?}
9548
+ */
9549
+ chkIsIssueRefundBtnEnable(payment) {
9550
+ if (payment !== null && payment !== undefined) {
9551
+ return payment.issue_refund && payment.refund_enable;
9552
+ }
9553
+ else {
9554
+ return false;
9555
+ }
9556
+ }
9557
+ /**
9558
+ * @param {?} remission
9559
+ * @return {?}
9560
+ */
9561
+ chkIsAddRefundBtnEnable(remission) {
9562
+ if (remission !== null && remission !== undefined) {
9563
+ return remission.add_refund;
9564
+ }
9565
+ else {
9566
+ return false;
9567
+ }
9568
+ }
9569
+ /**
9570
+ * @param {?} fee
9571
+ * @return {?}
9572
+ */
9573
+ chkIsAddRemissionBtnEnable(fee) {
9574
+ if (fee !== null && fee !== undefined) {
9575
+ return fee.add_remission && fee.remission_enable;
9576
+ }
9577
+ else {
9578
+ return false;
9579
+ }
9580
+ }
8269
9581
  /**
8270
9582
  * @return {?}
8271
9583
  */
@@ -8279,12 +9591,132 @@ class ServiceRequestComponent {
8279
9591
  this.OrderslistService.setorderRemissionTotal(null);
8280
9592
  this.OrderslistService.setorderFeesTotal(null);
8281
9593
  }
9594
+ /**
9595
+ * @param {?} paymentType
9596
+ * @return {?}
9597
+ */
9598
+ selectPymentOption(paymentType) {
9599
+ this.paymentType = paymentType;
9600
+ this.isContinueBtnDisabled = false;
9601
+ }
9602
+ /**
9603
+ * @return {?}
9604
+ */
9605
+ goToPaymentViewComp() {
9606
+ this.viewCompStatus = '';
9607
+ this.viewStatus = 'paymentview';
9608
+ }
9609
+ /**
9610
+ * @param {?} paymentgrp
9611
+ * @return {?}
9612
+ */
9613
+ continuePayment(paymentgrp) {
9614
+ if (this.paymentType === 'op') {
9615
+ this.isFullyRefund = false;
9616
+ this.viewStatus = '';
9617
+ this.viewCompStatus = 'overPaymentAddressCapture';
9618
+ }
9619
+ else if (this.paymentType === 'fp') {
9620
+ this.isFullyRefund = true;
9621
+ this.paymentGroupList = paymentgrp;
9622
+ this.viewStatus = 'issuerefund';
9623
+ this.viewCompStatus = "";
9624
+ this.isRefundRemission = true;
9625
+ this.paymentLibComponent.isFromPaymentDetailPage = true;
9626
+ this.isFromPaymentDetailPage = true;
9627
+ this.isFromServiceRequestPage = this.paymentLibComponent.isFromServiceRequestPage;
9628
+ }
9629
+ }
9630
+ /**
9631
+ * @param {?} obj
9632
+ * @return {?}
9633
+ */
9634
+ getContactDetails(obj) {
9635
+ this.contactDetailsObj = obj;
9636
+ this.viewStatus = '';
9637
+ this.viewCompStatus = 'overpaymentcheckandanswer';
9638
+ }
9639
+ /**
9640
+ * @param {?} event
9641
+ * @return {?}
9642
+ */
9643
+ gotoPaymentSelectPage(event) {
9644
+ event.preventDefault();
9645
+ this.viewStatus = '';
9646
+ this.viewCompStatus = 'overpayment';
9647
+ }
9648
+ /**
9649
+ * @param {?=} note
9650
+ * @return {?}
9651
+ */
9652
+ gotoAddressPage(note) {
9653
+ if (note) {
9654
+ this.notification = { contact_details: note, notification_type: note.notification_type };
9655
+ }
9656
+ this.errorMessage = '';
9657
+ this.viewStatus = '';
9658
+ this.viewCompStatus = 'overPaymentAddressCapture';
9659
+ }
9660
+ /**
9661
+ * @return {?}
9662
+ */
9663
+ processRefund() {
9664
+ this.isConfirmationBtnDisabled = true;
9665
+ this.errorMessage = '';
9666
+ /** @type {?} */
9667
+ const obj = this.paymentGroupList.fees[0];
9668
+ this.fees = [{ id: obj.id,
9669
+ code: obj.code,
9670
+ version: obj.version,
9671
+ apportion_amount: obj.apportion_amount,
9672
+ calculated_amount: obj.calculated_amount,
9673
+ updated_volume: obj.updated_volume ? obj.updated_volume : obj.volume,
9674
+ volume: obj.volume,
9675
+ refund_amount: this.getOverPaymentValue() }];
9676
+ /** @type {?} */
9677
+ const requestBody = new PostRefundRetroRemission(this.contactDetailsObj, this.fees, this.paymentGroupList.payments[0].reference, 'RR037', this.getOverPaymentValue(), 'op');
9678
+ this.paymentViewService.postRefundsReason(requestBody).subscribe((/**
9679
+ * @param {?} response
9680
+ * @return {?}
9681
+ */
9682
+ response => {
9683
+ if (JSON.parse(response)) {
9684
+ this.viewCompStatus = '';
9685
+ this.viewStatus = 'refundconfirmationpage';
9686
+ this.refundReference = JSON.parse(response).refund_reference;
9687
+ this.refundAmount = JSON.parse(response).refund_amount;
9688
+ }
9689
+ }), (/**
9690
+ * @param {?} error
9691
+ * @return {?}
9692
+ */
9693
+ (error) => {
9694
+ this.errorMessage = error;
9695
+ this.isConfirmationBtnDisabled = false;
9696
+ this.cd.detectChanges();
9697
+ }));
9698
+ }
9699
+ /**
9700
+ * @return {?}
9701
+ */
9702
+ getOverPaymentValue() {
9703
+ /** @type {?} */
9704
+ let feesOverPayment = 0;
9705
+ this.paymentGroupList.fees.forEach((/**
9706
+ * @param {?} fee
9707
+ * @return {?}
9708
+ */
9709
+ fee => {
9710
+ feesOverPayment += fee.over_payment;
9711
+ }));
9712
+ return feesOverPayment > 0 ? feesOverPayment : this.paymentGroupList.payments[0].over_payment;
9713
+ }
8282
9714
  }
8283
9715
  ServiceRequestComponent.decorators = [
8284
9716
  { type: Component, args: [{
8285
9717
  selector: 'ccpay-service-request',
8286
- template: "<!-- Order Full View Details-->\n<ng-container *ngIf=\"viewStatus === 'order-full-view'\">\n <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\" *ngIf=\"isServiceRequest === 'false'\">\n <a href=\"javascript:void(0)\" (click)=\"goToCaseTransationPage($event)\" class=\"govuk-back-link\">Back</a>\n </li>\n <li class=\"govuk-breadcrumbs__list-item\" *ngIf=\"isServiceRequest !== 'false'\">\n <a href=\"javascript:void(0)\" (click)=\"goToServiceRequestPage()\" id=\"bckLnksize\" class=\"govuk-back-link\">Back</a>\n </li>\n </ol>\n </div>\n <div class=\"govuk-grid-column-full\">\n <div class=\"column\">\n <h1 class=\"heading-large govuk-!-margin-top-0\">Service request</h1>\n </div>\n <table >\n <tbody>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Service request reference</td>\n <td>{{orderRef}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Status</td>\n <td>{{orderStatus}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Date created</td>\n <td>{{orderCreated | date:'dd MMMM yyyy'}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Party</td>\n <td>{{orderParty}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">CCD event</td>\n <td>{{orderCCDEvent}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <div class=\"govuk-grid-column-full order-class\">\n <div class=\"column\">\n <table class=\"govuk-table \">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-51\" scope=\"col\" *ngIf=\"isServiceRequest === 'false'\">Fee</td>\n <td class=\"govuk-table__header col-51\" scope=\"col\" colspan=\"2\" *ngIf=\"isServiceRequest !== 'false'\">Fee</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Total</td>\n <td class=\"govuk-table__header\" scope=\"col\" *ngIf=\"isServiceRequest === 'false'\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngFor=\"let order of orderDetail;\">\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of order.fees; let i = index;\">\n <td class=\"govuk-table__cell col-60 whitespace-inherit\" *ngIf=\"isServiceRequest === 'false'\">{{fee.description}}</td>\n <td class=\"govuk-table__cell col-60 whitespace-inherit\" colspan=\"2\" *ngIf=\"isServiceRequest !== 'false'\">{{fee.description}}</td>\n <td class=\"govuk-table__cell\">{{fee.volume? fee.volume : '-'}} X {{ fee.calculated_amount/fee.volume| currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell\">{{ fee?.net_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell alignright\" *ngIf=\"isServiceRequest === 'false'\">\n <button [disabled]=\"!chkForAddRemission(fee.code)\" (click)=\"addRemission(fee)\" class=\"govuk-button govuk-button--secondary\"> Add remission</button>\n </td>\n\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngFor=\"let order of orderDetail;\">\n <tr class=\"govuk-table__row\" *ngIf=\"order.fees?.length === 0\" >\n <td class=\"govuk-table__cell alignleft\" colspan=\"7\">No fees recorded</td>\n </tr>\n </tbody>\n </table>\n\n </div>\n <div class=\"maxwidth\">\n <p class=\"totalfees\">Total fees: {{orderFeesTotal | currency:'GBP':'symbol-narrow':'1.2-2' }}</p>\n </div>\n </div>\n <!-- remissions -->\n<ng-container *ngFor=\"let order of orderDetail;\" >\n <div class=\"govuk-grid-column-full order-class\" *ngIf=\"order.remissions\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-24 whitespace-inherit\" scope=\"col\">Help with fees or remission code</td>\n <td class=\"govuk-table__header col-27 whitespace-inherit\" scope=\"col\">Reference</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Fee</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header whitespace-inherit refundBtn\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody *ngIf=\"order.remissions?.length > 0\" class=\"govuk-table__body\" >\n <tr class=\"govuk-table__row\" *ngFor=\"let remission of order.remissions\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.hwf_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.remission_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.fee_code }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n <td class=\"govuk-table__cell refundBtn whitespace-inherit\" >\n <button [disabled]=\"!chkIsRefundRemissionBtnEnable()\" (click)=\"addRefundForRemission(order.payments[0],remission,order.fees)\" class=\"govuk-button govuk-button--secondary\"> Add refund</button>\n </td>\n <!-- <td class=\"govuk-table__cell refundBtn whitespace-inherit\" >\n\n </td> -->\n </tr>\n </tbody>\n\n\n </table>\n <div *ngIf=\"order.remissions?.length === 0\">\n <span >No help with fees or remissions.</span>\n </div>\n <div class=\"summarypagealign\">\n <p>Total reductions: {{orderRemissionTotal | currency:'GBP':'symbol-narrow':'1.2-2' }}</p>\n </div>\n <div class=\"summarypagealign\">\n <p class=\"summarypage\">Total fees to pay: {{(orderFeesTotal - orderRemissionTotal) | currency:'GBP':'symbol-narrow':'1.2-2' }}</p>\n </div>\n </div>\n\n\n</ng-container>\n\n\n <!--Payments-->\n <ng-container *ngFor=\"let order of orderDetail;\" >\n <div class=\"govuk-grid-column-full\" *ngIf=\"order.payments\">\n <h3 class=\"heading-medium\">Payments</h3>\n <table class=\"govuk-table \">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-25\" scope=\"col\"></td>\n <td class=\"govuk-table__header\" scope=\"col\">Date created</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody *ngIf=\"order.payments?.length > 0\" class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of order.payments\">\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(payment.paymentGroupReference, payment.reference, payment.method)\">Review</a>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment?.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment?.amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell alignright\">\n <button [disabled] = \"!chkIssueRefundBtnEnable(payment)\" (click)=\"issueRefund(payment)\" class=\"govuk-button govuk-button--secondary\">Issue refund</button>\n </td>\n <!-- <td *ngIf=\"!chkIssueRefundBtnEnable(payment)\" class=\"govuk-table__cell\" style=\"text-align: right;\">\n </td> -->\n </tr>\n </tbody>\n </table>\n\n <div *ngIf=\"order.payments === undefined || order.payments === null\">\n <!-- <h3 class=\"heading-medium mar-17\">Payments</h3> -->\n <span class=\"mar-17\" >No Payments recorded</span>\n </div>\n</div>\n</ng-container>\n<div *ngIf=\"isServiceRequest === 'false'\">\n <div *ngIf=\"((orderFeesTotal - orderRemissionTotal)- orderTotalPayments) > 0\" >\n <p class=\"totalPay\">Total left to pay: <b>{{((orderFeesTotal - orderRemissionTotal)- orderTotalPayments )| currency:'GBP':'symbol-narrow':'1.2-2' }}</b> </p>\n </div>\n <div *ngIf=\"((orderFeesTotal - orderRemissionTotal)- orderTotalPayments) < 0\" >\n <p class=\"totalPay\">Total left to pay: <b>0</b> </p>\n </div>\n</div>\n</ng-container>\n<ccpay-add-remission *ngIf=\"viewStatus === 'addremission' && feeId\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[fee]=\"feeId\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[paymentGroupRef]=\"orderRef\"\n[isFromServiceRequestPage] = \"true\"\n[payment] = \"payment\"\n[ccdCaseNumber]=\"ccdCaseNumber\"\n[orderRef] = \"orderRef\"\n[orderStatus] = \"orderStatus\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n[takepayment] = \"takePayment\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"\n></ccpay-add-remission>\n\n<ccpay-add-remission *ngIf=\"viewStatus === 'issuerefund' && payment\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[isFromServiceRequestPage] = \"true\"\n[payment]=\"payment\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[paymentGroupRef]=\"orderRef\"\n[ccdCaseNumber]=\"ccdCaseNumber\"\n[orderRef] = \"orderRef\"\n[orderStatus] = \"orderStatus\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n[takepayment] = \"takePayment\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"></ccpay-add-remission>\n\n<ccpay-add-remission *ngIf=\"viewStatus === 'addrefundforremission' && payment\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[payment]=\"payment\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[feeamount]=\"remissionFeeAmt\"\n[remission] = \"remissions\"\n[isFromServiceRequestPage]=\"true\"\n[ccdCaseNumber]=\"ccdCaseNumber\"\n[orderRef] = \"orderRef\"\n[orderStatus] = \"orderStatus\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n[takepayment] = \"takePayment\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"></ccpay-add-remission>\n\n<ccpay-payment-view *ngIf=\"viewStatus === 'payment-view'\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n[isTurnOff] = \"isTurnOff\"\n[isTakePayment] = \"takePayment\"\n[caseType] = \"caseType\"\n[orderRef] = \"orderRef\"\n[orderStatus] = \"orderStatus\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"\n[isServiceRequest] = \"isServiceRequest\">\n</ccpay-payment-view>\n\n<ng-container *ngIf=\"viewStatus === 'feeRemovalConfirmation'\">\n<div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n Are you sure you want to delete this fee?\n </strong>\n</div>\n<div class=\"govuk-button-grb\">\n <form novalidate>\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"cancelRemoval()\">\n Cancel\n </button>\n <button type=\"submit\" class=\"button\"\n [disabled]=\"isRemoveBtnDisabled\"\n [ngClass]='isRemoveBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"removeFee(feeId)\">\n Remove\n </button>\n </form>\n</div>\n</ng-container>\n",
8287
- styles: [".govuk-grid-column-full--gr{position:relative;margin-bottom:10px}.disable{text-decoration:none;cursor:default;color:#fff;background-color:grey;pointer-events:none}.govuk-grid__surplus-payments{margin:20px 0}.govuk-grid__surplus-payments>.govuk-grid-column-full{padding:0}.govuk-grid__surplus-payments-col1{margin-bottom:10px}.govuk-inset-text__no-border{border-left:0}.govuk-hidetext{font-size:22px;padding-bottom:10px}.lowercase{text-transform:lowercase}.channel::first-letter{text-transform:uppercase}.govuk-heading-xl{font-size:48px;margin-bottom:1px}.govuk-section-break--visible{border-bottom:2px solid #000}.totalpayments.govuk-table__row{border-bottom:2px solid #000!important}.govuk-inset-text{margin-left:1em}.govuk-button{font-size:19px;margin-bottom:0!important}.govuk-table__cell.govuk-table__cell--col6.govuk-table__custom--col6,.groupamount.govuk-table__header{text-align:right}.feeclass{padding-left:.7em}.align-center{text-align:center}details summary{display:list-item}.case-transaction__color{color:#a71414;font-weight:700;text-align:center}.capitalize::first-letter{text-transform:uppercase}.govuk-inset-text__no-left-margin{margin-left:0;padding-left:0}.whitespace-inherit{white-space:inherit!important}.govuk-section-records-break{margin:10px;border-bottom:2px solid #000!important}.exisitng-fees{margin-left:12px}.add-telephony-payment{margin-top:-2em;margin-left:-2em}.govuk-table__header--custom{text-align:center}.disable-link{cursor:default;pointer-events:none;color:#8e8c8c}.panel-no--style{border-left-style:none}.col-28{width:28%!important}.col-8{width:8%!important}.col-60{width:60%!important}.col-32{width:32%!important}.col-34{width:34%!important}#bckLnksize{font-size:16px!important}.col-15{width:15%!important;padding-right:0!important;padding-left:0!important}.col-16{width:16%!important}.col-14{width:14%!important}.col-17{width:17%!important}.col-12{width:12%!important}.col-9{width:9%!important}.col-10{width:10%!important}.col-11{width:11%!important}.col-13{width:13%!important}.col-21{width:21%!important}.col-20{width:20%!important}.col-24{width:24%!important}.govuk-table__cell,.govuk-table__header{padding:10px 10px 10px 0}.col-27{width:27%!important}td{white-space:nowrap;overflow:hidden!important}.col-19{width:19%!important;padding-left:0!important}.col-18{width:18%!important;padding-left:0!important;padding-right:0!important}.col-37{width:37%!important}.col-55{width:55%!important}.govuk-table{margin-bottom:1px}.hmcts-banner>.hmcts-banner__message{font-size:19px;line-height:1.25}.summary-table-font{font-size:36px}.order-class{padding-top:3em}.govuk-table__cell:last-child,.govuk-table__header:last-child{text-align:right}.govuk-grid-column-two-thirds{width:64%!important;padding:0!important}.govuk-heading-l{font-size:36px;margin-bottom:10px}.paymentrequest{margin-top:1em}.mar-17{margin-left:17px}.col-61{width:61px!important;padding:0!important}.error{width:960px;margin:auto}.summarypage{padding-left:36em;margin-top:2em}.summarypagealign{width:100%;text-align:right;margin-top:2em}.govuk-inset-text{font-size:2.1875rem}table{table-layout:fixed;width:100%}td,th{word-wrap:break-word}.totalPay{padding-right:14px;float:right;margin-top:2em}.govuk-back-link{font-size:1.5rem!important}.totalfees{float:right;margin-top:2em}.refundBtn{text-align:right;width:18%}.col-25{width:25%!important}.col-51{width:51%!important}.alignright{text-align:right}.alignleft{text-align:left}.alignself{align-self:flex-end}.maxwidth{width:100%}"]
9718
+ template: "<!-- Order Full View Details-->\n<ng-container *ngIf=\"viewStatus === 'order-full-view'\">\n <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\" *ngIf=\"isServiceRequest === 'false'\">\n <a href=\"javascript:void(0)\" (click)=\"goToCaseTransationPage($event)\" class=\"govuk-back-link\">Back</a>\n </li>\n <li class=\"govuk-breadcrumbs__list-item\" *ngIf=\"isServiceRequest !== 'false'\">\n <a href=\"javascript:void(0)\" (click)=\"goToServiceRequestPage()\" id=\"bckLnksize\" class=\"govuk-back-link\">Back</a>\n </li>\n </ol>\n </div>\n <div class=\"govuk-grid-column-full\">\n <div class=\"column\">\n <h1 class=\"heading-large govuk-!-margin-top-0\">Service request</h1>\n </div>\n <table >\n <tbody>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Service request reference</td>\n <td>{{orderRef}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Status</td>\n <td>{{orderStatus}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Date created</td>\n <td>{{orderCreated | date:'dd MMMM yyyy'}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Party</td>\n <td>{{orderParty}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">CCD event</td>\n <td>{{orderCCDEvent}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <div class=\"govuk-grid-column-full order-class\">\n <div class=\"column\">\n <table class=\"govuk-table \">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-51\" scope=\"col\" *ngIf=\"isServiceRequest === 'false'\">Fee</td>\n <td class=\"govuk-table__header col-51\" scope=\"col\" colspan=\"2\" *ngIf=\"isServiceRequest !== 'false'\">Fee</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Total</td>\n <td class=\"govuk-table__header\" scope=\"col\" *ngIf=\"isServiceRequest === 'false'\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngFor=\"let order of orderDetail;\">\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of order.fees; let i = index;\">\n <td class=\"govuk-table__cell col-60 whitespace-inherit\" *ngIf=\"isServiceRequest === 'false'\">{{fee.description}}</td>\n <td class=\"govuk-table__cell col-60 whitespace-inherit\" colspan=\"2\" *ngIf=\"isServiceRequest !== 'false'\">{{fee.description}}</td>\n <td class=\"govuk-table__cell\">{{fee.volume? fee.volume : '-'}} X {{ fee.calculated_amount/fee.volume| currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell\">{{ fee?.net_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell alignright\" *ngIf=\"isServiceRequest === 'false'\">\n <button [disabled]=\"!chkIsAddRemissionBtnEnable(fee)\" (click)=\"addRemission(fee)\" class=\"govuk-button govuk-button--secondary\"> Add remission</button>\n </td>\n\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngFor=\"let order of orderDetail;\">\n <tr class=\"govuk-table__row\" *ngIf=\"order.fees?.length === 0\" >\n <td class=\"govuk-table__cell alignleft\" colspan=\"7\">No fees recorded</td>\n </tr>\n </tbody>\n </table>\n\n </div>\n <div class=\"maxwidth\">\n <p class=\"totalfees\">Total fees: {{orderFeesTotal | currency:'GBP':'symbol-narrow':'1.2-2' }}</p>\n </div>\n </div>\n <!-- remissions -->\n<ng-container *ngFor=\"let order of orderDetail;\" >\n <div class=\"govuk-grid-column-full order-class\" *ngIf=\"order.remissions\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-24 whitespace-inherit\" scope=\"col\">Help with fees or remission code</td>\n <td class=\"govuk-table__header col-27 whitespace-inherit\" scope=\"col\">Reference</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Fee</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header whitespace-inherit refundBtn\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody *ngIf=\"order.remissions?.length > 0\" class=\"govuk-table__body\" >\n <tr class=\"govuk-table__row\" *ngFor=\"let remission of order.remissions\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.hwf_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.remission_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.fee_code }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n <td class=\"govuk-table__cell refundBtn whitespace-inherit\" >\n <button [disabled]=\"!chkIsAddRefundBtnEnable(remission)\" (click)=\"addRefundForRemission(order.payments[0],remission,order.fees)\" class=\"govuk-button govuk-button--secondary\"> Add refund</button>\n </td>\n <!-- <td class=\"govuk-table__cell refundBtn whitespace-inherit\" >\n\n </td> -->\n </tr>\n </tbody>\n\n\n </table>\n <div *ngIf=\"order.remissions?.length === 0\">\n <span >No help with fees or remissions.</span>\n </div>\n <div class=\"summarypagealign\">\n <p>Total reductions: {{orderRemissionTotal | currency:'GBP':'symbol-narrow':'1.2-2' }}</p>\n </div>\n <div class=\"summarypagealign\">\n <p class=\"summarypage\">Total fees to pay: {{(orderFeesTotal - orderRemissionTotal) | currency:'GBP':'symbol-narrow':'1.2-2' }}</p>\n </div>\n </div>\n\n\n</ng-container>\n\n\n <!--Payments-->\n <ng-container *ngFor=\"let order of orderDetail;\" >\n <div class=\"govuk-grid-column-full\" *ngIf=\"order.payments\">\n <h3 class=\"heading-medium\">Payments</h3>\n <table class=\"govuk-table \">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-25\" scope=\"col\"></td>\n <td class=\"govuk-table__header\" scope=\"col\">Date created</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody *ngIf=\"order.payments?.length > 0\" class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of order.payments\">\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(payment.paymentGroupReference, payment.reference, payment.method)\">Review</a>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment?.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment?.amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell alignright\">\n <button [disabled]=\"!chkIsIssueRefundBtnEnable(payment)\" (click)=\"issueRefund(payment)\" class=\"govuk-button govuk-button--secondary\">Issue refund</button>\n </td>\n <!-- <td *ngIf=\"!chkIssueRefundBtnEnable(payment)\" class=\"govuk-table__cell\" style=\"text-align: right;\">\n </td> -->\n </tr>\n </tbody>\n </table>\n\n <div *ngIf=\"order.payments === undefined || order.payments === null\">\n <!-- <h3 class=\"heading-medium mar-17\">Payments</h3> -->\n <span class=\"mar-17\" >No Payments recorded</span>\n </div>\n</div>\n</ng-container>\n<div *ngIf=\"isServiceRequest === 'false'\">\n <div *ngIf=\"((orderFeesTotal - orderRemissionTotal)- orderTotalPayments) > 0\" >\n <p class=\"totalPay\">Total left to pay: <b>{{((orderFeesTotal - orderRemissionTotal)- orderTotalPayments )| currency:'GBP':'symbol-narrow':'1.2-2' }}</b> </p>\n </div>\n <div *ngIf=\"((orderFeesTotal - orderRemissionTotal)- orderTotalPayments) < 0\" >\n <p class=\"totalPay\">Total left to pay: <b>0</b> </p>\n </div>\n</div>\n</ng-container>\n<ccpay-add-remission *ngIf=\"viewStatus === 'addremission' && feeId\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[fee]=\"feeId\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\" \n[isServiceRequest] = \"isServiceRequest\"\n[paymentGroupRef]=\"orderRef\" \n[isFromServiceRequestPage] = \"true\"\n[payment] = \"payment\"\n[ccdCaseNumber]=\"ccdCaseNumber\"\n[orderRef] = \"orderRef\"\n[orderStatus] = \"orderStatus\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n[takepayment] = \"takePayment\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"\n></ccpay-add-remission>\n<ccpay-add-remission *ngIf=\"viewStatus === 'issuerefund' && payment\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[isFromServiceRequestPage]=\"isFromServiceRequestPage\"\n[isFromPaymentDetailPage] = \"isFromPaymentDetailPage\"\n[payment]=\"payment\" \n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[paymentGroupRef]=\"orderRef\"\n[ccdCaseNumber]=\"ccdCaseNumber\"\n[orderRef] = \"orderRef\"\n[orderStatus] = \"orderStatus\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[isFullyRefund] = \"isFullyRefund\"\n[fees] = \"paymentFees\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n[isFromRefundListPage] = \"false\"\n[takepayment] = \"takePayment\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"></ccpay-add-remission>\n\n<ccpay-add-remission *ngIf=\"viewStatus === 'addrefundforremission' && payment\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[payment]=\"payment\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[feeamount]=\"remissionFeeAmt\"\n[remission] = \"remissions\"\n[isFromServiceRequestPage]=\"isServiceRequest\" \n[ccdCaseNumber]=\"ccdCaseNumber\"\n[orderRef] = \"orderRef\"\n[orderStatus] = \"orderStatus\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n[takepayment] = \"takePayment\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"></ccpay-add-remission>\n\n<ccpay-payment-view *ngIf=\"viewStatus === 'payment-view'\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n[isTurnOff] = \"isTurnOff\"\n[isTakePayment] = \"takePayment\"\n[caseType] = \"caseType\"\n[orderRef] = \"orderRef\"\n[orderStatus] = \"orderStatus\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"\n[isServiceRequest] = \"isServiceRequest\">\n</ccpay-payment-view>\n\n<ng-container *ngIf=\"viewStatus === 'feeRemovalConfirmation'\">\n<div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n Are you sure you want to delete this fee?\n </strong>\n</div>\n<div class=\"govuk-button-grb\">\n <form novalidate>\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"cancelRemoval()\">\n Cancel\n </button>\n <button type=\"submit\" class=\"button\"\n [disabled]=\"isRemoveBtnDisabled\"\n [ngClass]='isRemoveBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"removeFee(feeId)\">\n Remove\n </button>\n </form>\n</div>\n</ng-container>\n\n<div class=\"over-payment\">\n <ng-container *ngIf=\"viewCompStatus === 'overpayment'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='OVERPAYMENTPAGE'> \n <h1 class=\"heading-large\">Issue refund</h1>\n <h1 class=\"heading-medium\">Case reference: {{ccdCaseNumber | ccdHyphens }}</h1>\n <span id=\"how-contacted-conditional-hint govuk-font19px\" class=\"form-hint\">\n Payment reference: {{paymentGroupList?.payments[0]?.reference}}\n </span>\n <div class=\"govuk-form-group\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <b>\n Select payment to refund\n </b>\n </legend>\n <div class=\"govuk-radios\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"over-payment\" name=\"over-payment\" type=\"radio\" (click)=\"selectPymentOption('op')\" value=\"op\">\n <label class=\"govuk-label govuk-radios__label govuk-font19px\" for=\"where-do-you-live\">\n Over payment \u00A3{{getOverPaymentValue() | number:'.2'}}\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"full-payment\" name=\"over-payment\" type=\"radio\" (click)=\"selectPymentOption('fp')\" value=\"fp\">\n <label class=\"govuk-label govuk-radios__label govuk-font19px\" for=\"where-do-you-live-2\">\n Full payment \u00A3{{paymentGroupList?.payments[0]?.amount | number:'.2'}}\n </label>\n </div>\n </div>\n <button class=\"govuk-button govuk-button--secondary over-payment-alignment govuk-font19px\"\n (click)=\"goToPaymentViewComp()\"> Previous</button>\n <button \n (click)=\"continuePayment(paymentGroupList)\"\n [disabled]=\"isContinueBtnDisabled\"\n [ngClass]='isContinueBtnDisabled ? \"button button--disabled govuk-!-margin-right-1 govuk-font19px\" : \"button govuk-!-margin-right-1 govuk-font19px\"'\n class=\"govuk-button\"> Continue</button>\n </fieldset>\n </div>\n </ng-container>\n \n <ng-container *ngIf=\"viewCompStatus === 'overPaymentAddressCapture'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='OVERPAYMENTADDRESSCAPTUREPAGE'> \n <h1 class=\"govuk-heading-l\">Issue refund</h1>\n <h2 class=\"govuk-heading-m govuk-font19px\">Case reference: {{ccdCaseNumber | ccdHyphens }}</h2>\n <span id=\"how-contacted-conditional-hint\" class=\"govuk-hint govuk-font19px\">\n Payment reference: {{paymentGroupList?.payments[0]?.reference}}\n </span>\n <ccpay-contact-details \n [addressObj] = notification\n (assignContactDetails)=\"getContactDetails($event)\"\n (redirectToIssueRefund)=\"gotoPaymentSelectPage($event)\" ></ccpay-contact-details>\n <p>\n <a (click)=\"goToCaseTransationPage($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n </ng-container>\n \n <ng-container *ngIf=\"viewCompStatus === 'overpaymentcheckandanswer'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ADDREFUNDFORREMISSION'> \n <div class=\"govuk-warning-text\">\n \n <h1 class=\"heading-large\"> Check your answers</h1>\n </div>\n <table class=\"govuk-table govuk-table-mb\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\"> {{paymentGroupList.payments[0].reference}} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment amount</td>\n <td class=\"govuk-table__cell\">{{paymentGroupList.payments[0].amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee amount</td>\n <td class=\"govuk-table__cell\">{{paymentGroupList?.fees[0]?.net_amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td class=\"govuk-table__cell\">{{getOverPaymentValue() | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund reason</td>\n <td class=\"govuk-table__cell\">Over payment</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send to</td>\n <td class=\"govuk-table__cell\">{{orderParty}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send via</td>\n <td class=\"govuk-table__cell\">\n <div *ngIf=\"contactDetailsObj?.notification_type === 'EMAIL'\" class=\"contactDetails-width\">\n <strong>Email</strong>\n <br/>\n {{contactDetailsObj?.email}}\n </div>\n <div *ngIf=\"contactDetailsObj?.notification_type === 'LETTER'\" class=\"contactDetails-width\">\n <strong>Post</strong>\n <br/>\n {{contactDetailsObj?.address_line}}&nbsp;{{contactDetailsObj?.city}}&nbsp;{{contactDetailsObj?.county}}&nbsp;{{contactDetailsObj?.country}}&nbsp;{{contactDetailsObj?.postal_code}}\n </div>\n <a (click)=\"gotoAddressPage(contactDetailsObj)\" class=\"govuk-link right margin-top--size\" >Change</a>\n </td>\n </table>\n <button type=\"submit\" class=\"button govuk-button--secondary over-payment-alignment govuk-font19px\" (click)=\"gotoAddressPage(contactDetailsObj)\">Previous</button>\n <button type=\"submit\"\n [ngClass]='isContinueBtnDisabled ? \"button button--disabled govuk-!-margin-right-1 govuk-font19px\" : \"button govuk-!-margin-right-1 govuk-font19px\"'\n (click)=\"processRefund()\">\n Submit refund\n </button>\n <p>\n <a href=\"javascript:void(0)\" (click)=\"goToCaseTransationPage($event)\" class=\"govuk-link govuk-font19px\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n \n </ng-container>\n <ng-container *ngIf=\"viewStatus === 'refundconfirmationpage' && viewCompStatus !== 'overpayment' && viewCompStatus !== 'overPaymentAddressCapture' && viewCompStatus !== 'overpaymentcheckandanswer'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='RETROREMISSIONREFUNDCONFIRMATIONPAGE'> \n <div class=\"govuk-grid-row\">\n <div >\n <div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Refund submitted\n </h1>\n \n <div class=\"govuk-panel__body\">\n <p class=\"govuk-body white\"><strong>Refund reference: {{refundReference}}</strong></p>\n </div>\n \n </div>\n <h2 class=\"govuk-heading-l\">What happens next</h2>\n <p class=\"govuk-body\">\n A refund request for {{refundAmount | currency:'GBP':'symbol-narrow':'1.2-2' }} has been created and will be passed to a team leader to approve.\n </p>\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"goToCaseTransationPage($event)\" class=\"govuk-link pointer\" data-module=\"govuk-button\">\n Return to case\n </a>\n </p>\n </div>\n </div>\n \n </ng-container>\n </div>\n",
9719
+ styles: [".govuk-grid-column-full--gr{position:relative;margin-bottom:10px}.disable{text-decoration:none;cursor:default;color:#fff;background-color:grey;pointer-events:none}.govuk-grid__surplus-payments{margin:20px 0}.govuk-grid__surplus-payments>.govuk-grid-column-full{padding:0}.govuk-grid__surplus-payments-col1{margin-bottom:10px}.govuk-inset-text__no-border{border-left:0}.govuk-hidetext{font-size:22px;padding-bottom:10px}.lowercase{text-transform:lowercase}.channel::first-letter{text-transform:uppercase}.govuk-heading-xl{font-size:48px;margin-bottom:1px}.govuk-section-break--visible{border-bottom:2px solid #000}.totalpayments.govuk-table__row{border-bottom:2px solid #000!important}.govuk-inset-text{margin-left:1em}.govuk-button{font-size:19px;margin-bottom:0!important}.govuk-table__cell.govuk-table__cell--col6.govuk-table__custom--col6,.groupamount.govuk-table__header{text-align:right}.feeclass{padding-left:.7em}.align-center{text-align:center}details summary{display:list-item}.case-transaction__color{color:#a71414;font-weight:700;text-align:center}.capitalize::first-letter{text-transform:uppercase}.govuk-inset-text__no-left-margin{margin-left:0;padding-left:0}.whitespace-inherit{white-space:inherit!important}.govuk-section-records-break{margin:10px;border-bottom:2px solid #000!important}.exisitng-fees{margin-left:12px}.add-telephony-payment{margin-top:-2em;margin-left:-2em}.govuk-table__header--custom{text-align:center}.disable-link{cursor:default;pointer-events:none;color:#8e8c8c}.panel-no--style{border-left-style:none}.col-28{width:28%!important}.col-8{width:8%!important}.col-60{width:60%!important}.col-32{width:32%!important}.col-34{width:34%!important}#bckLnksize{font-size:16px!important}.col-15{width:15%!important;padding-right:0!important;padding-left:0!important}.col-16{width:16%!important}.col-14{width:14%!important}.col-17{width:17%!important}.col-12{width:12%!important}.col-9{width:9%!important}.col-10{width:10%!important}.col-11{width:11%!important}.col-13{width:13%!important}.col-21{width:21%!important}.col-20{width:20%!important}.col-24{width:24%!important}.govuk-table__cell,.govuk-table__header{padding:10px 10px 10px 0}.col-27{width:27%!important}td{white-space:nowrap;overflow:hidden!important}.col-19{width:19%!important;padding-left:0!important}.col-18{width:18%!important;padding-left:0!important;padding-right:0!important}.col-37{width:37%!important}.col-55{width:55%!important}.govuk-table{margin-bottom:1px}.hmcts-banner>.hmcts-banner__message{font-size:19px;line-height:1.25}.summary-table-font{font-size:36px}.order-class{padding-top:3em}.govuk-table__cell:last-child,.govuk-table__header:last-child{text-align:right}.govuk-grid-column-two-thirds{width:64%!important;padding:0!important}.govuk-heading-l{font-size:36px;margin-bottom:10px}.paymentrequest{margin-top:1em}.mar-17{margin-left:17px}.col-61{width:61px!important;padding:0!important}.error{width:960px;margin:auto}.summarypage{padding-left:36em;margin-top:2em}.summarypagealign{width:100%;text-align:right;margin-top:2em}.govuk-inset-text{font-size:2.1875rem}table{table-layout:fixed;width:100%}td,th{word-wrap:break-word}.totalPay{padding-right:14px;float:right;margin-top:2em}.govuk-back-link{font-size:1.5rem!important}.totalfees{float:right;margin-top:2em}.refundBtn{text-align:right;width:18%}.col-25{width:25%!important}.col-51{width:51%!important}.alignright{text-align:right}.alignleft{text-align:left}.alignself{align-self:flex-end}.maxwidth{width:100%}.over-payment .govuk-table-mb{margin-bottom:20px}.over-payment .contactDetails-width{width:70%}.over-payment .margin-top10px{margin-top:20px}.over-payment .govuk-font19px{font-size:19px!important}.over-payment .margin-top--size{margin-top:-30px}.over-payment .over-payment-alignment{margin-right:10px}.over-payment .govuk-button{font-size:19px;float:left;margin-top:2em}.over-payment td.govuk-table__cell{width:50%;text-align:left}.over-payment .govuk-label--s,.over-payment .govuk-warning-text__text,.over-payment .hmcts-currency-input__symbol{font-size:19px;font-weight:400}.over-payment .inline-error-class{outline:#a71414 solid 3px;outline-offset:0;border-color:#a71414}.over-payment .inline-error-message{color:#a71414;border-color:#a71414;font-weight:700;margin-top:10px;font-size:20px}.over-payment .govuk-button-group{padding-top:2em}.over-payment .heading-medium{margin-top:.875em}.over-payment .heading-large{margin-top:.25em}.over-payment .govuk-panel--confirmation{color:#fff;background:#00703c}.over-payment .govuk-panel__title{font-size:5rem}.over-payment .govuk-body,.over-payment .govuk-body-m{font-size:2.1875rem}.over-payment .govuk-link{cursor:pointer}.over-payment .govuk-radios__conditional{padding-top:12px!important}.over-payment .right{float:right;cursor:pointer}.over-payment .radio{float:right}.over-payment .white{color:#fff}"]
8288
9720
  }] }
8289
9721
  ];
8290
9722
  /** @nocollapse */
@@ -8292,6 +9724,7 @@ ServiceRequestComponent.ctorParameters = () => [
8292
9724
  { type: PaymentLibComponent },
8293
9725
  { type: PaymentViewService },
8294
9726
  { type: OrderslistService },
9727
+ { type: ChangeDetectorRef },
8295
9728
  { type: Router }
8296
9729
  ];
8297
9730
  ServiceRequestComponent.propDecorators = {
@@ -8306,6 +9739,7 @@ ServiceRequestComponent.propDecorators = {
8306
9739
  orderFeesTotal: [{ type: Input, args: ['orderFeesTotal',] }],
8307
9740
  orderTotalPayments: [{ type: Input, args: ['orderTotalPayments',] }],
8308
9741
  orderRemissionTotal: [{ type: Input, args: ['orderRemissionTotal',] }],
9742
+ paymentGroupList: [{ type: Input, args: ['paymentGroupList',] }],
8309
9743
  takePayment: [{ type: Input, args: ['takePayment',] }],
8310
9744
  ccdCaseNumber: [{ type: Input, args: ['ccdCaseNumber',] }],
8311
9745
  isServiceRequest: [{ type: Input, args: ["isServiceRequest",] }],
@@ -8562,6 +9996,7 @@ PaymentLibModule.decorators = [
8562
9996
  PaymentListComponent,
8563
9997
  PaymentViewComponent,
8564
9998
  PbaPaymentComponent,
9999
+ ContactDetailsComponent,
8565
10000
  ProcessRefundComponent,
8566
10001
  RefundListComponent,
8567
10002
  CardDetailsComponent,
@@ -8605,6 +10040,6 @@ PaymentLibModule.decorators = [
8605
10040
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
8606
10041
  */
8607
10042
 
8608
- export { PaymentLibService, PaymentLibComponent, PaymentLibModule, AddRemissionComponent as ɵbb, AllocatePaymentsComponent as ɵw, CardDetailsComponent as ɵm, CaseTransactionsComponent as ɵz, ErrorBannerComponent as ɵbi, FeeSummaryComponent as ɵba, MarkUnidentifiedPaymentComponent as ɵr, MarkUnsolicitedPaymentComponent as ɵt, PageNotFoundComponent as ɵo, PaymentListComponent as ɵb, PaymentViewComponent as ɵf, PbaDetailsComponent as ɵy, PbaPaymentComponent as ɵi, ProcessRefundComponent as ɵj, ProcessedPaymentsComponent as ɵv, RefundListComponent as ɵl, RefundStatusComponent as ɵbk, ReportsComponent as ɵbg, ServiceRequestComponent as ɵbl, StatusHistoryComponent as ɵp, TableComponent as ɵbj, UnprocessedPaymentsComponent as ɵu, CapitalizePipe as ɵbd, CcdHyphensPipe as ɵbc, keyValuePipe as ɵbe, SanitizeHtmlPipe as ɵbf, BulkScaningPaymentService as ɵs, CardDetailsService as ɵn, CaseTransactionsService as ɵx, OrderslistService as ɵa, PaymentListService as ɵc, PaymentViewService as ɵg, RefundsService as ɵk, ErrorHandlerService as ɵe, WebComponentHttpClient as ɵh, ConsoleLoggerService as ɵbm, LoggerService as ɵd, StatusHistoryService as ɵq, XlFileService as ɵbh };
10043
+ export { PaymentLibService, PaymentLibComponent, PaymentLibModule, AddRemissionComponent as ɵbd, AllocatePaymentsComponent as ɵy, CardDetailsComponent as ɵo, CaseTransactionsComponent as ɵbb, ContactDetailsComponent as ɵj, ErrorBannerComponent as ɵbk, FeeSummaryComponent as ɵbc, MarkUnidentifiedPaymentComponent as ɵt, MarkUnsolicitedPaymentComponent as ɵv, PageNotFoundComponent as ɵq, PaymentListComponent as ɵb, PaymentViewComponent as ɵf, PbaDetailsComponent as ɵba, PbaPaymentComponent as ɵi, ProcessRefundComponent as ɵl, ProcessedPaymentsComponent as ɵx, RefundListComponent as ɵn, RefundStatusComponent as ɵbm, ReportsComponent as ɵbi, ServiceRequestComponent as ɵbn, StatusHistoryComponent as ɵr, TableComponent as ɵbl, UnprocessedPaymentsComponent as ɵw, CapitalizePipe as ɵbf, CcdHyphensPipe as ɵbe, keyValuePipe as ɵbg, SanitizeHtmlPipe as ɵbh, BulkScaningPaymentService as ɵu, CardDetailsService as ɵp, CaseTransactionsService as ɵz, NotificationService as ɵk, OrderslistService as ɵa, PaymentListService as ɵc, PaymentViewService as ɵg, RefundsService as ɵm, ErrorHandlerService as ɵe, WebComponentHttpClient as ɵh, ConsoleLoggerService as ɵbo, LoggerService as ɵd, StatusHistoryService as ɵs, XlFileService as ɵbj };
8609
10044
 
8610
10045
  //# sourceMappingURL=hmcts-ccpay-web-component.js.map