@hmcts/ccpay-web-component 6.0.0-beta21 → 6.0.0-beta24
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.
- package/bundles/hmcts-ccpay-web-component.umd.js +13 -4
- package/bundles/hmcts-ccpay-web-component.umd.js.map +1 -1
- package/bundles/hmcts-ccpay-web-component.umd.min.js +1 -1
- package/bundles/hmcts-ccpay-web-component.umd.min.js.map +1 -1
- package/esm2015/lib/components/pba-payment/pba-payment.component.js +6 -2
- package/esm2015/lib/interfaces/IserviceRequestPbaPayment.js +6 -2
- package/esm2015/lib/services/refunds/refunds.service.js +6 -2
- package/esm2015/lib/services/shared/httpclient/webcomponent.http.client.js +6 -2
- package/esm5/lib/components/pba-payment/pba-payment.component.js +6 -2
- package/esm5/lib/interfaces/IserviceRequestPbaPayment.js +5 -2
- package/esm5/lib/services/refunds/refunds.service.js +6 -2
- package/esm5/lib/services/shared/httpclient/webcomponent.http.client.js +6 -2
- package/fesm2015/hmcts-ccpay-web-component.js +16 -4
- package/fesm2015/hmcts-ccpay-web-component.js.map +1 -1
- package/fesm5/hmcts-ccpay-web-component.js +15 -4
- package/fesm5/hmcts-ccpay-web-component.js.map +1 -1
- package/lib/components/pba-payment/pba-payment.component.d.ts +1 -0
- package/lib/interfaces/IserviceRequestPbaPayment.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("rxjs/observable/throw"),require("rxjs"),require("@angular/common/http"),require("rxjs/operators"),require("@angular/platform-browser"),require("@angular/common"),require("file-saver"),require("xlsx"),require("@angular/material/table"),require("@angular/material/paginator"),require("@angular/material/sort"),require("@angular/material/form-field"),require("@angular/material/input"),require("@angular/forms"),require("@angular/router"),require("@angular/core")):"function"==typeof define&&define.amd?define("@hmcts/ccpay-web-component",["exports","rxjs/observable/throw","rxjs","@angular/common/http","rxjs/operators","@angular/platform-browser","@angular/common","file-saver","xlsx","@angular/material/table","@angular/material/paginator","@angular/material/sort","@angular/material/form-field","@angular/material/input","@angular/forms","@angular/router","@angular/core"],t):t((e.hmcts=e.hmcts||{},e.hmcts["ccpay-web-component"]={}),e.rxjs["observable/throw"],e.rxjs,e.ng.common.http,e.rxjs.operators,e.ng.platformBrowser,e.ng.common,e.FileSaver,e.XLSX,e.ng.material.table,e.ng.material.paginator,e.ng.material.sort,e.ng.material["form-field"],e.ng.material.input,e.ng.forms,e.ng.router,e.ng.core)}(this,function(e,t,o,s,a,n,r,i,l,c,d,u,p,m,g,h,f){"use strict";var y=(v.prototype.setApiRootUrl=function(e){this.API_ROOT=e},v.prototype.getApiRootUrl=function(){return this.API_ROOT},v.prototype.setBulkScanApiRootUrl=function(e){this.BULKSCAN_API_ROOT=e},v.prototype.getBulkScanApiRootUrl=function(){return this.BULKSCAN_API_ROOT},v.prototype.setRefundndsApiRootUrl=function(e){this.REFUNDS_API_ROOT=e},v.prototype.getRefundsApiRootUrl=function(){return this.REFUNDS_API_ROOT},v.prototype.setCardPaymentReturnUrl=function(e){this.CARDPAYMENTRETURNURL=e},v.prototype.getCardPaymentReturnUrl=function(){return this.CARDPAYMENTRETURNURL},v.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],v.ctorParameters=function(){return[]},v.ngInjectableDef=f.defineInjectable({factory:function(){return new v},token:v,providedIn:"root"}),v);function v(){}var b=(_.prototype.setOrdersList=function(e){this.ordersList.next(Object.assign([],e))},_.prototype.getOrdersList=function(){return this.ordersList},_.prototype.setRefundView=function(e){this.refundView.next(Object.assign([],e))},_.prototype.getRefundView=function(){return this.refundView},_.prototype.setCaseType=function(e){this.caseType.next(e)},_.prototype.getCaseType=function(){return this.caseType},_.prototype.setCCDCaseNumber=function(e){this.ccdCaseNumber.next(e)},_.prototype.getCCDCaseNumber=function(){return this.ccdCaseNumber},_.prototype.setFeeExists=function(e){this.feeExists.next(e)},_.prototype.getFeeExists=function(){return this.feeExists},_.prototype.setisFromServiceRequestPage=function(e){this.isFromServiceRequestPage.next(e)},_.prototype.getisFromServiceRequestPages=function(){return this.isFromServiceRequestPage},_.prototype.setOrderRefId=function(e){this.OrderRefId.next(e)},_.prototype.getSelectedOrderRefId=function(){return this.OrderRefId},_.prototype.setnavigationPage=function(e){this.navigationPage.next(e)},_.prototype.getnavigationPageValue=function(){return this.navigationPage},_.prototype.setpaymentPageView=function(e){this.paymentPageView.next(Object.assign([],e))},_.prototype.getpaymentPageView=function(){return this.paymentPageView},_.prototype.setUserRolesList=function(e){this.rolesList.next(Object.assign([],e))},_.prototype.getUserRolesList=function(){return this.rolesList},_.prototype.setorderDetail=function(e){this.orderDetail.next(Object.assign([],e))},_.prototype.getorderDetail=function(){return this.orderDetail},_.prototype.setOrderRef=function(e){this.orderRef.next(e)},_.prototype.getorderRefs=function(){return this.orderRef},_.prototype.setorderCCDEvent=function(e){this.orderCCDEvent.next(e)},_.prototype.getorderCCDEvents=function(){return this.orderCCDEvent},_.prototype.setorderCreated=function(e){this.orderCreated.next(e)},_.prototype.getorderCreateds=function(){return this.orderCreated},_.prototype.setorderParty=function(e){this.orderParty.next(e)},_.prototype.getorderPartys=function(){return this.orderParty},_.prototype.setorderRemissionTotal=function(e){this.orderRemissionTotal.next(e)},_.prototype.getorderRemissionTotals=function(){return this.orderRemissionTotal},_.prototype.setorderFeesTotal=function(e){this.orderFeesTotal.next(e)},_.prototype.getorderFeesTotals=function(){return this.orderFeesTotal},_.prototype.setorderTotalPayments=function(e){this.orderTotalPayments.next(e)},_.prototype.getoorderTotalPaymentss=function(){return this.orderTotalPayments},_.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],_.ctorParameters=function(){return[]},_.ngInjectableDef=f.defineInjectable({factory:function(){return new _},token:_,providedIn:"root"}),_);function _(){this.ordersList=new o.BehaviorSubject(null),this.refundView=new o.BehaviorSubject(null),this.caseType=new o.BehaviorSubject(""),this.getcaseType=this.caseType.asObservable(),this.feeExists=new o.BehaviorSubject(null),this.getFeeExist=this.feeExists.asObservable(),this.ccdCaseNumber=new o.BehaviorSubject(""),this.getCCDCaseNumberforRefund=this.ccdCaseNumber.asObservable(),this.isFromServiceRequestPage=new o.BehaviorSubject(null),this.getisFromServiceRequestPage=this.isFromServiceRequestPage.asObservable(),this.OrderRefId=new o.BehaviorSubject(""),this.getOrderRefId=this.OrderRefId.asObservable(),this.navigationPage=new o.BehaviorSubject(""),this.getnavigationPage=this.navigationPage.asObservable(),this.orderRef=new o.BehaviorSubject(""),this.getorderRef=this.orderRef.asObservable(),this.orderCCDEvent=new o.BehaviorSubject(""),this.getorderCCDEvent=this.caseType.asObservable(),this.orderCreated=new o.BehaviorSubject(null),this.getorderCreated=this.orderCreated.asObservable(),this.orderParty=new o.BehaviorSubject(""),this.getorderParty=this.orderParty.asObservable(),this.orderRemissionTotal=new o.BehaviorSubject(null),this.getorderRemissionTotal=this.orderRemissionTotal.asObservable(),this.orderFeesTotal=new o.BehaviorSubject(null),this.getorderFeesTotal=this.orderFeesTotal.asObservable(),this.orderTotalPayments=new o.BehaviorSubject(null),this.getorderTotalPayments=this.orderTotalPayments.asObservable(),this.rolesList=new o.BehaviorSubject(null),this.orderDetail=new o.BehaviorSubject(null),this.paymentPageView=new o.BehaviorSubject(null)}var k=(R.prototype.ngAfterContentChecked=function(){this.cd.detectChanges()},R.prototype.ngOnInit=function(){this.paymentLibService.setApiRootUrl(this.API_ROOT),this.paymentLibService.setBulkScanApiRootUrl(this.BULKSCAN_API_ROOT),this.paymentLibService.setRefundndsApiRootUrl(this.REFUNDS_API_ROOT),this.paymentLibService.setCardPaymentReturnUrl(this.CARDPAYMENTRETURNURL),0<this.LOGGEDINUSERROLES.length&&this.OrderslistService.setUserRolesList(this.LOGGEDINUSERROLES),this.PAYMENT_GROUP_REF&&(this.paymentGroupReference=this.PAYMENT_GROUP_REF),this.DCN_NUMBER&&(this.bspaymentdcn=this.DCN_NUMBER),"true"===this.REFUNDLIST&&(this.VIEW="refund-list",this.viewName=this.VIEW),"fee-summary"===this.VIEW?this.viewName="fee-summary":"reports"!==this.VIEW&&"refund-list"!==this.VIEW?this.viewName="case-transactions":this.viewName=this.VIEW,this.isTakePayment&&(this.TAKEPAYMENT=!0)},R.decorators=[{type:f.Component,args:[{selector:"ccpay-payment-lib",template:'\n <ccpay-refund-list [USERID]="USERID" [LOGGEDINUSERROLES]="LOGGEDINUSERROLES" [LOGGEDINUSEREMAIL]="LOGGEDINUSEREMAIL" *ngIf="viewName === \'refund-list\'"></ccpay-refund-list>\n <ccpay-payment-list *ngIf="viewName === \'payment-list\'"></ccpay-payment-list>\n <ccpay-refund-status [LOGGEDINUSERROLES]="LOGGEDINUSERROLES" *ngIf="viewName === \'refundstatuslist\'"> </ccpay-refund-status >\n <ccpay-payment-view [LOGGEDINUSERROLES]="LOGGEDINUSERROLES" *ngIf="viewName === \'payment-view\'"\n [isTurnOff]="ISTURNOFF" [isTakePayment]="TAKEPAYMENT" [caseType]="CASETYPE"\n [isOldPcipalOff]="ISOLDPCIPALOFF"\n [isNewPcipalOff]="ISNEWPCIPALOFF"></ccpay-payment-view>\n\n <ccpay-process-refund *ngIf="viewName === \'process-refund\'"\n [refundReference]="refundReference"\n [refundlistsource]="refundlistsource"\n ></ccpay-process-refund>\n <ccpay-pba-payment *ngIf="viewName === \'pba-payment\'"\n [pbaPayOrderRef]="pbaPayOrderRef"\n ></ccpay-pba-payment>\n <ccpay-case-transactions [isTakePayment]="isTakePayment" [LOGGEDINUSERROLES]="LOGGEDINUSERROLES" *ngIf="viewName === \'case-transactions\'"></ccpay-case-transactions>\n <app-mark-unidentified-payment *ngIf="viewName === \'unidentifiedPage\'"\n [caseType]="CASETYPE"></app-mark-unidentified-payment>\n <app-mark-unsolicited-payment *ngIf="viewName === \'unsolicitedPage\'"\n [caseType]="CASETYPE"></app-mark-unsolicited-payment>\n <app-allocate-payments *ngIf="viewName === \'allocate-payments\'"\n [isTurnOff]="ISTURNOFF"\n [caseType]="CASETYPE"\n ></app-allocate-payments>\n <ccpay-fee-summary *ngIf="viewName === \'fee-summary\'"\n [ccdCaseNumber]="CCD_CASE_NUMBER" \n [paymentGroupRef]="paymentGroupReference"\n [isTurnOff]="ISTURNOFF"\n [caseType]="CASETYPE"\n [isOldPcipalOff]="ISOLDPCIPALOFF"\n [isNewPcipalOff]="ISNEWPCIPALOFF"\n ></ccpay-fee-summary>\n <ccpay-reports *ngIf="viewName === \'reports\'"></ccpay-reports>\n '}]}],R.ctorParameters=function(){return[{type:y},{type:f.ChangeDetectorRef},{type:b}]},R.propDecorators={API_ROOT:[{type:f.Input,args:["API_ROOT"]}],BULKSCAN_API_ROOT:[{type:f.Input,args:["BULKSCAN_API_ROOT"]}],REFUNDS_API_ROOT:[{type:f.Input,args:["REFUNDS_API_ROOT"]}],CARDPAYMENTRETURNURL:[{type:f.Input,args:["CARDPAYMENTRETURNURL"]}],CCD_CASE_NUMBER:[{type:f.Input,args:["CCD_CASE_NUMBER"]}],EXC_REFERENCE:[{type:f.Input,args:["EXC_REFERENCE"]}],PAYMENT_METHOD:[{type:f.Input,args:["PAYMENT_METHOD"]}],VIEW:[{type:f.Input,args:["VIEW"]}],VIEWSERVICE:[{type:f.Input,args:["VIEWSERVICE"]}],PAYMENT_GROUP_REF:[{type:f.Input,args:["PAYMENT_GROUP_REF"]}],TAKEPAYMENT:[{type:f.Input,args:["TAKEPAYMENT"]}],SERVICEREQUEST:[{type:f.Input,args:["SERVICEREQUEST"]}],DCN_NUMBER:[{type:f.Input,args:["DCN_NUMBER"]}],SELECTED_OPTION:[{type:f.Input,args:["SELECTED_OPTION"]}],ISBSENABLE:[{type:f.Input,args:["ISBSENABLE"]}],ISSFENABLE:[{type:f.Input,args:["ISSFENABLE"]}],ISTURNOFF:[{type:f.Input,args:["ISTURNOFF"]}],CASETYPE:[{type:f.Input,args:["CASETYPE"]}],ISOLDPCIPALOFF:[{type:f.Input,args:["ISOLDPCIPALOFF"]}],ISNEWPCIPALOFF:[{type:f.Input,args:["ISNEWPCIPALOFF"]}],rootUrl:[{type:f.Input,args:["rootUrl"]}],REFUNDLIST:[{type:f.Input,args:["REFUNDLIST"]}],USERID:[{type:f.Input,args:["USERID"]}],LOGGEDINUSERROLES:[{type:f.Input,args:["LOGGEDINUSERROLES"]}],LOGGEDINUSEREMAIL:[{type:f.Input,args:["LOGGEDINUSEREMAIL"]}],isFromServiceRequestPage:[{type:f.Input,args:["isFromServiceRequestPage"]}]},R);function R(e,t,n){this.paymentLibService=e,this.cd=t,this.OrderslistService=n,this.unProcessedPaymentServiceId=null,this.unProcessedPayment=null,this.orderFeesTotal=0,this.orderRemissionTotal=0,this.orderTotalPayments=0,this.orderPendingPayments=0}var S=(E.prototype.handleError=function(e){e=e.error instanceof Error?"An error occurred: "+e.error.message:404===e.status?"string"==typeof e.error&&e.error!==undefined?60<e.error.length?JSON.parse(e.error).statusCode!==undefined&&500===JSON.parse(e.error).statusCode?"Internal server error":(60<e.error.length?JSON.parse(e.error):e).error:e.error:JSON.parse(e.error).error:500===e.status?"Internal server error":e.error.messsage===undefined?"object"==typeof e.error?JSON.parse(JSON.stringify(e.error)).error:"string"==typeof e.error&&e.error!==undefined?60<e.error.length?JSON.parse(e.error).statusCode!==undefined&&500===JSON.parse(e.error).statusCode?"Internal server error":(60<e.error.length?JSON.parse(e.error):e).error:e.error:JSON.parse(e.error).error:e.error.message!==undefined?""+e.error.message:""+e.error;return t._throw(e)},E.prototype.getServerErrorMessage=function(e){return{title:"There is a problem with the service",body:"Try again later",showError:e}},E.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],E.ctorParameters=function(){return[]},E.ngInjectableDef=f.defineInjectable({factory:function(){return new E},token:E,providedIn:"root"}),E);function E(){}var w=(C.prototype.invokeConsoleMethod=function(e,t){},C.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],C.ngInjectableDef=f.defineInjectable({factory:function(){return new C},token:C,providedIn:"root"}),C);function C(){}var P=(I.prototype.getPaymentByCcdCaseNumber=function(e,t){return this.logger.info("Payment-list-service getPaymentByCcdCaseNumber for: ",e),this.http.get(this.paymentLibService.API_ROOT+"/cases/"+e+"/payments",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},I.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],I.ctorParameters=function(){return[{type:s.HttpClient},{type:w},{type:S},{type:y}]},I.ngInjectableDef=f.defineInjectable({factory:function(){return new I(f.inject(s.HttpClient),f.inject(w),f.inject(S),f.inject(y))},token:I,providedIn:"root"}),I);function I(e,t,n,s){this.http=e,this.logger=t,this.errorHandlerService=n,this.paymentLibService=s}var A=(O.prototype.ngOnInit=function(){var t=this;this.paymentListService.getPaymentByCcdCaseNumber(this.paymentLibComponent.CCD_CASE_NUMBER,this.paymentLibComponent.PAYMENT_METHOD).subscribe(function(e){return t.payments=e},function(e){return t.errorMessage=e})},O.prototype.loadPaymentViewComponent=function(e,t,n){this.paymentLibComponent.paymentMethod=n,this.paymentLibComponent.paymentGroupReference=e,this.paymentLibComponent.paymentReference=t,this.paymentLibComponent.viewName="payment-view"},O.decorators=[{type:f.Component,args:[{selector:"ccpay-payment-list",template:'<div class="govuk-width-container">\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 Payments list could not be retrieved\n </h2>\n <div class="govuk-error-summary__body">\n {{ errorMessage }}\n </div>\n </div>\n </div>\n\n <div *ngIf="!errorMessage && payments">\n\n <table class="table">\n <tr>\n <th class="bold font-xsmall">Payment group reference</th>\n <th class="bold font-xsmall">Payment reference</th>\n <th class="bold font-xsmall">Date created</th>\n <th class="bold font-xsmall">Channel</th>\n <th class="bold font-xsmall">Method</th>\n <th class="bold font-xsmall">Amount</th>\n <th class="bold font-xsmall">Status</th>\n </tr>\n <tr *ngFor="let payment of payments.payments">\n <td class="font-xsmall">\n <a href="javascript:void(0)" (click)="loadPaymentViewComponent(payment.payment_group_reference, payment.payment_reference, payment.method)">{{ payment.payment_group_reference }}</a>\n <td class="font-xsmall">{{ payment.payment_reference }}</td>\n <td class="font-xsmall">{{ payment.date_created | date:\'dd MMM yyyy\' }}</td>\n <td class="font-xsmall">{{ payment.channel | titlecase }}</td>\n <td class="font-xsmall">{{ payment.method | titlecase }}</td>\n <td class="font-xsmall">£{{ payment.amount | number:\'.2\' }}</td>\n <td *ngIf="payment.method === \'card\' && payment.channel === \'online\'">\n <details>\n <summary><span class="summary font-xsmall">{{ payment.status }}</span></summary>\n <div class="panel panel-border-narrow" *ngIf="payment.status === \'Failed\'">\n <div *ngFor="let statusHistory of payment.status_histories">\n <p class="font-xsmall" *ngIf="statusHistory.error_code === \'P0010\'">\n Payment rejected due to payment method selected or payment information entered, for example, failed fraud check, a 3D Secure authentication failure, or the user does not have enough money in account\n </p>\n <p class="font-xsmall" *ngIf="statusHistory.error_code === \'P0020\'">\n Payment was not confirmed and completed within 90 minutes of being created\n </p>\n <p class="font-xsmall" *ngIf="statusHistory.error_code === \'P0030\'">\n User clicked on the “Cancel payment” button during the payment journey\n </p>\n <p class="font-xsmall" *ngIf="statusHistory.error_code === \'P0050\'">\n Multiple possible causes, for example a configuration problem with the payment provider, or incorrect login credentials\n </p>\n </div>\n </div>\n </details>\n </td>\n <td *ngIf="payment.method === \'card\' && payment.channel === \'telephony\'" class="font-xsmall">\n {{ payment.status}}\n </td>\n <td *ngIf="payment.method === \'payment by account\'">\n <details>\n <summary><span class="summary font-xsmall">{{ payment.status }}</span></summary>\n <div class="panel panel-border-narrow" *ngIf="payment.status === \'Pending\'">\n <p class="font-xsmall">This means the transaction is being processed by Liberata.</p>\n </div>\n </details>\n </td>\n </tr>\n </table>\n\n </div>\n\n</div>\n',styles:[""]}]}],O.ctorParameters=function(){return[{type:P},{type:k}]},O);function O(e,t){this.paymentListService=e,this.paymentLibComponent=t}function F(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],s=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&s>=e.length?void 0:e)&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var T=(L.prototype.post=function(e,t,n){n=this.addHeaders(n||{});return this.http.post(e,t,n)},L.prototype.put=function(e,t,n){n=this.addHeaders(n||{});return this.http.put(e,t,n)},L.prototype.get=function(e,t){t=this.addHeaders(t||{});return this.http.get(e,t)},L.prototype["delete"]=function(e,t){t=this.addHeaders(t||{});return this.http["delete"](e,t)},L.prototype.patch=function(e,t,n){n=this.addHeaders(n||{});return this.http.patch(e,t,n)},L.prototype.addHeaders=function(t){var e=this.meta.getTag("name=csrf-token"),n={};return t.headers&&t.headers.forEach(function(e){n[e]=t.headers.get(e)}),n["X-Requested-With"]="XMLHttpRequest",n["CSRF-Token"]=null===e?document.cookie.split(";").find(function(e){return e.startsWith(" XSRF-TOKEN")}).split("=")[1]:e.content,t.headers=new s.HttpHeaders(n),t.responseType="text",t},L.decorators=[{type:f.Injectable}],L.ctorParameters=function(){return[{type:s.HttpClient},{type:n.Meta}]},L);function L(e,t){this.http=e,this.meta=t}var D=(N.prototype.getPaymentDetails=function(e,t){return this.logger.info("Payment-view-service getPaymentDetails for: ",e),this.http.get("card"===t||"cash"===t||"cheque"===t||"postal order"===t?this.paymentLibService.API_ROOT+"/card-payments/"+e:this.paymentLibService.API_ROOT+"/credit-account-payments/"+e,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.getPaymentGroupDetails=function(e){return this.logger.info("Payment-view-service getPaymentGroupDetails for: ",e),this.http.get(this.paymentLibService.API_ROOT+"/payment-groups/"+e,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.getApportionPaymentDetails=function(e){return this.logger.info("Payment-view-service getPaymentGroupDetails for: ",e),this.http.get(this.paymentLibService.API_ROOT+"/payment-groups/fee-pay-apportion/"+e,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.getPBAaccountDetails=function(){var e=this.paymentLibService.API_ROOT+"/pba-accounts";return this.http.get(e,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.postWays2PayCardPayment=function(e,t){var n=this.paymentLibService.API_ROOT+"/service-request/"+e+"/card-payments",e=this.paymentLibService.CARDPAYMENTRETURNURL.replace(".prod","");return t["return-url"]=e+"/payment",this.https.post(n,t).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.postPBAaccountPayment=function(e,t){var n="idam-key-"+Math.random().toString().split(".").join("-");t.idempotency_key=n;e=this.paymentLibService.API_ROOT+"/service-request/"+e+"/pba-payments";return this.https.post(e,t)},N.prototype.postBSPayments=function(e){return this.https.post(this.paymentLibService.API_ROOT+"/payment-groups/bulk-scan-payments",e).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.postBSUnidentifiedPayments=function(e){return this.https.post(this.paymentLibService.API_ROOT+"/payment-allocations",e).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.postBSUnsolicitedPayments=function(e){return this.https.post(this.paymentLibService.API_ROOT+"/payment-allocations",e).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.postBSAllocationPayments=function(e){return this.https.post(this.paymentLibService.API_ROOT+"/payment-allocations",e).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.postPaymentGroupWithRemissions=function(e,t,n){return this.https.post(this.paymentLibService.API_ROOT+"/payment-groups/"+e+"/fees/"+t+"/remissions",n).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.deleteFeeFromPaymentGroup=function(e){return this.logger.info("Payment-view-service deleteFeeFromPaymentGroup for: ",e),this.https["delete"](this.paymentLibService.API_ROOT+"/fees/"+e).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.postPaymentToPayHub=function(e,t){return this.https.post(this.paymentLibService.API_ROOT+"/payment-groups/"+t+"/card-payments",e).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.postPaymentAntennaToPayHub=function(e,t){return this.https.post(this.paymentLibService.API_ROOT+"/payment-groups/"+t+"/telephony-card-payments",e).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.downloadSelectedReport=function(e,t,n){e=this.paymentLibService.API_ROOT+"/report/data?date_from="+t+"&date_to="+n+"&report_type="+e;return this.https.get(e,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.getBSfeature=function(){return this.https.get("api/payment-history/bulk-scan-feature",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.getSiteID=function(){return this.https.get("api/payment-history/refdata/legacy-sites",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.getPartyDetails=function(e){e=this.paymentLibService.API_ROOT+"/case-payment-orders?case_ids="+e;return this.https.get(e,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.setOrdersList=function(e){this.ordersList.next(Object.assign([],e))},N.prototype.getOrdersList=function(){return this.ordersList},N.prototype.postRefundsReason=function(e){return this.https.post(this.paymentLibService.API_ROOT+"/refund-for-payment",e).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.postPaymentGroupWithRetroRemissions=function(e,t,n){return this.https.post(this.paymentLibService.API_ROOT+"/payment-groups/"+e+"/fees/"+t+"/retro-remission",n).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.postRefundRetroRemission=function(e){return this.https.post(this.paymentLibService.API_ROOT+"/refund-retro-remission",e).pipe(a.catchError(this.errorHandlerService.handleError))},N.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],N.ctorParameters=function(){return[{type:s.HttpClient},{type:T},{type:w},{type:S},{type:y}]},N.ngInjectableDef=f.defineInjectable({factory:function(){return new N(f.inject(s.HttpClient),f.inject(T),f.inject(w),f.inject(S),f.inject(y))},token:N,providedIn:"root"}),N);function N(e,t,n,s,a){this.http=e,this.https=t,this.logger=n,this.errorHandlerService=s,this.paymentLibService=a,this.ordersList=new o.BehaviorSubject([])}var x=(B.prototype.ngAfterContentChecked=function(){this.cd.detectChanges()},B.prototype.ngOnInit=function(){var s=this;this.ccdCaseNumber=this.paymentLibComponent.CCD_CASE_NUMBER,this.selectedOption=this.paymentLibComponent.SELECTED_OPTION,this.dcnNumber=this.paymentLibComponent.DCN_NUMBER,this.isTurnOff=this.paymentLibComponent.ISTURNOFF,this.serviceReference=this.paymentLibComponent.paymentGroupReference,this.viewStatus="paymentview",this.paymentViewService.getApportionPaymentDetails(this.paymentLibComponent.paymentReference).subscribe(function(e){var n=[];e.fees.forEach(function(t){s.isRemissionsMatch=!1,e.remissions.forEach(function(e){e.fee_code===t.code&&(s.isRemissionsMatch=!0,t.remissions=e,n.push(t))}),s.isRemissionsMatch||n.push(t)}),e.fees=n,s.paymentGroup=e,s.paymentGroup.payments=s.paymentGroup.payments.filter(function(e){return e.reference.includes(s.paymentLibComponent.paymentReference)});var t=s.paymentGroup.payments[0].payment_allocation;s.isStatusAllocated=0<t.length&&"Allocated"===t[0].allocation_status||0===t.length},function(e){return s.errorMessage=e})},Object.defineProperty(B.prototype,"isCardPayment",{get:function(){return"card"===this.paymentGroup.payments[0].method},enumerable:!0,configurable:!0}),Object.defineProperty(B.prototype,"isTelephonyPayment",{get:function(){return"telephony"===this.paymentGroup.payments[0].channel},enumerable:!0,configurable:!0}),B.prototype.goToPaymentList=function(){this.paymentLibComponent.viewName="payment-list"},B.prototype.goToCaseTransationPage=function(e){var t=this;e.preventDefault(),this.paymentLibComponent.isFromServiceRequestPage?(this.OrderslistService.getorderRefs().subscribe(function(e){return t.orderRef=e}),this.OrderslistService.getorderCCDEvents().subscribe(function(e){return t.orderCCDEvent=e}),this.OrderslistService.getorderCreateds().subscribe(function(e){return t.orderCreated=e}),this.OrderslistService.getorderDetail().subscribe(function(e){return t.orderDetail=e}),this.OrderslistService.getorderPartys().subscribe(function(e){return t.orderParty=e}),this.OrderslistService.getorderRemissionTotals().subscribe(function(e){return t.orderRemissionTotal=e}),this.OrderslistService.getorderFeesTotals().subscribe(function(e){return t.orderFeesTotal=e}),this.OrderslistService.getoorderTotalPaymentss().subscribe(function(e){return t.orderTotalPayments=e}),this.viewStatus="order-full-view"):(this.OrderslistService.setnavigationPage("casetransactions"),this.OrderslistService.setisFromServiceRequestPage(!1),this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.ISBSENABLE=!0,this.resetOrderData())},B.prototype.addRemission=function(e){var t=this;this.chkForAddRemission(e.code)&&(this.feeId=e,this.paymentViewService.getApportionPaymentDetails(this.paymentGroup.payments[0].reference).subscribe(function(e){t.paymentGroup=e,t.paymentGroup.payments=t.paymentGroup.payments.filter(function(e){return e.reference.includes(t.paymentLibComponent.paymentReference)}),t.payment=t.paymentGroup.payments[0],t.paymentLibComponent.isFromPaymentDetailPage=!0,t.viewStatus="addremission",t.isRefundRemission=!0,t.cd.detectChanges()},function(e){return t.errorMessage=e}))},B.prototype.checkForFees=function(e){return null!==e&&e!==undefined&&null!==e.fees&&e.fees!==undefined},B.prototype.addRefundForRemission=function(e,t,n){var s=this;this.chkIsRefundRemissionBtnEnable()&&(this.payment=e,this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(function(e){s.paymentGroup=e,s.paymentGroup.payments=s.paymentGroup.payments.filter(function(e){return e.reference.includes(s.payment.reference)}),s.payment=s.paymentGroup.payments[0],s.remissions=t,s.remissionFeeAmt=n.filter(function(e){return e.code===s.remissions.fee_code})[0].net_amount,s.viewStatus="addrefundforremission"},function(e){return s.errorMessage=e}))},B.prototype.chkIsRefundRemissionBtnEnable=function(){var t=this;if(null!==this.paymentGroup&&this.paymentGroup!==undefined)return this.paymentGroup.payments.forEach(function(e){"payment by account"===e.method.toLocaleLowerCase()&&"success"===e.status.toLocaleLowerCase()&&t.allowFurtherAccessAfter4Days(e)&&(t.isRefundRemissionBtnEnable=!0)}),!!this.isRefundRemissionBtnEnable},B.prototype.issueRefund=function(e){null!==e&&e!==undefined&&this.chkIssueRefundBtnEnable(e.payments[0])&&(this.paymentGroup=e,this.viewStatus="issuerefund",this.isRefundRemission=!0,this.paymentLibComponent.isFromPaymentDetailPage=!0,this.isFromPaymentDetailPage=!0,this.isFromServiceRequestPage=this.paymentLibComponent.isFromServiceRequestPage)},B.prototype.getRemissionByFeeCode=function(e,t){var n,s;if(t&&0<t.length)try{for(var a=F(t),o=a.next();!o.done;o=a.next()){var r=o.value;if(r.fee_code===e)return r}}catch(i){n={error:i}}finally{try{o&&!o.done&&(s=a["return"])&&s.call(a)}finally{if(n)throw n.error}}return null},B.prototype.chkIssueRefundBtnEnable=function(e){return this.check4AllowedRoles2AccessRefund()&&this.allowFurtherAccessAfter4Days(e)&&"payment by account"===e.method&&"success"===e.status.toLocaleLowerCase()&&(this.isIssueRefunfBtnEnable=!0),!!this.isIssueRefunfBtnEnable},B.prototype.chkForPBAPayment=function(){if(null!==this.paymentGroup&&this.paymentGroup!==undefined){var e=this.paymentGroup.payments[0];return"payment by account"===e.method.toLocaleLowerCase()&&this.allowFurtherAccessAfter4Days(e)?!0:!1}},B.prototype.chkForAddRemission=function(e){var t,n;if(this.chkForPBAPayment()&&this.check4AllowedRoles2AccessRefund()&&this.allowFurtherAccessAfter4Days(this.paymentGroup.payments[0])){if(this.paymentGroup.remissions&&0<this.paymentGroup.remissions.length){try{for(var s=F(this.paymentGroup.remissions),a=s.next();!a.done;a=s.next())if(a.value.fee_code===e)return!1}catch(o){t={error:o}}finally{try{a&&!a.done&&(n=s["return"])&&n.call(s)}finally{if(t)throw t.error}}return!0}return!0}return!1},B.prototype.resetOrderData=function(){this.OrderslistService.setOrderRef(null),this.OrderslistService.setorderCCDEvent(null),this.OrderslistService.setorderCreated(null),this.OrderslistService.setorderDetail(null),this.OrderslistService.setorderParty(null),this.OrderslistService.setorderTotalPayments(null),this.OrderslistService.setorderRemissionTotal(null),this.OrderslistService.setorderFeesTotal(null)},B.decorators=[{type:f.Component,args:[{selector:"ccpay-payment-view",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">£{{ 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 \x3c!-- <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> --\x3e\n \x3c!-- <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> --\x3e\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 \x3c!-- Status histories --\x3e\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 \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}">£{{ 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}">£{{ 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\n\n \n \x3c!-- <button *ngIf="paymentGroup.payments[0].method === \'payment by account\'" (click)="addRemission(fee)" class="govuk-button govuk-button--secondary"> Add remission</button>\n --\x3e\n\n </div>\n\n \x3c!-- remissions --\x3e\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 \x3c!-- <td *ngIf="!chkIsRefundRemissionBtnEnable()" class="govuk-table__cell refundBtn whitespace-inherit" >\n \n </td> --\x3e\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\n\n\n \x3c!-- card details --\x3e\n \x3c!-- <ccpay-card-details *ngIf="isCardPayment && !isTelephonyPayment"></ccpay-card-details> --\x3e\n\n \x3c!-- pba details --\x3e\n \x3c!-- <ccpay-pba-details *ngIf="!isCardPayment" [payment]="paymentGroup.payments[0]"></ccpay-pba-details> --\x3e\n\n \n\n </div>\n\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[isOldPcipalOff]="isOldPcipalOff" \n[viewCompStatus]= "viewStatus"\n[isNewPcipalOff]="isNewPcipalOff" \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[isOldPcipalOff]="isOldPcipalOff" \n[viewCompStatus]= "viewStatus"\n[isNewPcipalOff]="isNewPcipalOff" \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 [isOldPcipalOff]="isOldPcipalOff" \n [payment] = \'paymentGroup.payments[0]\'\n [viewCompStatus]= "viewStatus"\n [isNewPcipalOff]="isNewPcipalOff" \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</ccpay-service-request>\n</ng-container>\n\x3c!-- <ng-container *ngIf="isTakePayment">\n <div class="govuk-width-container">\n <div class="govuk-breadcrumbs">\n <ol class="govuk-breadcrumbs__list">\n <li class="govuk-breadcrumbs__list-item">\n <a href="#" (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">\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 <tr class="section" *ngIf="isTurnOff">\n <td class="bold tb-col-w">Payment group reference</td>\n <td>{{ paymentGroup.payment_group_reference }}</td>\n </tr>\n <tr class="section">\n <td class="bold tb-col-w">Payment reference</td>\n <td>{{ paymentGroup.payments[0].reference }}</td>\n </tr>\n <tr class="section">\n <td class="bold tb-col-w">Payment amount</td>\n <td>£{{ paymentGroup.payments[0].amount | number:\'.2\' }}</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>{{ paymentGroup.payments[0].external_reference }}</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>{{ 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>{{ paymentGroup.payments[0].banked_date | date:\'dd MMM yyyy\' }}</td>\n </tr>\n </tbody>\n </table>\n \n <div class="govuk-grid-row" *ngIf="paymentGroup.fees.length > 0">\n <div class="column">\n <h2 class="heading-large">Fee and remission details</h2>\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>Application for {{ fee.description }}</td>\n </tr>\n <tr class="section">\n <td class="bold tb-col-w">Fee code</td>\n <td>{{ 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 }">£{{ fee.calculated_amount | number:\'.2\' }}</td>\n </tr>\n <tr *ngIf="fee.net_amount && isTurnOff">\n <td class="bold tb-col-w" [ngClass]="{\'tr-border\': !fee.apportion_amount && !fee.remissions}" >Net amount</td>\n <td [ngClass]="{\'tr-border\': !fee.apportion_amount && !fee.remissions}">£{{ fee.net_amount | number:\'.2\' }}</td>\n </tr>\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}">£{{ fee.apportion_amount | number:\'.2\' }}</td>\n </tr>\n \n <tr *ngIf="fee.remissions">\n <td class="bold tb-col-w">Remission code</td>\n <td>{{fee.remissions.hwf_reference}}</td>\n </tr>\n <tr *ngIf="fee.remissions">\n <td class="bold tb-col-w tr-border">Remission amount</td>\n <td class="tr-border">£{{ fee.remissions.hwf_amount | number:\'.2\'}}</td>\n </tr>\n </tbody>\n </table>\n \n </div>\n \n \x3c!-- card details --\x3e\n \x3c!-- <ccpay-card-details *ngIf="isCardPayment && !isTelephonyPayment"></ccpay-card-details>\n --\x3e\n \x3c!-- pba details --\x3e\n \x3c!-- <ccpay-pba-details *ngIf="!isCardPayment" [payment]="paymentGroup.payments[0]"></ccpay-pba-details> --\x3e\n \x3c!-- Status histories --\x3e\n \x3c!-- <ccpay-payment-statuses *ngIf="isStatusAllocated"[isTakePayment]="isTakePayment" ></ccpay-payment-statuses>\n \n </div>\n \n </main>\n </div> --\x3e\n\x3c!-- </ng-container> --\x3e \n',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}"]}]}],B.ctorParameters=function(){return[{type:D},{type:k},{type:f.ChangeDetectorRef},{type:b}]},B.propDecorators={isTurnOff:[{type:f.Input}],isTakePayment:[{type:f.Input}],caseType:[{type:f.Input}],isNewPcipalOff:[{type:f.Input}],isOldPcipalOff:[{type:f.Input}],orderRef:[{type:f.Input}],orderStatus:[{type:f.Input}],orderTotalPayments:[{type:f.Input}],payment:[{type:f.Input}],LOGGEDINUSERROLES:[{type:f.Input}],orderParty:[{type:f.Input}],orderCreated:[{type:f.Input}],orderCCDEvent:[{type:f.Input}],orderFeesTotal:[{type:f.Input}],orderRemissionTotal:[{type:f.Input}],orderDetail:[{type:f.Input}]},B);function B(e,t,n,s){var a=this;this.paymentViewService=e,this.paymentLibComponent=t,this.cd=n,this.OrderslistService=s,this.isRefundRemission=!1,this.isAddFeeBtnEnabled=!1,this.isIssueRefunfBtnEnable=!1,this.allowedRolesToAccessRefund=["payments-refund-approver","payments-refund"],this.remissions=[],this.check4AllowedRoles2AccessRefund=function(){return a.allowedRolesToAccessRefund.some(function(e){return-1!==a.LOGGEDINUSERROLES.indexOf(e)})},this.allowFurtherAccessAfter4Days=function(e){if(null!==e&&e!==undefined){var t=new Date;return t.setDate(t.getDate()-4),t>=new Date(e.date_created)}}}var M=(G.prototype.getRefundReasons=function(){return this.http.get(this.paymentLibService.REFUNDS_API_ROOT+"/reasons",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},G.prototype.getRefundRejectReasons=function(){return this.http.get(this.paymentLibService.REFUNDS_API_ROOT+"/rejection-reasons",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},G.prototype.getRefundActions=function(e){return this.http.get(this.paymentLibService.REFUNDS_API_ROOT+"/"+e+"/actions",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},G.prototype.patchRefundActions=function(e,t,n){return this.https.patch(this.paymentLibService.REFUNDS_API_ROOT+"/"+t+"/action/"+n,e).pipe(a.catchError(this.errorHandlerService.handleError))},G.prototype.getRefundList=function(e,t){return this.http.get(this.paymentLibService.REFUNDS_API_ROOT+"?status="+e+"&excludeCurrentUser="+t,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},G.prototype.getRefundStatusHistory=function(e){return this.http.get(this.paymentLibService.REFUNDS_API_ROOT+"/"+e+"/status-history",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},G.prototype.getRefundStatusList=function(e){return this.http.get(this.paymentLibService.REFUNDS_API_ROOT+"?ccdCaseNumber="+e,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},G.prototype.getUserDetails=function(){return this.http.get(this.paymentLibService.REFUNDS_API_ROOT+"/get-user-details",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},G.prototype.postIssueRefund=function(e){return this.https.post(this.paymentLibService.REFUNDS_API_ROOT+"/refund",e).pipe(a.catchError(this.errorHandlerService.handleError))},G.prototype.patchResubmitRefund=function(e,t){return this.https.patch(this.paymentLibService.REFUNDS_API_ROOT+"/resubmit/"+t,e).pipe(a.catchError(this.errorHandlerService.handleError))},G.prototype.addHeaders=function(t){var e=this.meta.getTag("name=csrf-token"),n={};return t.headers&&t.headers.forEach(function(e){n[e]=t.headers.get(e)}),n["X-Requested-With"]="XMLHttpRequest",null===e.content?n["CSRF-Token"]=document.cookie.split(";").find(function(e){return e.startsWith(" XSRF-TOKEN")}).split("=")[1]:n["CSRF-Token"]=e.content,t.headers=new s.HttpHeaders(n),t.responseType="text",t},G.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],G.ctorParameters=function(){return[{type:s.HttpClient},{type:T},{type:S},{type:y},{type:n.Meta}]},G.ngInjectableDef=f.defineInjectable({factory:function(){return new G(f.inject(s.HttpClient),f.inject(T),f.inject(S),f.inject(y),f.inject(n.Meta))},token:G,providedIn:"root"}),G);function G(e,t,n,s,a){this.http=e,this.https=t,this.errorHandlerService=n,this.paymentLibService=s,this.meta=a}var U=(H.prototype.ngOnInit=function(){var t=this;this.viewStatus="RefundProcess",this.RefundsService.getRefundActions(this.refundReference).subscribe(function(e){t.refundActionList=e},function(e){t.errorMessage=t.getErrorMessage(!0,e.statusCode,e.err,e)}),this.processRefundForm=this.formBuilder.group({refundActionField:new g.FormControl("",g.Validators.compose([g.Validators.required])),refundRejectReasonField:new g.FormControl("",g.Validators.compose([g.Validators.required])),sendMeBackField:new g.FormControl("",g.Validators.compose([g.Validators.required,g.Validators.minLength(3),g.Validators.maxLength(255),g.Validators.pattern("^([a-zA-Z0-9\\s,\\.]*)$")])),enterReasonField:new g.FormControl("",g.Validators.compose([g.Validators.required,g.Validators.maxLength(30),g.Validators.pattern("^([a-zA-Z0-9.\\s]*)$")]))}),this.ccdCaseNumber=this.refundlistsource.ccd_case_number,("string"==typeof this.paymentLibComponent.TAKEPAYMENT&&"false"===this.paymentLibComponent.TAKEPAYMENT||"boolean"==typeof this.paymentLibComponent.TAKEPAYMENT&&!this.paymentLibComponent.TAKEPAYMENT)&&(this.isFromRefundListPage=!0)},H.prototype.checkRefundActions=function(e){var t=this;this.refundActionsHasError=!1,this.isReasonFieldEmpty=!1,this.isReasonEmpty=!1,this.isReasonInvalid=!1,this.refundRejectReasonHasError=!1,"Return to caseworker"===e?(this.isConfirmButtondisabled=!0,this.isSendMeBackClicked=!0,this.isRejectClicked=!1,this.isOtherClicked=!1):"Approve"===e?(this.isSendMeBackClicked=!1,this.isConfirmButtondisabled=!1,this.isRejectClicked=!1,this.isOtherClicked=!1):"Reject"===e?(this.isRejectClicked=!0,this.isSendMeBackClicked=!1,this.isOtherClicked=!1,this.RefundsService.getRefundRejectReasons().subscribe(function(e){t.refundRejectReasonList=e},function(e){t.errorMessage=t.getErrorMessage(!0,e.statusCode,e.err,e)})):"RE005"===e?this.isOtherClicked=!0:"RE005"!==e&&(this.isOtherClicked=!1)},H.prototype.processRefundSubmit=function(){var e,t,n=this;this.resetForm([!1,!1,!1,!1,!1,!1,!1,!1],"all");var s=this.processRefundForm.controls,a=s.sendMeBackField.errors;this.processRefundForm.dirty&&s.refundActionField.valid&&("Approve"==s.refundActionField.value||"Reject"==s.refundActionField.value&&s.refundRejectReasonField.valid&&"RE005"!=s.refundRejectReasonField.value||"Reject"==s.refundActionField.value&&"RE005"==s.refundRejectReasonField.value&&s.enterReasonField.valid||"Return to caseworker"==s.refundActionField.value&&s.sendMeBackField.valid)?("Approve"===s.refundActionField.value?(t="APPROVE",e={code:"",reason:""}):"Reject"===s.refundActionField.value?(t="REJECT",e={code:s.refundRejectReasonField.value||"",reason:"RE005"==s.refundRejectReasonField.value?s.enterReasonField.value:""}):"Return to caseworker"===s.refundActionField.value&&(t="SENDBACK",e={code:"",reason:s.sendMeBackField.value}),this.RefundsService.patchRefundActions(e,this.refundReference,t).subscribe(function(e){n.isSuccesspageEnable=!0,n.successMsg=e.replace(/['"]+/g,"")},function(e){n.errorMessage=n.getErrorMessage(!0,e.statusCode,e.err,e)})):(""==s.refundActionField.value&&this.resetForm([!0,!1,!1,!1,!1,!1,!1,!1],"action"),"Reject"==s.refundActionField.value&&""==s.refundRejectReasonField.value&&this.resetForm([!1,!0,!1,!1,!1,!1,!1,!1],"rejectReason"),"Return to caseworker"==s.refundActionField.value&&(""==s.sendMeBackField.value&&this.resetForm([!1,!1,!0,!1,!1,!1,!1,!1],"addAreason"),""!=s.sendMeBackField.value&&s.sendMeBackField.invalid&&this.resetForm([!1,!1,!1,!0,!1,!1,!1,!1],"addAreason"),a&&a.minlength&&a.minlength.actualLength<3&&this.resetForm([!1,!1,!1,!1,!0,!1,!1,!1],"addAreason"),a&&a.maxlength&&255<a.maxlength.actualLength&&this.resetForm([!1,!1,!1,!1,!1,!0,!1,!1],"addAreason")),"Reject"==s.refundActionField.value&&"RE005"==s.refundRejectReasonField.value&&(""===s.enterReasonField.value&&this.resetForm([!1,!1,!1,!1,!1,!1,!0,!1],"enterReason"),""!==s.enterReasonField.value&&s.enterReasonField.invalid&&this.resetForm([!1,!1,!1,!1,!1,!1,!1,!0],"enterReason")))},H.prototype.getErrorMessage=function(e,t,n,s){var a="Please try again later";return{title:"Something went wrong",body:a=500!==t?n!==undefined?n:s:a,showError:e}},H.prototype.loadRefundListPage=function(){var t=this;this.OrderslistService.getnavigationPageValue().subscribe(function(e){return t.navigationpage=e}),this.navigationpage,this.paymentLibComponent.viewName="refundstatuslist",this.paymentLibComponent.isRefundStatusView=!0},H.prototype.loadRefundsHomePage=function(){"string"==typeof this.paymentLibComponent.TAKEPAYMENT&&"false"===this.paymentLibComponent.TAKEPAYMENT?this.paymentLibComponent.viewName="refund-list":(this.OrderslistService.setnavigationPage("casetransactions"),this.OrderslistService.setisFromServiceRequestPage(!1),this.paymentLibComponent.VIEW="case-transactions",this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.ISBSENABLE=!0,this.paymentLibComponent.isRefundStatusView=!1)},H.prototype.redirecttoRefundListPage=function(){"string"==typeof this.paymentLibComponent.TAKEPAYMENT&&"false"===this.paymentLibComponent.TAKEPAYMENT||"boolean"==typeof this.paymentLibComponent.TAKEPAYMENT&&!this.paymentLibComponent.TAKEPAYMENT?this.paymentLibComponent.viewName="refund-list":this.loadRefundListPage()},H.prototype.resetForm=function(e,t){"action"!==t&&"all"!==t||(this.refundActionsHasError=e[0]),"rejectReason"!==t&&"all"!==t||(this.refundRejectReasonHasError=e[1]),"addAreason"!==t&&"all"!==t||(this.isReasonFieldEmpty=e[2],this.isReasonFieldInvalid=e[3],this.reasonFieldMinHasError=e[4],this.reasonFieldMaxHasError=e[5]),"enterReason"!==t&&"all"!==t||(this.isReasonEmpty=e[6],this.isReasonInvalid=e[7])},H.prototype.goToCaseReview=function(){this.router.navigate(["/cases/case-details/"+this.ccdCaseNumber],{relativeTo:this.activeRoute})},H.decorators=[{type:f.Component,args:[{selector:"ccpay-process-refund",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',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}"]}]}],H.ctorParameters=function(){return[{type:M},{type:g.FormBuilder},{type:b},{type:k},{type:h.Router},{type:h.ActivatedRoute}]},H.propDecorators={refundReference:[{type:f.Input}],refundlistsource:[{type:f.Input}]},H);function H(e,t,n,s,a,o){this.RefundsService=e,this.formBuilder=t,this.OrderslistService=n,this.paymentLibComponent=s,this.router=a,this.activeRoute=o,this.errorMessage=this.getErrorMessage(!1,"","",""),this.sendmeback=null,this.refundActionList=[],this.refundRejectReasonList=[],this.isSendMeBackClicked=!1,this.isRejectClicked=!1,this.isOtherClicked=!1,this.isSuccesspageEnable=!1,this.refundActionsHasError=!1,this.refundRejectReasonHasError=!1,this.isReasonFieldEmpty=!1,this.isReasonFieldInvalid=!1,this.reasonFieldMinHasError=!1,this.reasonFieldMaxHasError=!1,this.isReasonEmpty=!1,this.isReasonInvalid=!1,this.successMsg=null,this.isConfirmButtondisabled=!0}var V=(j.prototype.ngOnInit=function(){var t=this;this.userLst=this.LOGGEDINUSERROLES,this.LOGGEDINUSERROLES.some(function(e){return e.includes("payments-refund-approver")})?this.isAuthorized=!0:(this.isApproveTableVisible=!1,this.isAuthorized=!1),this.tableApprovalHeader="Refunds to be approved",this.tableRejectedHeader="Refunds returned to caseworker",this.isAuthorized&&this.refundService.getRefundList(this.approvalStatus,!0).subscribe(function(e){t.submittedRefundList=e.refund_list,t.isApproveTableVisible=!0}),this.refundService.getRefundList(this.rejectStatus,!1).subscribe(function(e){t.rejectedRefundList=e.refund_list,t.isRejectTableVisible=!0})},j.decorators=[{type:f.Component,args:[{selector:"ccpay-refund-list",template:'\n\n<div class="hmcts-page-heading">\n <div class="hmcts-page-heading__title">\n <h1 class="govuk-heading-xl">Refund list</h1>\n </div>\n</div>\n\n<ng-container *ngIf="isAuthorized">\n<div class="hmcts-page-heading">\n <div class="hmcts-page-heading__title">\n <h2 class="govuk-heading-l">{{tableApprovalHeader}}</h2>\n </div>\n </div>\n <div *ngIf="!isApproveTableVisible">\n <div class="govuk-label dropdpwn" >No records to display</div>\n </div>\n</ng-container>\n \n<ng-container *ngIf="isApproveTableVisible">\n \n <div><ccpay-table [DATASOURCE]="submittedRefundList" [STATUS]="approvalStatus" [errorMessage]="errorMessage"></ccpay-table></div>\n</ng-container>\n\n\n<div class="hmcts-page-heading">\n <div class="hmcts-page-heading__title">\n <h2 class="govuk-heading-l">{{tableRejectedHeader}}</h2>\n </div>\n \n </div>\n <div *ngIf="!isRejectTableVisible">\n <div class="govuk-label dropdpwn">No records to display</div>\n </div>\n<ng-container *ngIf="isRejectTableVisible">\n \n <div><ccpay-table [DATASOURCE]="rejectedRefundList" [STATUS]="rejectStatus" [errorMessage]="errorMessage"></ccpay-table></div>\n</ng-container>\n\n\n',styles:[".govuk-heading-xl{font-size:48px;padding-top:1em}.govuk-heading-l{font-size:36px}.govuk-label{font-size:19px}.hmcts-page-heading{width:110%}"]}]}],j.ctorParameters=function(){return[{type:M}]},j.propDecorators={USERID:[{type:f.Input,args:["USERID"]}],LOGGEDINUSERROLES:[{type:f.Input,args:["LOGGEDINUSERROLES"]}],LOGGEDINUSEREMAIL:[{type:f.Input,args:["LOGGEDINUSEREMAIL"]}]},j);function j(e){this.refundService=e,this.submittedRefundList=[],this.rejectedRefundList=[],this.approvalStatus="Sent for approval",this.rejectStatus="Update required",this.errorMessage=null,this.isAuthorized=!0}var q=(z.prototype.getCardDetails=function(e){return this.logger.info("Card-detail-service getCardDetails for: ",e),this.http.get(this.paymentLibService.API_ROOT+"/card-payments/"+e+"/details",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},z.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],z.ctorParameters=function(){return[{type:s.HttpClient},{type:w},{type:S},{type:y}]},z.ngInjectableDef=f.defineInjectable({factory:function(){return new z(f.inject(s.HttpClient),f.inject(w),f.inject(S),f.inject(y))},token:z,providedIn:"root"}),z);function z(e,t,n,s){this.http=e,this.logger=t,this.errorHandlerService=n,this.paymentLibService=s}var Y=(W.prototype.ngOnInit=function(){var t=this;this.cardDetailsService.getCardDetails(this.paymentLibComponent.paymentReference).subscribe(function(e){return t.cardDetails=e},function(e){return t.errorMessage=e})},Object.defineProperty(W.prototype,"getPaymentReference",{get:function(){return this.paymentReference},enumerable:!0,configurable:!0}),W.decorators=[{type:f.Component,args:[{selector:"ccpay-card-details",template:'\n<div class="column">\n <h2 class="heading-medium">Payment method</h2>\n</div>\n\n<div role="group" aria-labelledby="failure-error-summary-heading" tabindex="-1" *ngIf="errorMessage">\n Payment method unavailable, The payment has either expired or unsuccessful.\n</div>\n\n<div *ngIf="!errorMessage && cardDetails">\n\n<table>\n <tbody>\n <tr>\n <td class="bold tb-col-w">Method</td>\n <td>Card</td>\n </tr>\n <tr>\n <td class="bold tb-col-w">Type</td>\n <td>{{ cardDetails.card_brand }}</td>\n </tr>\n </tbody>\n</table>\n</div>\n\n',styles:[".tb-col-w{width:330px}"]}]}],W.ctorParameters=function(){return[{type:q},{type:k}]},W);function W(e,t){this.cardDetailsService=e,this.paymentLibComponent=t,this.pageTitle="Card details"}var $=(J.decorators=[{type:f.Component,args:[{template:"\n <h1>This is not the page you were looking for!</h1>\n "}]}],J);function J(){}var K=(Z.prototype.getPaymentStatusesByReference=function(e,t){return this.logger.info("Status-history-service getPaymentStatusesByReference for: ",e),this.http.get("card"===t||"cash"===t||"cheque"===t||"postal order"===t?this.paymentLibService.API_ROOT+"/card-payments/"+e+"/statuses":this.paymentLibService.API_ROOT+"/credit-account-payments/"+e+"/statuses",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},Z.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],Z.ctorParameters=function(){return[{type:s.HttpClient},{type:w},{type:S},{type:y}]},Z.ngInjectableDef=f.defineInjectable({factory:function(){return new Z(f.inject(s.HttpClient),f.inject(w),f.inject(S),f.inject(y))},token:Z,providedIn:"root"}),Z);function Z(e,t,n,s){this.http=e,this.logger=t,this.errorHandlerService=n,this.paymentLibService=s}var X=(Q.prototype.ngOnInit=function(){var t=this;this.statusHistoryService.getPaymentStatusesByReference(this.paymentLibComponent.paymentReference,this.paymentLibComponent.paymentMethod).subscribe(function(e){return t.statuses=e},function(e){return t.errorMessage=e.replace(/"/g,"")})},Q.decorators=[{type:f.Component,args:[{selector:"ccpay-payment-statuses",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">£{{ 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',styles:[""]}]}],Q.ctorParameters=function(){return[{type:K},{type:k}]},Q.propDecorators={isTakePayment:[{type:f.Input}]},Q);function Q(e,t){this.statusHistoryService=e,this.paymentLibComponent=t,this.pageTitle="Payment status history"}var ee=(te.prototype.ngOnInit=function(){},te.decorators=[{type:f.Component,args:[{selector:"ccpay-pba-details",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',styles:[".capitalize::first-letter{text-transform:uppercase}.tb-col-w{width:330px}"]}]}],te.ctorParameters=function(){return[]},te.propDecorators={payment:[{type:f.Input}]},te);function te(){}var ne=function(){return undefined},se=(Object.defineProperty(ae.prototype,"info",{get:function(){return ne},enumerable:!0,configurable:!0}),Object.defineProperty(ae.prototype,"warn",{get:function(){return ne},enumerable:!0,configurable:!0}),Object.defineProperty(ae.prototype,"error",{get:function(){return ne},enumerable:!0,configurable:!0}),ae.prototype.invokeConsoleMethod=function(e,t){(console[e]||console.log||ne).apply(console,[t])},ae.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],ae.ngInjectableDef=f.defineInjectable({factory:function(){return new ae},token:ae,providedIn:"root"}),ae);function ae(){}var oe=(re.prototype.getPaymentGroups=function(e){return this.logger.info("Case-transactions-service getPaymentGroups for: ",e),this.http.get(this.paymentLibService.API_ROOT+"/cases/"+e+"/paymentgroups",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},re.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],re.ctorParameters=function(){return[{type:s.HttpClient},{type:w},{type:S},{type:y}]},re.ngInjectableDef=f.defineInjectable({factory:function(){return new re(f.inject(s.HttpClient),f.inject(w),f.inject(S),f.inject(y))},token:re,providedIn:"root"}),re);function re(e,t,n,s){this.http=e,this.logger=t,this.errorHandlerService=n,this.paymentLibService=s}var ie=(le.prototype.getBSPaymentsByCCD=function(e){return this.http.get(this.paymentLibService.BULKSCAN_API_ROOT+"/cases/"+e,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},le.prototype.getBSPaymentsByDCN=function(e){return this.http.get(this.paymentLibService.BULKSCAN_API_ROOT+"/cases?document_control_number="+e,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},le.prototype.postBSAllocatePayment=function(e,t){return this.https.post(this.paymentLibService.API_ROOT+"/payment-groups/"+t+"/bulk-scan-payments",e).pipe(a.catchError(this.errorHandlerService.handleError))},le.prototype.postBSPaymentStrategic=function(e,t){return this.https.post(this.paymentLibService.API_ROOT+"/payment-groups/"+t+"/bulk-scan-payments-strategic",e).pipe(a.catchError(this.errorHandlerService.handleError))},le.prototype.postBSWoPGStrategic=function(e){return this.https.post(this.paymentLibService.API_ROOT+"/payment-groups/bulk-scan-payments-strategic",e).pipe(a.catchError(this.errorHandlerService.handleError))},le.prototype.patchBSChangeStatus=function(e,t){return this.https.patch(this.paymentLibService.API_ROOT+"/bulk-scan-payments/"+e+"/status/"+t,t).pipe(a.catchError(this.errorHandlerService.handleError))},le.prototype.calculateOutStandingAmount=function(e){var t=0,n=0,s=0;return e.fees&&e.fees.forEach(function(e){t+=e.calculated_amount}),e.payments&&e.payments.forEach(function(e){"SUCCESS"===e.status.toUpperCase()&&(n+=e.amount)}),e.remissions&&e.remissions.forEach(function(e){s+=e.hwf_amount}),t-s-n},le.prototype.removeUnwantedString=function(e,t){return e.replace(/[\_]/gi,t)},le.prototype.downloadSelectedReport=function(e,t,n){return this.https.get(this.paymentLibService.BULKSCAN_API_ROOT+"/report/data?date_from="+t+"&date_to="+n+"&report_type="+e,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},le.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],le.ctorParameters=function(){return[{type:s.HttpClient},{type:T},{type:S},{type:y}]},le.ngInjectableDef=f.defineInjectable({factory:function(){return new le(f.inject(s.HttpClient),f.inject(T),f.inject(S),f.inject(y))},token:le,providedIn:"root"}),le);function le(e,t,n,s){this.http=e,this.https=t,this.errorHandlerService=n,this.paymentLibService=s}var ce=(de.prototype.ngOnInit=function(){var t=this;this.navigationpage="",null!==this.OrderslistService.getpaymentPageView()&&this.OrderslistService.getpaymentPageView().subscribe(function(e){return t.paymentView=e}),this.LOGGEDINUSERROLES!==undefined&&0!==this.LOGGEDINUSERROLES.length||null===this.OrderslistService.getUserRolesList()||this.OrderslistService.getUserRolesList().subscribe(function(e){return t.LOGGEDINUSERROLES=e}),null!==this.OrderslistService.getnavigationPageValue()&&this.OrderslistService.getnavigationPageValue().subscribe(function(e){return t.navigationpage=e}),this.paymentView!==undefined&&null!==this.paymentView&&this.paymentView.payment_group_reference!==undefined&&"paymentdetailspage"===this.navigationpage&&this.goToPayementView(this.paymentView.payment_group_reference,this.paymentView.reference,this.paymentView.method),this.isGrpOutstandingAmtPositive=!1,this.ccdCaseNumber=this.paymentLibComponent.CCD_CASE_NUMBER,this.caseType=this.paymentLibComponent.CASETYPE,""===this.paymentLibComponent.CCD_CASE_NUMBER&&(this.ccdCaseNumber=this.paymentLibComponent.EXC_REFERENCE),this.excReference=this.paymentLibComponent.EXC_REFERENCE,this.takePayment=this.paymentLibComponent.TAKEPAYMENT,this.servicerequest=this.paymentLibComponent.SERVICEREQUEST.toString(),"true"===this.paymentLibComponent.SERVICEREQUEST.toString()?this.serviceRequestValue="true":this.serviceRequestValue="false",this.isBulkScanEnable=this.paymentLibComponent.ISBSENABLE,this.dcnNumber=this.paymentLibComponent.DCN_NUMBER,this.selectedOption=this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase(),this.isTurnOff=this.paymentLibComponent.ISTURNOFF,this.isNewPcipalOff=this.paymentLibComponent.ISNEWPCIPALOFF,this.isOldPcipalOff=this.paymentLibComponent.ISOLDPCIPALOFF,this.isStrategicFixEnable=this.paymentLibComponent.ISSFENABLE,this.isTurnOff?this.caseTransactionsService.getPaymentGroups(this.ccdCaseNumber).subscribe(function(e){t.isAnyFeeGroupAvilable=!0,t.paymentGroups=e.payment_groups,t.calculateAmounts(),t.calculateOrderFeesAmounts(),t.totalRefundAmount=t.calculateRefundAmount(),t.paymentViewService.getPartyDetails(t.ccdCaseNumber).subscribe(function(e){t.cpoDetails=JSON.parse(e).content[0]},function(e){t.errorMessage=e.replace(/"/g,""),t.setDefaults(),t.isCPODown=!0})},function(e){t.errorMessage=e.replace(/"/g,""),t.isAnyFeeGroupAvilable=!1,t.setDefaults()}):this.caseTransactionsService.getPaymentGroups(this.ccdCaseNumber).subscribe(function(e){t.isAnyFeeGroupAvilable=!0,t.paymentGroups=e.payment_groups,t.calculateAmounts(),t.calculateOrderFeesAmounts(),t.calculateRefundAmount(),t.isFromServiceRequestPage?(t.OrderslistService.getSelectedOrderRefId().subscribe(function(e){return t.orderRef=e}),t.goToOrderViewDetailSection(t.orderRef)):t.paymentViewService.getPartyDetails(t.ccdCaseNumber).subscribe(function(e){t.cpoDetails=JSON.parse(e).content[0]},function(e){t.errorMessage=e.replace(/"/g,""),t.isCPODown=!0})},function(e){t.errorMessage=e.replace(/"/g,""),t.isAnyFeeGroupAvilable=!1,t.setDefaults()}),this.paymentGroups!==undefined&&this.checkForExceptionRecord(),null!==this.OrderslistService.getisFromServiceRequestPages()&&this.OrderslistService.getisFromServiceRequestPages().subscribe(function(e){return t.isFromServiceRequestPage=e})},de.prototype.setDefaults=function(){this.totalPayments=0,this.totalRemissions=0,this.totalNonOffPayments=0,this.totalFees=0},de.prototype.getAllocationStatus=function(e){e=e.payment_allocation;return 0<e.length?e[0].allocation_status:"-"},de.prototype.checkForExceptionRecord=function(){var t=this;0!==this.paymentGroups.length||"ccdorexception"!==this.selectedOption.toLocaleLowerCase()&&"rc"!==this.selectedOption.toLocaleLowerCase()||this.bulkScaningPaymentService.getBSPaymentsByCCD(this.ccdCaseNumber).subscribe(function(e){e.data&&e.data.exception_record_reference&&0<e.data.exception_record_reference.length&&0<e.data.ccd_reference&&(t.isExceptionRecord=!1,t.isAddFeeBtnEnabled=!0),e.data&&e.data.exception_record_reference&&0<e.data.exception_record_reference.length&&e.data.ccd_reference===undefined&&(t.isExceptionRecord=!0,t.isAddFeeBtnEnabled=!1),e.data&&e.data.exception_record_reference&&e.data.exception_record_reference.length===undefined&&0<e.data.ccd_reference&&(t.isExceptionRecord=!1,t.isAddFeeBtnEnabled=!0)}),0===this.paymentGroups.length&&"dcn"===this.selectedOption.toLocaleLowerCase()&&(!(0<this.paymentLibComponent.CCD_CASE_NUMBER.length&&0<this.paymentLibComponent.EXC_REFERENCE.length)&&0===this.paymentLibComponent.CCD_CASE_NUMBER.length&&0<this.paymentLibComponent.EXC_REFERENCE.length?(this.isExceptionRecord=!0,this.isAddFeeBtnEnabled=!1):(this.isExceptionRecord=!1,this.isAddFeeBtnEnabled=!0)),0<this.paymentGroups.length&&this.paymentGroups.forEach(function(e){e.payments&&e.payments.forEach(function(e){e.case_reference!==undefined&&e.ccd_case_number===undefined?(t.isExceptionRecord=!0,t.isAddFeeBtnEnabled=!1):(t.isExceptionRecord=!1,t.isAddFeeBtnEnabled=!0)})})},de.prototype.calculateOrderFeesAmounts=function(){var t=this;this.paymentGroups.forEach(function(e){t.resetOrderVariables(),e.fees&&e.fees.forEach(function(e){t.orderFeesTotal=t.orderFeesTotal+e.calculated_amount}),e.remissions&&e.remissions.forEach(function(e){t.orderRemissionTotal=t.orderRemissionTotal+e.hwf_amount}),e.payments&&e.payments.forEach(function(e){"SUCCESS"===e.status.toUpperCase()&&(t.orderTotalPayments=t.orderTotalPayments+e.amount)}),"Paid"===e.service_request_status?(t.orderStatus=e.service_request_status,t.orderAddBtnEnable=!1):"Partially paid"!==e.service_request_status&&"Not paid"!==e.service_request_status||(t.orderStatus=e.service_request_status,t.orderAddBtnEnable=!0),null!==t.cpoDetails?t.orderLevelFees.push({orderRefId:e.payment_group_reference,orderTotalFees:t.orderFeesTotal,orderStatus:t.orderStatus,orderParty:t.cpoDetails.responsibleParty,orderCCDEvent:t.cpoDetails.action,orderCreated:e.date_created,orderAddBtnEnable:t.orderAddBtnEnable}):t.orderLevelFees.push({orderRefId:e.payment_group_reference,orderTotalFees:t.orderFeesTotal,orderStatus:t.orderStatus,orderParty:"",orderCCDEvent:"",orderCreated:e.date_created,orderAddBtnEnable:t.orderAddBtnEnable}),"Paid"!==t.orderStatus&&t.OrderslistService.setOrdersList(t.orderLevelFees)})},de.prototype.resetOrderVariables=function(){this.orderFeesTotal=0,this.orderTotalPayments=0,this.orderRemissionTotal=0,this.orderPendingPayments=0,this.isAddFeeBtnEnabled=!0},de.prototype.goToOrderViewDetailSection=function(e){var t=this;this.isFromServiceRequestPage?(this.OrderslistService.setOrderRefId(e),this.orderRef=e):(this.OrderslistService.setOrderRefId(e.orderRefId),this.orderRef=e.orderRefId),this.orderFeesTotal=0,this.orderRemissionTotal=0,this.orderTotalPayments=0,this.orderPendingPayments=0,this.orderDetail=this.paymentGroups.filter(function(e){return e.payment_group_reference===t.orderRef}),this.orderDetail.forEach(function(e){e.fees&&e.fees.forEach(function(e){t.orderFeesTotal=t.orderFeesTotal+e.calculated_amount}),e.remissions&&(e.remissions.forEach(function(e){t.orderRemissionTotal=t.orderRemissionTotal+e.hwf_amount}),e.payments&&(t.payment=e.payments[0],e.payments.forEach(function(e){"SUCCESS"===e.status.toUpperCase()&&(t.orderTotalPayments=t.orderTotalPayments+e.amount)}))),t.orderStatus=e.service_request_status}),null!==this.cpoDetails?(this.orderParty=this.cpoDetails.responsibleParty,this.orderCreated=this.cpoDetails.createdTimestamp,this.orderCCDEvent=this.cpoDetails.action):(this.orderParty="",this.orderCCDEvent="",this.orderCreated=e.orderCreated),this.viewStatus="order-full-view"},de.prototype.redirectToOrderFeeSearchPage=function(e,t){t.orderAddBtnEnable&&(e.preventDefault(),this.paymentLibComponent.bspaymentdcn=null,this.paymentLibComponent.paymentGroupReference=t.orderRefId,this.paymentLibComponent.isTurnOff=this.isTurnOff,this.paymentLibComponent.viewName="fee-summary")},de.prototype.calculateAmounts=function(){var a=this,o=0,n=0,t=0,r=0;this.paymentGroups.forEach(function(s){s.fees&&s.fees.forEach(function(e){var t,n;a.isTurnOff?o+=e.calculated_amount:(e.date_created&&(t=e.amount_due===undefined,n=e.amount_due<=0,a.clAmountDue=t?a.clAmountDue+e.net_amount:n?a.clAmountDue+0:a.clAmountDue+e.amount_due),e.payment_group_reference=s.payment_group_reference),a.fees.push(e)}),a.isTurnOff&&(a.totalFees=o),s.payments&&s.payments.forEach(function(e){var t;a.isTurnOff?"SUCCESS"===e.status.toUpperCase()&&(n+=e.amount,a.payments.push(e)):(t=e.payment_allocation,"SUCCESS"===e.status.toUpperCase()&&(n+=e.amount,(0===t.length||0<t.length&&"Allocated"===t[0].allocation_status)&&(r+=e.amount),0<t.length&&a.nonPayments.push(e)),0===t.length&&a.payments.push(e)),e.paymentGroupReference=s.payment_group_reference,a.allPayments.push(e)}),a.totalPayments=n,a.isTurnOff||(a.totalNonOffPayments=r),s.remissions&&s.remissions.forEach(function(e){t+=e.hwf_amount,a.remissions.push(e)}),a.totalRemissions=t})},de.prototype.calculateRefundAmount=function(){var i=this;if(this.isTurnOff){var o=0,r=!1;return this.paymentGroups.forEach(function(e){var t,n=0,s=0,a=0;e.fees&&(i.isFeeRecordsExist=!0,e.fees.forEach(function(e){n+=e.calculated_amount,0===e.calculated_amount&&(r=!0)})),e.payments&&e.payments.forEach(function(e){"SUCCESS"===e.status.toUpperCase()&&(s+=e.amount)}),e.remissions&&e.remissions.forEach(function(e){a+=e.hwf_amount}),(t=n-a-s)<0?0===o?o=t:o+=t:(0<t||0==t&&r)&&(i.isGrpOutstandingAmtPositive=!0)}),-1*o}var l=!1;this.paymentGroups.forEach(function(e,n){var t,s=0,a=0,o=0,r=[];e.fees&&(e.fees.forEach(function(t){s+=t.calculated_amount,i.isRemissionsMatch=!1,e.remissions&&e.remissions.forEach(function(e){e.fee_code===t.code&&(i.isRemissionsMatch=!0,t.remissions=e,r.push(t))}),i.isRemissionsMatch||r.push(t),t.date_created?l=!0:(i.isHistoricGroupAvailable=!0,i.paymentGroups[n].old=!0)}),i.paymentGroups[n].fees=r),e.payments&&e.payments.forEach(function(e){"SUCCESS"===e.status.toUpperCase()&&(a+=e.amount)}),e.remissions&&e.remissions.forEach(function(e){o+=e.hwf_amount}),0<(t=s-o-a)&&l&&(i.isAnyFeeGroupAvilable=!0,i.isFeeRecordsExist=!0,i.paymentRef=e.payment_group_reference),e.fees&&0<e.fees.length&&t<=0&&l&&(i.isAnyFeeGroupAvilable=!1)}),(!l&&this.isHistoricGroupAvailable||!l&&!this.isHistoricGroupAvailable)&&(this.isAnyFeeGroupAvilable=!1)},de.prototype.getGroupOutstandingAmount=function(e){return this.bulkScaningPaymentService.calculateOutStandingAmount(e)},de.prototype.redirectToFeeSearchPage=function(e){e.preventDefault();e=this.isBulkScanEnable?"&isBulkScanning=Enable":"&isBulkScanning=Disable";e+=this.isTurnOff?"&isTurnOff=Enable":"&isTurnOff=Disable",e+=this.isStrategicFixEnable?"&isStFixEnable=Enable":"&isStFixEnable=Disable",e+=this.isNewPcipalOff?"&isNewPcipalOff=Enable":"&isNewPcipalOff=Disable",e+=this.isOldPcipalOff?"&isOldPcipalOff=Enable":"&isOldPcipalOff=Disable",e+="&caseType="+this.caseType,this.router.navigateByUrl("/fee-search?selectedOption="+this.selectedOption+"&ccdCaseNumber="+this.ccdCaseNumber+e)},de.prototype.addRemission=function(e){var t=this;this.chkForAddRemission(e.code)&&(this.feeId=e,this.viewStatus="addremission",this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(function(e){t.paymentGroup=e,t.paymentGroup.payments=t.paymentGroup.payments.filter(function(e){return e.reference.includes(t.paymentLibComponent.paymentReference)}),t.payment=t.paymentGroup.payments[0]},function(e){return t.errorMessage=e.replace(/"/g,"")}))},de.prototype.addRefundForRemission=function(e,t,n){var s=this;this.viewStatus="addrefundforremission",this.payment=e,this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(function(e){s.paymentGroup=e,s.paymentGroup.payments=s.paymentGroup.payments.filter(function(e){return e.reference.includes(s.payment.reference)}),s.payment=s.paymentGroup.payments[0],s.remissions=t,s.remissionFeeAmt=n.filter(function(e){return e.code===s.remissions.fee_code})[0].net_amount},function(e){return s.errorMessage=e})},de.prototype.redirectToremissionPage=function(e){e.preventDefault(),this.paymentLibComponent.viewName="remission"},de.prototype.goToServiceRequestPage=function(){this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.TAKEPAYMENT=!1,this.paymentLibComponent.SERVICEREQUEST="true",this.paymentLibComponent.isFromServiceRequestPage=!0,window.location.reload()},de.prototype.redirectToReportsPage=function(e){e.preventDefault(),this.router.navigateByUrl("/reports?selectedOption="+this.selectedOption+"&ccdCaseNumber="+this.ccdCaseNumber)},de.prototype.loadFeeSummaryPage=function(e){this.paymentLibComponent.bspaymentdcn=null,this.paymentLibComponent.paymentGroupReference=e.payment_group_reference,this.paymentLibComponent.isTurnOff=this.isTurnOff,this.paymentLibComponent.viewName="fee-summary"},de.prototype.goToPaymentViewComponent=function(e){this.paymentLibComponent.paymentMethod=e.paymentMethod,this.paymentLibComponent.paymentGroupReference=e.paymentGroupReference,this.paymentLibComponent.paymentReference=e.paymentReference,this.paymentLibComponent.viewName="payment-view"},de.prototype.goToPayementView=function(e,t,n){this.goToPaymentViewComponent({paymentGroupReference:e,paymentReference:t,paymentMethod:n})},de.prototype.selectedUnprocessedFeeEvent=function(e){e?(this.isTurnOff&&(this.isAddFeeBtnEnabled=!1),this.isUnprocessedRecordSelected=!0):(this.isTurnOff&&(this.isAddFeeBtnEnabled=!0),this.isUnprocessedRecordSelected=!1)},de.prototype.getUnprocessedFeeCount=function(e){this.unprocessedRecordCount=e},de.prototype.calculateAmountDue=function(e){return e.date_created?e.amount_due!==undefined?e.amount_due:e.net_amount:"0.00"},de.prototype.confirmRemoveFee=function(e){this.isRemoveBtnDisabled=!1,this.feeId=e,this.viewStatus="feeRemovalConfirmation"},de.prototype.cancelRemoval=function(){this.viewStatus="main"},de.prototype.removeFee=function(e){var t=this;this.isRemoveBtnDisabled=!0,this.paymentViewService.deleteFeeFromPaymentGroup(e).subscribe(function(e){window.location.reload()},function(e){t.errorMessage=e,t.isRemoveBtnDisabled=!1})},de.prototype.isCheckAmountdueExist=function(e){return void 0===e},de.prototype.issueRefund=function(e){null!==e&&e!==undefined&&this.chkIssueRefundBtnEnable(e)&&(this.viewStatus="issuerefund",this.payment=e,this.paymentLibComponent.isFromServiceRequestPage=!0,this.isRefundRemission=!0)},de.prototype.chkForAddRemission=function(e){var t,n;if(this.chkForPBAPayment()&&this.check4AllowedRoles2AccessRefund()){if(0<this.orderDetail[0].remissions.length)try{for(var s=F(this.orderDetail[0].remissions),a=s.next();!a.done;a=s.next())if(a.value.fee_code===e)return!1}catch(o){t={error:o}}finally{try{a&&!a.done&&(n=s["return"])&&n.call(s)}finally{if(t)throw t.error}}return!0}return!1},de.prototype.chkForPBAPayment=function(){var t=this;if(null!==this.orderDetail&&this.orderDetail!==undefined)return this.orderDetail.forEach(function(e){e.payments&&e.payments.forEach(function(e){"payment by account"===e.method.toLocaleLowerCase()&&t.allowFurtherAccessAfter4Days(e)&&(t.isPBA=!0)})}),!!this.isPBA},de.prototype.chkIssueRefundBtnEnable=function(e){return this.check4AllowedRoles2AccessRefund()&&this.allowFurtherAccessAfter4Days(e)&&"payment by account"===e.method&&"success"===e.status.toLocaleLowerCase()&&(this.isIssueRefunfBtnEnable=!0),!!this.isIssueRefunfBtnEnable},de.prototype.chkIsRefundRemissionBtnEnable=function(){var t=this;if(null!==this.orderDetail&&this.orderDetail!==undefined)return this.paymentLibComponent.isFromServiceRequestPage=!0,this.orderDetail.forEach(function(e){e.payments&&e.payments.forEach(function(e){"payment by account"===e.method.toLocaleLowerCase()&&"success"===e.status.toLocaleLowerCase()&&t.allowFurtherAccessAfter4Days(e)&&(t.isRefundRemissionBtnEnable=!0)})}),!!this.isRefundRemissionBtnEnable},de.prototype.loadPBAAccountPage=function(e){this.paymentLibComponent.pbaPayOrderRef=e,this.paymentLibComponent.viewName="pba-payment"},de.decorators=[{type:f.Component,args:[{selector:"ccpay-case-transactions",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 \x3c!-- payments --\x3e\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 \x3c!-- remissions --\x3e\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 \x3c!-- No fees start --\x3e\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 \x3c!-- No fees end --\x3e\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 \x3c!--New Code start--\x3e\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 \x3c!-- payments --\x3e\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 \x3c!-- remissions --\x3e\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 [ISNEWPCIPALOFF]="isNewPcipalOff"\n [ISOLDPCIPALOFF]="isOldPcipalOff"\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\x3c!--Order Case Transactions Page--\x3e\n <ng-container *ngIf="viewStatus === \'main\' && !isTurnOff && takePayment">\n <div>\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 \x3c!--Payment Request--\x3e\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">\t\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 \x3c!-- <ng-container *ngIf="orderLevelFees?.length === 0">\n <br/>No service requests on this case.<br/>\n </ng-container> --\x3e\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 [isNewPcipalOff]="isNewPcipalOff"\n [isOldPcipalOff]="isOldPcipalOff"\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 \x3c!-- <span *ngIf="serviceRequestValue === \'false\'" class="heading-medium">Service requests</span> --\x3e\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">\t\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 \x3c!-- </div> --\x3e\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 [ccdCaseNumber]="ccdCaseNumber" ></ccpay-refund-status>\n </div>\n\n </ng-container>\n\n\n<input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'FEEREMOVALCONFIRMATION_2\'>\n\n\x3c!-- Order Full View Details--\x3e\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[isOldPcipalOff]="isOldPcipalOff" \n[viewCompStatus]= "viewStatus"\n[isNewPcipalOff]="isNewPcipalOff" \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[isOldPcipalOff]="isOldPcipalOff" \n[viewCompStatus]= "viewStatus"\n[isNewPcipalOff]="isNewPcipalOff" \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[isOldPcipalOff]="isOldPcipalOff" \n[viewCompStatus]= "viewStatus"\n[isNewPcipalOff]="isNewPcipalOff" \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\n\n',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}"]}]}],de.ctorParameters=function(){return[{type:h.Router},{type:D},{type:ie},{type:oe},{type:k},{type:b}]},de.propDecorators={LOGGEDINUSERROLES:[{type:f.Input,args:["LOGGEDINUSERROLES"]}],isTakePayment:[{type:f.Input}]},de);function de(e,t,n,s,a,o){var r=this;this.router=e,this.paymentViewService=t,this.bulkScaningPaymentService=n,this.caseTransactionsService=s,this.paymentLibComponent=a,this.OrderslistService=o,this.paymentGroups=[],this.payments=[],this.nonPayments=[],this.allPayments=[],this.remissions=[],this.fees=[],this.isRefundRemission=!0,this.isAddFeeBtnEnabled=!0,this.isExceptionRecord=!1,this.isUnprocessedRecordSelected=!1,this.isAnyFeeGroupAvilable=!0,this.isHistoricGroupAvailable=!1,this.viewStatus="main",this.isRemoveBtnDisabled=!1,this.clAmountDue=0,this.isFeeRecordsExist=!1,this.isGrpOutstandingAmtPositive=!1,this.orderDetail=[],this.isAddRemissionEnable=!1,this.orderRemissionDetails=[],this.orderLevelFees=[],this.ispaymentGroupApisuccess=!1,this.cpoDetails=null,this.orderFeesTotal=0,this.orderRemissionTotal=0,this.orderTotalPayments=0,this.orderPendingPayments=0,this.isPBA=!1,this.isIssueRefunfBtnEnable=!1,this.isAddRemissionBtnEnabled=!1,this.isRefundRemissionBtnEnable=!1,this.allowedRolesToAccessRefund=["payments-refund-approver","payments-refund"],this.isEligible4PBAPayment=["pui-finance-manager","pui-user-manager","pui-organisation-manager","pui-case-manager"],this.currentDate=new Date,this.check4AllowedRoles2AccessRefund=function(){return r.allowedRolesToAccessRefund.some(function(e){return-1!==r.LOGGEDINUSERROLES.indexOf(e)})},this.check4AllowedRoles2AccessPBApayment=function(){return r.isEligible4PBAPayment.some(function(e){return-1!==r.LOGGEDINUSERROLES.indexOf(e)})},this.allowFurtherAccessAfter4Days=function(e){if(null!==e&&e!==undefined){var t=new Date;return t.setDate(t.getDate()-4),t>=new Date(e.date_created)}}}var ue=function(e,t,n){this.currency="GBP",this.description="PayBubble payment",this.channel="telephony",this.provider="pci pal",this.ccd_case_number=e,this.amount=t.toFixed(2),this.case_type=n},pe=function(e,t,n){this.currency="GBP",this.ccd_case_number=e,this.amount=t.toFixed(2),this.case_type=n},me="bulk-scan-enabling-fe",ge=(he.prototype.ngOnInit=function(){var t=this;this.viewStatus="main",this.caseType=this.paymentLibComponent.CASETYPE,this.bsPaymentDcnNumber=this.paymentLibComponent.bspaymentdcn,this.selectedOption=this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase(),this.isStrategicFixEnable=this.paymentLibComponent.ISSFENABLE,this.OrderslistService.setCaseType(this.paymentLibComponent.CASETYPE),!this.isOldPcipalOff&&this.isNewPcipalOff?this.platForm="8x8":this.isOldPcipalOff&&!this.isNewPcipalOff?this.platForm="Antenna":this.isOldPcipalOff&&this.isNewPcipalOff&&(this.platForm="8x8"),this.paymentViewService.getBSfeature().subscribe(function(e){e=JSON.parse(e).filter(function(e){return e.uid===me});t.paymentLibComponent.ISBSENABLE=!!e[0]&&e[0].enable},function(e){t.paymentLibComponent.ISBSENABLE=!1}),this.bsPaymentDcnNumber&&this.getUnassignedPaymentlist(),this.getPaymentGroup()},he.prototype.getUnassignedPaymentlist=function(){var t=this;"dcn"===this.selectedOption?this.bulkScaningPaymentService.getBSPaymentsByDCN(this.paymentLibComponent.DCN_NUMBER).subscribe(function(e){e.data.payments?t.service=e.data.responsible_service_id:t.upPaymentErrorMessage="error"},function(e){return t.upPaymentErrorMessage=e}):this.bulkScaningPaymentService.getBSPaymentsByCCD(this.ccdCaseNumber).subscribe(function(e){e.data.payments?t.service=e.data.responsible_service_id:t.upPaymentErrorMessage="error"},function(e){return t.upPaymentErrorMessage=e})},he.prototype.getRemissionByFeeCode=function(e){var t,n;if(this.paymentGroup&&this.paymentGroup.remissions&&0<this.paymentGroup.remissions.length)try{for(var s=F(this.paymentGroup.remissions),a=s.next();!a.done;a=s.next()){var o=a.value;if(o.fee_code===e)return o}}catch(r){t={error:r}}finally{try{a&&!a.done&&(n=s["return"])&&n.call(s)}finally{if(t)throw t.error}}return null},he.prototype.addRemission=function(e){this.currentFee=e,this.viewStatus="add_remission"},he.prototype.getPaymentGroup=function(){var n=this,s=[];this.paymentViewService.getPaymentGroupDetails(this.paymentGroupRef).subscribe(function(e){n.paymentGroup=e,n.isPaymentExist=!!e.payments&&0<e.payments.length,n.isRemissionsExist=!!e.remissions&&0<e.remissions.length,e.fees&&(e.fees.forEach(function(t){n.totalAfterRemission=n.totalAfterRemission+t.net_amount,0===t.calculated_amount&&(n.isFeeAmountZero=!0),n.isRemissionsMatch=!1,e.remissions.forEach(function(e){e.fee_code===t.code&&(n.isRemissionsMatch=!0,t.remissions=e,s.push(t))}),n.isRemissionsMatch||s.push(t)}),e.fees=s),n.outStandingAmount=n.bulkScaningPaymentService.calculateOutStandingAmount(e)},function(e){return n.errorMessage=e.replace(/"/g,"")})},he.prototype.confirmRemoveFee=function(e){this.isRemoveBtnDisabled=!1,this.currentFee=e,this.viewStatus="feeRemovalConfirmation"},he.prototype.removeFee=function(e){var t=this;this.isRemoveBtnDisabled=!0,this.paymentViewService.deleteFeeFromPaymentGroup(e).subscribe(function(e){return t.paymentGroup.fees&&1<t.paymentGroup.fees.length?(t.totalAfterRemission=0,t.getPaymentGroup(),void(t.viewStatus="main")):void t.loadCaseTransactionPage()},function(e){t.errorMessage=e,t.isRemoveBtnDisabled=!1})},he.prototype.loadCaseTransactionPage=function(){var t=this;this.paymentLibComponent.TAKEPAYMENT=!0,this.paymentLibComponent.viewName="case-transactions",this.paymentViewService.getBSfeature().subscribe(function(e){e=JSON.parse(e).filter(function(e){return e.uid===me});t.paymentLibComponent.ISBSENABLE=!!e[0]&&e[0].enable},function(e){t.paymentLibComponent.ISBSENABLE=!1});var e="selectedOption="+this.paymentLibComponent.SELECTED_OPTION;e+=this.bsPaymentDcnNumber?"&dcn="+this.bsPaymentDcnNumber:"",e+=this.paymentLibComponent.ISBSENABLE?"&isBulkScanning=Enable":"&isBulkScanning=Disable",e+=this.paymentLibComponent.ISTURNOFF?"&isTurnOff=Enable":"&isTurnOff=Disable",e+=this.paymentLibComponent.ISSFENABLE?"&isStFixEnable=Enable":"&isStFixEnable=Disable",e+="&caseType="+this.paymentLibComponent.CASETYPE,e+=this.isNewPcipalOff?"&isNewPcipalOff=Enable":"&isNewPcipalOff=Disable",e+=this.isOldPcipalOff?"&isOldPcipalOff=Enable":"&isOldPcipalOff=Disable";e="/payment-history/"+this.ccdCaseNumber+"?view=case-transactions&takePayment=true&"+e;this.router.navigateByUrl(e)},he.prototype.cancelRemission=function(){this.viewStatus="main"},he.prototype.redirectToFeeSearchPage=function(e,t){e.preventDefault();e=this.bsPaymentDcnNumber?"&dcn="+this.bsPaymentDcnNumber:"";e+=this.paymentLibComponent.ISBSENABLE?"&isBulkScanning=Enable":"&isBulkScanning=Disable",e+=this.paymentLibComponent.ISTURNOFF?"&isTurnOff=Enable":"&isTurnOff=Disable",e+=this.paymentLibComponent.ISSFENABLE?"&isStFixEnable=Enable":"&isStFixEnable=Disable",e+="&caseType="+this.paymentLibComponent.CASETYPE,e+=this.isNewPcipalOff?"&isNewPcipalOff=Enable":"&isNewPcipalOff=Disable",e+=this.isOldPcipalOff?"&isOldPcipalOff=Enable":"&isOldPcipalOff=Disable","feeRemovalConfirmation"!==this.viewStatus&&"add_remission"!==this.viewStatus?(e="/fee-search?ccdCaseNumber="+this.ccdCaseNumber+"&selectedOption="+this.paymentLibComponent.SELECTED_OPTION+"&paymentGroupRef="+this.paymentGroupRef+e,this.router.navigateByUrl(e)):this.viewStatus="main"},he.prototype.takePayment=function(){var t=this;this.isConfirmationBtnDisabled=!0;var e=new ue(this.ccdCaseNumber,this.outStandingAmount,this.caseType),n=new pe(this.ccdCaseNumber,this.outStandingAmount,this.caseType);"8x8"===this.platForm?this.paymentViewService.postPaymentToPayHub(e,this.paymentGroupRef).subscribe(function(e){t.location.go("payment-history?view=fee-summary"),t.payhubHtml=e,t.viewStatus="payhub_view",t.isBackButtonEnable=!1},function(e){t.errorMessage=e,t.isConfirmationBtnDisabled=!1,t.router.navigateByUrl("/pci-pal-failure")}):"Antenna"===this.platForm&&this.paymentViewService.postPaymentAntennaToPayHub(n,this.paymentGroupRef).subscribe(function(e){t.isBackButtonEnable=!1,window.location.href="/makePaymentByTelephoneyProvider"},function(e){t.errorMessage=e,t.isConfirmationBtnDisabled=!1,t.router.navigateByUrl("/pci-pal-failure")})},he.prototype.goToAllocatePage=function(e,t){0<e||0===e&&t?(this.paymentLibComponent.paymentGroupReference=this.paymentGroupRef,this.paymentLibComponent.viewName="allocate-payments"):this.loadCaseTransactionPage()},he.prototype.isCheckAmountdueExist=function(e){return void 0===e},he.decorators=[{type:f.Component,args:[{selector:"ccpay-fee-summary",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 \x3c!-- <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 <div class="govuk-grid-column-one-third" align="right">\n <button *ngIf="!isTurnOff" (click)="redirectToFeeSearchPage($event,\'summary\')"\n [disabled]="isPaymentExist"\n [ngClass]=\'isPaymentExist ? "button button--disabled govuk-!-margin-right-1" : "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>\t\n </div>\n </div> --\x3e\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 \x3c!-- <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">\t\n <label class="govuk-label govuk-radios__label" for="changed-name">\t\n 8x8\t\n </label>\t\n </div>\t\n <div class="govuk-radios__item">\t\n <input id="changed-name-2" class="govuk-radios__input" [(ngModel)]="platForm" type="radio" aria-label="Antenna" value="Antenna">\t\n <label class="govuk-label govuk-radios__label" for="changed-name-2">\t\n Antenna\t\n </label>\t\n </div>\t\n </div>\t\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> --\x3e\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 \x3c!-- <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> --\x3e\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>\t\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\x3c!-- \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> --\x3e\n\n <div class="govuk-form-group govuk-form-group--mg" *ngIf="!bsPaymentDcnNumber && isOldPcipalOff && isNewPcipalOff">\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 Select payment service\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">\t\n <label class="govuk-label govuk-radios__label" for="changed-name">\t\n 8x8\t\n </label>\t\n </div>\t\n <div class="govuk-radios__item">\t\n <input id="changed-name-2" class="govuk-radios__input" [(ngModel)]="platForm" type="radio" aria-label="Antenna" value="Antenna">\t\n <label class="govuk-label govuk-radios__label" for="changed-name-2">\t\n Antenna\t\n </label>\t\n </div>\t\n </div>\t\n </fieldset>\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 [isOldPcipalOff]="isOldPcipalOff" \n [isNewPcipalOff]="isNewPcipalOff" \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<div *ngIf="viewStatus === \'payhub_view\' && payhubHtml" [innerHTML]="payhubHtml | sanitizeHtml" id="payhub-html-id"></div>\n',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}"]}]}],he.ctorParameters=function(){return[{type:h.Router},{type:ie},{type:r.Location},{type:D},{type:k},{type:b}]},he.propDecorators={paymentGroupRef:[{type:f.Input}],ccdCaseNumber:[{type:f.Input}],isTurnOff:[{type:f.Input}],caseType:[{type:f.Input}],isOldPcipalOff:[{type:f.Input}],isNewPcipalOff:[{type:f.Input}]},he);function he(e,t,n,s,a,o){this.router=e,this.bulkScaningPaymentService=t,this.location=n,this.paymentViewService=s,this.paymentLibComponent=a,this.OrderslistService=o,this.viewStatus="main",this.service="",this.platForm="",this.isBackButtonEnable=!0,this.isFeeAmountZero=!1,this.totalAfterRemission=0,this.isConfirmationBtnDisabled=!1,this.isRemoveBtnDisabled=!1,this.isPaymentExist=!1,this.isRemissionsExist=!1,this.isRemissionsMatch=!1}var fe=(ye.prototype.ngOnInit=function(){},ye.decorators=[{type:f.Component,args:[{selector:"ccpay-error-banner",template:'<div class="govuk-error-summary" aria-labelledby="error-summary-title" role="alert" tabindex="-1" data-module="govuk-error-summary">\n <h2 class="govuk-error-summary__title govuk-error-summary__title-custom" id="error-summary-title">\n {{errorMessage.title}}\n </h2>\n <div class="govuk-error-summary__body">\n <ul class="govuk-list govuk-error-summary__list">\n <li>\n {{errorMessage.body}}\n </li>\n </ul>\n </div>\n</div>',styles:[".govuk-error-summary h2{font-size:24px}.govuk-error-summary__list li{font-size:19px}"]}]}],ye.ctorParameters=function(){return[]},ye.propDecorators={errorMessage:[{type:f.Input,args:["errorMessage"]}]},ye);function ye(){}var ve=function(e,t,n){this.payment_allocation_status={description:"",name:"Unidentified"},this.payment_group_reference=e,this.payment_reference=t,this.unidentified_reason=n},be=function(e,t,n,s,a){this.amount=t.amount,this.banked_date=t.date_banked,this.ccd_case_number=e,this.exception_record=s,this.currency=t.currency,this.document_control_number=t.dcn_reference,this.external_provider="exela",this.giro_slip_no=t.bgc_reference,this.payer_name=t.payer_name,this.payment_channel={description:"",name:"bulk scan"},this.payment_status={description:"bulk scan payment completed",name:"success"},this.payment_method=t.payment_method,this.case_type=n,a&&(this.payment_allocation_dto=a)},_e=(ke.prototype.ngOnInit=function(){this.viewStatus="mainForm",this.ccdCaseNumber=this.paymentLibComponent.CCD_CASE_NUMBER,this.bspaymentdcn=this.paymentLibComponent.bspaymentdcn,this.isStrategicFixEnable=this.paymentLibComponent.ISSFENABLE,this.getUnassignedPayment(),this.markPaymentUnidentifiedForm=this.formBuilder.group({investicationDetail:new g.FormControl("",g.Validators.compose([g.Validators.required,g.Validators.minLength(3),g.Validators.maxLength(255),g.Validators.pattern("^([a-zA-Z0-9\\s,\\.]*)$")]))})},ke.prototype.getUnassignedPayment=function(){var s=this;this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(function(e){s.errorMessage=s.getErrorMessage(!1),s.unassignedRecord=e.data.payments.filter(function(e){return e&&e.dcn_reference==s.bspaymentdcn})[0],s.siteID=e.data.responsible_service_id;var t=e.data.ccd_reference,n=e.data.exception_record_reference,e=t&&t===s.ccdCaseNumber?null:s.ccdCaseNumber;s.ccdReference=t||null,s.exceptionReference=n||e},function(e){s.errorMessage=s.getErrorMessage(!0)})},ke.prototype.trimUnderscore=function(e){return this.bulkScaningPaymentService.removeUnwantedString(e," ")},ke.prototype.saveAndContinue=function(){this.resetForm([!1,!1,!1,!1]);var e=this.markPaymentUnidentifiedForm.controls.investicationDetail,t=e.errors;this.markPaymentUnidentifiedForm.dirty&&this.markPaymentUnidentifiedForm.valid?(this.investigationComment=this.markPaymentUnidentifiedForm.controls.investicationDetail.value,this.viewStatus="unidentifiedContinueConfirm"):(""==e.value&&this.resetForm([!0,!1,!1,!1]),""!=e.value&&e.invalid&&this.resetForm([!1,!0,!1,!1]),t&&t.minlength&&t.minlength.actualLength<3&&this.resetForm([!1,!1,!0,!1]),t&&t.maxlength&&255<t.maxlength.actualLength&&this.resetForm([!1,!1,!1,!0]))},ke.prototype.resetForm=function(e){this.isInvesticationDetailEmpty=e[0],this.investicationDetailHasError=e[1],this.investicationDetailMinHasError=e[2],this.investicationDetailMaxHasError=e[3]},ke.prototype.confirmPayments=function(){var n=this;this.isConfirmButtondisabled=!0;var e,s=this.markPaymentUnidentifiedForm.get("investicationDetail").value;this.isStrategicFixEnable?this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference,"PROCESSED").subscribe(function(e){n.errorMessage=n.getErrorMessage(!1);var t=new be(n.ccdReference,n.unassignedRecord,n.siteID,n.exceptionReference);n.paymentViewService.postBSPayments(t).subscribe(function(e){n.errorMessage=n.getErrorMessage(!1);var t=JSON.parse(e),e=new ve(t.data.payment_group_reference,t.data.reference,s);t.success&&n.paymentViewService.postBSUnidentifiedPayments(e).subscribe(function(e){n.errorMessage=n.getErrorMessage(!1),JSON.parse(e).success&&n.gotoCasetransationPage()},function(e){n.bulkScaningPaymentService.patchBSChangeStatus(n.unassignedRecord.dcn_reference,"COMPLETE").subscribe(),n.errorMessage=n.getErrorMessage(!0),n.isConfirmButtondisabled=!1})},function(e){n.bulkScaningPaymentService.patchBSChangeStatus(n.unassignedRecord.dcn_reference,"COMPLETE").subscribe(),n.errorMessage=n.getErrorMessage(!0),n.isConfirmButtondisabled=!1})},function(e){n.errorMessage=n.getErrorMessage(!0),n.isConfirmButtondisabled=!1}):(e={allocation_status:"Unidentified",payment_allocation_status:{description:"",name:"Unidentified"},unidentified_reason:s,user_id:this.caseType},e=new be(this.ccdReference,this.unassignedRecord,this.caseType,this.exceptionReference,e),this.bulkScaningPaymentService.postBSWoPGStrategic(e).subscribe(function(e){n.errorMessage=n.getErrorMessage(!1),JSON.parse(e).success&&n.gotoCasetransationPage()},function(e){n.errorMessage=n.getErrorMessage(!0),n.isConfirmButtondisabled=!1}))},ke.prototype.cancelMarkUnidentifiedPayments=function(e){e&&"cancel"===e?""!==this.markPaymentUnidentifiedForm.get("investicationDetail").value?this.viewStatus="unidentifiedCancelConfirm":this.gotoCasetransationPage():this.viewStatus="mainForm"},ke.prototype.gotoCasetransationPage=function(){this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.TAKEPAYMENT=!0,this.paymentLibComponent.ISBSENABLE=!0},ke.prototype.getErrorMessage=function(e){return{title:"There is a problem with the service",body:"Try again later",showError:e}},ke.decorators=[{type:f.Component,args:[{selector:"app-mark-unidentified-payment",template:'<div class="mkpay-unidentified" >\n <div *ngIf="viewStatus === \'mainForm\'">\n <input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'MARKUNIDENTIFIED\'>\n <h1 class="heading-large">Mark payment as unidentified</h1>\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">Payment asset number (DCN)</td>\n <td class="govuk-table__header" scope="col">Banked date</td>\n <td class="govuk-table__header" scope="col">Amount</td>\n <td class="govuk-table__header" scope="col">Method</td>\n \n </tr>\n </thead>\n <tbody class="govuk-table__body">\n <tr class="govuk-table__row">\n <td class="govuk-table__cell">{{unassignedRecord.dcn_reference}}</td>\n <td class="govuk-table__cell"> {{unassignedRecord.date_banked | date:\'dd MMM yyyy\'}}</td>\n <td class="govuk-table__cell"> {{unassignedRecord.amount | currency :\'GBP\':\'symbol\':\'1.2-2\'}}</td>\n <td class="capitalize govuk-table__cell"> {{trimUnderscore(unassignedRecord.payment_method) | lowercase}} </td>\n </tr>\n </tbody>\n </table>\n </div>\n <form [formGroup]="markPaymentUnidentifiedForm" novalidate>\n <div class="govuk-form-group">\n <p class="unidentifiedSubText">\n Give a reason for marking this payment as unidentified.\n <br/>\n Include any investigations you\'ve made.\n </p>\n <label class="heading-small" for="investicationDetail">\n\n </label>\n <textarea class="form-control form-control-3-4" [ngClass]="{\'inline-error-class\': isInvesticationDetailEmpty || investicationDetailHasError || investicationDetailMinHasError || investicationDetailMaxHasError}" name="investicationDetail" id="investicationDetail" rows="5" formControlName="investicationDetail">\n </textarea>\n <p class="inline-error-message" *ngIf="isInvesticationDetailEmpty || investicationDetailHasError || investicationDetailMinHasError || investicationDetailMaxHasError">\n <span *ngIf="isInvesticationDetailEmpty">Enter a reason for marking this payment as unidentified.</span>\n <span *ngIf="investicationDetailHasError">Enter a vaild reason</span>\n <span *ngIf="investicationDetailMinHasError">Reason should be at least 3 characters.</span>\n <span *ngIf="investicationDetailMaxHasError">Reason should be 255 characters or under.</span>\n </p>\n </div>\n <div class="govuk-button--group">\n <button type="submit" class="button" (click)="saveAndContinue()">\n Continue\n </button>\n <button type="button" class="button govuk-button--secondary" (click)="cancelMarkUnidentifiedPayments(\'cancel\')">\n Cancel\n </button>\n </div>\n </form>\n </div>\n <ng-container *ngIf="viewStatus === \'unidentifiedContinueConfirm\'">\n <ccpay-error-banner *ngIf="errorMessage.showError" [errorMessage]="errorMessage"></ccpay-error-banner>\n <input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'UNIDENTIFIEDCONFIRMATION\'>\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 <h1 class="heading-small"> Are you sure you want to mark this payment as unidentified? </h1>\n \n </strong>\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">Investigations</td>\n </tr>\n </thead>\n <tbody class="govuk-table__body">\n <tr class="govuk-table__row">\n <td class="govuk-table__cell">{{investigationComment}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n </div>\n <div class="govuk-button--group">\n <button type="submit" class="button" [disabled]="isConfirmButtondisabled" (click)="confirmPayments()">\n Confirm\n </button>\n <button type="button" class="button govuk-button--secondary" (click)="cancelMarkUnidentifiedPayments()">\n Cancel\n </button>\n </div>\n </ng-container>\n <ng-container *ngIf="viewStatus === \'unidentifiedCancelConfirm\'">\n <input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'CANCELUNIDENTIFIED\'>\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 cancel?\n </strong>\n </div>\n <div class="govuk-button--group">\n <button type="submit" class="button" (click)="gotoCasetransationPage()">\n Yes\n </button>\n <button type="button" class="button govuk-button--secondary" (click)="cancelMarkUnidentifiedPayments()">\n No\n </button>\n </div>\n </ng-container>\n</div>\n',styles:[".mkpay-unidentified{margin:10px 0 20px}.mkpay-unidentified .govuk-button--group .govuk-button--secondary{margin-left:10px;background-color:#b3b8bdf2}.mkpay-unidentified .inline-error-class{outline:#a71414 solid 3px;outline-offset:0}.mkpay-unidentified .inline-error-message{color:#a71414;font-weight:700;margin-top:10px}.govuk-grid-column-full{padding:0}.unidentifiedSubText{line-height:45px}.govuk-warning-text__text{font-size:19px}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}"]}]}],ke.ctorParameters=function(){return[{type:g.FormBuilder},{type:D},{type:k},{type:ie}]},ke.propDecorators={caseType:[{type:f.Input}]},ke);function ke(e,t,n,s){this.formBuilder=e,this.paymentViewService=t,this.paymentLibComponent=n,this.bulkScaningPaymentService=s,this.isInvesticationDetailEmpty=!1,this.investicationDetailHasError=!1,this.investicationDetailMinHasError=!1,this.investicationDetailMaxHasError=!1,this.errorMessage=this.getErrorMessage(!1),this.siteID=null,this.isConfirmButtondisabled=!1,this.ccdReference=null,this.exceptionReference=null,this.isStrategicFixEnable=!0}var Re=function(e,t,n,s,a,o){this.payment_allocation_status={description:"",name:"Transferred"},this.payment_group_reference=e,this.payment_reference=t,this.unidentified_reason=n,this.receiving_office=s,this.receiving_email_address=o,this.sending_email_address=a},Se=(Ee.prototype.ngOnInit=function(){var t=this;this.resetForm([!1,!1,!1,!1,!1,!1],"all"),this.viewStatus="mainForm",this.ccdCaseNumber=this.paymentLibComponent.CCD_CASE_NUMBER,this.bspaymentdcn=this.paymentLibComponent.bspaymentdcn,this.isStrategicFixEnable=this.paymentLibComponent.ISSFENABLE,this.getUnassignedPayment(),this.paymentViewService.getSiteID().subscribe(function(e){t.isContinueButtondisabled=!1,t.errorMessage=t.getErrorMessage(!1),t.siteIDList=JSON.parse(e)},function(e){window.scrollTo(0,0),t.isContinueButtondisabled=!0,t.errorMessage=t.getErrorMessage(!0)}),this.markPaymentUnsolicitedForm=this.formBuilder.group({reason:new g.FormControl("",g.Validators.compose([g.Validators.required,g.Validators.minLength(3),g.Validators.maxLength(255),g.Validators.pattern("^([a-zA-Z0-9\\s,\\.]*)$")])),responsibleOffice:new g.FormControl("",g.Validators.compose([g.Validators.required,g.Validators.pattern("^([a-zA-Z0-9\\s\\n,\\.-:]*)$")])),responsiblePerson:new g.FormControl(""),emailId:new g.FormControl("")})},Ee.prototype.trimUnderscore=function(e){return this.bulkScaningPaymentService.removeUnwantedString(e," ")},Ee.prototype.confirmPayments=function(){var n=this;this.isConfirmButtondisabled=!0;var e,s=this.markPaymentUnsolicitedForm.controls;this.isStrategicFixEnable?this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference,"PROCESSED").subscribe(function(e){n.errorMessage=n.getErrorMessage(!1);JSON.parse(e);e=new be(n.ccdReference,n.unassignedRecord,n.siteID,n.exceptionReference);n.paymentViewService.postBSPayments(e).subscribe(function(e){n.errorMessage=n.getErrorMessage(!1);var t=JSON.parse(e),e=new Re(t.data.payment_group_reference,t.data.reference,s.reason.value,n.selectedSiteId,s.responsiblePerson.value,s.emailId.value);t.success&&n.paymentViewService.postBSUnsolicitedPayments(e).subscribe(function(e){n.errorMessage=n.getErrorMessage(!1),JSON.parse(e).success&&n.gotoCasetransationPage()},function(e){n.bulkScaningPaymentService.patchBSChangeStatus(n.unassignedRecord.dcn_reference,"COMPLETE").subscribe(),n.errorMessage=n.getErrorMessage(!0),n.isConfirmButtondisabled=!1})},function(e){n.bulkScaningPaymentService.patchBSChangeStatus(n.unassignedRecord.dcn_reference,"COMPLETE").subscribe(),n.errorMessage=n.getErrorMessage(!0),n.isConfirmButtondisabled=!1})},function(e){n.errorMessage=n.getErrorMessage(!0),n.isConfirmButtondisabled=!1}):(e={allocation_status:"Transferred",payment_allocation_status:{description:"",name:"Transferred"},unidentified_reason:s.reason.value,receiving_office:this.selectedSiteId,user_id:this.caseType},e=new be(this.ccdReference,this.unassignedRecord,this.caseType,this.exceptionReference,e),this.bulkScaningPaymentService.postBSWoPGStrategic(e).subscribe(function(e){n.errorMessage=n.getErrorMessage(!1),JSON.parse(e).success&&n.gotoCasetransationPage()},function(e){n.errorMessage=n.getErrorMessage(!0),n.isConfirmButtondisabled=!1}))},Ee.prototype.saveAndContinue=function(){this.resetForm([!1,!1,!1,!1,!1,!1],"all");var e,t=this.markPaymentUnsolicitedForm.controls.reason.errors,n=this.markPaymentUnsolicitedForm.controls.reason,s=this.markPaymentUnsolicitedForm.controls.responsibleOffice;this.markPaymentUnsolicitedForm.dirty&&this.markPaymentUnsolicitedForm.valid?(e=this.markPaymentUnsolicitedForm.controls,this.emailId=e.emailId.value,this.responsibleOffice=s.value,this.responsiblePerson=e.responsiblePerson.value,this.reason=e.reason.value,this.viewStatus="unsolicitedContinueConfirm"):(""==n.value&&this.resetForm([!0,!1,!1,!1,!1,!1],"reason"),""!=n.value&&this.markPaymentUnsolicitedForm.controls.reason.invalid&&this.resetForm([!1,!0,!1,!1,!1,!1],"reason"),t&&t.minlength&&t.minlength.actualLength<3&&this.resetForm([!1,!1,!0,!1,!1,!1],"reason"),t&&t.maxlength&&255<t.maxlength.actualLength&&this.resetForm([!1,!1,!1,!0,!1,!1],"reason"),""==s.value&&this.resetForm([!1,!1,!1,!1,!0,!1],"responsibleOffice"),""!=s.value&&s.invalid&&this.resetForm([!1,!1,!1,!1,!1,!0],"responsibleOffice"))},Ee.prototype.resetForm=function(e,t){"reason"!==t&&"all"!==t||(this.isReasonEmpty=e[0],this.reasonHasError=e[1],this.reasonMinHasError=e[2],this.reasonMaxHasError=e[3]),"responsibleOffice"!==t&&"all"!==t||(this.isResponsibleOfficeEmpty=e[4],this.responsibleOfficeHasError=e[5])},Ee.prototype.cancelMarkUnsolicitedPayments=function(e){e&&"cancel"===e?this.checkingFormValue()?this.viewStatus="unsolicitedCancelConfirm":this.gotoCasetransationPage():(this.markPaymentUnsolicitedForm.controls.responsibleOffice.setValue(""),this.viewStatus="mainForm")},Ee.prototype.checkingFormValue=function(){var e,t=this.markPaymentUnsolicitedForm.value,n=!1;for(e in t)if(t.hasOwnProperty(e)&&""!==t[e]){n=!0;break}return n},Ee.prototype.gotoCasetransationPage=function(){this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.TAKEPAYMENT=!0,this.paymentLibComponent.ISBSENABLE=!0},Ee.prototype.getUnassignedPayment=function(){var s=this;this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(function(e){s.unassignedRecord=e.data.payments.filter(function(e){return e&&e.dcn_reference==s.bspaymentdcn})[0],s.siteID=e.data.responsible_service_id;var t=e.data.ccd_reference,n=e.data.exception_record_reference,e=t&&t===s.ccdCaseNumber?null:s.ccdCaseNumber;s.ccdReference=t||null,s.exceptionReference=n||e},function(e){s.errorMessage=s.getErrorMessage(!0)})},Ee.prototype.getErrorMessage=function(e){return{title:"Something went wrong.",body:"Please try again later.",showError:e}},Ee.prototype.selectchange=function(e){this.selectedSiteId=e.target.value,this.selectedSiteName=e.target.options[e.target.selectedIndex].text},Ee.decorators=[{type:f.Component,args:[{selector:"app-mark-unsolicited-payment",template:'<div class="mkpay-unidentified">\n <div *ngIf="viewStatus === \'mainForm\'">\n <ccpay-error-banner *ngIf="errorMessage.showError" [errorMessage]="errorMessage"></ccpay-error-banner>\n <h1 class="heading-large">Mark payment as transferred</h1>\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">Payment asset number (DCN)</td>\n <td class="govuk-table__header" scope="col">Banked date</td>\n <td class="govuk-table__header" scope="col">Amount</td>\n <td class="govuk-table__header" scope="col">Method</td>\n </tr>\n </thead>\n <tbody class="govuk-table__body">\n <tr class="govuk-table__row">\n <td class="govuk-table__cell">{{unassignedRecord.dcn_reference}}</td>\n <td class="govuk-table__cell"> {{unassignedRecord.date_banked | date:\'dd MMM yyyy\'}}</td>\n <td class="govuk-table__cell"> {{unassignedRecord.amount | currency :\'GBP\':\'symbol\':\'1.2-2\'}}</td>\n <td class="capitalize govuk-table__cell"> {{trimUnderscore(unassignedRecord.payment_method) | lowercase}} </td>\n </tr>\n </tbody>\n </table>\n </div>\n \n <form [formGroup]="markPaymentUnsolicitedForm" novalidate>\n <input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'MARKTRANSFERRED\'>\n <div class="govuk-form-group">\n <label class="govuk-label custom-govuk-label custom-govuk-label" for="reason">\n Reason for payment being marked as transferred \n </label>\n <textarea class="form-control form-control-3-4" [ngClass]="{\'inline-error-class\': reasonHasError || reasonMinHasError || reasonMaxHasError}" name="reason" id="reason" rows="5" formControlName="reason">\n </textarea>\n <p class="inline-error-message" *ngIf="isReasonEmpty || reasonHasError || reasonMinHasError || reasonMaxHasError">\n <span *ngIf="isReasonEmpty">Enter a reason for marking this payment as transferred.</span>\n <span *ngIf="reasonHasError">Enter a valid reason</span>\n <span *ngIf="reasonMinHasError">Reason should be at least 3 characters.</span>\n <span *ngIf="reasonMaxHasError">Reason should be 255 characters or under.</span>\n </p>\n </div>\n <div class="govuk-form-group">\n <label class="govuk-label custom-govuk-label" for="responsibleOffice">\n Receiving Site ID (Receiving court/Bulk centre site ID) \n </label>\n <select class="form-control short-input" id="responsibleOffice" formControlName="responsibleOffice" (change)="selectchange($event)">\n <option value="" selected=\'selected\'>Please select</option>\n <option *ngFor="let siteID of siteIDList;" value="{{siteID.siteId}}">{{siteID.siteName}} ({{siteID.siteId}})</option>\n </select>\n <p class="inline-error-message" *ngIf="isResponsibleOfficeEmpty || responsibleOfficeHasError">\n <span *ngIf="isResponsibleOfficeEmpty">Please select Receiving Site ID</span>\n <span *ngIf="responsibleOfficeHasError">Please select a valid Receiving Site ID</span>\n </p>\n </div>\n <div class="govuk-button--group">\n <button type="submit" [disabled]="isContinueButtondisabled" class="button" (click)="saveAndContinue()">\n Confirm\n </button>\n <button type="button" class="button govuk-button--secondary" (click)="cancelMarkUnsolicitedPayments(\'cancel\')">\n Cancel\n </button>\n </div>\n </form>\n \n</div>\n <ng-container *ngIf="viewStatus === \'unsolicitedContinueConfirm\'">\n <ccpay-error-banner *ngIf="errorMessage.showError" [errorMessage]="errorMessage"></ccpay-error-banner>\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 <h1 class="heading-small"> Are you sure you want to mark this payment as transferred? </h1>\n </strong>\n <input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'TRANSFERREDCONFIRMATION\'>\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">Reason</td>\n <td class="govuk-table__header" scope="col">Receiving site ID</td>\n </tr>\n </thead>\n <tbody class="govuk-table__body">\n <tr class="govuk-table__row">\n <td class="govuk-table__cell">{{reason}}</td>\n <td class="govuk-table__cell">{{selectedSiteName}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n </div>\n <div class="govuk-button--group">\n <button type="submit" class="button" [disabled]="isConfirmButtondisabled" (click)="confirmPayments()">\n Confirm\n </button>\n <button type="button" class="button govuk-button--secondary" (click)="cancelMarkUnsolicitedPayments()">\n Cancel\n </button>\n </div>\n </ng-container>\n <ng-container *ngIf="viewStatus === \'unsolicitedCancelConfirm\'">\n <input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'CANCELTRANSFERRED\'>\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 cancel?\n </strong>\n </div>\n <div class="govuk-button--group">\n <button type="submit" class="button" (click)="gotoCasetransationPage()">\n Yes\n </button>\n <button type="button" class="button govuk-button--secondary" (click)="cancelMarkUnsolicitedPayments()">\n No\n </button>\n </div>\n </ng-container>\n</div>',styles:[".mkpay-unidentified{margin:10px 0 20px}.mkpay-unidentified .govuk-button--secondary{margin-left:10px;background-color:#b3b8bdf2}.mkpay-unidentified .inline-error-class{outline:#a71414 solid 3px;outline-offset:0}.mkpay-unidentified .inline-error-message{color:#a71414;font-weight:700;margin-top:10px}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.custom-govuk-label,.govuk-warning-text__text{font-size:19px}#responsibleOffice{color:#000;width:75%;font-weight:#fff}select option{background:#fff}"]}]}],Ee.ctorParameters=function(){return[{type:g.FormBuilder},{type:D},{type:k},{type:ie}]},Ee.propDecorators={caseType:[{type:f.Input}]},Ee);function Ee(e,t,n,s){this.formBuilder=e,this.paymentViewService=t,this.paymentLibComponent=n,this.bulkScaningPaymentService=s,this.reasonHasError=!1,this.isReasonEmpty=!1,this.reasonMinHasError=!1,this.reasonMaxHasError=!1,this.responsibleOfficeHasError=!1,this.isResponsibleOfficeEmpty=!1,this.errorMessage=this.getErrorMessage(!1),this.siteID=null,this.isConfirmButtondisabled=!1,this.isContinueButtondisabled=!1,this.ccdReference=null,this.exceptionReference=null,this.isStrategicFixEnable=!0}var we=(Ce.prototype.ngOnInit=function(){var t=this;this.ccdCaseNumber=this.paymentLibComponent.CCD_CASE_NUMBER,this.selectedOption=this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase(),this.dcnNumber=this.paymentLibComponent.DCN_NUMBER,this.isBulkScanEnable=this.paymentLibComponent.ISBSENABLE,this.isTurnOff=this.paymentLibComponent.ISTURNOFF,this.isNewpcipaloff=this.paymentLibComponent.ISNEWPCIPALOFF,this.isOldpcipaloff=this.paymentLibComponent.ISOLDPCIPALOFF,this.isStFixEnable=this.paymentLibComponent.ISSFENABLE,this.OrderslistService.getFeeExists().subscribe(function(e){return t.FEE_RECORDS_EXISTS=e}),this.getUnassignedPaymentlist()},Ce.prototype.getUnassignedPaymentlist=function(){var t=this;"dcn"===this.selectedOption?this.bulkScaningPaymentService.getBSPaymentsByDCN(this.dcnNumber).subscribe(function(e){e.data&&e.data.payments?t.setValuesForUnassignedRecord(e.data):e.payments?t.setValuesForUnassignedRecord(e):(t.upPaymentErrorMessage="error",t.getUnprocessedFeeCount.emit("0"))},function(e){t.upPaymentErrorMessage=e,t.getUnprocessedFeeCount.emit("0")}):this.bulkScaningPaymentService.getBSPaymentsByCCD(this.ccdCaseNumber).subscribe(function(e){e.data&&e.data.payments?t.setValuesForUnassignedRecord(e.data):e.payments?t.setValuesForUnassignedRecord(e):(t.upPaymentErrorMessage="error",t.getUnprocessedFeeCount.emit("0"))},function(e){t.upPaymentErrorMessage=e,t.getUnprocessedFeeCount.emit("0")})},Ce.prototype.setValuesForUnassignedRecord=function(e){this.unassignedRecordList=e.payments,this.unassignedRecordList&&(this.unassignedRecordListLength=e.payments.length),this.serviceId=e.responsible_service_id,e.ccd_reference===undefined&&(this.isExceptionCase=!0),this.getUnprocessedFeeCount.emit(this.unassignedRecordList.length),this.unprocessedPaymentSelectEvent(this.unassignedRecordList)},Ce.prototype.formatUnassignedRecordId=function(e){return"unassignrecord-"+e},Ce.prototype.trimUnderscore=function(e){return this.bulkScaningPaymentService.removeUnwantedString(e," ")},Ce.prototype.redirectToFeeSearchPage=function(e,t){e.preventDefault(),this.recordId=t;t=this.isBulkScanEnable?"&isBulkScanning=Enable":"&isBulkScanning=Disable";t+=this.ISTURNOFF?"&isTurnOff=Enable":"&isTurnOff=Disable",t+=this.isStFixEnable?"&isStFixEnable=Enable":"&isStFixEnable=Disable",t+="&caseType="+this.paymentLibComponent.CASETYPE,t+=this.isOldpcipaloff?"&isOldPcipalOff=Enable":"&isOldPcipalOff=Disable",t+=this.isNewpcipaloff?"&isNewPcipalOff=Enable":"&isNewPcipalOff=Disable",this.router.navigateByUrl("/fee-search?selectedOption="+this.selectedOption+"&ccdCaseNumber="+this.ccdCaseNumber+"&dcn="+this.recordId+t)},Ce.prototype.loadUnsolicitedPage=function(e,t){this.recordId=t,this.paymentLibComponent.bspaymentdcn=this.recordId,this.paymentLibComponent.viewName=e},Ce.prototype.unprocessedPaymentSelectEvent=function(e){this.isUnprocessedRecordSelected=!0,this.validateButtons(),this.selectedUnprocessedFeeEvent.emit(e)},Ce.prototype.resetButtons=function(){this.isUnprocessedRecordSelected=!1,this.isAllocateToExistingFeebtnEnabled=!1,this.isMarkAsUnidentifiedbtnEnabled=!1,this.isAllocatedToNewFeebtnEnabled=!1},Ce.prototype.goToAllocatePage=function(e){this.paymentLibComponent.bspaymentdcn=e,this.paymentLibComponent.unProcessedPaymentServiceId=this.serviceId,this.paymentLibComponent.isTurnOff=this.ISTURNOFF,this.paymentLibComponent.isNewPcipalOff=this.ISNEWPCIPALOFF,this.paymentLibComponent.isOldPcipalOff=this.ISOLDPCIPALOFF,this.paymentLibComponent.ISSFENABLE=this.isStFixEnable,this.ISTURNOFF?(this.paymentLibComponent.paymentGroupReference=this.PAYMENTREF,this.paymentLibComponent.viewName="fee-summary"):(this.paymentLibComponent.paymentGroupReference=null,this.paymentLibComponent.viewName="allocate-payments")},Ce.prototype.validateButtons=function(){this.isUnprocessedRecordSelected&&this.isExceptionCase?this.isMarkAsUnidentifiedbtnEnabled=!0:!this.isUnprocessedRecordSelected||this.isExceptionCase||this.FEE_RECORDS_EXISTS?this.isUnprocessedRecordSelected&&!this.isExceptionCase&&this.FEE_RECORDS_EXISTS&&(this.ISTURNOFF?(this.isAllocateToExistingFeebtnEnabled=this.IS_OS_AMT_AVAILABLE,this.isAllocatedToNewFeebtnEnabled=!0):(this.isAllocateToExistingFeebtnEnabled=!0,this.isAllocatedToNewFeebtnEnabled=!1)):(this.isAllocateToExistingFeebtnEnabled=!1,this.isAllocatedToNewFeebtnEnabled=!0)},Ce.prototype.unprocessedPaymentUnSelectEvent=function(e){e.preventDefault(),this.recordId=null,this.isUnprocessedRecordSelected=!1,this.isAllocateToExistingFeebtnEnabled=!1,this.isAllocatedToNewFeebtnEnabled=!1,this.isMarkAsUnidentifiedbtnEnabled=!1,this.selectedUnprocessedFeeEvent.emit("")},Ce.prototype.showDetailRow=function(e,t,n){e.preventDefault(),this.unassignedRecordSelectedList=t},Ce.decorators=[{type:f.Component,args:[{selector:"ccpay-app-unprocessed-payments",template:'\x3c!-- <ng-container *ngIf="IS_BUTTON_ENABLE">\n <div class="unprocessed-payments govuk-grid-column-full govuk-!-padding-bottom-3">\n <input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'CASETRANSACTION\'>\n <h3 class="heading-medium" *ngIf="!IS_BUTTON_ENABLE">Unprocessed payments</h3>\n <h3 class="heading-medium" *ngIf="IS_BUTTON_ENABLE">Unallocated 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" scope="col" *ngIf="IS_BUTTON_ENABLE && !isTurnOff">Select</td>\n <td class="govuk-table__header" scope="col" *ngIf="IS_BUTTON_ENABLE && isTurnOff"><a href="#" (click)="unprocessedPaymentUnSelectEvent($event)">Unselect</a></td>\n \n <td class="govuk-table__header" scope="col">Payment asset number (DCN)</td>\n <td class="govuk-table__header" scope="col">Banked date</td>\n <td class="govuk-table__header" scope="col">Amount</td>\n <td class="govuk-table__header" scope="col">Method</td>\n </tr>\n </thead>\n <tbody class="govuk-table__body" >\n <tr class="govuk-table__row" *ngFor="let unassignedRecord of unassignedRecordList; let i of index;">\n <td class="govuk-table__cell" *ngIf="IS_BUTTON_ENABLE">\n <div class="multiple-choice unprocessed-payments--radio-button">\n <input id="\'unpaiedFee\'+i+\'\'"\n aria-label="unassignedRecord"\n name="unassignedRecord"\n type="radio"\n [(ngModel)]="recordId"\n (click)="unprocessedPaymentSelectEvent(unassignedRecord.dcn_reference)"\n value="{{unassignedRecord.dcn_reference}}" />\n <label for="radio-inline-1"></label>\n </div>\n </td>\n <td class="govuk-table__cell whitespace-inherit">\n {{unassignedRecord.dcn_reference}}\n </td>\n <td class="govuk-table__cell whitespace-inherit"> {{unassignedRecord.date_banked | date:\'dd MMM yyyy\'}}</td>\n <td class="govuk-table__cell whitespace-inherit"> {{unassignedRecord.amount | currency :\'GBP\':\'symbol\':\'1.2-2\'}}</td>\n <td class="capitalize govuk-table__cell whitespace-inherit"> {{ trimUnderscore(unassignedRecord.payment_method) | lowercase}} </td>\n </tr>\n </tbody>\n <tbody class="govuk-table__body" *ngIf="upPaymentErrorMessage !== null">\n <td class="govuk-table__cell" colspan="6">No unallocated payments record available</td>\n </tbody>\n </table>\n <div class="button-grb" *ngIf="IS_BUTTON_ENABLE && !isTurnOff">\n <button type="button"\n [disabled]="!isAllocatedToNewFeebtnEnabled"\n [ngClass]="!isAllocatedToNewFeebtnEnabled ? \'button govuk-button--secondary button--disabled govuk-!-margin-right-1\' : \'button govuk-button--secondary govuk-!-margin-right-1\'" (click)="redirectToFeeSearchPage($event)">\n Allocate to a new fee\n </button>\n <button type="button" \n [disabled]="!isAllocateToExistingFeebtnEnabled"\n [ngClass]=\'!isAllocateToExistingFeebtnEnabled ? "button govuk-button--secondary button--disabled govuk-!-margin-right-1" : "button govuk-button--secondary govuk-!-margin-right-1"\' (click)="goToAllocatePage()">\n Allocate to an existing fee\n </button>\n <button type="button" \n [disabled]="!isMarkAsUnidentifiedbtnEnabled"\n [ngClass]=\'!isMarkAsUnidentifiedbtnEnabled ? "button govuk-button--secondary button--disabled govuk-!-margin-right-1" : "button govuk-button--secondary govuk-!-margin-right-1"\' (click)="loadUnsolicitedPage(\'unidentifiedPage\')">\n Mark as unidentified\n </button>\n <button type="button" \n [disabled]="!isUnprocessedRecordSelected"\n [ngClass]=\'!isUnprocessedRecordSelected ? "button govuk-button--secondary button--disabled govuk-!-margin-right-1" : "button govuk-button--secondary govuk-!-margin-right-1"\' (click)="loadUnsolicitedPage(\'unsolicitedPage\')">\n Mark as transferred\n </button> \n </div>\n \n <div class="button-grb" *ngIf="IS_BUTTON_ENABLE && isTurnOff">\n <button type="button"\n [disabled]="!isAllocatedToNewFeebtnEnabled"\n [ngClass]="!isAllocatedToNewFeebtnEnabled ? \'button button--disabled govuk-!-margin-right-1\' : \'button govuk-!-margin-right-1\'" (click)="redirectToFeeSearchPage($event)">\n Allocate to a new fee\n </button>\n <button type="button" \n [disabled]="!isAllocateToExistingFeebtnEnabled"\n [ngClass]=\'!isAllocateToExistingFeebtnEnabled ? "button button--disabled govuk-!-margin-right-1" : "button govuk-!-margin-right-1"\' (click)="goToAllocatePage()">\n Allocate to an existing fee\n </button>\n <button type="button" \n [disabled]="!isMarkAsUnidentifiedbtnEnabled"\n [ngClass]=\'!isMarkAsUnidentifiedbtnEnabled ? "button button--disabled govuk-!-margin-right-1" : "button govuk-!-margin-right-1"\' (click)="loadUnsolicitedPage(\'unidentifiedPage\')">\n Mark as unidentified\n </button>\n <button type="button" \n [disabled]="!isUnprocessedRecordSelected"\n [ngClass]=\'!isUnprocessedRecordSelected ? "button button--disabled govuk-!-margin-right-1" : "button govuk-!-margin-right-1"\' (click)="loadUnsolicitedPage(\'unsolicitedPage\')">\n Mark as transferred\n </button> \n </div>\n </div>\n</ng-container> --\x3e\n\n\n<ng-container *ngIf="!IS_BUTTON_ENABLE">\n <table class="govuk-table">\n \n <thead class="govuk-table__head" *ngIf=\'PAYMENTSLENGTH === 0 \'>\n \x3c!-- <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-14" scope="col">Date</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> --\x3e\n </thead>\n <tbody class="govuk-table__body">\n <tr class="govuk-table__row" *ngFor="let unassignedRecord of unassignedRecordList; let i of index;">\n <td class="govuk-table__cell whitespace-inherit" class="col-13">\n Unallocated \n </td>\n <td class="govuk-table__cell whitespace-inherit"> {{unassignedRecord.amount | currency :\'GBP\':\'symbol\':\'1.2-2\'}}</td>\n <td class="govuk-table__cell whitespace-inherit"></td>\n <td class="govuk-table__cell whitespace-inherit"></td>\n <td class="govuk-table__cell whitespace-inherit"></td>\n <td class="govuk-table__cell whitespace-inherit"></td>\n </tr>\n </tbody>\n \n </table>\n\n</ng-container>\n\n\n\x3c!--Orders Unallocated changes--\x3e\n<ng-container *ngIf="IS_BUTTON_ENABLE">\n <div class="unprocessed-payments">\n <input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'CASETRANSACTION\'>\n <table class="table">\n \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-9" scope="col">Amount</td>\n <td class="govuk-table__header col-16" scope="col">Date allocated</td>\n <td class="govuk-table__header col-24" colspan="3" scope="col">Request 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>\n <ng-container *ngFor="let unassignedRecord of unassignedRecordList; let i of index;">\n <tr>\n <td class="govuk-table__cell whitespace-inherit col-13" >\n Unallocated \n </td>\n <td class="govuk-table__cell whitespace-inherit col-10">\n {{unassignedRecord.amount | currency :\'GBP\':\'symbol\':\'1.2-2\'}}\n </td>\n <td class="govuk-table__cell whitespace-inherit" colspan="8">\n <div *ngIf="IS_BUTTON_ENABLE && !isTurnOff" class="alignright">\n <button type="button"\n [disabled]="!isAllocatedToNewFeebtnEnabled"\n [ngClass]="!isAllocatedToNewFeebtnEnabled ? \'button govuk-button--secondary button--disabled\' : \'button govuk-button--secondary\'" (click)="redirectToFeeSearchPage($event,unassignedRecord.dcn_reference)">\n Allocate to new service request\n </button><br/>\n <button type="button" \n [disabled]="!isAllocateToExistingFeebtnEnabled"\n [ngClass]=\'!isAllocateToExistingFeebtnEnabled ? "button govuk-button--secondary button--disabled" : "button govuk-button--secondary"\' (click)="goToAllocatePage(unassignedRecord.dcn_reference)">\n Allocate to existing service request \n </button>\n </div>\n \n </td>\n </tr>\n \n \x3c!-- <ng-container> --\x3e\n <tr>\n <td class="unassigned noborders" colspan="10">\n <summary (click)="unassignedRecord.expanded = !unassignedRecord.expanded" class="govuk-details__summary">\n <span class="govuk-details__summary-text">\n More details and actions\n </span>\n </summary>\n <div *ngIf="unassignedRecord.expanded" class="govuk-details__text govuk-!-margin-bottom-5 paddingright">\n <dl class="govuk-summary-list govuk-!-margin-bottom-5">\n <div class="govuk-summary-list__row">\n <dt class="govuk-summary-list__key">\n Method\n </dt>\n <dd class="govuk-summary-list__value">\n {{ trimUnderscore(unassignedRecord.payment_method) | lowercase}}\n </dd>\n </div>\n <div class="govuk-summary-list__row">\n <dt class="govuk-summary-list__key">\n Payment assest number (DCN) \n </dt>\n <dd class="govuk-summary-list__value">\n {{unassignedRecord.dcn_reference}}\n </dd>\n </div>\n </dl>\n <div class=" govuk-!-margin-bottom-5">\n <button type="button" \n [disabled]="!isMarkAsUnidentifiedbtnEnabled"\n [ngClass]=\'!isMarkAsUnidentifiedbtnEnabled ? "button govuk-button--secondary button--disabled" : "button govuk-button--secondary"\' (click)="loadUnsolicitedPage(\'unidentifiedPage\',unassignedRecord.dcn_reference)">\n Mark as unidentified\n </button>\n </div>\n <div>\n <button type="button" \n [disabled]="!isUnprocessedRecordSelected"\n [ngClass]=\'!isUnprocessedRecordSelected ? "button govuk-button--secondary button--disabled" : "button govuk-button--secondary"\' (click)="loadUnsolicitedPage(\'unsolicitedPage\',unassignedRecord.dcn_reference)">\n Mark as transferred\n </button> \n </div>\n\n </div>\n </td> \n </tr> \n \x3c!-- </ng-container> --\x3e\n </ng-container>\n </tbody>\n </table>\n \n </div>\n</ng-container>\n\n<ng-container *ngIf="viewStatus === \'main\'">\n\n</ng-container>\n\x3c!-- <ng-container *ngIf="PAYMENTSLENGTH === 0 && unassignedRecordListLength === 0">\n <br/>No payments.<br/>\n</ng-container> --\x3e\n\n',styles:[".unprocessed-payments .unprocessed-payments--radio-button{bottom:10px}.disable{text-decoration:none;padding:.526315em .789473em .263157em;cursor:default;color:#fff;background-color:#00823b;pointer-events:none;font-size:1em;line-height:1.25;outline:transparent solid 1px;outline-offset:-1px;-webkit-appearance:none;box-shadow:0 2px 0 #003618}.button.disabled,.button[disabled=disabled],.button[disabled]{zoom:1;opacity:.5}.button.disabled:active,.button[disabled=disabled]:active,.button[disabled]:active{top:0;box-shadow:0 2px 0 #003618}.button[disabled=disabled]{background:#00823b}.col-13{width:13%!important}.col-17{width:17%!important}.col-12{width:12%!important}.col-9{width:9%!important}.col-15{width:15%!important}.lowercase{text-transform:lowercase}.capitalize::first-letter{text-transform:uppercase}.whitespace-inherit{white-space:inherit!important}.top_row{display:table;width:100%}.top_row>div{display:table-cell;width:50%;border-bottom:1px solid #eee}.unassigned{border-top:hidden}.col-16{width:16%!important}.col-10{width:10%!important}.col-14{width:14%!important}.col-19{width:19%!important;padding-left:0!important}.col-18{width:18%!important;padding-left:0!important;padding-right:0!important}.col-21{width:21%!important}.col-20{width:20%!important}.col-11{width:11%!important}.col-37{width:37%!important}.noborders>td{border-color:transparent;border-top-style:hidden;border-right-style:hidden;border-left-style:hidden}.govuk-button--secondary{margin-bottom:10px}.govuk-summary-list{font-size:19px}.govuk-summary-list__key{width:35%}td{white-space:nowrap;overflow:hidden!important}table{table-layout:fixed;width:100%}td,th{word-wrap:break-word}.alignright{text-align:right}.paddingright{padding-right:0}"]}]}],Ce.ctorParameters=function(){return[{type:h.Router},{type:ie},{type:k},{type:D},{type:b}]},Ce.propDecorators={FEE_RECORDS_EXISTS:[{type:f.Input,args:["FEE_RECORDS_EXISTS"]}],PAYMENTREF:[{type:f.Input,args:["PAYMENTREF"]}],ISTURNOFF:[{type:f.Input,args:["ISTURNOFF"]}],IS_BUTTON_ENABLE:[{type:f.Input,args:["IS_BUTTON_ENABLE"]}],IS_OS_AMT_AVAILABLE:[{type:f.Input,args:["IS_OS_AMT_AVAILABLE"]}],ISNEWPCIPALOFF:[{type:f.Input,args:["ISNEWPCIPALOFF"]}],ISOLDPCIPALOFF:[{type:f.Input,args:["ISOLDPCIPALOFF"]}],ISSFENABLE:[{type:f.Input,args:["ISSFENABLE"]}],PAYMENTSLENGTH:[{type:f.Input,args:["PAYMENTSLENGTH"]}],LEVEL:[{type:f.Input,args:["LEVEL"]}],selectedUnprocessedFeeEvent:[{type:f.Output}],getUnprocessedFeeCount:[{type:f.Output}]},Ce);function Ce(e,t,n,s,a){this.router=e,this.bulkScaningPaymentService=t,this.paymentLibComponent=n,this.paymentViewService=s,this.OrderslistService=a,this.selectedUnprocessedFeeEvent=new f.EventEmitter,this.getUnprocessedFeeCount=new f.EventEmitter,this.viewStatus="main",this.upPaymentErrorMessage=null,this.recordId=null,this.isRecordExist=!1,this.dcnNumber=null,this.isUnprocessedRecordSelected=!0,this.isAllocateToExistingFeebtnEnabled=!1,this.isMarkAsUnidentifiedbtnEnabled=!1,this.isAllocatedToNewFeebtnEnabled=!1,this.isExceptionCase=!1,this.serviceId=null,this.isTurnOff=!0,this.unassignedRecordListLength=0}var Pe=(Ie.prototype.ngOnInit=function(){},Ie.prototype.trimUnderscore=function(e){return this.bulkScaningPaymentService.removeUnwantedString(e," ")},Ie.prototype.redirectToPaymentViewPage=function(e,t,n){this.goToPaymentViewComponent.emit({paymentGroupReference:e,paymentReference:t,paymentMethod:n})},Ie.decorators=[{type:f.Component,args:[{selector:"ccpay-app-processed-payments",template:'<div class="processed-payments govuk-grid-column-full govuk-!-padding-bottom-3">\n <h3 class="heading-medium">Processed 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" scope="col">Payment asset number (DCN)</td>\n <td class="govuk-table__header" scope="col">Banked date</td>\n <td class="govuk-table__header" scope="col">Amount</td>\n <td class="govuk-table__header" scope="col">Method</td>\n <td class="govuk-table__header" scope="col">Allocation status</td>\n </tr>\n </thead>\n <tbody class="govuk-table__body" >\n <tr class="govuk-table__row" *ngFor="let processedRecord of NONPAYMENTS">\n <td class="govuk-table__cell">\n <a href="javascript:void(0)" (click)="redirectToPaymentViewPage(processedRecord.paymentGroupReference, processedRecord.reference, processedRecord.method)">{{processedRecord.document_control_number}}</a>\n </td>\n <td class="govuk-table__cell"> {{processedRecord.banked_date | date:\'dd MMM yyyy\'}}</td>\n <td class="govuk-table__cell"> {{processedRecord.amount | currency :\'GBP\':\'symbol\':\'1.2-2\'}}</td>\n <td class="capitalize govuk-table__cell"> {{ trimUnderscore(processedRecord.method) | lowercase}} </td>\n <td class="capitalize govuk-table__cell"> {{ processedRecord.payment_allocation[0] ? processedRecord.payment_allocation[0].allocation_status : \'-\' }} </td>\n\n </tr>\n <tr class="govuk-table__row" *ngIf="NONPAYMENTS.length === 0">\n <td class="govuk-table__cell" colspan="5">\n No processed payments\n </td>\n\n </tr>\n\n </tbody>\n </table>\n</div>\n',styles:[".lowercase{text-transform:lowercase}.capitalize::first-letter{text-transform:uppercase}"]}]}],Ie.ctorParameters=function(){return[{type:h.Router},{type:ie}]},Ie.propDecorators={NONPAYMENTS:[{type:f.Input,args:["NONPAYMENTS"]}],goToPaymentViewComponent:[{type:f.Output}]},Ie);function Ie(e,t){this.router=e,this.bulkScaningPaymentService=t,this.goToPaymentViewComponent=new f.EventEmitter}var Ae=function(e,t,n,s,a){this.payment_allocation_status={description:"",name:"Allocated"},this.payment_group_reference=e,this.payment_reference=t,this.reason=n||null,this.explanation=s||null,this.user_name=a||null},Oe=(Fe.prototype.ngOnInit=function(){var t=this;this.viewStatus="mainForm",null!==this.paymentLibComponent.paymentGroupReference&&(this.viewStatus="allocatePaymentConfirmation"),this.ccdCaseNumber=this.paymentLibComponent.CCD_CASE_NUMBER,this.bspaymentdcn=this.paymentLibComponent.bspaymentdcn,this.paymentRef=this.paymentLibComponent.paymentGroupReference,this.selectedOption=this.paymentLibComponent.SELECTED_OPTION,this.isStrategicFixEnable=this.paymentLibComponent.ISSFENABLE,this.isTurnOff=this.paymentLibComponent.isTurnOff,this.overUnderPaymentForm=this.formBuilder.group({moreDetails:new g.FormControl("",g.Validators.compose([g.Validators.required,g.Validators.minLength(3),g.Validators.maxLength(255),g.Validators.pattern("^([a-zA-Z0-9\\s,\\.]*)$")])),userName:new g.FormControl("",g.Validators.compose([g.Validators.required,g.Validators.pattern("^([a-zA-Z0-9\\s]*)$")]))}),this.OrderslistService.getOrdersList().subscribe(function(e){return t.orderLevelFees=e.filter(function(e){return"Paid"!==e.orderStatus})}),this.OrderslistService.getCaseType().subscribe(function(e){return t.caseType=e}),this.getUnassignedPayment()},Fe.prototype.getGroupOutstandingAmount=function(e){return this.bulkScaningPaymentService.calculateOutStandingAmount(e)},Fe.prototype.getPaymentGroupDetails=function(){var n=this;this.isTurnOff?this.caseTransactionsService.getPaymentGroups(this.ccdCaseNumber).subscribe(function(e){n.errorMessage=n.errorHandlerService.getServerErrorMessage(!1),n.paymentGroups=e.payment_groups.filter(function(e){e.fees.forEach(function(e){0===e.calculated_amount&&(n.isFeeAmountZero=!0)});var t=n.getGroupOutstandingAmount(e),e=0<t||0==t&&n.isFeeAmountZero&&e.payment_group_reference===n.paymentRef;return n.paymentRef?e:0<t||0==t&&n.isFeeAmountZero})},function(e){n.errorMessage=n.errorHandlerService.getServerErrorMessage(!0)}):this.paymentViewService.getPaymentGroupDetails(this.paymentRef).subscribe(function(e){n.errorMessage=n.errorHandlerService.getServerErrorMessage(!1),n.paymentGroup=e,n.saveAndContinue()},function(e){n.errorMessage=n.errorHandlerService.getServerErrorMessage(!0)})},Fe.prototype.selectedPaymentGroup=function(e){this.isContinueButtondisabled=!1,this.paymentGroup=e},Fe.prototype.gotoCasetransationPage=function(){this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.isTurnOff=this.isTurnOff,this.paymentLibComponent.TAKEPAYMENT=!0,this.paymentLibComponent.ISBSENABLE=!0},Fe.prototype.gotoSummaryPage=function(e){e.preventDefault(),this.paymentLibComponent.viewName="fee-summary",this.paymentLibComponent.isTurnOff=this.isTurnOff,this.paymentLibComponent.TAKEPAYMENT=!0,this.paymentLibComponent.ISBSENABLE=!0},Fe.prototype.cancelAllocatePayment=function(e){e.preventDefault(),this.resetForm([!1,!1,!1,!1,!1,!1,!1,!1],"all"),this.isTurnOff?this.viewStatus="mainForm":(this.paymentLibComponent.viewName="fee-summary",this.paymentLibComponent.isTurnOff=this.isTurnOff,this.paymentLibComponent.TAKEPAYMENT=!0,this.paymentLibComponent.ISBSENABLE=!0)},Fe.prototype.confirmAllocatePayement=function(){this.enCookieUserName=document.cookie.split(";").find(function(e){return e.includes("user-info")}).split("=")[1].split(";"),this.cookieUserName=JSON.parse(decodeURIComponent(this.enCookieUserName));var e=this.cookieUserName.forename+" "+this.cookieUserName.surname,t=this.overUnderPaymentForm.controls.moreDetails,n=this.overUnderPaymentForm.controls.moreDetails.errors,s=e,a=this.paymentReason&&this.paymentExplanation,e="Other"===this.paymentExplanation;this.resetForm([!1,!1,!1,!1,!1,!1,!1,!1],"all"),!this.isRemainingAmountGtZero&&!this.isRemainingAmountLtZero||a&&(!e&&0<s.length||e&&0<s.length&&t.valid)?(this.isConfirmButtondisabled=!0,this.otherPaymentExplanation="Other"===this.paymentExplanation?t.value:this.paymentExplanation,this.userName=s,this.finalServiceCall()):(this.paymentReason||this.resetForm([!0,!1,!1,!1,!1,!1,!1,!1],"reason"),this.paymentExplanation||this.resetForm([!1,!0,!1,!1,!1,!1,!1,!1],"explanation"),this.paymentExplanation&&e&&(""==t.value&&this.resetForm([!1,!1,!0,!1,!1,!1,!1,!1],"other"),""!=t.value&&t.invalid&&this.resetForm([!1,!1,!1,!0,!1,!1,!1,!1],"other"),n&&n.minlength&&n.minlength.actualLength<3&&this.resetForm([!1,!1,!1,!1,!0,!1,!1,!1],"other"),n&&n.maxlength&&255<n.maxlength.actualLength&&this.resetForm([!1,!1,!1,!1,!1,!0,!1,!1],"other")),0===s.length&&this.resetForm([!1,!1,!1,!1,!1,!1,!0,!1],"username"))},Fe.prototype.resetForm=function(e,t){"reason"!==t&&"all"!==t||(this.paymentReasonHasError=e[0]),"explanation"!==t&&"all"!==t||(this.paymentExplanationHasError=e[1]),"other"!==t&&"all"!==t||(this.isPaymentDetailsEmpty=e[2],this.isPaymentDetailsInvalid=e[3],this.paymentDetailsMinHasError=e[4],this.paymentDetailsMaxHasError=e[5]),"username"!==t&&"all"!==t||(this.isUserNameEmpty=e[6],this.isUserNameInvalid=e[7])},Fe.prototype.finalServiceCall=function(){var e,n=this;this.isStrategicFixEnable?this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference,"PROCESSED").subscribe(function(e){n.errorMessage=n.errorHandlerService.getServerErrorMessage(!1),JSON.parse(e).success&&(e=new be(n.ccdReference,n.unAllocatedPayment,n.siteID,n.exceptionReference),n.bulkScaningPaymentService.postBSAllocatePayment(e,n.paymentGroup.payment_group_reference).subscribe(function(e){n.errorMessage=n.errorHandlerService.getServerErrorMessage(!1);var t=JSON.parse(e),e=new Ae(t.data.payment_group_reference,t.data.reference,n.paymentReason,n.otherPaymentExplanation,n.userName);t.success&&n.paymentViewService.postBSAllocationPayments(e).subscribe(function(e){n.errorMessage=n.errorHandlerService.getServerErrorMessage(!1),JSON.parse(e).success&&n.gotoCasetransationPage()},function(e){n.bulkScaningPaymentService.patchBSChangeStatus(n.unAllocatedPayment.dcn_reference,"COMPLETE").subscribe(),n.errorMessage=n.errorHandlerService.getServerErrorMessage(!0),window.scrollTo(0,0),n.isConfirmButtondisabled=!1})},function(e){n.bulkScaningPaymentService.patchBSChangeStatus(n.unAllocatedPayment.dcn_reference,"COMPLETE").subscribe(),n.errorMessage=n.errorHandlerService.getServerErrorMessage(!0),window.scrollTo(0,0),n.isConfirmButtondisabled=!1}))},function(e){n.errorMessage=n.errorHandlerService.getServerErrorMessage(!0),window.scrollTo(0,0),n.isConfirmButtondisabled=!1}):(e={reason:this.paymentReason,allocation_status:"Allocated",explanation:this.otherPaymentExplanation,payment_allocation_status:{description:"",name:"Allocated"},payment_group_reference:this.paymentGroup.payment_group_reference,case_type:this.caseType,user_name:this.userName},e=new be(this.ccdReference,this.unAllocatedPayment,this.caseType,this.exceptionReference,e),this.bulkScaningPaymentService.postBSPaymentStrategic(e,this.paymentGroup.payment_group_reference).subscribe(function(e){n.errorMessage=n.errorHandlerService.getServerErrorMessage(!1),JSON.parse(e).success&&n.gotoCasetransationPage()},function(e){n.errorMessage=n.errorHandlerService.getServerErrorMessage(!0),window.scrollTo(0,0),n.isConfirmButtondisabled=!1}))},Fe.prototype.saveAndContinue=function(){var e,t;this.paymentGroup&&(this.isMoreDetailsBoxHide=!0,this.overUnderPaymentForm.get("moreDetails").reset(),this.overUnderPaymentForm.get("moreDetails").setValue(""),this.overUnderPaymentForm.get("userName").reset(),this.overUnderPaymentForm.get("userName").setValue(""),this.paymentReason="",this.paymentExplanation="",e=this.getGroupOutstandingAmount(this.paymentGroup),t=this.unAllocatedPayment.amount-e,this.isRemainingAmountGtZero=0<t,this.isRemainingAmountLtZero=t<0,this.paymentSectionLabel=this.isRemainingAmountGtZero?{title:"There is an Over payment of",reason:"Provide a reason. This will be used in the Refund process."}:this.isRemainingAmountLtZero?{title:"There is an Under payment of",reason:"Provide a reason"}:{title:"Amount left to be allocated",reason:""},this.feedbackUrlLabel=this.isRemainingAmountGtZero?"CONFIRMALLOCATION_SURPLUS":this.isRemainingAmountLtZero?"CONFIRMALLOCATION_SHORTFALL":"CONFIRMALLOCATION",this.remainingAmount=this.isRemainingAmountGtZero?t:this.isRemainingAmountLtZero?-1*t:0,this.afterFeeAllocateOutstanding=0<=t?0:-1*t,this.amountForAllocation=e>=this.unAllocatedPayment.amount?this.unAllocatedPayment.amount:e,this.isTurnOff&&(this.viewStatus="allocatePaymentConfirmation"))},Fe.prototype.getUnassignedPayment=function(){var s=this;this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(function(e){s.errorMessage=s.errorHandlerService.getServerErrorMessage(!1),s.unAllocatedPayment=e.data.payments.filter(function(e){return e&&e.dcn_reference==s.bspaymentdcn})[0],s.siteID=e.data.responsible_service_id;var t=e.data.ccd_reference,n=e.data.exception_record_reference,e=t&&t===s.ccdCaseNumber?null:s.ccdCaseNumber;s.ccdReference=t||null,s.exceptionReference=n||e,s.getPaymentGroupDetails()},function(e){s.errorMessage=s.errorHandlerService.getServerErrorMessage(!0)})},Fe.prototype.selectRadioButton=function(e,t){this.isMoreDetailsBoxHide=!0,"explanation"===t&&"other"===e&&(this.isPaymentDetailsEmpty=!1,this.isPaymentDetailsInvalid=!1,this.paymentDetailsMinHasError=!1,this.paymentDetailsMaxHasError=!1,this.isMoreDetailsBoxHide=!1)},Fe.prototype.OrderListSelectEvent=function(e){this.isContinueButtondisabled=!1,this.recordId=e},Fe.prototype.redirectToOrderFeeSearchPage=function(){this.paymentLibComponent.paymentGroupReference=this.recordId,this.paymentLibComponent.isTurnOff=this.isTurnOff,this.paymentLibComponent.viewName="fee-summary"},Fe.decorators=[{type:f.Component,args:[{selector:"app-allocate-payments",template:'<div class="allocate-payments">\n <ng-container *ngIf="viewStatus === \'mainForm\' && !isTurnOff">\n\n <div class="govuk-breadcrumbs">\n <ol class="govuk-breadcrumbs__list">\n <li class="govuk-breadcrumbs__list-item">\n <a (click)="gotoCasetransationPage()" class="govuk-back-link govuk-label">Back</a>\n </li>\n </ol>\n </div>\n \n <div class="paymentrequest">\n <h1 class="govuk-heading-xl govuk-!-margin-top-3 govuk-!-margin-bottom-4">Select payment request</h1>\n <p class="govuk-!-margin-top-5 casererf">Case reference: {{ccdReference}}</p>\n </div>\n \n <div *ngFor="let orderRef of orderLevelFees; let i of index;" class="multiple-choice unprocessed-payments--radio-button">\n <input id="\'orderfee\'+i+\'\'"\n aria-label="orderLevelRecord"\n name="orderLevelRecord"\n \n (click)="OrderListSelectEvent(orderRef.orderRefId)"\n type="radio"\n value="{{orderRef.orderTotalFees}}" />\n <label for="radio-inline-1"> {{orderRef.orderTotalFees | currency :\'GBP\':\'symbol\':\'1.2-2\'}}({{orderRef.orderStatus}})</label>\n </div>\n \n <div class="paymentrequest">\n <button [disabled]="isContinueButtondisabled" type="submit" (click)="redirectToOrderFeeSearchPage()" class="button allbtb button--disabled govuk-!-margin-right-1">\n Continue\n </button>\n </div>\n \n </ng-container>\n\n <div *ngIf="viewStatus===\'mainForm\' && isTurnOff">\n <input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'ALLOCATEPAYMENTS\'>\n <div class="govuk-breadcrumbs" *ngIf="paymentRef">\n <ol class="govuk-breadcrumbs__list">\n <li class="govuk-breadcrumbs__list-item">\n <a href="#" (click)="gotoSummaryPage($event)" class="govuk-back-link">Back</a>\n </li>\n </ol>\n </div>\n <div class="govuk-heading-section">\n <h1 class="govuk-heading-xl">Allocate payment to fee group</h1>\n <h2 class="govuk-heading-l">Amount left to be allocated:\n {{ unAllocatedPayment.amount | currency:\'GBP\':\'symbol-narrow\':\'1.2-2\' }}</h2>\n </div>\n <div class="payment-group-section" *ngFor="let paymentGroup of paymentGroups">\n <h3 class="govuk-heading-m">Group reference: {{paymentGroup.payment_group_reference}}</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"></td>\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" *ngFor="let fee of paymentGroup.fees; let i = index;">\n <td class="govuk-table__cell govuk-table__cell--col1 govuk-table__custom--col1"\n [attr.rowspan]="paymentGroup.fees.length" *ngIf="i==0">\n <div class="multiple-choice">\n <input id="unpaiedFee-{{i}}" name="unassignedRecord" type="radio"\n (click)="selectedPaymentGroup(paymentGroup)" />\n <label for="unpaiedFee-{{i}}"></label>\n </div>\n </td>\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"> {{fee.volume? fee.volume : \'-\'}} </td>\n <td class="govuk-table__cell govuk-table__cell--col4">\n {{ fee.fee_amount | currency:\'GBP\':\'symbol-narrow\':\'1.2-2\' }} </td>\n <td class="govuk-table__cell govuk-table__cell--col5">\n {{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"\n [attr.rowspan]="paymentGroup.fees.length" *ngIf="i==0">\n {{getGroupOutstandingAmount(paymentGroup) | currency:\'GBP\':\'symbol-narrow\':\'1.2-2\' }} </td>\n\n </tr>\n\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 class="govuk-button-group-allocate">\n <button type="button" class="button govuk-!-margin-right-1" [disabled]="isContinueButtondisabled"\n (click)="saveAndContinue()">\n Continue\n </button>\n <button type="button" class="button govuk-button--secondary" (click)="gotoCasetransationPage()">\n Cancel\n </button>\n </div>\n </div>\n\n <ng-container *ngIf="(viewStatus === \'mainForm\' && isTurnOff) || viewStatus === \'allocatePaymentConfirmation\'">\n <ccpay-error-banner *ngIf="errorMessage.showError" [errorMessage]="errorMessage"></ccpay-error-banner>\n <input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'{{feedbackUrlLabel}}\'>\n <h1 class="govuk-heading-xl">Confirm allocation</h1>\n <h2 class="govuk-heading-l govuk-heading-l--custom">\n Amount to be allocated: {{amountForAllocation | currency:\'GBP\':\'symbol-narrow\':\'1.2-2\'}}\n </h2>\n <div class="payment-group-section" *ngIf="paymentGroup">\n <h3 class="govuk-heading-m--custom" *ngIf="isTurnOff">Group reference: {{paymentGroup.payment_group_reference}}\n </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">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 </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"> {{fee.volume? fee.volume : \'-\'}} </td>\n <td class="govuk-table__cell govuk-table__cell--col4">\n {{ fee.fee_amount | currency:\'GBP\':\'symbol-narrow\':\'1.2-2\' }} </td>\n <td class="govuk-table__cell govuk-table__cell--col5">\n {{fee.calculated_amount | currency:\'GBP\':\'symbol-narrow\':\'1.2-2\'}} </td>\n <td class="govuk-table__cell govuk-table__cell--col6" [attr.rowspan]="paymentGroup.fees.length"\n *ngIf="i==0"> {{afterFeeAllocateOutstanding | 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 class="govuk-warning-text" *ngIf="isRemainingAmountGtZero || isRemainingAmountLtZero || remainingAmount === 0">\n <span class="govuk-warning-text__icon" aria-hidden="true">!</span>\n <strong class="govuk-warning-text__text govuk-warning-text__custom">\n <span class="govuk-warning-text__assistive">Warning</span>\n {{paymentSectionLabel.title}} {{ remainingAmount | currency:\'GBP\':\'symbol-narrow\':\'1.2-2\' }}\n </strong>\n </div>\n <div class="govuk-form-group" *ngIf="isRemainingAmountGtZero || isRemainingAmountLtZero">\n <div class="govuk-form-group">\n <fieldset class="govuk-fieldset" aria-describedby="how-contacted-conditional-hint">\n <span id="how-contacted-conditional-hint" class="govuk-hint"\n [ngClass]="{\'inline-error-message\': paymentReasonHasError}">\n {{paymentSectionLabel.reason}}\n </span>\n <div\n [ngClass]="paymentReasonHasError ? \'govuk-radios govuk-radios--conditional form-group-error\' : \'govuk-radios govuk-radios--conditional\'"\n data-module="govuk-radios" *ngIf="isRemainingAmountGtZero">\n <div class="govuk-radios__item" *ngFor="let reason of reasonList.overPayment | keyValue">\n <input class="govuk-radios__input" id="{{reason.key}}" name="paymentReason" type="radio"\n [(ngModel)]="paymentReason" value={{reason.value}}>\n <label class="govuk-label govuk-radios__label govuk-font__custom" for="how-contacted-conditional">\n {{reason.value}}\n </label>\n </div>\n </div>\n <div\n [ngClass]="paymentReasonHasError ? \'govuk-radios govuk-radios--conditional form-group-error\' : \'govuk-radios govuk-radios--conditional\'"\n data-module="govuk-radios" *ngIf="isRemainingAmountLtZero">\n <div class="govuk-radios__item" *ngFor="let reason of reasonList.shortFall | keyValue">\n <input class="govuk-radios__input" id="{{reason.key}}" name="paymentReason" type="radio"\n [(ngModel)]="paymentReason" value={{reason.value}}>\n <label class="govuk-label govuk-radios__label govuk-font__custom" for="how-contacted-conditional">\n {{reason.value}}\n </label>\n </div>\n </div>\n </fieldset>\n </div>\n <div class="govuk-form-group">\n <fieldset class="govuk-fieldset" aria-describedby="how-contacted-conditional-hint">\n <span id="how-contacted-conditional-hint" class="govuk-hint"\n [ngClass]="{\'inline-error-message\': paymentExplanationHasError}">\n Provide an explanatory note\n </span>\n <div\n [ngClass]="paymentExplanationHasError ? \'govuk-radios govuk-radios--conditional form-group-error\' : \'govuk-radios govuk-radios--conditional\'"\n data-module="govuk-radios" *ngIf="isRemainingAmountGtZero">\n <div class="govuk-radios__item" *ngFor="let explanation of explanationList.overPayment | keyValue">\n <input class="govuk-radios__input" id="{{explanation.key}}" name="paymentExplanation" type="radio"\n [(ngModel)]="paymentExplanation" value={{explanation.value}}\n (click)="selectRadioButton(explanation.key, \'explanation\')">\n <label class="govuk-label govuk-radios__label govuk-font__custom" for="how-contacted-conditional">\n {{explanation.value}}\n </label>\n </div>\n </div>\n <div\n [ngClass]="paymentExplanationHasError ? \'govuk-radios govuk-radios--conditional form-group-error\' : \'govuk-radios govuk-radios--conditional\'"\n data-module="govuk-radios" *ngIf="isRemainingAmountLtZero">\n <div class="govuk-radios__item" *ngFor="let explanation of explanationList.shortFall | keyValue">\n <input class="govuk-radios__input" id="{{explanation.key}}" name="paymentExplanation" type="radio"\n [(ngModel)]="paymentExplanation" value={{explanation.value}}\n (click)="selectRadioButton(explanation.key, \'explanation\')">\n <label class="govuk-label govuk-radios__label govuk-font__custom" for="how-contacted-conditional">\n {{explanation.value}}\n </label>\n </div>\n </div>\n </fieldset>\n </div>\n </div>\n\n <form [formGroup]="overUnderPaymentForm" novalidate>\n <div\n [ngClass]="isMoreDetailsBoxHide ? \'govuk-radios__conditional govuk-radios__conditional--hidden\' : isPaymentDetailsEmpty || isPaymentDetailsInvalid || paymentDetailsMinHasError || paymentDetailsMaxHasError ? \'govuk-radios__conditional inline-error-border\' : \'govuk-radios__conditional\'"\n id="conditional-how-contacted-conditional-3">\n <div class="govuk-form-group">\n <span id="more-detail-hint" class="govuk-hint govuk-font__custom">\n Please enter details\n </span>\n <textarea class="govuk-textarea"\n [ngClass]="{\'inline-error-class\': isPaymentDetailsEmpty || isPaymentDetailsInvalid || paymentDetailsMinHasError || paymentDetailsMaxHasError}"\n id="moreDetails" name="moreDetails" rows="5" formControlName="moreDetails">\n </textarea>\n <p class="inline-error-message"\n *ngIf="isPaymentDetailsEmpty || isPaymentDetailsInvalid || paymentDetailsMinHasError || paymentDetailsMaxHasError">\n <span *ngIf="isPaymentDetailsEmpty">Enter a explanation</span>\n <span *ngIf="isPaymentDetailsInvalid">Enter a valid explanation</span>\n <span *ngIf="paymentDetailsMinHasError">Explanation should be at least 3 characters.</span>\n <span *ngIf="paymentDetailsMaxHasError">Explanation should be 255 characters or under.</span>\n </p>\n </div>\n </div>\n <div class="govuk-button--group">\n <button type="submit" [disabled]="isConfirmButtondisabled"\n [ngClass]="isConfirmButtondisabled ? \'button button--disabled\' : \'button\'"\n (click)="confirmAllocatePayement()">\n Confirm\n </button>\n <button type="button" class="button govuk-button--secondary" (click)="cancelAllocatePayment($event)">\n Cancel\n </button>\n </div>\n </form>\n </ng-container>\n</div>',styles:[".allocate-payments{margin:20px 0}.allocate-payments .govuk-table__cell--col1,.allocate-payments .govuk-table__cell--col3{width:10%}.allocate-payments .govuk-table__cell--col2,.allocate-payments .govuk-table__cell--col6{width:25%}.allocate-payments .govuk-table__cell--col4,.allocate-payments .govuk-table__cell--col5{width:15%}.allocate-payments .govuk-button-group-allocate{display:flex;justify-content:flex-start}.allocate-payments .govuk-button--secondary{margin-left:10px;background-color:#b3b8bdf2}.allocate-payments .govuk-custom-warning__message{font-size:30px;position:relative;top:12px;font-weight:700}.allocate-payments .govuk-warning-text-custom{margin-bottom:0!important;padding:10px 0 5px}.allocate-payments .govuk-table__custom--col1{padding-top:0;padding-bottom:20px;padding-left:15px}.allocate-payments .govuk-table__custom--col6{text-align:center}.allocate-payments .govuk-list__custom{padding-left:20px}.allocate-payments .govuk-font__custom,.allocate-payments .govuk-heading-m--custom,.allocate-payments .govuk-hint,.allocate-payments .govuk-label--m,.allocate-payments .govuk-list__custom,.allocate-payments .govuk-radios__item,.allocate-payments .govuk-warning-text__custom{font-size:19px}.allocate-payments .govuk-radios__conditional--hidden{display:none}.allocate-payments .form-group-error{border-left:5px solid #b10e1e;padding-left:15px}.allocate-payments .inline-error-class{outline:#a71414 solid 3px;outline-offset:0}.allocate-payments .inline-error-message{color:#a71414;font-weight:700;margin-top:10px}.allocate-payments .inline-error-border{border-color:#a71414}.allbtb{margin-top:2em}.govuk-back-link{font-size:1.5rem!important}.multiple-choice{font-size:19px}.casererf{align-self:flex-end;font-size:19px}.paymentrequest{display:flex;flex-direction:row;justify-content:space-between;width:960px}"]}]}],Fe.ctorParameters=function(){return[{type:S},{type:oe},{type:g.FormBuilder},{type:D},{type:k},{type:ie},{type:b}]},Fe.propDecorators={isTurnOff:[{type:f.Input}],caseType:[{type:f.Input}]},Fe);function Fe(e,t,n,s,a,o,r){this.errorHandlerService=e,this.caseTransactionsService=t,this.formBuilder=n,this.paymentViewService=s,this.paymentLibComponent=a,this.bulkScaningPaymentService=o,this.OrderslistService=r,this.unAllocatedPayment={amount:0},this.siteID=null,this.errorMessage=this.errorHandlerService.getServerErrorMessage(!1),this.paymentGroups=[],this.isMoreDetailsBoxHide=!0,this.isConfirmButtondisabled=!1,this.isContinueButtondisabled=!0,this.otherPaymentExplanation=null,this.selectedOption=null,this.isFeeAmountZero=!1,this.paymentReasonHasError=!1,this.paymentExplanationHasError=!1,this.isPaymentDetailsEmpty=!1,this.isPaymentDetailsInvalid=!1,this.paymentDetailsMinHasError=!1,this.paymentDetailsMaxHasError=!1,this.isUserNameEmpty=!1,this.isUserNameInvalid=!1,this.ccdReference=null,this.exceptionReference=null,this.paymentReason=null,this.paymentExplanation=null,this.userName=null,this.paymentRef=null,this.isStrategicFixEnable=!0,this.orderLevelFees=[],this.cookieUserName=[],this.userNameField=null,this.reasonList={overPayment:{hwfReward:"Help with Fees (HWF) awarded. Please include the HWF reference number in the explanatory note",wrongFee:"Incorrect payment received",notIssueCase:"Unable to issue case",otherDeduction:"Other"},shortFall:{helpWithFee:"Help with Fees (HWF) application declined",wrongFee:"Incorrect payment received",other:"Other"}},this.explanationList={overPayment:{referRefund:"Details in case notes. Refund due",noRefund:"Details in case notes. No refund due",noCase:"No case created. Refund due",other:"Other"},shortFall:{holdCase:"I have put a stop on the case and contacted the applicant requesting the balance of payment",heldCase:"I have put a stop on the case. The applicant needs to be contacted to request the balance of payment",other:"Other"}},this.refund={reason:{duplicate:"Duplicate payment",humanerror:"Human error",caseWithdrawn:"Case withdrawn",other:"Other"}}}var Te=function(e,t,n,s,a){this.ccd_case_number=e,this.fee=t,this.hwf_amount=n,this.hwf_reference=s,this.case_type=a},Le=function(e,t){this.hwf_amount=e,this.hwf_reference=t},De=function(e,t){this.payment_reference=e,this.refund_reason=t},Ne=function(e){this.remissionReference=e},xe=(Be.prototype.ngOnInit=function(){var t=this;this["default"]="Select a different reason",this.pattern1="^([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})$",this.pattern2="^([A-Za-z]{2}[0-9]{2})-([0-9]{6})$",""!==this.viewCompStatus&&this.viewCompStatus!==undefined&&(this.viewStatus=""),this.remission,this.fee&&(this.amount=this.fee.volume*this.fee.calculated_amount),this.payment&&(this.remessionPayment=this.payment,"Success"===this.payment.status&&(this.isPaymentSuccess=!0)),this.option=this.paymentLibComponent.SELECTED_OPTION,this.bsPaymentDcnNumber=this.paymentLibComponent.bspaymentdcn,this.remissionForm=this.formBuilder.group({remissionCode:new g.FormControl("",g.Validators.compose([g.Validators.required,g.Validators.pattern("("+this.pattern1+")|("+this.pattern2+")")])),amount:new g.FormControl("",g.Validators.compose([g.Validators.required,g.Validators.pattern("^[0-9]+(.[0-9]{1,2})?$")])),refundReason:new g.FormControl("",g.Validators.compose([g.Validators.required])),refundDDReason:new g.FormControl("",g.Validators.compose([g.Validators.required])),reason:new g.FormControl}),this.remissionForm.controls.refundDDReason.setValue("Select a different reason",{onlySelf:!0}),""===this.viewCompStatus&&(this.viewStatus="main"),"issuerefund"===this.viewCompStatus&&this.refundService.getRefundReasons().subscribe(function(e){t.refundReasons=e.filter(function(e){return!1===e.recently_used}),t.refundReasons=t.refundReasons.filter(function(e){return"Retrospective remission"!==e.name}),t.cd.detectChanges(),t.commonRefundReasons=e.filter(function(e){return!0===e.recently_used}),t.commonRefundReasons.sort(function(e,t){return e.toString().localeCompare(t)}),t.cd.detectChanges()}),"processretroremissonpage"===this.viewCompStatus&&this.isFromRefundListPage&&(this.viewStatus="processretroremissonpage")},Be.prototype.addRemission=function(){this.resetRemissionForm([!1,!1,!1,!1,!1,!1],"All");var e=this.remissionForm.controls,t=this.fee.calculated_amount>e.amount.value;this.remissionForm.controls.refundReason.setErrors(null),this.remissionForm.controls.refundDDReason.setErrors(null),this.remissionForm.dirty&&this.remissionForm.valid&&t?this.viewStatus="confirmation":(""==e.remissionCode.value&&this.resetRemissionForm([!0,!1,!1,!1,!1,!1],"remissionCode"),""!=e.remissionCode.value&&e.remissionCode.invalid&&this.resetRemissionForm([!1,!0,!1,!1,!1,!1],"remissionCode"),""==e.amount.value&&this.resetRemissionForm([!1,!1,!0,!1,!1,!1],"amount"),""!=e.amount.value&&e.amount.invalid&&this.resetRemissionForm([!1,!0,!1,!0,!1,!1],"amount"),e.amount.valid&&!t&&this.resetRemissionForm([!1,!1,!1,!1,!0,!1],"amount"))},Be.prototype.confirmRemission=function(){var t=this;this.isConfirmationBtnDisabled=!0;var e=this.remissionForm.controls.amount.value,e=this.fee.net_amount-e,e=new Te(this.ccdCaseNumber,this.fee,e,this.remissionForm.controls.remissionCode.value,this.caseType);this.paymentViewService.postPaymentGroupWithRemissions(decodeURIComponent(this.paymentGroupRef).trim(),this.fee.id,e).subscribe(function(e){JSON.parse(e).success&&(e=t.isTurnOff?"&isTurnOff=Enable":"&isTurnOff=Disable",e+="&caseType="+t.caseType,e+=t.isNewPcipalOff?"&isNewPcipalOff=Enable":"&isNewPcipalOff=Disable",e+=t.isOldPcipalOff?"&isOldPcipalOff=Enable":"&isOldPcipalOff=Disable",t.paymentLibComponent.bspaymentdcn?(t.router.routeReuseStrategy.shouldReuseRoute=function(){return!1},t.router.onSameUrlNavigation="reload",t.router.navigateByUrl("/payment-history/"+t.ccdCaseNumber+"?view=fee-summary&selectedOption="+t.option+"&paymentGroupRef="+t.paymentGroupRef+"&dcn="+t.paymentLibComponent.bspaymentdcn+e)):t.gotoCasetransationPage())},function(e){t.errorMessage=e,t.isConfirmationBtnDisabled=!1})},Be.prototype.resetRemissionForm=function(e,t){"All"===t?(this.isRemissionCodeEmpty=e[0],this.remissionCodeHasError=e[1],this.isAmountEmpty=e[2],this.amountHasError=e[3],this.isRemissionLessThanFeeError=e[4],this.isReasonEmpty=e[5]):"remissionCode"===t||"All"===t?(this.isRemissionCodeEmpty=e[0],this.remissionCodeHasError=e[1]):"amount"===t||"All"===t?(this.isAmountEmpty=e[2],this.amountHasError=e[3],this.isRemissionLessThanFeeError=e[4]):"reason"!==t&&"All"!==t||(this.isReasonEmpty=e[5])},Be.prototype.addRemissionCode=function(){this.errorMessage=!1,this.viewStatus="",this.isRefundRemission=!1,this.resetRemissionForm([!1,!1,!1,!1,!1,!1],"All");var e=this.remissionForm.controls;this.remissionForm.controls.refundReason.setErrors(null),this.remissionForm.controls.refundDDReason.setErrors(null),this.remissionForm.controls.amount.setErrors(null),this.remissionForm.dirty&&this.remissionForm.valid?(this.viewCompStatus="",this.viewStatus="processretroremissonpage"):(""==e.remissionCode.value&&this.resetRemissionForm([!0,!1,!1,!1,!1],"remissionCode"),""!=e.remissionCode.value&&e.remissionCode.invalid&&this.resetRemissionForm([!1,!0,!1,!1,!1],"remissionCode"),""==e.amount.value&&this.resetRemissionForm([!1,!1,!0,!1,!1],"amount"),""!=e.amount.value&&e.amount.invalid&&this.resetRemissionForm([!1,!0,!1,!0,!1],"amount"),""==e.reason.value&&this.resetRemissionForm([!1,!1,!1,!0,!1,!0],"reason"),e.amount.valid&&this.resetRemissionForm([!1,!1,!1,!1,!0],"amount"))},Be.prototype.gotoAddRetroRemissionCodePage=function(){return this.errorMessage=!1,this.isRefundRemission?(this.paymentLibComponent.iscancelClicked=!0,this.refundListAmount.emit(),void(this.paymentLibComponent.isFromRefundStatusPage=!0)):this.isFromRefundListPage?(this.paymentLibComponent.iscancelClicked=!0,this.refundListReason.emit({reason:this.selectedRefundReason,code:this.refundReason}),void(this.paymentLibComponent.isFromRefundStatusPage=!0)):(this.viewStatus="",this.selectedValue="yes",this.viewCompStatus="addremission",this.isRefundRemission=!0,this.errorMessage="",void(this.isFromPaymentDetailPage&&(this.paymentLibComponent.viewName="payment-view")))},Be.prototype.gotoCheckRetroRemissionPage=function(e){var t,n;this.paymentLibComponent.iscancelClicked=!1,this.errorMessage="",this.resetRemissionForm([!1,!1,!1,!1,!1],"All"),this.isRefundRemission?""==(t=this.remissionForm.controls).amount.value||t.amount.value<0?this.resetRemissionForm([!1,!1,!0,!1,!1],"amount"):(this.viewCompStatus="",this.viewStatus="checkretroremissionpage",this.refundListAmount.emit(t.amount.value)):(t=this.remissionForm.controls,n=this.fee.calculated_amount>=t.amount.value,this.remissionForm.dirty&&(""==t.amount.value||t.amount.value<0?this.resetRemissionForm([!1,!1,!0,!1,!1],"amount"):""!=t.amount.value&&t.amount.invalid?this.resetRemissionForm([!1,!1,!1,!0,!1],"amount"):t.amount.valid&&!n?this.resetRemissionForm([!1,!1,!1,!1,!0],"amount"):(this.viewCompStatus="",this.viewStatus="checkretroremissionpage")))},Be.prototype.gotoProcessRetroRemissionPage=function(){this.viewStatus="",this.viewCompStatus="addremission",this.isRefundRemission=!0,this.errorMessage=""},Be.prototype.confirmRetroRemission=function(){var e,t=this;this.isConfirmationBtnDisabled||(this.retroRemission=!0,this.remissionamt=this.remissionForm.controls.amount.value,e=new Le(this.remissionamt,this.remissionForm.controls.remissionCode.value),this.paymentViewService.postPaymentGroupWithRetroRemissions(decodeURIComponent(this.paymentGroupRef).trim(),this.fee.id,e).subscribe(function(e){JSON.parse(e)&&(t.isRemissionApplied=!0,t.viewCompStatus="",t.viewStatus="retroremissionconfirmationpage",t.remissionReference=JSON.parse(e).remission_reference)},function(e){t.errorMessage=e,t.isConfirmationBtnDisabled=!1,t.cd.detectChanges()}))},Be.prototype.processRefund=function(){var t=this;this.errorMessage="",this.isConfirmationBtnDisabled=!0,this.isRefundRemission&&(this.retroRemission=!0),this.remissionReference!==undefined&&""!==this.remissionReference||(this.remissionReference=this.remission.remission_reference);var e=new Ne(this.remissionReference);this.paymentViewService.postRefundRetroRemission(e).subscribe(function(e){JSON.parse(e)&&(t.viewCompStatus="",t.viewStatus="refundconfirmationpage",t.refundReference=JSON.parse(e).refund_reference,t.refundAmount=JSON.parse(e).refund_amount)},function(e){t.errorMessage=e,t.isConfirmationBtnDisabled=!1})},Be.prototype.gotoIssueRefundConfirmation=function(e){this.paymentLibComponent.iscancelClicked=!1,"true"===this.paymentLibComponent.REFUNDLIST&&(this.isFromRefundListPage=!0),this.errorMessage="",this.refundReason=(null===this.remissionForm.controls.refundReason.value?this.remissionForm.controls.refundDDReason:this.remissionForm.controls.refundReason).value,this.refundReason&&"Select a different reason"!==this.refundReason?!this.selectedRefundReason.includes("Other")||""!=this.remissionForm.controls.reason.value&&null!=this.remissionForm.controls.reason.value?this.selectedRefundReason.includes("Other")&&""!==this.remissionForm.controls.reason.value?(this.refundHasError=!1,this.refundReason+="-"+this.remissionForm.controls.reason.value,this.displayRefundReason=this.selectedRefundReason+"-"+this.remissionForm.controls.reason.value,this.isFromRefundListPage?this.refundListReason.emit({reason:this.displayRefundReason,code:this.refundReason}):(this.viewCompStatus="",this.viewStatus="checkissuerefundpage")):(this.displayRefundReason=this.selectedRefundReason,this.isFromRefundListPage?(this.paymentLibComponent.isFromRefundStatusPage=!0,this.refundListReason.emit({reason:this.selectedRefundReason,code:this.refundReason})):(this.viewCompStatus="",this.viewStatus="checkissuerefundpage")):this.resetRemissionForm([!1,!1,!1,!0,!1,!0],"reason"):this.refundHasError=!0},Be.prototype.gotoIssueRefundPage=function(){this.errorMessage="",this.viewCompStatus="issuerefund",this.viewStatus="",this.isRefundRemission=!0,this.errorMessage=!1,this.refundHasError=!1,this.isReasonEmpty=!1},Be.prototype.changeIssueRefundReason=function(){this.errorMessage="",this.refundHasError=!1,this.isReasonEmpty=!1,this.viewCompStatus="issuerefund",this.viewStatus="",this.isRefundRemission=!0},Be.prototype.confirmIssueRefund=function(){var t=this;this.isConfirmationBtnDisabled=!0,this.errorMessage="",this.isRefundRemission&&(this.retroRemission=!0);var e=new De(this.payment.reference,this.refundReason);this.paymentViewService.postRefundsReason(e).subscribe(function(e){JSON.parse(e)&&(t.viewCompStatus="",t.viewStatus="refundconfirmationpage",t.refundReference=JSON.parse(e).refund_reference,JSON.parse(e).refund_amount&&(t.refundAmount=JSON.parse(e).refund_amount))},function(e){t.errorMessage=e,t.isConfirmationBtnDisabled=!1,t.cd.detectChanges()})},Be.prototype.confirmRetroRefund=function(){var t=this;this.isConfirmationBtnDisabled=!0,this.errorMessage="",this.isRefundRemission&&(this.retroRemission=!0);var e=new De(this.payment.reference,"RR004-Retrospective remission");this.paymentViewService.postRefundsReason(e).subscribe(function(e){JSON.parse(e)&&(t.viewCompStatus="",t.viewStatus="retrorefundconfirmationpage",t.refundReference=JSON.parse(e).refund_reference,JSON.parse(e).refund_amount&&(t.refundAmount=JSON.parse(e).refund_amount))},function(e){t.errorMessage=e,t.isConfirmationBtnDisabled=!1})},Be.prototype.selectRadioButton=function(e,t){localStorage.setItem("myradio",e);var n=this.remissionForm.controls;n.refundDDReason.setValue("Select a different reason",{onlySelf:!0}),n.reason.reset(),this.isRefundReasonsSelected=!0,this.errorMessage=!1,this.isReasonEmpty=!1,this.showReasonText=!1,this.refundHasError=!1,this.selectedRefundReason=e,this.selectedRefundReason.includes("Other")&&(this.showReasonText=!0,this.refundHasError=!1,this.refundReason=e)},Be.prototype.selectchange=function(e){var t=this.remissionForm.controls;t.refundReason.reset(),t.reason.reset(),this.isRefundReasonsSelected=!1,this.showReasonText=!1,this.refundHasError=!1,this.selectedRefundReason=e.target.options[e.target.options.selectedIndex].id,this.reasonLength=29-this.selectedRefundReason.split("- ")[1].length,this.selectedRefundReason.includes("Other")&&(this.showReasonText=!0,this.refundHasError=!1,this.refundReason=e.target.options[e.target.options.selectedIndex].id)},Be.prototype.gotoServiceRequestPage=function(e){var t=this;this.errorMessage="",e.preventDefault(),this.isFromServiceRequestPage&&!this.isFromPaymentDetailPage?(this.viewStatus="order-full-view",this.viewCompStatus=""):this.isFromRefundListPage?(this.paymentLibComponent.iscancelClicked=!0,this.refundListReason.emit({reason:this.selectedRefundReason,code:this.refundReason}),this.paymentLibComponent.isFromRefundStatusPage=!0):(this.paymentLibComponent.paymentMethod=this.payment.method,this.paymentLibComponent.paymentGroupReference=this.paymentLibComponent.paymentGroupReference,this.paymentLibComponent.paymentReference=this.payment.reference,this.paymentLibComponent.viewName="payment-view",this.OrderslistService.setOrderRef(this.orderRef),this.OrderslistService.setorderCCDEvent(this.orderCCDEvent),this.OrderslistService.setorderCreated(this.orderCreated),this.OrderslistService.setorderDetail(this.orderDetail),this.OrderslistService.setorderParty(this.orderParty),this.OrderslistService.setorderTotalPayments(this.orderTotalPayments),this.OrderslistService.setorderRemissionTotal(this.orderRemissionTotal),this.OrderslistService.setorderFeesTotal(this.orderFeesTotal),this.viewStatus="payment-view",this.sendOrderDetail=this.orderDetail,this.sendOrderRef=this.orderRef,this.LOGGEDINUSERROLES===undefined&&this.OrderslistService.getUserRolesList().subscribe(function(e){return t.LOGGEDINUSERROLES=e}),this.viewCompStatus="")},Be.prototype.gotoCasetransationPage=function(){this.OrderslistService.setnavigationPage("casetransactions"),this.errorMessage="",this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.VIEW="case-transactions",this.paymentLibComponent.ISTURNOFF=this.isTurnOff,this.paymentLibComponent.ISNEWPCIPALOFF=this.isNewPcipalOff,this.paymentLibComponent.ISOLDPCIPALOFF=this.isOldPcipalOff,this.paymentLibComponent.isFromServiceRequestPage=!0,this.resetOrderData();var e=this.bsPaymentDcnNumber?"&dcn="+this.bsPaymentDcnNumber:"";e+=this.paymentLibComponent.ISBSENABLE?"&isBulkScanning=Enable":"&isBulkScanning=Disable",e+=this.paymentLibComponent.ISTURNOFF?"&isTurnOff=Enable":"&isTurnOff=Disable",e+=this.isStrategicFixEnable?"&isStFixEnable=Enable":"&isStFixEnable=Disable",e+="&caseType="+this.caseType,e+=this.paymentLibComponent.ISNEWPCIPALOFF?"&isNewPcipalOff=Enable":"&isNewPcipalOff=Disable",e+=this.paymentLibComponent.ISOLDPCIPALOFF?"&isOldPcipalOff=Enable":"&isOldPcipalOff=Disable";e="/payment-history/"+this.ccdCaseNumber+"?view=case-transactions&takePayment="+this.paymentLibComponent.TAKEPAYMENT+"&selectedOption="+this.option+e;this.router.routeReuseStrategy.shouldReuseRoute=function(){return!1},this.router.onSameUrlNavigation="reload",this.router.navigateByUrl(e)},Be.prototype.gotoCasetransationPageCancelBtnClicked=function(e){e.preventDefault(),this.paymentLibComponent.isFromServiceRequestPage?this.paymentLibComponent.REFUNDLIST?this.paymentLibComponent.viewName="refund-list":(this.paymentLibComponent.TAKEPAYMENT===undefined&&this.paymentLibComponent.SERVICEREQUEST===undefined&&(this.paymentLibComponent.SERVICEREQUEST="false"),this.OrderslistService.setisFromServiceRequestPage(!1),this.OrderslistService.setpaymentPageView({method:"",payment_group_reference:"",reference:""}),this.OrderslistService.setnavigationPage("casetransactions"),this.errorMessage="",this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.ISTURNOFF=this.isTurnOff,this.paymentLibComponent.ISNEWPCIPALOFF=this.isNewPcipalOff,this.paymentLibComponent.ISOLDPCIPALOFF=this.isOldPcipalOff,this.paymentLibComponent.isFromServiceRequestPage=!0,this.paymentLibComponent.ISBSENABLE=!0,e=this.bsPaymentDcnNumber?"&dcn="+this.bsPaymentDcnNumber:"",e+=this.paymentLibComponent.ISBSENABLE?"&isBulkScanning=Enable":"&isBulkScanning=Disable",e+=this.paymentLibComponent.ISTURNOFF?"&isTurnOff=Enable":"&isTurnOff=Disable",e+=this.isStrategicFixEnable?"&isStFixEnable=Enable":"&isStFixEnable=Disable",e+="&caseType="+this.caseType,e+=this.paymentLibComponent.ISNEWPCIPALOFF?"&isNewPcipalOff=Enable":"&isNewPcipalOff=Disable",e+=this.paymentLibComponent.ISOLDPCIPALOFF?"&isOldPcipalOff=Enable":"&isOldPcipalOff=Disable",this.isFromPaymentDetailPage&&(e+=this.paymentLibComponent.isFromPaymentDetailPage),e=this.paymentLibComponent.SERVICEREQUEST?"/payment-history/"+this.ccdCaseNumber+"?selectedOption="+this.option+e:"/payment-history/"+this.ccdCaseNumber+"?view=case-transactions&takePayment="+this.paymentLibComponent.TAKEPAYMENT+"&selectedOption="+this.option+e,this.router.routeReuseStrategy.shouldReuseRoute=function(){return!1},this.router.onSameUrlNavigation="reload",this.router.navigateByUrl(e)):(this.OrderslistService.setnavigationPage("casetransactions"),this.OrderslistService.setisFromServiceRequestPage(!1),this.paymentLibComponent.VIEW="case-transactions",this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.ISBSENABLE=!0,this.paymentLibComponent.isRefundStatusView=!1)},Be.prototype.resetOrderData=function(){this.OrderslistService.setOrderRef(null),this.OrderslistService.setorderCCDEvent(null),this.OrderslistService.setorderCreated(null),this.OrderslistService.setorderDetail(null),this.OrderslistService.setorderParty(null),this.OrderslistService.setorderTotalPayments(null),this.OrderslistService.setorderRemissionTotal(null),this.OrderslistService.setorderFeesTotal(null)},Be.prototype.getFormattedCurrency=function(e){return e.toString().includes(".")?e:e.toString().concat(".00")},Be.decorators=[{type:f.Component,args:[{selector:"ccpay-add-remission",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">£</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 \x3c!-- Add retro remission changes--\x3e\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">£</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">£{{ 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 \x3c!-- Issue Refund Section --\x3e\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’re 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 \x3c!-- <div *ngIf = "{{refund.name}} !== \'Retrospective remission\'"> --\x3e\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’re 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 \x3c!-- </div> --\x3e\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 \x3c!-- <option value="" selected=\'selected\'>Select a different reason</option> --\x3e\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’re 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 \x3c!--Retro Refund--\x3e\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 [isOldPcipalOff] = "isOldPcipalOff"\n [isNewPcipalOff] = "isNewPcipalOff"\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',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}"]}]}],Be.ctorParameters=function(){return[{type:g.FormBuilder},{type:h.Router},{type:D},{type:k},{type:M},{type:f.ChangeDetectorRef},{type:b}]},Be.propDecorators={fee:[{type:f.Input}],payment:[{type:f.Input}],remission:[{type:f.Input}],ccdCaseNumber:[{type:f.Input}],caseType:[{type:f.Input}],viewCompStatus:[{type:f.Input}],paymentGroupRef:[{type:f.Input}],isTurnOff:[{type:f.Input}],isRefundRemission:[{type:f.Input}],isOldPcipalOff:[{type:f.Input}],isNewPcipalOff:[{type:f.Input}],isStrategicFixEnable:[{type:f.Input}],paidAmount:[{type:f.Input}],isFromRefundListPage:[{type:f.Input}],isFromPaymentDetailPage:[{type:f.Input}],isFromServiceRequestPage:[{type:f.Input}],feeamount:[{type:f.Input}],LOGGEDINUSERROLES:[{type:f.Input,args:["LOGGEDINUSERROLES"]}],orderDetail:[{type:f.Input,args:["orderDetail"]}],orderRef:[{type:f.Input,args:["orderRef"]}],orderStatus:[{type:f.Input,args:["orderStatus"]}],orderParty:[{type:f.Input,args:["orderParty"]}],orderCreated:[{type:f.Input,args:["orderCreated"]}],orderCCDEvent:[{type:f.Input,args:["orderCCDEvent"]}],takePayment:[{type:f.Input,args:["takepayment"]}],orderFeesTotal:[{type:f.Input,args:["orderFeesTotal"]}],orderTotalPayments:[{type:f.Input,args:["orderTotalPayments"]}],orderRemissionTotal:[{type:f.Input,args:["orderRemissionTotal"]}],cancelRemission:[{type:f.Output}],refundListReason:[{type:f.Output}],refundListAmount:[{type:f.Output}]},Be);function Be(e,t,n,s,a,o,r){this.formBuilder=e,this.router=t,this.paymentViewService=n,this.paymentLibComponent=s,this.refundService=a,this.cd=o,this.OrderslistService=r,this.cancelRemission=new f.EventEmitter,this.refundListReason=new f.EventEmitter,this.refundListAmount=new f.EventEmitter,this.refund={reason:{duplicate:"Duplicate payment",humanerror:"Human error",caseWithdrawn:"Case withdrawn",other:"Other"}},this.hasErrors=!1,this.viewStatus="main",this.errorMessage=null,this.option=null,this.isConfirmationBtnDisabled=!1,this.selectedValue="yes",this.retroRemission=!1,this.remissionReference="",this.paymentExplanationHasError=!1,this.isRemissionCodeEmpty=!1,this.remissionCodeHasError=!1,this.isAmountEmpty=!1,this.isReasonEmpty=!1,this.amountHasError=!1,this.isRemissionLessThanFeeError=!1,this.refundHasError=!1,this.isPaymentSuccess=!1,this.isRemissionApplied=!1,this.commonRefundReasons=[]}var Me=(Ge.prototype.transform=function(e,t){var n=/^([0-9]{4})+([0-9]{4})+([0-9]{4})+([0-9]{4})$/;return e.match(n)?e.replace(n,"$1-$2-$3-$4"):e},Ge.decorators=[{type:f.Pipe,args:[{name:"ccdHyphens"}]}],Ge.ctorParameters=function(){return[]},Ge);function Ge(){}var Ue=(He.prototype.transform=function(e,t){return e&&e[0].toUpperCase()+e.slice(1)||""},He.decorators=[{type:f.Pipe,args:[{name:"capitalize"}]}],He.ctorParameters=function(){return[]},He);function He(){}var Ve=(je.prototype.transform=function(e){var t,n=[];for(t in e)e.hasOwnProperty(t)&&n.push({key:t,value:e[t]});return n},je.decorators=[{type:f.Pipe,args:[{name:"keyValue"}]}],je.ctorParameters=function(){return[]},je);function je(){}var qe=(ze.prototype.transform=function(e){return this.sanitizer.bypassSecurityTrustHtml(e)},ze.decorators=[{type:f.Pipe,args:[{name:"sanitizeHtml"}]}],ze.ctorParameters=function(){return[{type:n.DomSanitizer}]},ze);function ze(e){this.sanitizer=e}var Ye=(We.prototype.exportAsExcelFile=function(e,t){var n=(n=null!==t.match("Data_Loss")?(n=l.utils.json_to_sheet(e,{header:["loss_resp","payment_asset_dcn","env_ref","env_item","resp_service_id","resp_service_name","date_banked","bgc_batch","payment_method","amount"]}),this.setDataLossReportHeaders(n)):null!==t.match("Unprocessed")?(n=l.utils.json_to_sheet(e,{header:["resp_service_id","resp_service_name","exception_ref","ccd_ref","date_banked","bgc_batch","payment_asset_dcn","env_ref","env_item","payment_method","amount"]}),this.setUnprocessedReportHeaders(n)):null!==t.match("Processed_Unallocated")?(n=l.utils.json_to_sheet(e,{header:["resp_service_id","resp_service_name","allocation_status","receiving_office","allocation_reason","ccd_exception_reference","ccd_case_reference","payment_asset_dcn","env_ref","env_item","date_banked","bgc_batch","payment_method","amount"]}),this.setProcessedUnallocatedReportHeaders(n)):(n=l.utils.json_to_sheet(e,{header:["resp_service_id","resp_service_name","surplus_shortfall","balance","payment_amount","ccd_case_reference","ccd_exception_reference","processed_date","reason","explanation","user_name"]}),this.setShortFallReportHeaders(n)),this.autoFitColumns(n,e)),n=l.write({Sheets:{data:n},SheetNames:["data"]},{bookType:"xlsx",type:"array"});this.saveAsExcelFile(n,t)},We.prototype.autoFitColumns=function(e,t){for(var n=[],s=[],a=Object,o=0;o<t.length;o++)for(var r=a.values(t[o]),i=a.keys(t[o]),l=0;l<r.length;l++)null===r[l]&&(r[l]=""),n[l]=i[l].length>=r[l].length?i[l].length+2:r[l].length+1,r[l].length===undefined&&(n[l]=i[l].length+2),s.push({width:+n[l]});return e["!cols"]=s,e},We.prototype.setDataLossReportHeaders=function(e){return e.A1.v="Loss_Resp",e.B1.v="Payment_Asset_DCN",e.C1.v="Envelope_Ref",e.D1.v="Envelope_Item",e.E1.v="Resp_Service ID",e.F1.v="Resp_Service Name",e.G1.v="Date_Banked",e.H1.v="BGC_Batch",e.I1.v="Payment_Method",e.J1.v="Amount",e},We.prototype.setUnprocessedReportHeaders=function(e){return e.A1.v="Resp_Service ID",e.B1.v="Resp_Service Name",e.C1.v="Exception_Ref",e.D1.v="CCD_Ref",e.E1.v="Date_Banked",e.F1.v="BGC_Batch",e.G1.v="Payment_Asset_DCN",e.H1.v="Envelope_Ref",e.I1.v="Envelope_Item",e.J1.v="Payment_Method",e.K1.v="Amount",e},We.prototype.setProcessedUnallocatedReportHeaders=function(e){return e.A1.v="Resp_Service ID",e.B1.v="Resp_Service Name",e.C1.v="Allocation_Status",e.D1.v="Receiving_Office",e.E1.v="Allocation_Reason",e.F1.v="CCD_Exception_Ref",e.G1.v="CCD_Case_Ref",e.H1.v="Payment_Asset_DCN",e.I1.v="Envelope_Ref",e.J1.v="Envelope_Item",e.K1.v="Date_Banked",e.L1.v="BGC_Batch",e.M1.v="Payment_Method",e.N1.v="Amount",e},We.prototype.setShortFallReportHeaders=function(e){return e.A1.v="Resp_Service ID",e.B1.v="Resp_Service Name",e.C1.v="Over Payment_Under Payment",e.D1.v="Balance",e.E1.v="Payment_Amount",e.F1.v="CCD_Case_Ref",e.G1.v="Exception_Ref",e.H1.v="Processed_Date",e.I1.v="Reason",e.J1.v="Explanation",e.K1.v="Updated Name",e},We.prototype.saveAsExcelFile=function(e,t){e=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8"});i.saveAs(e,t+".xlsx")},We.decorators=[{type:f.Injectable}],We.ctorParameters=function(){return[]},We);function We(){}var $e=(Je.prototype.ngOnInit=function(){this.fromValidation()},Je.prototype.getToday=function(){return(new Date).toISOString().split("T")[0]},Je.prototype.getSelectedFromDate=function(){this.validateDates(this.reportsForm.get("selectedreport").value)},Je.prototype.validateDates=function(e){var t=this.tranformDate(this.reportsForm.get("startDate").value),n=this.tranformDate(this.reportsForm.get("endDate").value),s=7<(new Date(t)-new Date(n))/-864e5;new Date(t)>new Date(n)&&""!==n?(this.reportsForm.get("startDate").setValue(""),this.isDateRangeBetnWeek=!1,this.isStartDateLesthanEndDate=!0):(this.isDateRangeBetnWeek=!(!e||"SURPLUS_AND_SHORTFALL"!==e||!s),this.isStartDateLesthanEndDate=!1)},Je.prototype.fromValidation=function(){this.reportsForm=this.formBuilder.group({selectedreport:new g.FormControl(""),startDate:new g.FormControl(""),endDate:new g.FormControl("")})},Je.prototype.downloadReport=function(){var a=this;this.isDownLoadButtondisabled=!0;var s=[{loss_resp:"",payment_asset_dcn:"",env_ref:"",env_item:"",resp_service_id:"",resp_service_name:"",date_banked:"",bgc_batch:"",payment_method:"",amount:""}],o=[{resp_service_id:"",resp_service_name:"",exception_ref:"",ccd_ref:"",date_banked:"",bgc_batch:"",payment_asset_dcn:"",env_ref:"",env_item:"",payment_method:"",amount:""}],r=[{resp_service_id:"",resp_service_name:"",allocation_status:"",receiving_office:"",allocation_reason:"",ccd_exception_ref:"",ccd_case_ref:"",payment_asset_dcn:"",env_ref:"",env_item:"",date_banked:"",bgc_batch:"",payment_method:"",amount:"",updated_by:""}],i=[{resp_service_id:"",resp_service_name:"",surplus_shortfall:"",balance:"",payment_amount:"",ccd_case_reference:"",ccd_exception_reference:"",processed_date:"",reason:"",explanation:"",user_name:""}],l=this.reportsForm.get("selectedreport").value,c=this.tranformDate(this.reportsForm.get("startDate").value),d=this.tranformDate(this.reportsForm.get("endDate").value);"PROCESSED_UNALLOCATED"===l||"SURPLUS_AND_SHORTFALL"===l?this.paymentViewService.downloadSelectedReport(l,c,d).subscribe(function(e){a.errorMessage=a.errorHandlerService.getServerErrorMessage(!1);var e=JSON.parse(e),t={data:a.applyDateFormat(e)};if(0===t.data.length&&"PROCESSED_UNALLOCATED"===l?t.data=r:0===t.data.length&&"SURPLUS_AND_SHORTFALL"===l&&(t.data=i),0<e.data.length)for(var n=0;n<t.data.length;n++){t.data[n].payment_asset_dcn!==undefined&&(t.data[n].env_ref=t.data[n].payment_asset_dcn.substr(0,13),t.data[n].env_item=t.data[n].payment_asset_dcn.substr(13,21)),t.data[n].amount!==undefined&&(t.data[n].amount=a.convertToFloatValue(t.data[n].amount)),t.data[n].balance!==undefined&&(t.data[n].balance=a.convertToFloatValue(t.data[n].balance));var s=t.data[n].surplus_shortfall;s!==undefined&&(t.data[n].surplus_shortfall="Surplus"==s?"Over payment":"Under payment"),t.data[n].payment_amount!==undefined&&(t.data[n].payment_amount=a.convertToFloatValue(t.data[n].payment_amount))}a.isDownLoadButtondisabled=!1,a.xlFileService.exportAsExcelFile(t.data,a.getFileName(a.reportsForm.get("selectedreport").value,c,d))},function(e){a.isDownLoadButtondisabled=!1,a.errorMessage=a.errorHandlerService.getServerErrorMessage(!0)}):this.bulkScaningPaymentService.downloadSelectedReport(l,c,d).subscribe(function(e){a.errorMessage=a.errorHandlerService.getServerErrorMessage(!1);var e=JSON.parse(e),t={data:a.applyDateFormat(e)};if(0===t.data.length&&"DATA_LOSS"===l?t.data=s:0===t.data.length&&"UNPROCESSED"===l&&(t.data=o),0<e.data.length)for(var n=0;n<t.data.length;n++)t.data[n].amount!==undefined&&(t.data[n].amount=a.convertToFloatValue(t.data[n].amount)),t.data[n].payment_asset_dcn!==undefined&&(t.data[n].env_ref=t.data[n].payment_asset_dcn.substr(0,13),t.data[n].env_item=t.data[n].payment_asset_dcn.substr(13,21));a.isDownLoadButtondisabled=!1,a.xlFileService.exportAsExcelFile(t.data,a.getFileName(a.reportsForm.get("selectedreport").value,c,d))},function(e){a.isDownLoadButtondisabled=!1,a.errorMessage=a.errorHandlerService.getServerErrorMessage(!0)})},Je.prototype.getFileName=function(e,t,n){var s="en-US",a=r.formatDate(t,"ddMMyy",s),t=r.formatDate(n,"ddMMyy",s),n=new Date,n=r.formatDate(n,"ddMMyy",s)+"_"+this.getTwodigit(n.getHours())+this.getTwodigit(n.getMinutes())+this.getTwodigit(n.getSeconds());return this.getCamelCaseString(e)+"_"+a+"_To_"+t+"_Run_"+n},Je.prototype.tranformDate=function(e){var t="";return t=e?(e=e.split("-"))[1]+"/"+e[2]+"/"+e[0]:t},Je.prototype.getTwodigit=function(e){return("0"+e).slice(-2)},Je.prototype.getCamelCaseString=function(e){var t;switch(e){case"UNPROCESSED":t="Unprocessed";break;case"DATA_LOSS":t="Data_Loss";break;case"PROCESSED_UNALLOCATED":t="Processed_Unallocated";break;case"SURPLUS_AND_SHORTFALL":t="Over Payment_Under Payment";break;default:t=e}return t},Je.prototype.applyDateFormat=function(e){return e.data.map(function(e){return e.date_banked&&(e.date_banked=r.formatDate(e.date_banked,"dd/MM/yyyy","en-US")),e})},Je.prototype.convertToFloatValue=function(e){return e?Number.parseFloat(e).toFixed(2):"0.00"},Je.decorators=[{type:f.Component,args:[{selector:"ccpay-reports",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 ‘Unidentified’ or ‘Transferred’ (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 \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',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}"]}]}],Je.ctorParameters=function(){return[{type:Ye},{type:S},{type:g.FormBuilder},{type:ie},{type:D}]},Je);function Je(e,t,n,s,a){this.xlFileService=e,this.errorHandlerService=t,this.formBuilder=n,this.bulkScaningPaymentService=s,this.paymentViewService=a,this.isDownLoadButtondisabled=!1,this.isStartDateLesthanEndDate=!1,this.isDateRangeBetnWeek=!1,this.errorMessage=this.errorHandlerService.getServerErrorMessage(!1),this.paymentGroups=[]}var Ke=(Ze.prototype.ngOnInit=function(){this.errorMessage=this.errorMessage,"sent for approval"===this.STATUS.toLowerCase()?this.isApprovalFlow=!0:this.isApprovalFlow=!1,this.refundList=this.DATASOURCE,this.dataSource=new c.MatTableDataSource(this.refundList),this.actualcount=this.dataSource.data.length,this.refundList!==undefined&&(this.userLst=this.refundList.reduce(function(e,t){return e[t.user_full_name]="",e},{}),this.userLst=Object.keys(this.userLst)),this.userLst.sort(function(e,t){return e.toString().localeCompare(t)})},Ze.prototype.ngAfterViewInit=function(){this.dataSource.sort=this.sort,this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.cdRef.detectChanges()},Ze.prototype.applyFilter=function(e){e=(e=e.trim()).toLowerCase(),this.dataSource.filter=e},Ze.prototype.selectchange=function(e){this.dataSource.filter=e.target.value,this.actualcount=this.dataSource.data.length,this.dataSource.paginator=this.paginator},Ze.prototype.goToRefundProcessComponent=function(e,t){this.paymentLibComponent.refundlistsource=t,this.paymentLibComponent.refundReference=e,this.paymentLibComponent.viewName="process-refund"},Ze.prototype.goToRefundViewComponent=function(e,t){this.OrderslistService.setRefundView(t),this.paymentLibComponent.viewName="refundstatuslist",this.paymentLibComponent.CCD_CASE_NUMBER=t.ccd_case_number,this.paymentLibComponent.isRefundStatusView=!0,this.paymentLibComponent.isCallFromRefundList=!0},Ze.prototype.goToCaseReview=function(e,t){this.router.navigate(["/cases/case-details/"+e],{relativeTo:this.activeRoute})},Ze.decorators=[{type:f.Component,args:[{selector:"ccpay-table",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> <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',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}"]}]}],Ze.ctorParameters=function(){return[{type:k},{type:f.ChangeDetectorRef},{type:b},{type:h.Router},{type:h.ActivatedRoute}]},Ze.propDecorators={DATASOURCE:[{type:f.Input,args:["DATASOURCE"]}],STATUS:[{type:f.Input,args:["STATUS"]}],errorMessage:[{type:f.Input,args:["errorMessage"]}],paginator:[{type:f.ViewChild,args:[d.MatPaginator]}],sort:[{type:f.ViewChild,args:[u.MatSort]}]},Ze);function Ze(e,t,n,s,a){this.paymentLibComponent=e,this.cdRef=t,this.OrderslistService=n,this.router=s,this.activeRoute=a,this.displayedColumns=["ccd_case_number","refund_reference","user_full_name","date_created","date_updated","Action"]}var Xe=function(e,t){this.refund_reason=e,this.amount=t},Qe=(et.prototype.ngOnInit=function(){var t=this;if(this.resetRemissionForm([!1,!1,!1,!1],"All"),this.bsPaymentDcnNumber=this.paymentLibComponent.bspaymentdcn,this.isCallFromRefundList=this.paymentLibComponent.isCallFromRefundList,this.paymentLibComponent.isRefundStatusView?(this.viewName="refundview",this.OrderslistService.getRefundView().subscribe(function(e){return t.refundlist=e}),this.OrderslistService.getCCDCaseNumberforRefund.subscribe(function(e){return t.ccdCaseNumber=e})):(this.viewName="refundstatuslist",this.refundService.getRefundStatusList(this.ccdCaseNumber).subscribe(function(e){t.rejectedRefundList=e.refund_list})),this.refundStatusForm=this.formBuilder.group({amount:new g.FormControl("",g.Validators.compose([g.Validators.required,g.Validators.pattern("^[0-9]+(.[0-9]{1,2})?$")])),refundReason:new g.FormControl("",g.Validators.compose([g.Validators.required])),reason:new g.FormControl}),this.refundlist!==undefined){if(this.getRefundsStatusHistoryList(),this.LOGGEDINUSERROLES.some(function(e){return e.includes("payments-refund-approver")}))return this.isProcessRefund=!0,void(this.refundButtonState=this.refundlist.refund_status.name);this.LOGGEDINUSERROLES.some(function(e){return e.includes("payments-refund")})&&(this.isProcessRefund=!1,this.refundButtonState=this.refundlist.refund_status.name)}},et.prototype.getRefundsStatusHistoryList=function(){var t=this;this.refundlist!==undefined&&this.refundService.getRefundStatusHistory(this.refundlist.refund_reference).subscribe(function(e){t.refundStatusHistories=e.status_history_dto_list,t.isLastUpdatedByCurrentUser=e.last_updated_by_current_user})},et.prototype.goToRefundView=function(e,t){this.OrderslistService.setRefundView(e),this.OrderslistService.setCCDCaseNumber(this.ccdCaseNumber),this.paymentLibComponent.viewName="refundstatuslist",this.paymentLibComponent.isRefundStatusView=!0,this.refundlist=e,this.OrderslistService.setnavigationPage(t)},et.prototype.loadCaseTransactionPage=function(){this.OrderslistService.setnavigationPage("casetransactions"),this.OrderslistService.setisFromServiceRequestPage(!1),this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.ISBSENABLE=!0,this.paymentLibComponent.isRefundStatusView=!1},et.prototype.loadRefundListPage=function(){var t=this;this.OrderslistService.getnavigationPageValue().subscribe(function(e){return t.navigationpage=e}),"casetransactions"===this.navigationpage?this.loadCaseTransactionPage():this.paymentLibComponent.viewName="refund-list"},et.prototype.gotoReviewDetailsPage=function(e){this.errorMessage=!1,this.paymentLibComponent.isRefundStatusView=!0,this.ngOnInit()},et.prototype.gotoReviewAndReSubmitPage=function(){var t=this;this.viewName="reviewandsubmitview",this.oldRefundReason=this.refundlist.reason,this.changedAmount=this.refundlist.amount,this.refundreason=this.refundStatusHistories.filter(function(e){return"update required"===e.status.toLowerCase()})[0].notes,this.refundService.getRefundReasons().subscribe(function(e){t.refundReasons=e})},et.prototype.gotoRefundReasonPage=function(){this.isRefundBtnDisabled=!1,this.paymentLibComponent.REFUNDLIST="true",this.paymentLibComponent.isFromRefundStatusPage=!0,this.ccdCaseNumber=this.paymentLibComponent.CCD_CASE_NUMBER,this.errorMessage=!1,this.viewName="issuerefund"},et.prototype.gotoAmountPage=function(){this.errorMessage=!1,this.paymentLibComponent.REFUNDLIST="true",this.isRefundBtnDisabled=!1,this.ccdCaseNumber=this.paymentLibComponent.CCD_CASE_NUMBER,this.paymentLibComponent.isFromRefundStatusPage=!0,this.viewName="processretroremissonpage"},et.prototype.goToReviewAndSubmitView=function(){var e=this.refundStatusForm.controls;this.refundStatusForm.dirty&&(""==e.amount.value?this.resetRemissionForm([!0,!1,!1,!1],"amount"):""!=e.amount.value&&e.amount.invalid?this.resetRemissionForm([!1,!0,!1,!1],"amount"):""==e.reason.value?this.resetRemissionForm([!1,!1,!1,!0],"reason"):(this.refundlist.reason=e.reason.value,this.viewName="reviewandsubmitview"))},et.prototype.resetRemissionForm=function(e,t){"All"===t?(this.isAmountEmpty=e[0],this.amountHasError=e[1],this.isRemissionLessThanFeeError=e[2],this.isReasonEmpty=e[3]):"amount"===t||"All"===t?(this.isAmountEmpty=e[0],this.amountHasError=e[1],this.isRemissionLessThanFeeError=e[2]):"reason"!==t&&"All"!==t||(this.isReasonEmpty=e[3])},et.prototype.selectRadioButton=function(e,t){this.refundHasError=!1,"Other"===(this.selectedRefundReason=e)&&(this.refundHasError=!1,this.refundReason=e)},et.prototype.getRefundListReason=function(e){this.paymentLibComponent.isFromRefundStatusPage&&!this.paymentLibComponent.iscancelClicked?(this.refundlist.reason=e.reason,this.refundCode=e.code):this.isRefundBtnDisabled=!0,this.viewName="reviewandsubmitview",this.paymentLibComponent.CCD_CASE_NUMBER=this.ccdCaseNumber},et.prototype.getRefundAmount=function(e){this.paymentLibComponent.isFromRefundStatusPage&&!this.paymentLibComponent.iscancelClicked?0<e&&(this.changedAmount=e):this.isRefundBtnDisabled=!0,this.viewName="reviewandsubmitview",this.paymentLibComponent.CCD_CASE_NUMBER=this.ccdCaseNumber},et.prototype.gotoReviewRefundConfirmationPage=function(){var t=this;this.oldRefundReason===this.refundlist.reason&&(this.refundCode="");var e=new Xe(this.refundCode,this.changedAmount);this.refundService.patchResubmitRefund(e,this.refundlist.refund_reference).subscribe(function(e){JSON.parse(e)&&(t.refundReference=JSON.parse(e).refund_reference,t.refundAmount=JSON.parse(e).refund_amount,t.viewName="reviewrefundconfirmationpage")},function(e){t.errorMessage=e.replace(/"/g,"")})},et.prototype.goToRefundProcessComponent=function(e,t){this.paymentLibComponent.refundlistsource=t,this.paymentLibComponent.refundReference=e,this.paymentLibComponent.viewName="process-refund"},et.decorators=[{type:f.Component,args:[{selector:"ccpay-refund-status",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 \x3c!-- payments --\x3e\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">£{{ 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>£{{refundlist?.amount | number:\'.2\' }}</td>\n </tr>\n\n </tbody>\n </table>\n\n \x3c!-- Status history --\x3e\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\'">\n <div *ngIf="refundButtonState===\'Update required\'">\n \x3c!-- <div *ngIf="refundButtonState===\'sent back\'"> --\x3e\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 \x3c!-- <div *ngIf="isProcessRefund && !isLastUpdatedByCurrentUser && refundButtonState===\'sent for approval\'"> --\x3e\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 \x3c!-- <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> --\x3e\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 \x3c!-- <td class="govuk-table__cell">{{ refundlist?.reason }}</td>\n <a (click)="gotoRefundReasonPage()" class="govuk-link right">Change</a> --\x3e\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"> £{{ 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 \x3c!-- <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> --\x3e\n \x3c!-- <p>\n <a (click)="loadRefundListPage()" href="" class="cancelbtn">Cancel</a>\n </p> --\x3e\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',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}"]}]}],et.ctorParameters=function(){return[{type:g.FormBuilder},{type:M},{type:k},{type:D},{type:h.Router},{type:b}]},et.propDecorators={LOGGEDINUSERROLES:[{type:f.Input,args:["LOGGEDINUSERROLES"]}],isOldPcipalOff:[{type:f.Input}],isNewPcipalOff:[{type:f.Input}],ccdCaseNumber:[{type:f.Input}],isTurnOff:[{type:f.Input}]},et);function et(e,t,n,s,a,o){var r=this;this.formBuilder=e,this.refundService=t,this.paymentLibComponent=n,this.paymentViewService=s,this.router=a,this.OrderslistService=o,this.LOGGEDINUSERROLES=[],this.rejectedRefundList=[],this.approvalStatus="Sent for approval",this.rejectStatus="Update required",this.errorMessage=null,this.refundButtonState="",this.isAmountEmpty=!1,this.isReasonEmpty=!1,this.amountHasError=!1,this.isRemissionLessThanFeeError=!1,this.refundHasError=!1,this.refundReasons=[],this.isRefundBtnDisabled=!0,this.isLastUpdatedByCurrentUser=!0,this.isProcessRefund=!1,this.allowedRolesToAccessRefund=["payments-refund-approver","payments-refund"],this.check4AllowedRoles2AccessRefund=function(){return r.allowedRolesToAccessRefund.some(function(e){return-1!==r.LOGGEDINUSERROLES.indexOf(e)})}}var tt=(nt.prototype.ngOnInit=function(){var t=this;this.viewStatus===undefined&&(this.viewStatus=this.paymentLibComponent.viewName),this.paymentLibComponent.isFromServiceRequestPage&&this.paymentLibComponent.isFromPaymentDetailPage&&this.paymentLibComponent.isFromPaymentDetailPage&&this.paymentLibComponent.isFromServiceRequestPage&&(this.OrderslistService.getorderRefs().subscribe(function(e){return t.orderRef=e}),this.OrderslistService.getorderCCDEvents().subscribe(function(e){return t.orderCCDEvent=e}),this.OrderslistService.getorderCreateds().subscribe(function(e){return t.orderCreated=e}),this.OrderslistService.getorderDetail().subscribe(function(e){return t.orderDetail=e}),this.OrderslistService.getorderPartys().subscribe(function(e){return t.orderParty=e}),this.OrderslistService.getorderRemissionTotals().subscribe(function(e){return t.orderRemissionTotal=e}),this.OrderslistService.getorderFeesTotals().subscribe(function(e){return t.orderFeesTotal=e}),this.OrderslistService.getoorderTotalPaymentss().subscribe(function(e){return t.orderTotalPayments=e}))},nt.prototype.goToServiceRequestPage=function(){this.goToServiceRquestComponent.emit()},nt.prototype.goToCaseTransationPage=function(e){e.preventDefault(),this.OrderslistService.setnavigationPage("servicerequestpage"),this.OrderslistService.setisFromServiceRequestPage(!1),this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.ISBSENABLE=!0,this.paymentLibComponent.isTakePayment=this.paymentLibComponent.TAKEPAYMENT,this.takePayment&&(this.paymentLibComponent.isTakePayment=this.takePayment),this.paymentLibComponent.SERVICEREQUEST="true",this.paymentLibComponent.isFromServiceRequestPage=!1,"false"!==this.isServiceRequest&&(this.paymentLibComponent.isFromServiceRequestPage=!0),this.paymentLibComponent.isFromRefundStatusPage=!1,this.paymentLibComponent.viewName="case-transactions",this.resetOrderData();e=this.paymentLibComponent.ISBSENABLE?"&isBulkScanning=Enable":"&isBulkScanning=Disable";e+=this.paymentLibComponent.ISTURNOFF?"&isTurnOff=Enable":"&isTurnOff=Disable","false"===this.isServiceRequest&&(e+=this.paymentLibComponent.TAKEPAYMENT?"&takePayment=true":"&takePayment=false"),e+=this.isStrategicFixEnable?"&isStFixEnable=Enable":"&isStFixEnable=Disable",e+="false"!==this.isServiceRequest?"&servicerequest=true":"&servicerequest=false",e+="&caseType="+this.paymentLibComponent.CASETYPE,e+=this.paymentLibComponent.ISNEWPCIPALOFF?"&isNewPcipalOff=Enable":"&isNewPcipalOff=Disable",e+=this.paymentLibComponent.ISOLDPCIPALOFF?"&isOldPcipalOff=Enable":"&isOldPcipalOff=Disable";e="/payment-history/"+this.paymentLibComponent.CCD_CASE_NUMBER+"?view=case-transactions&selectedOption="+this.paymentLibComponent.SELECTED_OPTION+e;this.router.routeReuseStrategy.shouldReuseRoute=function(){return!1},this.router.onSameUrlNavigation="reload",this.router.navigateByUrl(e)},nt.prototype.chkForAddRemission=function(e){var t,n;if(this.chkForPBAPayment()&&this.check4AllowedRoles2AccessRefund()){if(0<this.orderDetail[0].remissions.length)try{for(var s=F(this.orderDetail[0].remissions),a=s.next();!a.done;a=s.next())if(a.value.fee_code===e)return!1}catch(o){t={error:o}}finally{try{a&&!a.done&&(n=s["return"])&&n.call(s)}finally{if(t)throw t.error}}return!0}return!1},nt.prototype.chkForPBAPayment=function(){var t=this;if(null!==this.orderDetail&&this.orderDetail!==undefined)return this.orderDetail.forEach(function(e){e.payments&&e.payments.forEach(function(e){"payment by account"===e.method.toLocaleLowerCase()&&t.allowFurtherAccessAfter4Days(e)&&(t.paymentLibComponent.paymentReference=e.reference,t.isPBA=!0)})}),!!this.isPBA},nt.prototype.addRemission=function(e){var t=this;this.chkForAddRemission(e.code)&&(this.feeId=e,this.viewStatus="addremission",this.payment=this.orderDetail[0].payments[0],this.paymentViewService.getApportionPaymentDetails(this.orderDetail[0].payments[0].reference).subscribe(function(e){t.paymentGroup=e,t.paymentGroup.payments=t.paymentGroup.payments.filter(function(e){return e.reference.includes(t.paymentLibComponent.paymentReference)}),t.payment=t.paymentGroup.payments[0]},function(e){return t.errorMessage=e.replace(/"/g,"")}))},nt.prototype.addRefundForRemission=function(e,t,n){var s=this;this.viewStatus="addrefundforremission",this.payment=e,this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(function(e){s.paymentGroup=e,s.paymentGroup.payments=s.paymentGroup.payments.filter(function(e){return e.reference.includes(s.payment.reference)}),s.payment=s.paymentGroup.payments[0],s.remissions=t,s.remissionFeeAmt=n.filter(function(e){return e.code===s.remissions.fee_code})[0].net_amount},function(e){return s.errorMessage=e})},nt.prototype.cancelRemoval=function(){this.viewStatus="main"},nt.prototype.removeFee=function(e){var t=this;this.isRemoveBtnDisabled=!0,this.paymentViewService.deleteFeeFromPaymentGroup(e).subscribe(function(e){window.location.reload()},function(e){t.errorMessage=e,t.isRemoveBtnDisabled=!1})},nt.prototype.chkIssueRefundBtnEnable=function(e){return this.check4AllowedRoles2AccessRefund()&&this.allowFurtherAccessAfter4Days(e)&&"payment by account"===e.method&&"success"===e.status.toLocaleLowerCase()&&(this.isIssueRefunfBtnEnable=!0),!!this.isIssueRefunfBtnEnable},nt.prototype.chkIsRefundRemissionBtnEnable=function(){var t=this;if(null!==this.orderDetail&&this.orderDetail!==undefined)return this.paymentLibComponent.isFromServiceRequestPage=!0,this.orderDetail.forEach(function(e){e.payments&&e.payments.forEach(function(e){"payment by account"===e.method.toLocaleLowerCase()&&"success"===e.status.toLocaleLowerCase()&&t.allowFurtherAccessAfter4Days(e)&&(t.isRefundRemissionBtnEnable=!0)})}),!!this.isRefundRemissionBtnEnable},nt.prototype.issueRefund=function(e){null!==e&&e!==undefined&&this.chkIssueRefundBtnEnable(e)&&(this.viewStatus="issuerefund",this.payment=e,this.paymentLibComponent.isFromServiceRequestPage=!0,this.isRefundRemission=!0)},nt.prototype.goToPayementView=function(e,t,n){this.goToPaymentViewComponent({paymentGroupReference:e,paymentReference:t,paymentMethod:n})},nt.prototype.goToPaymentViewComponent=function(e){this.paymentLibComponent.paymentMethod=e.paymentMethod,this.paymentLibComponent.isFromServiceRequestPage=!0,this.paymentLibComponent.paymentGroupReference=e.paymentGroupReference,this.paymentLibComponent.paymentReference=e.paymentReference,this.OrderslistService.setOrderRef(this.orderRef),this.OrderslistService.setorderCCDEvent(this.orderCCDEvent),this.OrderslistService.setorderCreated(this.orderCreated),this.OrderslistService.setorderDetail(this.orderDetail),this.OrderslistService.setorderParty(this.orderParty),this.OrderslistService.setorderTotalPayments(this.orderTotalPayments),this.OrderslistService.setorderRemissionTotal(this.orderRemissionTotal),this.OrderslistService.setorderFeesTotal(this.orderFeesTotal),this.viewStatus="payment-view"},nt.prototype.resetOrderData=function(){this.OrderslistService.setOrderRef(null),this.OrderslistService.setorderCCDEvent(null),this.OrderslistService.setorderCreated(null),this.OrderslistService.setorderDetail(null),this.OrderslistService.setorderParty(null),this.OrderslistService.setorderTotalPayments(null),this.OrderslistService.setorderRemissionTotal(null),this.OrderslistService.setorderFeesTotal(null)},nt.decorators=[{type:f.Component,args:[{selector:"ccpay-service-request",template:'\x3c!-- Order Full View Details--\x3e\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()" 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 \x3c!-- remissions --\x3e\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 \x3c!-- <td class="govuk-table__cell refundBtn whitespace-inherit" >\n \n </td> --\x3e\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 \x3c!--Payments--\x3e\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 \x3c!-- <td *ngIf="!chkIssueRefundBtnEnable(payment)" class="govuk-table__cell" style="text-align: right;">\n </td> --\x3e\n </tr>\n </tbody>\n </table>\n \n <div *ngIf="order.payments === undefined || order.payments === null">\n \x3c!-- <h3 class="heading-medium mar-17">Payments</h3> --\x3e\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 \n</ng-container>\n<ccpay-add-remission *ngIf="viewStatus === \'addremission\' && feeId"\n[isTurnOff]="isTurnOff"\n[isStrategicFixEnable]="isStrategicFixEnable" \n[isOldPcipalOff]="isOldPcipalOff" \n[viewCompStatus]= "viewStatus"\n[isNewPcipalOff]="isNewPcipalOff" \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[isOldPcipalOff]="isOldPcipalOff" \n[viewCompStatus]= "viewStatus"\n[isNewPcipalOff]="isNewPcipalOff" \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[isOldPcipalOff]="isOldPcipalOff" \n[viewCompStatus]= "viewStatus"\n[isNewPcipalOff]="isNewPcipalOff" \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[isOldPcipalOff] = "isOldPcipalOff"\n[isNewPcipalOff] = "isNewPcipalOff"\n[orderFeesTotal] = "orderFeesTotal"\n[orderTotalPayments] = "orderTotalPayments"\n[orderRemissionTotal] = "orderRemissionTotal">\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>',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}.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%}"]}]}],nt.ctorParameters=function(){return[{type:k},{type:D},{type:b},{type:h.Router}]},nt.propDecorators={LOGGEDINUSERROLES:[{type:f.Input,args:["LOGGEDINUSERROLES"]}],viewStatus:[{type:f.Input,args:["viewStatus"]}],orderDetail:[{type:f.Input,args:["orderDetail"]}],orderRef:[{type:f.Input,args:["orderRef"]}],orderStatus:[{type:f.Input,args:["orderStatus"]}],orderParty:[{type:f.Input,args:["orderParty"]}],orderCreated:[{type:f.Input,args:["orderCreated"]}],orderCCDEvent:[{type:f.Input,args:["orderCCDEvent"]}],orderFeesTotal:[{type:f.Input,args:["orderFeesTotal"]}],orderTotalPayments:[{type:f.Input,args:["orderTotalPayments"]}],orderRemissionTotal:[{type:f.Input,args:["orderRemissionTotal"]}],takePayment:[{type:f.Input,args:["takePayment"]}],ccdCaseNumber:[{type:f.Input,args:["ccdCaseNumber"]}],isServiceRequest:[{type:f.Input,args:["isServiceRequest"]}],goToServiceRquestComponent:[{type:f.Output}]},nt);function nt(e,t,n,s){var a=this;this.paymentLibComponent=e,this.paymentViewService=t,this.OrderslistService=n,this.router=s,this.goToServiceRquestComponent=new f.EventEmitter,this.paymentGroups=[],this.payments=[],this.nonPayments=[],this.allPayments=[],this.remissions=[],this.fees=[],this.isRefundRemission=!0,this.isAddFeeBtnEnabled=!0,this.isExceptionRecord=!1,this.isUnprocessedRecordSelected=!1,this.isAnyFeeGroupAvilable=!0,this.isHistoricGroupAvailable=!1,this.isRemoveBtnDisabled=!1,this.clAmountDue=0,this.isFeeRecordsExist=!1,this.isGrpOutstandingAmtPositive=!1,this.isAddRemissionEnable=!1,this.orderRemissionDetails=[],this.orderLevelFees=[],this.cpoDetails=null,this.isPBA=!1,this.isIssueRefunfBtnEnable=!1,this.isAddRemissionBtnEnabled=!1,this.isRefundRemissionBtnEnable=!1,this.allowedRolesToAccessRefund=["payments-refund-approver","payments-refund"],this.check4AllowedRoles2AccessRefund=function(){return a.allowedRolesToAccessRefund.some(function(e){return-1!==a.LOGGEDINUSERROLES.indexOf(e)})},this.allowFurtherAccessAfter4Days=function(e){if(null!==e&&e!==undefined){var t=new Date;return t.setDate(t.getDate()-4),t>=new Date(e.date_created)}}}var st=function(e){this.amount=e,this.currency="GBP",this.language="string"},at=function(e,t,n){this.account_number=e,this.amount=t,this.currency="GBP",this.customer_reference=n},ot=(rt.prototype.ngOnInit=function(){var t=this;this.pbaPayOrderRef=this.paymentLibComponent.pbaPayOrderRef,this.viewStatus="pba-payment",this.errorMsg=null,this.paymentViewService.getPBAaccountDetails().subscribe(function(e){t.isGetPBAAccountSucceed=!0,t.pbaAccountList=e.organisationEntityResponse.paymentAccount},function(e){t.errorMsg=e})},rt.prototype.selectpbaaccount=function(e){"pbaAccountNumber"===e.currentTarget.id&&(this.isPBADropdownSelected=!0,this.selectedPbaAccount=e.target.value),"pbaAccountRef"===e.currentTarget.id&&(this.pbaAccountRef=e.target.value),""!==this.selectedPbaAccount&&""!==this.pbaAccountRef?this.isContinueButtondisabled=!1:this.isContinueButtondisabled=!0},rt.prototype.saveAndContinue=function(){var e,n=this;this.isPbaAccountSelected?(this.isInSufficiantFund=!1,this.isPBAAccountNotExist=!1,this.isPBAServerError=!1,this.isPBAAccountPaymentSuccess=!1,-1!==this.pbaAccountList.indexOf(this.selectedPbaAccount)?(e=new at(this.selectedPbaAccount,this.pbaPayOrderRef.orderTotalFees,this.pbaAccountRef),this.paymentViewService.postPBAaccountPayment(this.pbaPayOrderRef.orderRefId,e).subscribe(function(e){try{n.pbaAccountrPaymentResult=JSON.parse(e)}catch(t){n.pbaAccountrPaymentResult=e}n.isPBAAccountPaymentSuccess=!0},function(e){"402"==e.status?n.isInSufficiantFund=!0:"410"==e.status?n.isPBAAccountNotExist=!0:"412"==e.status?n.isPBAAccountHold=!0:n.isPBAServerError=!0})):this.isPBAServerError=!0):this.isCardPaymentSelected&&this.cardPayment()},rt.prototype.cardPayment=function(){var t=this;this.isCardPaymentSuccess=!0;var e=new st(this.pbaPayOrderRef.orderTotalFees);this.paymentViewService.postWays2PayCardPayment(this.pbaPayOrderRef.orderRefId,e).subscribe(function(e){e=JSON.parse(e).next_url;window.location.href=e},function(e){t.isCardPaymentSuccess=!1})},rt.prototype.selectPaymentMethod=function(e){"PBA"===e?(this.isPbaAccountSelected=!0,this.isCardPaymentSelected=!1,this.isPBADropdownSelected=!1,this.isContinueButtondisabled=!0,this.selectedPbaAccount=null):"CARD"===e&&(this.isPbaAccountSelected=!1,this.isCardPaymentSelected=!0,this.isPBADropdownSelected=!1,this.isContinueButtondisabled=!1)},rt.prototype.gotoCasetransationPage=function(){this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.TAKEPAYMENT=!1,this.paymentLibComponent.ISBSENABLE=!0,this.paymentLibComponent.isFromServiceRequestPage=!0},rt.decorators=[{type:f.Component,args:[{selector:"ccpay-pba-payment",template:'<ng-container *ngIf="viewStatus === \'pba-payment\'">\n\n <div class="govuk-breadcrumbs" *ngIf="!errorMsg && !isPBAAccountPaymentSuccess && !isCardPaymentSuccess">\n <ol class="govuk-breadcrumbs__list">\n <li class="govuk-breadcrumbs__list-item">\n <a href="javascript:void(0)" (click)="gotoCasetransationPage()" class="govuk-back-link pba-payments-16-font">Back</a>\n </li>\n </ol>\n </div>\n <div class="pba-payment" *ngIf="(pbaAccountList?.length > 0 || errorMsg) && !isInSufficiantFund && !isPBAAccountNotExist && !isPBAServerError && !isPBAAccountHold && !isPBAAccountPaymentSuccess && isCardPaymentSuccess">\n \n <div *ngIf="errorMsg" class="govuk-error-summary pba-payments-error-box--size" aria-labelledby="error-summary-title" >\n <h2 class="govuk-error-summary__title govuk-error-summary__title-custom pba-payments-24-font" id="error-summary-title">\n There is a problem\n </h2>\n <div class="govuk-error-summary__body">\n <ul class="govuk-list govuk-error-summary__list">\n <li class="pba-payments-error-16-font">\n Your PBA account cannot be found.\n </li>\n <li class="pba-payments-error-16-font">\n If you know your organisation has a PBA, try again.\n </li>\n <li class="pba-payments-error-16-font">\n You can also pay by credit or debit card.\n </li>\n </ul>\n </div>\n </div>\n \x3c!-- <h1 class="heading-medium margin-top-10-px">Pay fee using Payment by Account (PBA)</h1> --\x3e\n <div class="govuk-form-group margin-top-10-px">\n <label class="govuk-label pba-payments-govuk__label pba-payments-19-font">\n Amount to pay \n </label>\n <span class="pba-payments-19-font">{{pbaPayOrderRef.orderTotalFees | currency :\'GBP\':\'symbol\':\'1.2-2\'}}</span>\n </div>\n\n <div class="govuk-form-group" *ngIf="!errorMsg">\n <fieldset class="govuk-fieldset" aria-describedby="contact-hint">\n <div class="govuk-radios" data-module="govuk-radios">\n <div class="govuk-radios__item">\n <input class="govuk-radios__input" id="pbaAccount" name="paymentSelection" type="radio" value="PBA" (click)="selectPaymentMethod(\'PBA\')" data-aria-controls="pba-account">\n <label class="govuk-label govuk-radios__label pba-payments-19-font pba-payments-font-bld" for="pbaAccount">\n Pay fee using Payment by Account (PBA)\n </label>\n </div>\n <div class="govuk-radios__conditional" id="conditional-contact" *ngIf="isPbaAccountSelected">\n <div class="govuk-form-group pba-payments-select-box--size">\n <label class="govuk-label pba-payments-govuk__label pba-payments-19-font" for="pbaAccountNumber">\n Select a PBA \n </label>\n <select class="form-control short-input" id="pbaAccountNumber" (change)="selectpbaaccount($event)">\n <option value="" selected=\'selected\'>Select option</option>\n <option *ngFor="let pbaAccount of pbaAccountList;" value="{{pbaAccount}}">{{pbaAccount}}</option>\n </select>\n </div>\n <div class="govuk-form-group" *ngIf="!errorMsg && selectedPbaAccount">\n <label class="govuk-label pba-payments-govuk__label pba-payments-24-font" for="pbaAccountNumber">\n Enter a reference for your PBA account statements \n </label>\n <div id="event-name-hint" class="govuk-hint pba-payments-19-font pba-payment-width">\n This should be your own unique reference to identify the case. It will appear on your statements.\n </div>\n <input class="govuk-input pba-payments-ref-box--size pba-payments-19-font" id="pbaAccountRef" (change)="selectpbaaccount($event)" name="pbaAccountRef" type="text" aria-describedby="pbaAccountRef-hint">\n </div>\n \n </div>\n <div class="govuk-radios__item">\n <input class="govuk-radios__input" id="cardPayment" name="paymentSelection" type="radio" value="card" (click)="selectPaymentMethod(\'CARD\')" data-aria-controls="card-payment">\n <label class="govuk-label govuk-radios__label pba-payments-19-font pba-payments-font-bld" for="cardPayment">\n Pay by credit or debit card\n </label>\n </div>\n </div>\n </fieldset>\n </div>\n\n <div class="govuk-button--group" *ngIf="errorMsg">\n <button type="button" class="button pba-payments-19-font govuk-button--secondary pba-payments-margin-10" (click)="gotoCasetransationPage()">\n View Service Request\n </button>\n <button type="submit" class="button pba-payments-19-font pba-payments-20-margin" (click)="cardPayment()">\n Pay by card\n </button>\n </div>\n <div class="govuk-button--group" *ngIf="!errorMsg">\n <button type="submit" [disabled]="isContinueButtondisabled" class="button pba-payments-19-font pba-payments-20-margin" (click)="saveAndContinue()">\n <span *ngIf="!isPBADropdownSelected">Continue</span>\n <span *ngIf="isPBADropdownSelected">Confirm payment</span>\n </button>\n </div>\n </div>\n<ng-container *ngIf="pbaAccountList?.length <= 0 && !errorMsg && isGetPBAAccountSucceed && isCardPaymentSuccess">\n <div class="govuk-width-container">\n <main class="govuk-main-wrapper govuk-main-wrapper--l" id="main-content" role="main">\n <div class="govuk-grid-row">\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 <h2 class="warning-heading-m">You don’t have a registered PBA.</h2>\n </strong>\n </div>\n <div class="pba-payments-margin-top-10">\n <h2 class="heading-medium">Pay by credit or debit card</h2>\n <p class="govuk-body pba-payments-19-font">\n We recommend that you apply to get a new PBA to pay for fees.\n </p>\n <p class="govuk-bod ypba-payments-19-font">\n you can also pay by credit or debit card if you need to pay now\n </p>\n <p class="govuk-body">\n <button type="submit" (click)="cardPayment()" class="button pba-payments-19-font pba-payments-20-margin">\n Pay by card\n </button>\n </p>\n \n </div>\n <div class="pba-payments-margin-top-10">\n <h2 class="heading-medium">Register an existing PBA with MyHMCTS</h2>\n <p class="govuk-body pba-payments-19-font">\n You may find it easier in future to pay by PBA, your organisation administrator will need to \n email <a href="mailto: MyHMCTSsupport@justice.gov.uk">MyHMCTSsupport@justice.gov.uk</a> to ask for your PBA to be registered with your \n MyHMCTS account. You should include your organisation name and PBA number.\n </p>\n <p class="govuk-body pba-payments-19-font">\n It can then take up to 3 days for your account to be updated. You’ll need to start your claim \n again to pay the fee.\n </p>\n </div>\n <div class="pba-payments-margin-top-10">\n <h2 class="heading-medium">Apply to get a new PBA </h2>\n <p class="govuk-body pba-payments-19-font">\n You’ll need to provide details for you and your organisation, including the required credit\n limit for your account.\n </p>\n <p class="govuk-body pba-payments-19-font">\n Once your account has been registered, you’ll need to start your claim again to pay the fee.\n </p>\n <p class="govuk-body pba-payments-19-font">\n Read more information on <a target="_blank" href="https://www.gov.uk/guidance/hmcts-payment-by-account-for-online-services">registering for PBA</a>.\n </p>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n\n<ng-container *ngIf="isInSufficiantFund && isCardPaymentSuccess">\n <div class="govuk-width-container">\n <main class="govuk-main-wrapper govuk-main-wrapper--l" id="main-content" role="main">\n <div class="govuk-grid-row">\n <div class="govuk-error-summary pba-payments-error-box--size" aria-labelledby="error-summary-title">\n <h2 class="govuk-error-summary__title govuk-error-summary__title-custom pba-payments-24-font" id="error-summary-title">\n There is a problem\n </h2>\n <div class="govuk-error-summary__body">\n <ul class="govuk-list govuk-error-summary__list">\n <li class="pba-payments-error-16-font">\n You don\'t have enough funds in your PBA account to pay for this fee.\n </li>\n <li class="pba-payments-error-16-font">\n If you have already topped up your PBA account, wait up to 24 hours for the new balance to become available.\n </li>\n </ul>\n </div>\n </div>\n <div class="pba-payments-margin-top-10">\n <h2 class="heading-medium">Should you need any further advice</h2>\n <p class="govuk-body pba-payments-19-font">\n Email <a href="mailto:MiddleOffice.DDservices@liberata.com">MiddleOffice.DDservices@liberata.com</a> or call <a href="tel:01633-652-125">01633 652 125</a> (option 3) to try to fix the issue.\n </p>\n <p class="govuk-body pba-payments-19-font">\n you can also pay by credit or debit card.\n </p>\n <div class="govuk-button--group">\n <button type="button" class="button pba-payments-19-font govuk-button--secondary pba-payments-margin-10" (click)="gotoCasetransationPage()">\n View Service Request\n </button>\n <button type="submit" class="button pba-payments-19-font pba-payments-20-margin" (click)="cardPayment()">\n Pay by card\n </button>\n </div>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n<ng-container *ngIf="isPBAAccountNotExist && isCardPaymentSuccess">\n <div class="govuk-width-container">\n <main class="govuk-main-wrapper govuk-main-wrapper--l" id="main-content" role="main">\n <div class="govuk-grid-row">\n <div class="govuk-error-summary pba-payments-error-box--size" aria-labelledby="error-summary-title">\n <h2 class="govuk-error-summary__title govuk-error-summary__title-custom pba-payments-24-font" id="error-summary-title">\n There is a problem\n </h2>\n <div class="govuk-error-summary__body">\n <ul class="govuk-list govuk-error-summary__list">\n <li class="pba-payments-error-16-font">\n Your PBA account ({{selectedPbaAccount}}) no longer exists.\n </li>\n </ul>\n </div>\n </div>\n <div class="pba-payments-margin-top-10">\n <h2 class="heading-medium">Should you need any further advice</h2>\n <p class="govuk-body pba-payments-19-font govuk-body-width">\n Email <a href="mailto:MiddleOffice.DDservices@liberata.com">MiddleOffice.DDservices@liberata.com</a> or call <a href="tel:01633-652-125">01633 652 125</a> (option 3) to try to fix the issue.\n </p>\n <p class="govuk-body pba-payments-19-font">\n you can also pay by credit or debit card.\n </p>\n <div class="govuk-button--group">\n <button type="button" class="button pba-payments-19-font govuk-button--secondary pba-payments-margin-10" (click)="gotoCasetransationPage()">\n View Service Request\n </button>\n <button type="submit" class="button pba-payments-19-font pba-payments-20-margin" (click)="cardPayment()">\n Pay by card\n </button>\n </div>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n<ng-container *ngIf="isPBAAccountHold && isCardPaymentSuccess">\n <div class="govuk-width-container">\n <main class="govuk-main-wrapper govuk-main-wrapper--l" id="main-content" role="main">\n <div class="govuk-grid-row">\n <div class="govuk-error-summary pba-payments-error-box--size" aria-labelledby="error-summary-title">\n <h2 class="govuk-error-summary__title govuk-error-summary__title-custom pba-payments-24-font" id="error-summary-title">\n There is a problem\n </h2>\n <div class="govuk-error-summary__body">\n <ul class="govuk-list govuk-error-summary__list">\n <li class="pba-payments-error-16-font">\n Your PBA account ({{selectedPbaAccount}}) has been put on hold.\n </li>\n </ul>\n </div>\n </div>\n <div class="pba-payments-margin-top-10">\n <h2 class="heading-medium">Should you need any further advice</h2>\n <p class="govuk-body pba-payments-19-font govuk-body-width">\n Email <a href="mailto:MiddleOffice.DDservices@liberata.com">MiddleOffice.DDservices@liberata.com</a> or call <a href="tel:01633-652-125">01633 652 125</a> (option 3) to try to fix the issue.\n </p>\n <p class="govuk-body pba-payments-19-font">\n you can also pay by credit or debit card.\n </p>\n <div class="govuk-button--group">\n <button type="button" class="button pba-payments-19-font govuk-button--secondary pba-payments-margin-10" (click)="gotoCasetransationPage()">\n View Service Request\n </button>\n <button type="submit" class="button pba-payments-19-font pba-payments-20-margin" (click)="cardPayment()">\n Pay by card\n </button>\n </div>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n<ng-container *ngIf="isPBAServerError && isCardPaymentSuccess">\n <div class="govuk-width-container">\n <main class="govuk-main-wrapper govuk-main-wrapper--l" id="main-content" role="main">\n <div class="govuk-grid-row">\n <div class="pba-payments-margin-top-10">\n <h2 class="pba-payments-heading-lg">Sorry, there is a problem with the service</h2>\n <p class="govuk-body pba-payments-19-font">\n Try again later.\n </p>\n <p class="govuk-body pba-payments-19-font">\n you can also pay by credit or debit card.\n </p>\n <div class="govuk-button--group">\n <button type="button" class="button pba-payments-19-font govuk-button--secondary pba-payments-margin-10" (click)="gotoCasetransationPage()">\n View Service Request\n </button>\n <button type="submit" class="button pba-payments-19-font pba-payments-20-margin" (click)="cardPayment()">\n Pay by card\n </button>\n </div>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n\n<ng-container *ngIf="isPBAAccountPaymentSuccess && isCardPaymentSuccess">\n <div class="govuk-width-container">\n <main class="govuk-main-wrapper govuk-main-wrapper--l" id="main-content" role="main">\n <div class="govuk-grid-row">\n <div class="govuk-panel govuk-panel--confirmation pba-payments--confirmation">\n <h1 class="govuk-panel__title pba-payments--title">\n Payment successful\n </h1>\n <div class="govuk-panel__body pba-payments__body">\n Your payment reference is <br><strong>{{pbaAccountrPaymentResult.payment_reference}}</strong>\n </div>\n </div>\n <p class="govuk-body pba-payments-19-font">\n <a href="javascript:void(0)" (click)="gotoCasetransationPage()">View service requests</a>\n </p>\n </div>\n </main>\n </div>\n</ng-container>\n\n<ng-container *ngIf="!isCardPaymentSuccess">\n <div class="govuk-width-container">\n <main class="govuk-main-wrapper govuk-main-wrapper--l" id="main-content" role="main">\n <div class="govuk-grid-row">\n <div class="pba-payments-margin-top-10">\n <h2 class="pba-payments-heading-lg">Sorry, there is a problem with the service</h2>\n <p class="govuk-body pba-payments-19-font">\n Try again later.\n </p>\n \x3c!-- <p class="govuk-body pba-payments-19-font">\n you can also <a href="javascript:void(0)" (click)="cardPayment()" >pay by credit or debit card</a>.\n </p> --\x3e\n <p class="govuk-body pba-payments-19-font">\n <a href="javascript:void(0)" (click)="gotoCasetransationPage()">View service requests</a>\n </p>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n</ng-container>\n\n\n\n',styles:[".pba-payments-govuk__label{font-weight:700;line-height:1.31578947}.pba-payments-19-font{font-size:19px}.pba-payments-font-bld{font-weight:700}.pba-payments-16-font{font-size:16px}.pba-payments-24-font{font-size:24px}.pba-payments-20-margin{margin-bottom:20px}.pba-payments-select-box--size{width:40%}.pba-payments-error-box--size{width:80%}.pba-payments-ref-box--size{width:60%}.pba-payments-error-16-font{font-size:16px;line-height:34px}.pba-payments-margin-10{margin-right:10px}.pba-payments-margin-top-10{margin-top:15px}.pba-payments-heading-lg{font-size:40px;font-weight:700;line-height:72px}.pba-payments--confirmation{background:#00703c!important}.pba-payments__body{font-size:36px!important}.pba-payments--title{font-size:48px!important}.warning-heading-m{font-size:29px;font-weight:700}.pba-payment-width{width:75%}.margin-top-10-px{margin-top:10px}.govuk-error-summary:focus{outline:#fd0 solid 3px}.govuk-body-width{width:750px}"]}]}],rt.ctorParameters=function(){return[{type:k},{type:D}]},rt.propDecorators={pbaPayOrderRef:[{type:f.Input}]},rt);function rt(e,t){this.paymentLibComponent=e,this.paymentViewService=t,this.isPBAAccountHold=!1,this.isCardPaymentSuccess=!0,this.isInSufficiantFund=!1,this.isPBAAccountNotExist=!1,this.isPBAServerError=!1,this.isGetPBAAccountSucceed=!1,this.selectedPbaAccount="",this.pbaAccountRef="",this.isPbaAccountSelected=!1,this.isCardPaymentSelected=!1,this.isPBADropdownSelected=!1,this.isContinueButtondisabled=!0,this.isPBAAccountPaymentSuccess=!1}it.decorators=[{type:f.NgModule,args:[{imports:[r.CommonModule,s.HttpClientModule,g.FormsModule,g.ReactiveFormsModule,c.MatTableModule,d.MatPaginatorModule,u.MatSortModule,p.MatFormFieldModule,m.MatInputModule],declarations:[k,A,x,ot,U,V,Y,$,X,_e,Se,we,Pe,Oe,ee,ce,ge,xe,Me,Ue,Ve,qe,$e,fe,Ke,Qe,tt],exports:[k],providers:[{provide:w,useClass:se},Ye,T]}]}],m=it;function it(){}e.PaymentLibService=y,e.PaymentLibComponent=k,e.PaymentLibModule=m,e.ɵbb=xe,e.ɵw=Oe,e.ɵm=Y,e.ɵz=ce,e.ɵbi=fe,e.ɵba=ge,e.ɵr=_e,e.ɵt=Se,e.ɵo=$,e.ɵb=A,e.ɵf=x,e.ɵy=ee,e.ɵi=ot,e.ɵj=U,e.ɵv=Pe,e.ɵl=V,e.ɵbk=Qe,e.ɵbg=$e,e.ɵbl=tt,e.ɵp=X,e.ɵbj=Ke,e.ɵu=we,e.ɵbd=Ue,e.ɵbc=Me,e.ɵbe=Ve,e.ɵbf=qe,e.ɵs=ie,e.ɵn=q,e.ɵx=oe,e.ɵa=b,e.ɵc=P,e.ɵg=D,e.ɵk=M,e.ɵe=S,e.ɵh=T,e.ɵbm=se,e.ɵd=w,e.ɵq=K,e.ɵbh=Ye,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("rxjs/observable/throw"),require("rxjs"),require("@angular/common/http"),require("rxjs/operators"),require("@angular/platform-browser"),require("@angular/common"),require("file-saver"),require("xlsx"),require("@angular/material/table"),require("@angular/material/paginator"),require("@angular/material/sort"),require("@angular/material/form-field"),require("@angular/material/input"),require("@angular/forms"),require("@angular/router"),require("@angular/core")):"function"==typeof define&&define.amd?define("@hmcts/ccpay-web-component",["exports","rxjs/observable/throw","rxjs","@angular/common/http","rxjs/operators","@angular/platform-browser","@angular/common","file-saver","xlsx","@angular/material/table","@angular/material/paginator","@angular/material/sort","@angular/material/form-field","@angular/material/input","@angular/forms","@angular/router","@angular/core"],t):t((e.hmcts=e.hmcts||{},e.hmcts["ccpay-web-component"]={}),e.rxjs["observable/throw"],e.rxjs,e.ng.common.http,e.rxjs.operators,e.ng.platformBrowser,e.ng.common,e.FileSaver,e.XLSX,e.ng.material.table,e.ng.material.paginator,e.ng.material.sort,e.ng.material["form-field"],e.ng.material.input,e.ng.forms,e.ng.router,e.ng.core)}(this,function(e,t,o,s,a,n,r,i,l,c,d,u,p,m,g,h,f){"use strict";var y=(v.prototype.setApiRootUrl=function(e){this.API_ROOT=e},v.prototype.getApiRootUrl=function(){return this.API_ROOT},v.prototype.setBulkScanApiRootUrl=function(e){this.BULKSCAN_API_ROOT=e},v.prototype.getBulkScanApiRootUrl=function(){return this.BULKSCAN_API_ROOT},v.prototype.setRefundndsApiRootUrl=function(e){this.REFUNDS_API_ROOT=e},v.prototype.getRefundsApiRootUrl=function(){return this.REFUNDS_API_ROOT},v.prototype.setCardPaymentReturnUrl=function(e){this.CARDPAYMENTRETURNURL=e},v.prototype.getCardPaymentReturnUrl=function(){return this.CARDPAYMENTRETURNURL},v.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],v.ctorParameters=function(){return[]},v.ngInjectableDef=f.defineInjectable({factory:function(){return new v},token:v,providedIn:"root"}),v);function v(){}var b=(_.prototype.setOrdersList=function(e){this.ordersList.next(Object.assign([],e))},_.prototype.getOrdersList=function(){return this.ordersList},_.prototype.setRefundView=function(e){this.refundView.next(Object.assign([],e))},_.prototype.getRefundView=function(){return this.refundView},_.prototype.setCaseType=function(e){this.caseType.next(e)},_.prototype.getCaseType=function(){return this.caseType},_.prototype.setCCDCaseNumber=function(e){this.ccdCaseNumber.next(e)},_.prototype.getCCDCaseNumber=function(){return this.ccdCaseNumber},_.prototype.setFeeExists=function(e){this.feeExists.next(e)},_.prototype.getFeeExists=function(){return this.feeExists},_.prototype.setisFromServiceRequestPage=function(e){this.isFromServiceRequestPage.next(e)},_.prototype.getisFromServiceRequestPages=function(){return this.isFromServiceRequestPage},_.prototype.setOrderRefId=function(e){this.OrderRefId.next(e)},_.prototype.getSelectedOrderRefId=function(){return this.OrderRefId},_.prototype.setnavigationPage=function(e){this.navigationPage.next(e)},_.prototype.getnavigationPageValue=function(){return this.navigationPage},_.prototype.setpaymentPageView=function(e){this.paymentPageView.next(Object.assign([],e))},_.prototype.getpaymentPageView=function(){return this.paymentPageView},_.prototype.setUserRolesList=function(e){this.rolesList.next(Object.assign([],e))},_.prototype.getUserRolesList=function(){return this.rolesList},_.prototype.setorderDetail=function(e){this.orderDetail.next(Object.assign([],e))},_.prototype.getorderDetail=function(){return this.orderDetail},_.prototype.setOrderRef=function(e){this.orderRef.next(e)},_.prototype.getorderRefs=function(){return this.orderRef},_.prototype.setorderCCDEvent=function(e){this.orderCCDEvent.next(e)},_.prototype.getorderCCDEvents=function(){return this.orderCCDEvent},_.prototype.setorderCreated=function(e){this.orderCreated.next(e)},_.prototype.getorderCreateds=function(){return this.orderCreated},_.prototype.setorderParty=function(e){this.orderParty.next(e)},_.prototype.getorderPartys=function(){return this.orderParty},_.prototype.setorderRemissionTotal=function(e){this.orderRemissionTotal.next(e)},_.prototype.getorderRemissionTotals=function(){return this.orderRemissionTotal},_.prototype.setorderFeesTotal=function(e){this.orderFeesTotal.next(e)},_.prototype.getorderFeesTotals=function(){return this.orderFeesTotal},_.prototype.setorderTotalPayments=function(e){this.orderTotalPayments.next(e)},_.prototype.getoorderTotalPaymentss=function(){return this.orderTotalPayments},_.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],_.ctorParameters=function(){return[]},_.ngInjectableDef=f.defineInjectable({factory:function(){return new _},token:_,providedIn:"root"}),_);function _(){this.ordersList=new o.BehaviorSubject(null),this.refundView=new o.BehaviorSubject(null),this.caseType=new o.BehaviorSubject(""),this.getcaseType=this.caseType.asObservable(),this.feeExists=new o.BehaviorSubject(null),this.getFeeExist=this.feeExists.asObservable(),this.ccdCaseNumber=new o.BehaviorSubject(""),this.getCCDCaseNumberforRefund=this.ccdCaseNumber.asObservable(),this.isFromServiceRequestPage=new o.BehaviorSubject(null),this.getisFromServiceRequestPage=this.isFromServiceRequestPage.asObservable(),this.OrderRefId=new o.BehaviorSubject(""),this.getOrderRefId=this.OrderRefId.asObservable(),this.navigationPage=new o.BehaviorSubject(""),this.getnavigationPage=this.navigationPage.asObservable(),this.orderRef=new o.BehaviorSubject(""),this.getorderRef=this.orderRef.asObservable(),this.orderCCDEvent=new o.BehaviorSubject(""),this.getorderCCDEvent=this.caseType.asObservable(),this.orderCreated=new o.BehaviorSubject(null),this.getorderCreated=this.orderCreated.asObservable(),this.orderParty=new o.BehaviorSubject(""),this.getorderParty=this.orderParty.asObservable(),this.orderRemissionTotal=new o.BehaviorSubject(null),this.getorderRemissionTotal=this.orderRemissionTotal.asObservable(),this.orderFeesTotal=new o.BehaviorSubject(null),this.getorderFeesTotal=this.orderFeesTotal.asObservable(),this.orderTotalPayments=new o.BehaviorSubject(null),this.getorderTotalPayments=this.orderTotalPayments.asObservable(),this.rolesList=new o.BehaviorSubject(null),this.orderDetail=new o.BehaviorSubject(null),this.paymentPageView=new o.BehaviorSubject(null)}var k=(R.prototype.ngAfterContentChecked=function(){this.cd.detectChanges()},R.prototype.ngOnInit=function(){this.paymentLibService.setApiRootUrl(this.API_ROOT),this.paymentLibService.setBulkScanApiRootUrl(this.BULKSCAN_API_ROOT),this.paymentLibService.setRefundndsApiRootUrl(this.REFUNDS_API_ROOT),this.paymentLibService.setCardPaymentReturnUrl(this.CARDPAYMENTRETURNURL),0<this.LOGGEDINUSERROLES.length&&this.OrderslistService.setUserRolesList(this.LOGGEDINUSERROLES),this.PAYMENT_GROUP_REF&&(this.paymentGroupReference=this.PAYMENT_GROUP_REF),this.DCN_NUMBER&&(this.bspaymentdcn=this.DCN_NUMBER),"true"===this.REFUNDLIST&&(this.VIEW="refund-list",this.viewName=this.VIEW),"fee-summary"===this.VIEW?this.viewName="fee-summary":"reports"!==this.VIEW&&"refund-list"!==this.VIEW?this.viewName="case-transactions":this.viewName=this.VIEW,this.isTakePayment&&(this.TAKEPAYMENT=!0)},R.decorators=[{type:f.Component,args:[{selector:"ccpay-payment-lib",template:'\n <ccpay-refund-list [USERID]="USERID" [LOGGEDINUSERROLES]="LOGGEDINUSERROLES" [LOGGEDINUSEREMAIL]="LOGGEDINUSEREMAIL" *ngIf="viewName === \'refund-list\'"></ccpay-refund-list>\n <ccpay-payment-list *ngIf="viewName === \'payment-list\'"></ccpay-payment-list>\n <ccpay-refund-status [LOGGEDINUSERROLES]="LOGGEDINUSERROLES" *ngIf="viewName === \'refundstatuslist\'"> </ccpay-refund-status >\n <ccpay-payment-view [LOGGEDINUSERROLES]="LOGGEDINUSERROLES" *ngIf="viewName === \'payment-view\'"\n [isTurnOff]="ISTURNOFF" [isTakePayment]="TAKEPAYMENT" [caseType]="CASETYPE"\n [isOldPcipalOff]="ISOLDPCIPALOFF"\n [isNewPcipalOff]="ISNEWPCIPALOFF"></ccpay-payment-view>\n\n <ccpay-process-refund *ngIf="viewName === \'process-refund\'"\n [refundReference]="refundReference"\n [refundlistsource]="refundlistsource"\n ></ccpay-process-refund>\n <ccpay-pba-payment *ngIf="viewName === \'pba-payment\'"\n [pbaPayOrderRef]="pbaPayOrderRef"\n ></ccpay-pba-payment>\n <ccpay-case-transactions [isTakePayment]="isTakePayment" [LOGGEDINUSERROLES]="LOGGEDINUSERROLES" *ngIf="viewName === \'case-transactions\'"></ccpay-case-transactions>\n <app-mark-unidentified-payment *ngIf="viewName === \'unidentifiedPage\'"\n [caseType]="CASETYPE"></app-mark-unidentified-payment>\n <app-mark-unsolicited-payment *ngIf="viewName === \'unsolicitedPage\'"\n [caseType]="CASETYPE"></app-mark-unsolicited-payment>\n <app-allocate-payments *ngIf="viewName === \'allocate-payments\'"\n [isTurnOff]="ISTURNOFF"\n [caseType]="CASETYPE"\n ></app-allocate-payments>\n <ccpay-fee-summary *ngIf="viewName === \'fee-summary\'"\n [ccdCaseNumber]="CCD_CASE_NUMBER" \n [paymentGroupRef]="paymentGroupReference"\n [isTurnOff]="ISTURNOFF"\n [caseType]="CASETYPE"\n [isOldPcipalOff]="ISOLDPCIPALOFF"\n [isNewPcipalOff]="ISNEWPCIPALOFF"\n ></ccpay-fee-summary>\n <ccpay-reports *ngIf="viewName === \'reports\'"></ccpay-reports>\n '}]}],R.ctorParameters=function(){return[{type:y},{type:f.ChangeDetectorRef},{type:b}]},R.propDecorators={API_ROOT:[{type:f.Input,args:["API_ROOT"]}],BULKSCAN_API_ROOT:[{type:f.Input,args:["BULKSCAN_API_ROOT"]}],REFUNDS_API_ROOT:[{type:f.Input,args:["REFUNDS_API_ROOT"]}],CARDPAYMENTRETURNURL:[{type:f.Input,args:["CARDPAYMENTRETURNURL"]}],CCD_CASE_NUMBER:[{type:f.Input,args:["CCD_CASE_NUMBER"]}],EXC_REFERENCE:[{type:f.Input,args:["EXC_REFERENCE"]}],PAYMENT_METHOD:[{type:f.Input,args:["PAYMENT_METHOD"]}],VIEW:[{type:f.Input,args:["VIEW"]}],VIEWSERVICE:[{type:f.Input,args:["VIEWSERVICE"]}],PAYMENT_GROUP_REF:[{type:f.Input,args:["PAYMENT_GROUP_REF"]}],TAKEPAYMENT:[{type:f.Input,args:["TAKEPAYMENT"]}],SERVICEREQUEST:[{type:f.Input,args:["SERVICEREQUEST"]}],DCN_NUMBER:[{type:f.Input,args:["DCN_NUMBER"]}],SELECTED_OPTION:[{type:f.Input,args:["SELECTED_OPTION"]}],ISBSENABLE:[{type:f.Input,args:["ISBSENABLE"]}],ISSFENABLE:[{type:f.Input,args:["ISSFENABLE"]}],ISTURNOFF:[{type:f.Input,args:["ISTURNOFF"]}],CASETYPE:[{type:f.Input,args:["CASETYPE"]}],ISOLDPCIPALOFF:[{type:f.Input,args:["ISOLDPCIPALOFF"]}],ISNEWPCIPALOFF:[{type:f.Input,args:["ISNEWPCIPALOFF"]}],rootUrl:[{type:f.Input,args:["rootUrl"]}],REFUNDLIST:[{type:f.Input,args:["REFUNDLIST"]}],USERID:[{type:f.Input,args:["USERID"]}],LOGGEDINUSERROLES:[{type:f.Input,args:["LOGGEDINUSERROLES"]}],LOGGEDINUSEREMAIL:[{type:f.Input,args:["LOGGEDINUSEREMAIL"]}],isFromServiceRequestPage:[{type:f.Input,args:["isFromServiceRequestPage"]}]},R);function R(e,t,n){this.paymentLibService=e,this.cd=t,this.OrderslistService=n,this.unProcessedPaymentServiceId=null,this.unProcessedPayment=null,this.orderFeesTotal=0,this.orderRemissionTotal=0,this.orderTotalPayments=0,this.orderPendingPayments=0}var S=(E.prototype.handleError=function(e){e=e.error instanceof Error?"An error occurred: "+e.error.message:404===e.status?"string"==typeof e.error&&e.error!==undefined?60<e.error.length?JSON.parse(e.error).statusCode!==undefined&&500===JSON.parse(e.error).statusCode?"Internal server error":(60<e.error.length?JSON.parse(e.error):e).error:e.error:JSON.parse(e.error).error:500===e.status?"Internal server error":e.error.messsage===undefined?"object"==typeof e.error?JSON.parse(JSON.stringify(e.error)).error:"string"==typeof e.error&&e.error!==undefined?60<e.error.length?JSON.parse(e.error).statusCode!==undefined&&500===JSON.parse(e.error).statusCode?"Internal server error":(60<e.error.length?JSON.parse(e.error):e).error:e.error:JSON.parse(e.error).error:e.error.message!==undefined?""+e.error.message:""+e.error;return t._throw(e)},E.prototype.getServerErrorMessage=function(e){return{title:"There is a problem with the service",body:"Try again later",showError:e}},E.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],E.ctorParameters=function(){return[]},E.ngInjectableDef=f.defineInjectable({factory:function(){return new E},token:E,providedIn:"root"}),E);function E(){}var w=(C.prototype.invokeConsoleMethod=function(e,t){},C.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],C.ngInjectableDef=f.defineInjectable({factory:function(){return new C},token:C,providedIn:"root"}),C);function C(){}var P=(I.prototype.getPaymentByCcdCaseNumber=function(e,t){return this.logger.info("Payment-list-service getPaymentByCcdCaseNumber for: ",e),this.http.get(this.paymentLibService.API_ROOT+"/cases/"+e+"/payments",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},I.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],I.ctorParameters=function(){return[{type:s.HttpClient},{type:w},{type:S},{type:y}]},I.ngInjectableDef=f.defineInjectable({factory:function(){return new I(f.inject(s.HttpClient),f.inject(w),f.inject(S),f.inject(y))},token:I,providedIn:"root"}),I);function I(e,t,n,s){this.http=e,this.logger=t,this.errorHandlerService=n,this.paymentLibService=s}var O=(A.prototype.ngOnInit=function(){var t=this;this.paymentListService.getPaymentByCcdCaseNumber(this.paymentLibComponent.CCD_CASE_NUMBER,this.paymentLibComponent.PAYMENT_METHOD).subscribe(function(e){return t.payments=e},function(e){return t.errorMessage=e})},A.prototype.loadPaymentViewComponent=function(e,t,n){this.paymentLibComponent.paymentMethod=n,this.paymentLibComponent.paymentGroupReference=e,this.paymentLibComponent.paymentReference=t,this.paymentLibComponent.viewName="payment-view"},A.decorators=[{type:f.Component,args:[{selector:"ccpay-payment-list",template:'<div class="govuk-width-container">\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 Payments list could not be retrieved\n </h2>\n <div class="govuk-error-summary__body">\n {{ errorMessage }}\n </div>\n </div>\n </div>\n\n <div *ngIf="!errorMessage && payments">\n\n <table class="table">\n <tr>\n <th class="bold font-xsmall">Payment group reference</th>\n <th class="bold font-xsmall">Payment reference</th>\n <th class="bold font-xsmall">Date created</th>\n <th class="bold font-xsmall">Channel</th>\n <th class="bold font-xsmall">Method</th>\n <th class="bold font-xsmall">Amount</th>\n <th class="bold font-xsmall">Status</th>\n </tr>\n <tr *ngFor="let payment of payments.payments">\n <td class="font-xsmall">\n <a href="javascript:void(0)" (click)="loadPaymentViewComponent(payment.payment_group_reference, payment.payment_reference, payment.method)">{{ payment.payment_group_reference }}</a>\n <td class="font-xsmall">{{ payment.payment_reference }}</td>\n <td class="font-xsmall">{{ payment.date_created | date:\'dd MMM yyyy\' }}</td>\n <td class="font-xsmall">{{ payment.channel | titlecase }}</td>\n <td class="font-xsmall">{{ payment.method | titlecase }}</td>\n <td class="font-xsmall">£{{ payment.amount | number:\'.2\' }}</td>\n <td *ngIf="payment.method === \'card\' && payment.channel === \'online\'">\n <details>\n <summary><span class="summary font-xsmall">{{ payment.status }}</span></summary>\n <div class="panel panel-border-narrow" *ngIf="payment.status === \'Failed\'">\n <div *ngFor="let statusHistory of payment.status_histories">\n <p class="font-xsmall" *ngIf="statusHistory.error_code === \'P0010\'">\n Payment rejected due to payment method selected or payment information entered, for example, failed fraud check, a 3D Secure authentication failure, or the user does not have enough money in account\n </p>\n <p class="font-xsmall" *ngIf="statusHistory.error_code === \'P0020\'">\n Payment was not confirmed and completed within 90 minutes of being created\n </p>\n <p class="font-xsmall" *ngIf="statusHistory.error_code === \'P0030\'">\n User clicked on the “Cancel payment” button during the payment journey\n </p>\n <p class="font-xsmall" *ngIf="statusHistory.error_code === \'P0050\'">\n Multiple possible causes, for example a configuration problem with the payment provider, or incorrect login credentials\n </p>\n </div>\n </div>\n </details>\n </td>\n <td *ngIf="payment.method === \'card\' && payment.channel === \'telephony\'" class="font-xsmall">\n {{ payment.status}}\n </td>\n <td *ngIf="payment.method === \'payment by account\'">\n <details>\n <summary><span class="summary font-xsmall">{{ payment.status }}</span></summary>\n <div class="panel panel-border-narrow" *ngIf="payment.status === \'Pending\'">\n <p class="font-xsmall">This means the transaction is being processed by Liberata.</p>\n </div>\n </details>\n </td>\n </tr>\n </table>\n\n </div>\n\n</div>\n',styles:[""]}]}],A.ctorParameters=function(){return[{type:P},{type:k}]},A);function A(e,t){this.paymentListService=e,this.paymentLibComponent=t}function F(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],s=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&s>=e.length?void 0:e)&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var T=(L.prototype.post=function(e,t,n){n=this.addHeaders(n||{});return this.http.post(e,t,n)},L.prototype.put=function(e,t,n){n=this.addHeaders(n||{});return this.http.put(e,t,n)},L.prototype.get=function(e,t){t=this.addHeaders(t||{});return this.http.get(e,t)},L.prototype["delete"]=function(e,t){t=this.addHeaders(t||{});return this.http["delete"](e,t)},L.prototype.patch=function(e,t,n){n=this.addHeaders(n||{});return this.http.patch(e,t,n)},L.prototype.addHeaders=function(t){var e=this.meta.getTag("name=csrf-token"),n={};return t.headers&&t.headers.forEach(function(e){n[e]=t.headers.get(e)}),n["X-Requested-With"]="XMLHttpRequest",null===e.content&&document.cookie.split(";").find(function(e){return e.startsWith("XSRF-TOKEN")})!==undefined?n["CSRF-Token"]=document.cookie.split(";").find(function(e){return e.startsWith(" XSRF-TOKEN")}).split("=")[1]:n["CSRF-Token"]=e.content,t.headers=new s.HttpHeaders(n),t.responseType="text",t},L.decorators=[{type:f.Injectable}],L.ctorParameters=function(){return[{type:s.HttpClient},{type:n.Meta}]},L);function L(e,t){this.http=e,this.meta=t}var D=(N.prototype.getPaymentDetails=function(e,t){return this.logger.info("Payment-view-service getPaymentDetails for: ",e),this.http.get("card"===t||"cash"===t||"cheque"===t||"postal order"===t?this.paymentLibService.API_ROOT+"/card-payments/"+e:this.paymentLibService.API_ROOT+"/credit-account-payments/"+e,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.getPaymentGroupDetails=function(e){return this.logger.info("Payment-view-service getPaymentGroupDetails for: ",e),this.http.get(this.paymentLibService.API_ROOT+"/payment-groups/"+e,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.getApportionPaymentDetails=function(e){return this.logger.info("Payment-view-service getPaymentGroupDetails for: ",e),this.http.get(this.paymentLibService.API_ROOT+"/payment-groups/fee-pay-apportion/"+e,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.getPBAaccountDetails=function(){var e=this.paymentLibService.API_ROOT+"/pba-accounts";return this.http.get(e,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.postWays2PayCardPayment=function(e,t){var n=this.paymentLibService.API_ROOT+"/service-request/"+e+"/card-payments",e=this.paymentLibService.CARDPAYMENTRETURNURL.replace(".prod","");return t["return-url"]=e+"/payment",this.https.post(n,t).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.postPBAaccountPayment=function(e,t){var n="idam-key-"+Math.random().toString().split(".").join("-");t.idempotency_key=n;e=this.paymentLibService.API_ROOT+"/service-request/"+e+"/pba-payments";return this.https.post(e,t)},N.prototype.postBSPayments=function(e){return this.https.post(this.paymentLibService.API_ROOT+"/payment-groups/bulk-scan-payments",e).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.postBSUnidentifiedPayments=function(e){return this.https.post(this.paymentLibService.API_ROOT+"/payment-allocations",e).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.postBSUnsolicitedPayments=function(e){return this.https.post(this.paymentLibService.API_ROOT+"/payment-allocations",e).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.postBSAllocationPayments=function(e){return this.https.post(this.paymentLibService.API_ROOT+"/payment-allocations",e).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.postPaymentGroupWithRemissions=function(e,t,n){return this.https.post(this.paymentLibService.API_ROOT+"/payment-groups/"+e+"/fees/"+t+"/remissions",n).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.deleteFeeFromPaymentGroup=function(e){return this.logger.info("Payment-view-service deleteFeeFromPaymentGroup for: ",e),this.https["delete"](this.paymentLibService.API_ROOT+"/fees/"+e).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.postPaymentToPayHub=function(e,t){return this.https.post(this.paymentLibService.API_ROOT+"/payment-groups/"+t+"/card-payments",e).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.postPaymentAntennaToPayHub=function(e,t){return this.https.post(this.paymentLibService.API_ROOT+"/payment-groups/"+t+"/telephony-card-payments",e).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.downloadSelectedReport=function(e,t,n){e=this.paymentLibService.API_ROOT+"/report/data?date_from="+t+"&date_to="+n+"&report_type="+e;return this.https.get(e,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.getBSfeature=function(){return this.https.get("api/payment-history/bulk-scan-feature",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.getSiteID=function(){return this.https.get("api/payment-history/refdata/legacy-sites",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.getPartyDetails=function(e){e=this.paymentLibService.API_ROOT+"/case-payment-orders?case_ids="+e;return this.https.get(e,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.setOrdersList=function(e){this.ordersList.next(Object.assign([],e))},N.prototype.getOrdersList=function(){return this.ordersList},N.prototype.postRefundsReason=function(e){return this.https.post(this.paymentLibService.API_ROOT+"/refund-for-payment",e).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.postPaymentGroupWithRetroRemissions=function(e,t,n){return this.https.post(this.paymentLibService.API_ROOT+"/payment-groups/"+e+"/fees/"+t+"/retro-remission",n).pipe(a.catchError(this.errorHandlerService.handleError))},N.prototype.postRefundRetroRemission=function(e){return this.https.post(this.paymentLibService.API_ROOT+"/refund-retro-remission",e).pipe(a.catchError(this.errorHandlerService.handleError))},N.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],N.ctorParameters=function(){return[{type:s.HttpClient},{type:T},{type:w},{type:S},{type:y}]},N.ngInjectableDef=f.defineInjectable({factory:function(){return new N(f.inject(s.HttpClient),f.inject(T),f.inject(w),f.inject(S),f.inject(y))},token:N,providedIn:"root"}),N);function N(e,t,n,s,a){this.http=e,this.https=t,this.logger=n,this.errorHandlerService=s,this.paymentLibService=a,this.ordersList=new o.BehaviorSubject([])}var x=(B.prototype.ngAfterContentChecked=function(){this.cd.detectChanges()},B.prototype.ngOnInit=function(){var s=this;this.ccdCaseNumber=this.paymentLibComponent.CCD_CASE_NUMBER,this.selectedOption=this.paymentLibComponent.SELECTED_OPTION,this.dcnNumber=this.paymentLibComponent.DCN_NUMBER,this.isTurnOff=this.paymentLibComponent.ISTURNOFF,this.serviceReference=this.paymentLibComponent.paymentGroupReference,this.viewStatus="paymentview",this.paymentViewService.getApportionPaymentDetails(this.paymentLibComponent.paymentReference).subscribe(function(e){var n=[];e.fees.forEach(function(t){s.isRemissionsMatch=!1,e.remissions.forEach(function(e){e.fee_code===t.code&&(s.isRemissionsMatch=!0,t.remissions=e,n.push(t))}),s.isRemissionsMatch||n.push(t)}),e.fees=n,s.paymentGroup=e,s.paymentGroup.payments=s.paymentGroup.payments.filter(function(e){return e.reference.includes(s.paymentLibComponent.paymentReference)});var t=s.paymentGroup.payments[0].payment_allocation;s.isStatusAllocated=0<t.length&&"Allocated"===t[0].allocation_status||0===t.length},function(e){return s.errorMessage=e})},Object.defineProperty(B.prototype,"isCardPayment",{get:function(){return"card"===this.paymentGroup.payments[0].method},enumerable:!0,configurable:!0}),Object.defineProperty(B.prototype,"isTelephonyPayment",{get:function(){return"telephony"===this.paymentGroup.payments[0].channel},enumerable:!0,configurable:!0}),B.prototype.goToPaymentList=function(){this.paymentLibComponent.viewName="payment-list"},B.prototype.goToCaseTransationPage=function(e){var t=this;e.preventDefault(),this.paymentLibComponent.isFromServiceRequestPage?(this.OrderslistService.getorderRefs().subscribe(function(e){return t.orderRef=e}),this.OrderslistService.getorderCCDEvents().subscribe(function(e){return t.orderCCDEvent=e}),this.OrderslistService.getorderCreateds().subscribe(function(e){return t.orderCreated=e}),this.OrderslistService.getorderDetail().subscribe(function(e){return t.orderDetail=e}),this.OrderslistService.getorderPartys().subscribe(function(e){return t.orderParty=e}),this.OrderslistService.getorderRemissionTotals().subscribe(function(e){return t.orderRemissionTotal=e}),this.OrderslistService.getorderFeesTotals().subscribe(function(e){return t.orderFeesTotal=e}),this.OrderslistService.getoorderTotalPaymentss().subscribe(function(e){return t.orderTotalPayments=e}),this.viewStatus="order-full-view"):(this.OrderslistService.setnavigationPage("casetransactions"),this.OrderslistService.setisFromServiceRequestPage(!1),this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.ISBSENABLE=!0,this.resetOrderData())},B.prototype.addRemission=function(e){var t=this;this.chkForAddRemission(e.code)&&(this.feeId=e,this.paymentViewService.getApportionPaymentDetails(this.paymentGroup.payments[0].reference).subscribe(function(e){t.paymentGroup=e,t.paymentGroup.payments=t.paymentGroup.payments.filter(function(e){return e.reference.includes(t.paymentLibComponent.paymentReference)}),t.payment=t.paymentGroup.payments[0],t.paymentLibComponent.isFromPaymentDetailPage=!0,t.viewStatus="addremission",t.isRefundRemission=!0,t.cd.detectChanges()},function(e){return t.errorMessage=e}))},B.prototype.checkForFees=function(e){return null!==e&&e!==undefined&&null!==e.fees&&e.fees!==undefined},B.prototype.addRefundForRemission=function(e,t,n){var s=this;this.chkIsRefundRemissionBtnEnable()&&(this.payment=e,this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(function(e){s.paymentGroup=e,s.paymentGroup.payments=s.paymentGroup.payments.filter(function(e){return e.reference.includes(s.payment.reference)}),s.payment=s.paymentGroup.payments[0],s.remissions=t,s.remissionFeeAmt=n.filter(function(e){return e.code===s.remissions.fee_code})[0].net_amount,s.viewStatus="addrefundforremission"},function(e){return s.errorMessage=e}))},B.prototype.chkIsRefundRemissionBtnEnable=function(){var t=this;if(null!==this.paymentGroup&&this.paymentGroup!==undefined)return this.paymentGroup.payments.forEach(function(e){"payment by account"===e.method.toLocaleLowerCase()&&"success"===e.status.toLocaleLowerCase()&&t.allowFurtherAccessAfter4Days(e)&&(t.isRefundRemissionBtnEnable=!0)}),!!this.isRefundRemissionBtnEnable},B.prototype.issueRefund=function(e){null!==e&&e!==undefined&&this.chkIssueRefundBtnEnable(e.payments[0])&&(this.paymentGroup=e,this.viewStatus="issuerefund",this.isRefundRemission=!0,this.paymentLibComponent.isFromPaymentDetailPage=!0,this.isFromPaymentDetailPage=!0,this.isFromServiceRequestPage=this.paymentLibComponent.isFromServiceRequestPage)},B.prototype.getRemissionByFeeCode=function(e,t){var n,s;if(t&&0<t.length)try{for(var a=F(t),o=a.next();!o.done;o=a.next()){var r=o.value;if(r.fee_code===e)return r}}catch(i){n={error:i}}finally{try{o&&!o.done&&(s=a["return"])&&s.call(a)}finally{if(n)throw n.error}}return null},B.prototype.chkIssueRefundBtnEnable=function(e){return this.check4AllowedRoles2AccessRefund()&&this.allowFurtherAccessAfter4Days(e)&&"payment by account"===e.method&&"success"===e.status.toLocaleLowerCase()&&(this.isIssueRefunfBtnEnable=!0),!!this.isIssueRefunfBtnEnable},B.prototype.chkForPBAPayment=function(){if(null!==this.paymentGroup&&this.paymentGroup!==undefined){var e=this.paymentGroup.payments[0];return"payment by account"===e.method.toLocaleLowerCase()&&this.allowFurtherAccessAfter4Days(e)?!0:!1}},B.prototype.chkForAddRemission=function(e){var t,n;if(this.chkForPBAPayment()&&this.check4AllowedRoles2AccessRefund()&&this.allowFurtherAccessAfter4Days(this.paymentGroup.payments[0])){if(this.paymentGroup.remissions&&0<this.paymentGroup.remissions.length){try{for(var s=F(this.paymentGroup.remissions),a=s.next();!a.done;a=s.next())if(a.value.fee_code===e)return!1}catch(o){t={error:o}}finally{try{a&&!a.done&&(n=s["return"])&&n.call(s)}finally{if(t)throw t.error}}return!0}return!0}return!1},B.prototype.resetOrderData=function(){this.OrderslistService.setOrderRef(null),this.OrderslistService.setorderCCDEvent(null),this.OrderslistService.setorderCreated(null),this.OrderslistService.setorderDetail(null),this.OrderslistService.setorderParty(null),this.OrderslistService.setorderTotalPayments(null),this.OrderslistService.setorderRemissionTotal(null),this.OrderslistService.setorderFeesTotal(null)},B.decorators=[{type:f.Component,args:[{selector:"ccpay-payment-view",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">£{{ 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 \x3c!-- <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> --\x3e\n \x3c!-- <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> --\x3e\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 \x3c!-- Status histories --\x3e\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 \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}">£{{ 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}">£{{ 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\n\n \n \x3c!-- <button *ngIf="paymentGroup.payments[0].method === \'payment by account\'" (click)="addRemission(fee)" class="govuk-button govuk-button--secondary"> Add remission</button>\n --\x3e\n\n </div>\n\n \x3c!-- remissions --\x3e\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 \x3c!-- <td *ngIf="!chkIsRefundRemissionBtnEnable()" class="govuk-table__cell refundBtn whitespace-inherit" >\n \n </td> --\x3e\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\n\n\n \x3c!-- card details --\x3e\n \x3c!-- <ccpay-card-details *ngIf="isCardPayment && !isTelephonyPayment"></ccpay-card-details> --\x3e\n\n \x3c!-- pba details --\x3e\n \x3c!-- <ccpay-pba-details *ngIf="!isCardPayment" [payment]="paymentGroup.payments[0]"></ccpay-pba-details> --\x3e\n\n \n\n </div>\n\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[isOldPcipalOff]="isOldPcipalOff" \n[viewCompStatus]= "viewStatus"\n[isNewPcipalOff]="isNewPcipalOff" \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[isOldPcipalOff]="isOldPcipalOff" \n[viewCompStatus]= "viewStatus"\n[isNewPcipalOff]="isNewPcipalOff" \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 [isOldPcipalOff]="isOldPcipalOff" \n [payment] = \'paymentGroup.payments[0]\'\n [viewCompStatus]= "viewStatus"\n [isNewPcipalOff]="isNewPcipalOff" \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</ccpay-service-request>\n</ng-container>\n\x3c!-- <ng-container *ngIf="isTakePayment">\n <div class="govuk-width-container">\n <div class="govuk-breadcrumbs">\n <ol class="govuk-breadcrumbs__list">\n <li class="govuk-breadcrumbs__list-item">\n <a href="#" (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">\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 <tr class="section" *ngIf="isTurnOff">\n <td class="bold tb-col-w">Payment group reference</td>\n <td>{{ paymentGroup.payment_group_reference }}</td>\n </tr>\n <tr class="section">\n <td class="bold tb-col-w">Payment reference</td>\n <td>{{ paymentGroup.payments[0].reference }}</td>\n </tr>\n <tr class="section">\n <td class="bold tb-col-w">Payment amount</td>\n <td>£{{ paymentGroup.payments[0].amount | number:\'.2\' }}</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>{{ paymentGroup.payments[0].external_reference }}</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>{{ 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>{{ paymentGroup.payments[0].banked_date | date:\'dd MMM yyyy\' }}</td>\n </tr>\n </tbody>\n </table>\n \n <div class="govuk-grid-row" *ngIf="paymentGroup.fees.length > 0">\n <div class="column">\n <h2 class="heading-large">Fee and remission details</h2>\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>Application for {{ fee.description }}</td>\n </tr>\n <tr class="section">\n <td class="bold tb-col-w">Fee code</td>\n <td>{{ 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 }">£{{ fee.calculated_amount | number:\'.2\' }}</td>\n </tr>\n <tr *ngIf="fee.net_amount && isTurnOff">\n <td class="bold tb-col-w" [ngClass]="{\'tr-border\': !fee.apportion_amount && !fee.remissions}" >Net amount</td>\n <td [ngClass]="{\'tr-border\': !fee.apportion_amount && !fee.remissions}">£{{ fee.net_amount | number:\'.2\' }}</td>\n </tr>\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}">£{{ fee.apportion_amount | number:\'.2\' }}</td>\n </tr>\n \n <tr *ngIf="fee.remissions">\n <td class="bold tb-col-w">Remission code</td>\n <td>{{fee.remissions.hwf_reference}}</td>\n </tr>\n <tr *ngIf="fee.remissions">\n <td class="bold tb-col-w tr-border">Remission amount</td>\n <td class="tr-border">£{{ fee.remissions.hwf_amount | number:\'.2\'}}</td>\n </tr>\n </tbody>\n </table>\n \n </div>\n \n \x3c!-- card details --\x3e\n \x3c!-- <ccpay-card-details *ngIf="isCardPayment && !isTelephonyPayment"></ccpay-card-details>\n --\x3e\n \x3c!-- pba details --\x3e\n \x3c!-- <ccpay-pba-details *ngIf="!isCardPayment" [payment]="paymentGroup.payments[0]"></ccpay-pba-details> --\x3e\n \x3c!-- Status histories --\x3e\n \x3c!-- <ccpay-payment-statuses *ngIf="isStatusAllocated"[isTakePayment]="isTakePayment" ></ccpay-payment-statuses>\n \n </div>\n \n </main>\n </div> --\x3e\n\x3c!-- </ng-container> --\x3e \n',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}"]}]}],B.ctorParameters=function(){return[{type:D},{type:k},{type:f.ChangeDetectorRef},{type:b}]},B.propDecorators={isTurnOff:[{type:f.Input}],isTakePayment:[{type:f.Input}],caseType:[{type:f.Input}],isNewPcipalOff:[{type:f.Input}],isOldPcipalOff:[{type:f.Input}],orderRef:[{type:f.Input}],orderStatus:[{type:f.Input}],orderTotalPayments:[{type:f.Input}],payment:[{type:f.Input}],LOGGEDINUSERROLES:[{type:f.Input}],orderParty:[{type:f.Input}],orderCreated:[{type:f.Input}],orderCCDEvent:[{type:f.Input}],orderFeesTotal:[{type:f.Input}],orderRemissionTotal:[{type:f.Input}],orderDetail:[{type:f.Input}]},B);function B(e,t,n,s){var a=this;this.paymentViewService=e,this.paymentLibComponent=t,this.cd=n,this.OrderslistService=s,this.isRefundRemission=!1,this.isAddFeeBtnEnabled=!1,this.isIssueRefunfBtnEnable=!1,this.allowedRolesToAccessRefund=["payments-refund-approver","payments-refund"],this.remissions=[],this.check4AllowedRoles2AccessRefund=function(){return a.allowedRolesToAccessRefund.some(function(e){return-1!==a.LOGGEDINUSERROLES.indexOf(e)})},this.allowFurtherAccessAfter4Days=function(e){if(null!==e&&e!==undefined){var t=new Date;return t.setDate(t.getDate()-4),t>=new Date(e.date_created)}}}var M=(G.prototype.getRefundReasons=function(){return this.http.get(this.paymentLibService.REFUNDS_API_ROOT+"/reasons",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},G.prototype.getRefundRejectReasons=function(){return this.http.get(this.paymentLibService.REFUNDS_API_ROOT+"/rejection-reasons",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},G.prototype.getRefundActions=function(e){return this.http.get(this.paymentLibService.REFUNDS_API_ROOT+"/"+e+"/actions",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},G.prototype.patchRefundActions=function(e,t,n){return this.https.patch(this.paymentLibService.REFUNDS_API_ROOT+"/"+t+"/action/"+n,e).pipe(a.catchError(this.errorHandlerService.handleError))},G.prototype.getRefundList=function(e,t){return this.http.get(this.paymentLibService.REFUNDS_API_ROOT+"?status="+e+"&excludeCurrentUser="+t,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},G.prototype.getRefundStatusHistory=function(e){return this.http.get(this.paymentLibService.REFUNDS_API_ROOT+"/"+e+"/status-history",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},G.prototype.getRefundStatusList=function(e){return this.http.get(this.paymentLibService.REFUNDS_API_ROOT+"?ccdCaseNumber="+e,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},G.prototype.getUserDetails=function(){return this.http.get(this.paymentLibService.REFUNDS_API_ROOT+"/get-user-details",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},G.prototype.postIssueRefund=function(e){return this.https.post(this.paymentLibService.REFUNDS_API_ROOT+"/refund",e).pipe(a.catchError(this.errorHandlerService.handleError))},G.prototype.patchResubmitRefund=function(e,t){return this.https.patch(this.paymentLibService.REFUNDS_API_ROOT+"/resubmit/"+t,e).pipe(a.catchError(this.errorHandlerService.handleError))},G.prototype.addHeaders=function(t){var e=this.meta.getTag("name=csrf-token"),n={};return t.headers&&t.headers.forEach(function(e){n[e]=t.headers.get(e)}),n["X-Requested-With"]="XMLHttpRequest",null===e.content&&document.cookie.split(";").find(function(e){return e.startsWith("XSRF-TOKEN")})!==undefined?n["CSRF-Token"]=document.cookie.split(";").find(function(e){return e.startsWith(" XSRF-TOKEN")}).split("=")[1]:n["CSRF-Token"]=e.content,t.headers=new s.HttpHeaders(n),t.responseType="text",t},G.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],G.ctorParameters=function(){return[{type:s.HttpClient},{type:T},{type:S},{type:y},{type:n.Meta}]},G.ngInjectableDef=f.defineInjectable({factory:function(){return new G(f.inject(s.HttpClient),f.inject(T),f.inject(S),f.inject(y),f.inject(n.Meta))},token:G,providedIn:"root"}),G);function G(e,t,n,s,a){this.http=e,this.https=t,this.errorHandlerService=n,this.paymentLibService=s,this.meta=a}var U=(H.prototype.ngOnInit=function(){var t=this;this.viewStatus="RefundProcess",this.RefundsService.getRefundActions(this.refundReference).subscribe(function(e){t.refundActionList=e},function(e){t.errorMessage=t.getErrorMessage(!0,e.statusCode,e.err,e)}),this.processRefundForm=this.formBuilder.group({refundActionField:new g.FormControl("",g.Validators.compose([g.Validators.required])),refundRejectReasonField:new g.FormControl("",g.Validators.compose([g.Validators.required])),sendMeBackField:new g.FormControl("",g.Validators.compose([g.Validators.required,g.Validators.minLength(3),g.Validators.maxLength(255),g.Validators.pattern("^([a-zA-Z0-9\\s,\\.]*)$")])),enterReasonField:new g.FormControl("",g.Validators.compose([g.Validators.required,g.Validators.maxLength(30),g.Validators.pattern("^([a-zA-Z0-9.\\s]*)$")]))}),this.ccdCaseNumber=this.refundlistsource.ccd_case_number,("string"==typeof this.paymentLibComponent.TAKEPAYMENT&&"false"===this.paymentLibComponent.TAKEPAYMENT||"boolean"==typeof this.paymentLibComponent.TAKEPAYMENT&&!this.paymentLibComponent.TAKEPAYMENT)&&(this.isFromRefundListPage=!0)},H.prototype.checkRefundActions=function(e){var t=this;this.refundActionsHasError=!1,this.isReasonFieldEmpty=!1,this.isReasonEmpty=!1,this.isReasonInvalid=!1,this.refundRejectReasonHasError=!1,"Return to caseworker"===e?(this.isConfirmButtondisabled=!0,this.isSendMeBackClicked=!0,this.isRejectClicked=!1,this.isOtherClicked=!1):"Approve"===e?(this.isSendMeBackClicked=!1,this.isConfirmButtondisabled=!1,this.isRejectClicked=!1,this.isOtherClicked=!1):"Reject"===e?(this.isRejectClicked=!0,this.isSendMeBackClicked=!1,this.isOtherClicked=!1,this.RefundsService.getRefundRejectReasons().subscribe(function(e){t.refundRejectReasonList=e},function(e){t.errorMessage=t.getErrorMessage(!0,e.statusCode,e.err,e)})):"RE005"===e?this.isOtherClicked=!0:"RE005"!==e&&(this.isOtherClicked=!1)},H.prototype.processRefundSubmit=function(){var e,t,n=this;this.resetForm([!1,!1,!1,!1,!1,!1,!1,!1],"all");var s=this.processRefundForm.controls,a=s.sendMeBackField.errors;this.processRefundForm.dirty&&s.refundActionField.valid&&("Approve"==s.refundActionField.value||"Reject"==s.refundActionField.value&&s.refundRejectReasonField.valid&&"RE005"!=s.refundRejectReasonField.value||"Reject"==s.refundActionField.value&&"RE005"==s.refundRejectReasonField.value&&s.enterReasonField.valid||"Return to caseworker"==s.refundActionField.value&&s.sendMeBackField.valid)?("Approve"===s.refundActionField.value?(t="APPROVE",e={code:"",reason:""}):"Reject"===s.refundActionField.value?(t="REJECT",e={code:s.refundRejectReasonField.value||"",reason:"RE005"==s.refundRejectReasonField.value?s.enterReasonField.value:""}):"Return to caseworker"===s.refundActionField.value&&(t="SENDBACK",e={code:"",reason:s.sendMeBackField.value}),this.RefundsService.patchRefundActions(e,this.refundReference,t).subscribe(function(e){n.isSuccesspageEnable=!0,n.successMsg=e.replace(/['"]+/g,"")},function(e){n.errorMessage=n.getErrorMessage(!0,e.statusCode,e.err,e)})):(""==s.refundActionField.value&&this.resetForm([!0,!1,!1,!1,!1,!1,!1,!1],"action"),"Reject"==s.refundActionField.value&&""==s.refundRejectReasonField.value&&this.resetForm([!1,!0,!1,!1,!1,!1,!1,!1],"rejectReason"),"Return to caseworker"==s.refundActionField.value&&(""==s.sendMeBackField.value&&this.resetForm([!1,!1,!0,!1,!1,!1,!1,!1],"addAreason"),""!=s.sendMeBackField.value&&s.sendMeBackField.invalid&&this.resetForm([!1,!1,!1,!0,!1,!1,!1,!1],"addAreason"),a&&a.minlength&&a.minlength.actualLength<3&&this.resetForm([!1,!1,!1,!1,!0,!1,!1,!1],"addAreason"),a&&a.maxlength&&255<a.maxlength.actualLength&&this.resetForm([!1,!1,!1,!1,!1,!0,!1,!1],"addAreason")),"Reject"==s.refundActionField.value&&"RE005"==s.refundRejectReasonField.value&&(""===s.enterReasonField.value&&this.resetForm([!1,!1,!1,!1,!1,!1,!0,!1],"enterReason"),""!==s.enterReasonField.value&&s.enterReasonField.invalid&&this.resetForm([!1,!1,!1,!1,!1,!1,!1,!0],"enterReason")))},H.prototype.getErrorMessage=function(e,t,n,s){var a="Please try again later";return{title:"Something went wrong",body:a=500!==t?n!==undefined?n:s:a,showError:e}},H.prototype.loadRefundListPage=function(){var t=this;this.OrderslistService.getnavigationPageValue().subscribe(function(e){return t.navigationpage=e}),this.navigationpage,this.paymentLibComponent.viewName="refundstatuslist",this.paymentLibComponent.isRefundStatusView=!0},H.prototype.loadRefundsHomePage=function(){"string"==typeof this.paymentLibComponent.TAKEPAYMENT&&"false"===this.paymentLibComponent.TAKEPAYMENT?this.paymentLibComponent.viewName="refund-list":(this.OrderslistService.setnavigationPage("casetransactions"),this.OrderslistService.setisFromServiceRequestPage(!1),this.paymentLibComponent.VIEW="case-transactions",this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.ISBSENABLE=!0,this.paymentLibComponent.isRefundStatusView=!1)},H.prototype.redirecttoRefundListPage=function(){"string"==typeof this.paymentLibComponent.TAKEPAYMENT&&"false"===this.paymentLibComponent.TAKEPAYMENT||"boolean"==typeof this.paymentLibComponent.TAKEPAYMENT&&!this.paymentLibComponent.TAKEPAYMENT?this.paymentLibComponent.viewName="refund-list":this.loadRefundListPage()},H.prototype.resetForm=function(e,t){"action"!==t&&"all"!==t||(this.refundActionsHasError=e[0]),"rejectReason"!==t&&"all"!==t||(this.refundRejectReasonHasError=e[1]),"addAreason"!==t&&"all"!==t||(this.isReasonFieldEmpty=e[2],this.isReasonFieldInvalid=e[3],this.reasonFieldMinHasError=e[4],this.reasonFieldMaxHasError=e[5]),"enterReason"!==t&&"all"!==t||(this.isReasonEmpty=e[6],this.isReasonInvalid=e[7])},H.prototype.goToCaseReview=function(){this.router.navigate(["/cases/case-details/"+this.ccdCaseNumber],{relativeTo:this.activeRoute})},H.decorators=[{type:f.Component,args:[{selector:"ccpay-process-refund",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',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}"]}]}],H.ctorParameters=function(){return[{type:M},{type:g.FormBuilder},{type:b},{type:k},{type:h.Router},{type:h.ActivatedRoute}]},H.propDecorators={refundReference:[{type:f.Input}],refundlistsource:[{type:f.Input}]},H);function H(e,t,n,s,a,o){this.RefundsService=e,this.formBuilder=t,this.OrderslistService=n,this.paymentLibComponent=s,this.router=a,this.activeRoute=o,this.errorMessage=this.getErrorMessage(!1,"","",""),this.sendmeback=null,this.refundActionList=[],this.refundRejectReasonList=[],this.isSendMeBackClicked=!1,this.isRejectClicked=!1,this.isOtherClicked=!1,this.isSuccesspageEnable=!1,this.refundActionsHasError=!1,this.refundRejectReasonHasError=!1,this.isReasonFieldEmpty=!1,this.isReasonFieldInvalid=!1,this.reasonFieldMinHasError=!1,this.reasonFieldMaxHasError=!1,this.isReasonEmpty=!1,this.isReasonInvalid=!1,this.successMsg=null,this.isConfirmButtondisabled=!0}var V=(j.prototype.ngOnInit=function(){var t=this;this.userLst=this.LOGGEDINUSERROLES,this.LOGGEDINUSERROLES.some(function(e){return e.includes("payments-refund-approver")})?this.isAuthorized=!0:(this.isApproveTableVisible=!1,this.isAuthorized=!1),this.tableApprovalHeader="Refunds to be approved",this.tableRejectedHeader="Refunds returned to caseworker",this.isAuthorized&&this.refundService.getRefundList(this.approvalStatus,!0).subscribe(function(e){t.submittedRefundList=e.refund_list,t.isApproveTableVisible=!0}),this.refundService.getRefundList(this.rejectStatus,!1).subscribe(function(e){t.rejectedRefundList=e.refund_list,t.isRejectTableVisible=!0})},j.decorators=[{type:f.Component,args:[{selector:"ccpay-refund-list",template:'\n\n<div class="hmcts-page-heading">\n <div class="hmcts-page-heading__title">\n <h1 class="govuk-heading-xl">Refund list</h1>\n </div>\n</div>\n\n<ng-container *ngIf="isAuthorized">\n<div class="hmcts-page-heading">\n <div class="hmcts-page-heading__title">\n <h2 class="govuk-heading-l">{{tableApprovalHeader}}</h2>\n </div>\n </div>\n <div *ngIf="!isApproveTableVisible">\n <div class="govuk-label dropdpwn" >No records to display</div>\n </div>\n</ng-container>\n \n<ng-container *ngIf="isApproveTableVisible">\n \n <div><ccpay-table [DATASOURCE]="submittedRefundList" [STATUS]="approvalStatus" [errorMessage]="errorMessage"></ccpay-table></div>\n</ng-container>\n\n\n<div class="hmcts-page-heading">\n <div class="hmcts-page-heading__title">\n <h2 class="govuk-heading-l">{{tableRejectedHeader}}</h2>\n </div>\n \n </div>\n <div *ngIf="!isRejectTableVisible">\n <div class="govuk-label dropdpwn">No records to display</div>\n </div>\n<ng-container *ngIf="isRejectTableVisible">\n \n <div><ccpay-table [DATASOURCE]="rejectedRefundList" [STATUS]="rejectStatus" [errorMessage]="errorMessage"></ccpay-table></div>\n</ng-container>\n\n\n',styles:[".govuk-heading-xl{font-size:48px;padding-top:1em}.govuk-heading-l{font-size:36px}.govuk-label{font-size:19px}.hmcts-page-heading{width:110%}"]}]}],j.ctorParameters=function(){return[{type:M}]},j.propDecorators={USERID:[{type:f.Input,args:["USERID"]}],LOGGEDINUSERROLES:[{type:f.Input,args:["LOGGEDINUSERROLES"]}],LOGGEDINUSEREMAIL:[{type:f.Input,args:["LOGGEDINUSEREMAIL"]}]},j);function j(e){this.refundService=e,this.submittedRefundList=[],this.rejectedRefundList=[],this.approvalStatus="Sent for approval",this.rejectStatus="Update required",this.errorMessage=null,this.isAuthorized=!0}var q=(z.prototype.getCardDetails=function(e){return this.logger.info("Card-detail-service getCardDetails for: ",e),this.http.get(this.paymentLibService.API_ROOT+"/card-payments/"+e+"/details",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},z.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],z.ctorParameters=function(){return[{type:s.HttpClient},{type:w},{type:S},{type:y}]},z.ngInjectableDef=f.defineInjectable({factory:function(){return new z(f.inject(s.HttpClient),f.inject(w),f.inject(S),f.inject(y))},token:z,providedIn:"root"}),z);function z(e,t,n,s){this.http=e,this.logger=t,this.errorHandlerService=n,this.paymentLibService=s}var Y=(W.prototype.ngOnInit=function(){var t=this;this.cardDetailsService.getCardDetails(this.paymentLibComponent.paymentReference).subscribe(function(e){return t.cardDetails=e},function(e){return t.errorMessage=e})},Object.defineProperty(W.prototype,"getPaymentReference",{get:function(){return this.paymentReference},enumerable:!0,configurable:!0}),W.decorators=[{type:f.Component,args:[{selector:"ccpay-card-details",template:'\n<div class="column">\n <h2 class="heading-medium">Payment method</h2>\n</div>\n\n<div role="group" aria-labelledby="failure-error-summary-heading" tabindex="-1" *ngIf="errorMessage">\n Payment method unavailable, The payment has either expired or unsuccessful.\n</div>\n\n<div *ngIf="!errorMessage && cardDetails">\n\n<table>\n <tbody>\n <tr>\n <td class="bold tb-col-w">Method</td>\n <td>Card</td>\n </tr>\n <tr>\n <td class="bold tb-col-w">Type</td>\n <td>{{ cardDetails.card_brand }}</td>\n </tr>\n </tbody>\n</table>\n</div>\n\n',styles:[".tb-col-w{width:330px}"]}]}],W.ctorParameters=function(){return[{type:q},{type:k}]},W);function W(e,t){this.cardDetailsService=e,this.paymentLibComponent=t,this.pageTitle="Card details"}var $=(J.decorators=[{type:f.Component,args:[{template:"\n <h1>This is not the page you were looking for!</h1>\n "}]}],J);function J(){}var K=(Z.prototype.getPaymentStatusesByReference=function(e,t){return this.logger.info("Status-history-service getPaymentStatusesByReference for: ",e),this.http.get("card"===t||"cash"===t||"cheque"===t||"postal order"===t?this.paymentLibService.API_ROOT+"/card-payments/"+e+"/statuses":this.paymentLibService.API_ROOT+"/credit-account-payments/"+e+"/statuses",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},Z.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],Z.ctorParameters=function(){return[{type:s.HttpClient},{type:w},{type:S},{type:y}]},Z.ngInjectableDef=f.defineInjectable({factory:function(){return new Z(f.inject(s.HttpClient),f.inject(w),f.inject(S),f.inject(y))},token:Z,providedIn:"root"}),Z);function Z(e,t,n,s){this.http=e,this.logger=t,this.errorHandlerService=n,this.paymentLibService=s}var X=(Q.prototype.ngOnInit=function(){var t=this;this.statusHistoryService.getPaymentStatusesByReference(this.paymentLibComponent.paymentReference,this.paymentLibComponent.paymentMethod).subscribe(function(e){return t.statuses=e},function(e){return t.errorMessage=e.replace(/"/g,"")})},Q.decorators=[{type:f.Component,args:[{selector:"ccpay-payment-statuses",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">£{{ 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',styles:[""]}]}],Q.ctorParameters=function(){return[{type:K},{type:k}]},Q.propDecorators={isTakePayment:[{type:f.Input}]},Q);function Q(e,t){this.statusHistoryService=e,this.paymentLibComponent=t,this.pageTitle="Payment status history"}var ee=(te.prototype.ngOnInit=function(){},te.decorators=[{type:f.Component,args:[{selector:"ccpay-pba-details",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',styles:[".capitalize::first-letter{text-transform:uppercase}.tb-col-w{width:330px}"]}]}],te.ctorParameters=function(){return[]},te.propDecorators={payment:[{type:f.Input}]},te);function te(){}var ne=function(){return undefined},se=(Object.defineProperty(ae.prototype,"info",{get:function(){return ne},enumerable:!0,configurable:!0}),Object.defineProperty(ae.prototype,"warn",{get:function(){return ne},enumerable:!0,configurable:!0}),Object.defineProperty(ae.prototype,"error",{get:function(){return ne},enumerable:!0,configurable:!0}),ae.prototype.invokeConsoleMethod=function(e,t){(console[e]||console.log||ne).apply(console,[t])},ae.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],ae.ngInjectableDef=f.defineInjectable({factory:function(){return new ae},token:ae,providedIn:"root"}),ae);function ae(){}var oe=(re.prototype.getPaymentGroups=function(e){return this.logger.info("Case-transactions-service getPaymentGroups for: ",e),this.http.get(this.paymentLibService.API_ROOT+"/cases/"+e+"/paymentgroups",{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},re.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],re.ctorParameters=function(){return[{type:s.HttpClient},{type:w},{type:S},{type:y}]},re.ngInjectableDef=f.defineInjectable({factory:function(){return new re(f.inject(s.HttpClient),f.inject(w),f.inject(S),f.inject(y))},token:re,providedIn:"root"}),re);function re(e,t,n,s){this.http=e,this.logger=t,this.errorHandlerService=n,this.paymentLibService=s}var ie=(le.prototype.getBSPaymentsByCCD=function(e){return this.http.get(this.paymentLibService.BULKSCAN_API_ROOT+"/cases/"+e,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},le.prototype.getBSPaymentsByDCN=function(e){return this.http.get(this.paymentLibService.BULKSCAN_API_ROOT+"/cases?document_control_number="+e,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},le.prototype.postBSAllocatePayment=function(e,t){return this.https.post(this.paymentLibService.API_ROOT+"/payment-groups/"+t+"/bulk-scan-payments",e).pipe(a.catchError(this.errorHandlerService.handleError))},le.prototype.postBSPaymentStrategic=function(e,t){return this.https.post(this.paymentLibService.API_ROOT+"/payment-groups/"+t+"/bulk-scan-payments-strategic",e).pipe(a.catchError(this.errorHandlerService.handleError))},le.prototype.postBSWoPGStrategic=function(e){return this.https.post(this.paymentLibService.API_ROOT+"/payment-groups/bulk-scan-payments-strategic",e).pipe(a.catchError(this.errorHandlerService.handleError))},le.prototype.patchBSChangeStatus=function(e,t){return this.https.patch(this.paymentLibService.API_ROOT+"/bulk-scan-payments/"+e+"/status/"+t,t).pipe(a.catchError(this.errorHandlerService.handleError))},le.prototype.calculateOutStandingAmount=function(e){var t=0,n=0,s=0;return e.fees&&e.fees.forEach(function(e){t+=e.calculated_amount}),e.payments&&e.payments.forEach(function(e){"SUCCESS"===e.status.toUpperCase()&&(n+=e.amount)}),e.remissions&&e.remissions.forEach(function(e){s+=e.hwf_amount}),t-s-n},le.prototype.removeUnwantedString=function(e,t){return e.replace(/[\_]/gi,t)},le.prototype.downloadSelectedReport=function(e,t,n){return this.https.get(this.paymentLibService.BULKSCAN_API_ROOT+"/report/data?date_from="+t+"&date_to="+n+"&report_type="+e,{withCredentials:!0}).pipe(a.catchError(this.errorHandlerService.handleError))},le.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],le.ctorParameters=function(){return[{type:s.HttpClient},{type:T},{type:S},{type:y}]},le.ngInjectableDef=f.defineInjectable({factory:function(){return new le(f.inject(s.HttpClient),f.inject(T),f.inject(S),f.inject(y))},token:le,providedIn:"root"}),le);function le(e,t,n,s){this.http=e,this.https=t,this.errorHandlerService=n,this.paymentLibService=s}var ce=(de.prototype.ngOnInit=function(){var t=this;this.navigationpage="",null!==this.OrderslistService.getpaymentPageView()&&this.OrderslistService.getpaymentPageView().subscribe(function(e){return t.paymentView=e}),this.LOGGEDINUSERROLES!==undefined&&0!==this.LOGGEDINUSERROLES.length||null===this.OrderslistService.getUserRolesList()||this.OrderslistService.getUserRolesList().subscribe(function(e){return t.LOGGEDINUSERROLES=e}),null!==this.OrderslistService.getnavigationPageValue()&&this.OrderslistService.getnavigationPageValue().subscribe(function(e){return t.navigationpage=e}),this.paymentView!==undefined&&null!==this.paymentView&&this.paymentView.payment_group_reference!==undefined&&"paymentdetailspage"===this.navigationpage&&this.goToPayementView(this.paymentView.payment_group_reference,this.paymentView.reference,this.paymentView.method),this.isGrpOutstandingAmtPositive=!1,this.ccdCaseNumber=this.paymentLibComponent.CCD_CASE_NUMBER,this.caseType=this.paymentLibComponent.CASETYPE,""===this.paymentLibComponent.CCD_CASE_NUMBER&&(this.ccdCaseNumber=this.paymentLibComponent.EXC_REFERENCE),this.excReference=this.paymentLibComponent.EXC_REFERENCE,this.takePayment=this.paymentLibComponent.TAKEPAYMENT,this.servicerequest=this.paymentLibComponent.SERVICEREQUEST.toString(),"true"===this.paymentLibComponent.SERVICEREQUEST.toString()?this.serviceRequestValue="true":this.serviceRequestValue="false",this.isBulkScanEnable=this.paymentLibComponent.ISBSENABLE,this.dcnNumber=this.paymentLibComponent.DCN_NUMBER,this.selectedOption=this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase(),this.isTurnOff=this.paymentLibComponent.ISTURNOFF,this.isNewPcipalOff=this.paymentLibComponent.ISNEWPCIPALOFF,this.isOldPcipalOff=this.paymentLibComponent.ISOLDPCIPALOFF,this.isStrategicFixEnable=this.paymentLibComponent.ISSFENABLE,this.isTurnOff?this.caseTransactionsService.getPaymentGroups(this.ccdCaseNumber).subscribe(function(e){t.isAnyFeeGroupAvilable=!0,t.paymentGroups=e.payment_groups,t.calculateAmounts(),t.calculateOrderFeesAmounts(),t.totalRefundAmount=t.calculateRefundAmount(),t.paymentViewService.getPartyDetails(t.ccdCaseNumber).subscribe(function(e){t.cpoDetails=JSON.parse(e).content[0]},function(e){t.errorMessage=e.replace(/"/g,""),t.setDefaults(),t.isCPODown=!0})},function(e){t.errorMessage=e.replace(/"/g,""),t.isAnyFeeGroupAvilable=!1,t.setDefaults()}):this.caseTransactionsService.getPaymentGroups(this.ccdCaseNumber).subscribe(function(e){t.isAnyFeeGroupAvilable=!0,t.paymentGroups=e.payment_groups,t.calculateAmounts(),t.calculateOrderFeesAmounts(),t.calculateRefundAmount(),t.isFromServiceRequestPage?(t.OrderslistService.getSelectedOrderRefId().subscribe(function(e){return t.orderRef=e}),t.goToOrderViewDetailSection(t.orderRef)):t.paymentViewService.getPartyDetails(t.ccdCaseNumber).subscribe(function(e){t.cpoDetails=JSON.parse(e).content[0]},function(e){t.errorMessage=e.replace(/"/g,""),t.isCPODown=!0})},function(e){t.errorMessage=e.replace(/"/g,""),t.isAnyFeeGroupAvilable=!1,t.setDefaults()}),this.paymentGroups!==undefined&&this.checkForExceptionRecord(),null!==this.OrderslistService.getisFromServiceRequestPages()&&this.OrderslistService.getisFromServiceRequestPages().subscribe(function(e){return t.isFromServiceRequestPage=e})},de.prototype.setDefaults=function(){this.totalPayments=0,this.totalRemissions=0,this.totalNonOffPayments=0,this.totalFees=0},de.prototype.getAllocationStatus=function(e){e=e.payment_allocation;return 0<e.length?e[0].allocation_status:"-"},de.prototype.checkForExceptionRecord=function(){var t=this;0!==this.paymentGroups.length||"ccdorexception"!==this.selectedOption.toLocaleLowerCase()&&"rc"!==this.selectedOption.toLocaleLowerCase()||this.bulkScaningPaymentService.getBSPaymentsByCCD(this.ccdCaseNumber).subscribe(function(e){e.data&&e.data.exception_record_reference&&0<e.data.exception_record_reference.length&&0<e.data.ccd_reference&&(t.isExceptionRecord=!1,t.isAddFeeBtnEnabled=!0),e.data&&e.data.exception_record_reference&&0<e.data.exception_record_reference.length&&e.data.ccd_reference===undefined&&(t.isExceptionRecord=!0,t.isAddFeeBtnEnabled=!1),e.data&&e.data.exception_record_reference&&e.data.exception_record_reference.length===undefined&&0<e.data.ccd_reference&&(t.isExceptionRecord=!1,t.isAddFeeBtnEnabled=!0)}),0===this.paymentGroups.length&&"dcn"===this.selectedOption.toLocaleLowerCase()&&(!(0<this.paymentLibComponent.CCD_CASE_NUMBER.length&&0<this.paymentLibComponent.EXC_REFERENCE.length)&&0===this.paymentLibComponent.CCD_CASE_NUMBER.length&&0<this.paymentLibComponent.EXC_REFERENCE.length?(this.isExceptionRecord=!0,this.isAddFeeBtnEnabled=!1):(this.isExceptionRecord=!1,this.isAddFeeBtnEnabled=!0)),0<this.paymentGroups.length&&this.paymentGroups.forEach(function(e){e.payments&&e.payments.forEach(function(e){e.case_reference!==undefined&&e.ccd_case_number===undefined?(t.isExceptionRecord=!0,t.isAddFeeBtnEnabled=!1):(t.isExceptionRecord=!1,t.isAddFeeBtnEnabled=!0)})})},de.prototype.calculateOrderFeesAmounts=function(){var t=this;this.paymentGroups.forEach(function(e){t.resetOrderVariables(),e.fees&&e.fees.forEach(function(e){t.orderFeesTotal=t.orderFeesTotal+e.calculated_amount}),e.remissions&&e.remissions.forEach(function(e){t.orderRemissionTotal=t.orderRemissionTotal+e.hwf_amount}),e.payments&&e.payments.forEach(function(e){"SUCCESS"===e.status.toUpperCase()&&(t.orderTotalPayments=t.orderTotalPayments+e.amount)}),"Paid"===e.service_request_status?(t.orderStatus=e.service_request_status,t.orderAddBtnEnable=!1):"Partially paid"!==e.service_request_status&&"Not paid"!==e.service_request_status||(t.orderStatus=e.service_request_status,t.orderAddBtnEnable=!0),null!==t.cpoDetails?t.orderLevelFees.push({orderRefId:e.payment_group_reference,orderTotalFees:t.orderFeesTotal,orderStatus:t.orderStatus,orderParty:t.cpoDetails.responsibleParty,orderCCDEvent:t.cpoDetails.action,orderCreated:e.date_created,orderAddBtnEnable:t.orderAddBtnEnable}):t.orderLevelFees.push({orderRefId:e.payment_group_reference,orderTotalFees:t.orderFeesTotal,orderStatus:t.orderStatus,orderParty:"",orderCCDEvent:"",orderCreated:e.date_created,orderAddBtnEnable:t.orderAddBtnEnable}),"Paid"!==t.orderStatus&&t.OrderslistService.setOrdersList(t.orderLevelFees)})},de.prototype.resetOrderVariables=function(){this.orderFeesTotal=0,this.orderTotalPayments=0,this.orderRemissionTotal=0,this.orderPendingPayments=0,this.isAddFeeBtnEnabled=!0},de.prototype.goToOrderViewDetailSection=function(e){var t=this;this.isFromServiceRequestPage?(this.OrderslistService.setOrderRefId(e),this.orderRef=e):(this.OrderslistService.setOrderRefId(e.orderRefId),this.orderRef=e.orderRefId),this.orderFeesTotal=0,this.orderRemissionTotal=0,this.orderTotalPayments=0,this.orderPendingPayments=0,this.orderDetail=this.paymentGroups.filter(function(e){return e.payment_group_reference===t.orderRef}),this.orderDetail.forEach(function(e){e.fees&&e.fees.forEach(function(e){t.orderFeesTotal=t.orderFeesTotal+e.calculated_amount}),e.remissions&&(e.remissions.forEach(function(e){t.orderRemissionTotal=t.orderRemissionTotal+e.hwf_amount}),e.payments&&(t.payment=e.payments[0],e.payments.forEach(function(e){"SUCCESS"===e.status.toUpperCase()&&(t.orderTotalPayments=t.orderTotalPayments+e.amount)}))),t.orderStatus=e.service_request_status}),null!==this.cpoDetails?(this.orderParty=this.cpoDetails.responsibleParty,this.orderCreated=this.cpoDetails.createdTimestamp,this.orderCCDEvent=this.cpoDetails.action):(this.orderParty="",this.orderCCDEvent="",this.orderCreated=e.orderCreated),this.viewStatus="order-full-view"},de.prototype.redirectToOrderFeeSearchPage=function(e,t){t.orderAddBtnEnable&&(e.preventDefault(),this.paymentLibComponent.bspaymentdcn=null,this.paymentLibComponent.paymentGroupReference=t.orderRefId,this.paymentLibComponent.isTurnOff=this.isTurnOff,this.paymentLibComponent.viewName="fee-summary")},de.prototype.calculateAmounts=function(){var a=this,o=0,n=0,t=0,r=0;this.paymentGroups.forEach(function(s){s.fees&&s.fees.forEach(function(e){var t,n;a.isTurnOff?o+=e.calculated_amount:(e.date_created&&(t=e.amount_due===undefined,n=e.amount_due<=0,a.clAmountDue=t?a.clAmountDue+e.net_amount:n?a.clAmountDue+0:a.clAmountDue+e.amount_due),e.payment_group_reference=s.payment_group_reference),a.fees.push(e)}),a.isTurnOff&&(a.totalFees=o),s.payments&&s.payments.forEach(function(e){var t;a.isTurnOff?"SUCCESS"===e.status.toUpperCase()&&(n+=e.amount,a.payments.push(e)):(t=e.payment_allocation,"SUCCESS"===e.status.toUpperCase()&&(n+=e.amount,(0===t.length||0<t.length&&"Allocated"===t[0].allocation_status)&&(r+=e.amount),0<t.length&&a.nonPayments.push(e)),0===t.length&&a.payments.push(e)),e.paymentGroupReference=s.payment_group_reference,a.allPayments.push(e)}),a.totalPayments=n,a.isTurnOff||(a.totalNonOffPayments=r),s.remissions&&s.remissions.forEach(function(e){t+=e.hwf_amount,a.remissions.push(e)}),a.totalRemissions=t})},de.prototype.calculateRefundAmount=function(){var i=this;if(this.isTurnOff){var o=0,r=!1;return this.paymentGroups.forEach(function(e){var t,n=0,s=0,a=0;e.fees&&(i.isFeeRecordsExist=!0,e.fees.forEach(function(e){n+=e.calculated_amount,0===e.calculated_amount&&(r=!0)})),e.payments&&e.payments.forEach(function(e){"SUCCESS"===e.status.toUpperCase()&&(s+=e.amount)}),e.remissions&&e.remissions.forEach(function(e){a+=e.hwf_amount}),(t=n-a-s)<0?0===o?o=t:o+=t:(0<t||0==t&&r)&&(i.isGrpOutstandingAmtPositive=!0)}),-1*o}var l=!1;this.paymentGroups.forEach(function(e,n){var t,s=0,a=0,o=0,r=[];e.fees&&(e.fees.forEach(function(t){s+=t.calculated_amount,i.isRemissionsMatch=!1,e.remissions&&e.remissions.forEach(function(e){e.fee_code===t.code&&(i.isRemissionsMatch=!0,t.remissions=e,r.push(t))}),i.isRemissionsMatch||r.push(t),t.date_created?l=!0:(i.isHistoricGroupAvailable=!0,i.paymentGroups[n].old=!0)}),i.paymentGroups[n].fees=r),e.payments&&e.payments.forEach(function(e){"SUCCESS"===e.status.toUpperCase()&&(a+=e.amount)}),e.remissions&&e.remissions.forEach(function(e){o+=e.hwf_amount}),0<(t=s-o-a)&&l&&(i.isAnyFeeGroupAvilable=!0,i.isFeeRecordsExist=!0,i.paymentRef=e.payment_group_reference),e.fees&&0<e.fees.length&&t<=0&&l&&(i.isAnyFeeGroupAvilable=!1)}),(!l&&this.isHistoricGroupAvailable||!l&&!this.isHistoricGroupAvailable)&&(this.isAnyFeeGroupAvilable=!1)},de.prototype.getGroupOutstandingAmount=function(e){return this.bulkScaningPaymentService.calculateOutStandingAmount(e)},de.prototype.redirectToFeeSearchPage=function(e){e.preventDefault();e=this.isBulkScanEnable?"&isBulkScanning=Enable":"&isBulkScanning=Disable";e+=this.isTurnOff?"&isTurnOff=Enable":"&isTurnOff=Disable",e+=this.isStrategicFixEnable?"&isStFixEnable=Enable":"&isStFixEnable=Disable",e+=this.isNewPcipalOff?"&isNewPcipalOff=Enable":"&isNewPcipalOff=Disable",e+=this.isOldPcipalOff?"&isOldPcipalOff=Enable":"&isOldPcipalOff=Disable",e+="&caseType="+this.caseType,this.router.navigateByUrl("/fee-search?selectedOption="+this.selectedOption+"&ccdCaseNumber="+this.ccdCaseNumber+e)},de.prototype.addRemission=function(e){var t=this;this.chkForAddRemission(e.code)&&(this.feeId=e,this.viewStatus="addremission",this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(function(e){t.paymentGroup=e,t.paymentGroup.payments=t.paymentGroup.payments.filter(function(e){return e.reference.includes(t.paymentLibComponent.paymentReference)}),t.payment=t.paymentGroup.payments[0]},function(e){return t.errorMessage=e.replace(/"/g,"")}))},de.prototype.addRefundForRemission=function(e,t,n){var s=this;this.viewStatus="addrefundforremission",this.payment=e,this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(function(e){s.paymentGroup=e,s.paymentGroup.payments=s.paymentGroup.payments.filter(function(e){return e.reference.includes(s.payment.reference)}),s.payment=s.paymentGroup.payments[0],s.remissions=t,s.remissionFeeAmt=n.filter(function(e){return e.code===s.remissions.fee_code})[0].net_amount},function(e){return s.errorMessage=e})},de.prototype.redirectToremissionPage=function(e){e.preventDefault(),this.paymentLibComponent.viewName="remission"},de.prototype.goToServiceRequestPage=function(){this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.TAKEPAYMENT=!1,this.paymentLibComponent.SERVICEREQUEST="true",this.paymentLibComponent.isFromServiceRequestPage=!0,window.location.reload()},de.prototype.redirectToReportsPage=function(e){e.preventDefault(),this.router.navigateByUrl("/reports?selectedOption="+this.selectedOption+"&ccdCaseNumber="+this.ccdCaseNumber)},de.prototype.loadFeeSummaryPage=function(e){this.paymentLibComponent.bspaymentdcn=null,this.paymentLibComponent.paymentGroupReference=e.payment_group_reference,this.paymentLibComponent.isTurnOff=this.isTurnOff,this.paymentLibComponent.viewName="fee-summary"},de.prototype.goToPaymentViewComponent=function(e){this.paymentLibComponent.paymentMethod=e.paymentMethod,this.paymentLibComponent.paymentGroupReference=e.paymentGroupReference,this.paymentLibComponent.paymentReference=e.paymentReference,this.paymentLibComponent.viewName="payment-view"},de.prototype.goToPayementView=function(e,t,n){this.goToPaymentViewComponent({paymentGroupReference:e,paymentReference:t,paymentMethod:n})},de.prototype.selectedUnprocessedFeeEvent=function(e){e?(this.isTurnOff&&(this.isAddFeeBtnEnabled=!1),this.isUnprocessedRecordSelected=!0):(this.isTurnOff&&(this.isAddFeeBtnEnabled=!0),this.isUnprocessedRecordSelected=!1)},de.prototype.getUnprocessedFeeCount=function(e){this.unprocessedRecordCount=e},de.prototype.calculateAmountDue=function(e){return e.date_created?e.amount_due!==undefined?e.amount_due:e.net_amount:"0.00"},de.prototype.confirmRemoveFee=function(e){this.isRemoveBtnDisabled=!1,this.feeId=e,this.viewStatus="feeRemovalConfirmation"},de.prototype.cancelRemoval=function(){this.viewStatus="main"},de.prototype.removeFee=function(e){var t=this;this.isRemoveBtnDisabled=!0,this.paymentViewService.deleteFeeFromPaymentGroup(e).subscribe(function(e){window.location.reload()},function(e){t.errorMessage=e,t.isRemoveBtnDisabled=!1})},de.prototype.isCheckAmountdueExist=function(e){return void 0===e},de.prototype.issueRefund=function(e){null!==e&&e!==undefined&&this.chkIssueRefundBtnEnable(e)&&(this.viewStatus="issuerefund",this.payment=e,this.paymentLibComponent.isFromServiceRequestPage=!0,this.isRefundRemission=!0)},de.prototype.chkForAddRemission=function(e){var t,n;if(this.chkForPBAPayment()&&this.check4AllowedRoles2AccessRefund()){if(0<this.orderDetail[0].remissions.length)try{for(var s=F(this.orderDetail[0].remissions),a=s.next();!a.done;a=s.next())if(a.value.fee_code===e)return!1}catch(o){t={error:o}}finally{try{a&&!a.done&&(n=s["return"])&&n.call(s)}finally{if(t)throw t.error}}return!0}return!1},de.prototype.chkForPBAPayment=function(){var t=this;if(null!==this.orderDetail&&this.orderDetail!==undefined)return this.orderDetail.forEach(function(e){e.payments&&e.payments.forEach(function(e){"payment by account"===e.method.toLocaleLowerCase()&&t.allowFurtherAccessAfter4Days(e)&&(t.isPBA=!0)})}),!!this.isPBA},de.prototype.chkIssueRefundBtnEnable=function(e){return this.check4AllowedRoles2AccessRefund()&&this.allowFurtherAccessAfter4Days(e)&&"payment by account"===e.method&&"success"===e.status.toLocaleLowerCase()&&(this.isIssueRefunfBtnEnable=!0),!!this.isIssueRefunfBtnEnable},de.prototype.chkIsRefundRemissionBtnEnable=function(){var t=this;if(null!==this.orderDetail&&this.orderDetail!==undefined)return this.paymentLibComponent.isFromServiceRequestPage=!0,this.orderDetail.forEach(function(e){e.payments&&e.payments.forEach(function(e){"payment by account"===e.method.toLocaleLowerCase()&&"success"===e.status.toLocaleLowerCase()&&t.allowFurtherAccessAfter4Days(e)&&(t.isRefundRemissionBtnEnable=!0)})}),!!this.isRefundRemissionBtnEnable},de.prototype.loadPBAAccountPage=function(e){this.paymentLibComponent.pbaPayOrderRef=e,this.paymentLibComponent.viewName="pba-payment"},de.decorators=[{type:f.Component,args:[{selector:"ccpay-case-transactions",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 \x3c!-- payments --\x3e\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 \x3c!-- remissions --\x3e\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 \x3c!-- No fees start --\x3e\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 \x3c!-- No fees end --\x3e\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 \x3c!--New Code start--\x3e\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 \x3c!-- payments --\x3e\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 \x3c!-- remissions --\x3e\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 [ISNEWPCIPALOFF]="isNewPcipalOff"\n [ISOLDPCIPALOFF]="isOldPcipalOff"\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\x3c!--Order Case Transactions Page--\x3e\n <ng-container *ngIf="viewStatus === \'main\' && !isTurnOff && takePayment">\n <div>\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 \x3c!--Payment Request--\x3e\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">\t\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 \x3c!-- <ng-container *ngIf="orderLevelFees?.length === 0">\n <br/>No service requests on this case.<br/>\n </ng-container> --\x3e\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 [isNewPcipalOff]="isNewPcipalOff"\n [isOldPcipalOff]="isOldPcipalOff"\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 \x3c!-- <span *ngIf="serviceRequestValue === \'false\'" class="heading-medium">Service requests</span> --\x3e\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">\t\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 \x3c!-- </div> --\x3e\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 [ccdCaseNumber]="ccdCaseNumber" ></ccpay-refund-status>\n </div>\n\n </ng-container>\n\n\n<input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'FEEREMOVALCONFIRMATION_2\'>\n\n\x3c!-- Order Full View Details--\x3e\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[isOldPcipalOff]="isOldPcipalOff" \n[viewCompStatus]= "viewStatus"\n[isNewPcipalOff]="isNewPcipalOff" \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[isOldPcipalOff]="isOldPcipalOff" \n[viewCompStatus]= "viewStatus"\n[isNewPcipalOff]="isNewPcipalOff" \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[isOldPcipalOff]="isOldPcipalOff" \n[viewCompStatus]= "viewStatus"\n[isNewPcipalOff]="isNewPcipalOff" \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\n\n',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}"]}]}],de.ctorParameters=function(){return[{type:h.Router},{type:D},{type:ie},{type:oe},{type:k},{type:b}]},de.propDecorators={LOGGEDINUSERROLES:[{type:f.Input,args:["LOGGEDINUSERROLES"]}],isTakePayment:[{type:f.Input}]},de);function de(e,t,n,s,a,o){var r=this;this.router=e,this.paymentViewService=t,this.bulkScaningPaymentService=n,this.caseTransactionsService=s,this.paymentLibComponent=a,this.OrderslistService=o,this.paymentGroups=[],this.payments=[],this.nonPayments=[],this.allPayments=[],this.remissions=[],this.fees=[],this.isRefundRemission=!0,this.isAddFeeBtnEnabled=!0,this.isExceptionRecord=!1,this.isUnprocessedRecordSelected=!1,this.isAnyFeeGroupAvilable=!0,this.isHistoricGroupAvailable=!1,this.viewStatus="main",this.isRemoveBtnDisabled=!1,this.clAmountDue=0,this.isFeeRecordsExist=!1,this.isGrpOutstandingAmtPositive=!1,this.orderDetail=[],this.isAddRemissionEnable=!1,this.orderRemissionDetails=[],this.orderLevelFees=[],this.ispaymentGroupApisuccess=!1,this.cpoDetails=null,this.orderFeesTotal=0,this.orderRemissionTotal=0,this.orderTotalPayments=0,this.orderPendingPayments=0,this.isPBA=!1,this.isIssueRefunfBtnEnable=!1,this.isAddRemissionBtnEnabled=!1,this.isRefundRemissionBtnEnable=!1,this.allowedRolesToAccessRefund=["payments-refund-approver","payments-refund"],this.isEligible4PBAPayment=["pui-finance-manager","pui-user-manager","pui-organisation-manager","pui-case-manager"],this.currentDate=new Date,this.check4AllowedRoles2AccessRefund=function(){return r.allowedRolesToAccessRefund.some(function(e){return-1!==r.LOGGEDINUSERROLES.indexOf(e)})},this.check4AllowedRoles2AccessPBApayment=function(){return r.isEligible4PBAPayment.some(function(e){return-1!==r.LOGGEDINUSERROLES.indexOf(e)})},this.allowFurtherAccessAfter4Days=function(e){if(null!==e&&e!==undefined){var t=new Date;return t.setDate(t.getDate()-4),t>=new Date(e.date_created)}}}var ue=function(e,t,n){this.currency="GBP",this.description="PayBubble payment",this.channel="telephony",this.provider="pci pal",this.ccd_case_number=e,this.amount=t.toFixed(2),this.case_type=n},pe=function(e,t,n){this.currency="GBP",this.ccd_case_number=e,this.amount=t.toFixed(2),this.case_type=n},me="bulk-scan-enabling-fe",ge=(he.prototype.ngOnInit=function(){var t=this;this.viewStatus="main",this.caseType=this.paymentLibComponent.CASETYPE,this.bsPaymentDcnNumber=this.paymentLibComponent.bspaymentdcn,this.selectedOption=this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase(),this.isStrategicFixEnable=this.paymentLibComponent.ISSFENABLE,this.OrderslistService.setCaseType(this.paymentLibComponent.CASETYPE),!this.isOldPcipalOff&&this.isNewPcipalOff?this.platForm="8x8":this.isOldPcipalOff&&!this.isNewPcipalOff?this.platForm="Antenna":this.isOldPcipalOff&&this.isNewPcipalOff&&(this.platForm="8x8"),this.paymentViewService.getBSfeature().subscribe(function(e){e=JSON.parse(e).filter(function(e){return e.uid===me});t.paymentLibComponent.ISBSENABLE=!!e[0]&&e[0].enable},function(e){t.paymentLibComponent.ISBSENABLE=!1}),this.bsPaymentDcnNumber&&this.getUnassignedPaymentlist(),this.getPaymentGroup()},he.prototype.getUnassignedPaymentlist=function(){var t=this;"dcn"===this.selectedOption?this.bulkScaningPaymentService.getBSPaymentsByDCN(this.paymentLibComponent.DCN_NUMBER).subscribe(function(e){e.data.payments?t.service=e.data.responsible_service_id:t.upPaymentErrorMessage="error"},function(e){return t.upPaymentErrorMessage=e}):this.bulkScaningPaymentService.getBSPaymentsByCCD(this.ccdCaseNumber).subscribe(function(e){e.data.payments?t.service=e.data.responsible_service_id:t.upPaymentErrorMessage="error"},function(e){return t.upPaymentErrorMessage=e})},he.prototype.getRemissionByFeeCode=function(e){var t,n;if(this.paymentGroup&&this.paymentGroup.remissions&&0<this.paymentGroup.remissions.length)try{for(var s=F(this.paymentGroup.remissions),a=s.next();!a.done;a=s.next()){var o=a.value;if(o.fee_code===e)return o}}catch(r){t={error:r}}finally{try{a&&!a.done&&(n=s["return"])&&n.call(s)}finally{if(t)throw t.error}}return null},he.prototype.addRemission=function(e){this.currentFee=e,this.viewStatus="add_remission"},he.prototype.getPaymentGroup=function(){var n=this,s=[];this.paymentViewService.getPaymentGroupDetails(this.paymentGroupRef).subscribe(function(e){n.paymentGroup=e,n.isPaymentExist=!!e.payments&&0<e.payments.length,n.isRemissionsExist=!!e.remissions&&0<e.remissions.length,e.fees&&(e.fees.forEach(function(t){n.totalAfterRemission=n.totalAfterRemission+t.net_amount,0===t.calculated_amount&&(n.isFeeAmountZero=!0),n.isRemissionsMatch=!1,e.remissions.forEach(function(e){e.fee_code===t.code&&(n.isRemissionsMatch=!0,t.remissions=e,s.push(t))}),n.isRemissionsMatch||s.push(t)}),e.fees=s),n.outStandingAmount=n.bulkScaningPaymentService.calculateOutStandingAmount(e)},function(e){return n.errorMessage=e.replace(/"/g,"")})},he.prototype.confirmRemoveFee=function(e){this.isRemoveBtnDisabled=!1,this.currentFee=e,this.viewStatus="feeRemovalConfirmation"},he.prototype.removeFee=function(e){var t=this;this.isRemoveBtnDisabled=!0,this.paymentViewService.deleteFeeFromPaymentGroup(e).subscribe(function(e){return t.paymentGroup.fees&&1<t.paymentGroup.fees.length?(t.totalAfterRemission=0,t.getPaymentGroup(),void(t.viewStatus="main")):void t.loadCaseTransactionPage()},function(e){t.errorMessage=e,t.isRemoveBtnDisabled=!1})},he.prototype.loadCaseTransactionPage=function(){var t=this;this.paymentLibComponent.TAKEPAYMENT=!0,this.paymentLibComponent.viewName="case-transactions",this.paymentViewService.getBSfeature().subscribe(function(e){e=JSON.parse(e).filter(function(e){return e.uid===me});t.paymentLibComponent.ISBSENABLE=!!e[0]&&e[0].enable},function(e){t.paymentLibComponent.ISBSENABLE=!1});var e="selectedOption="+this.paymentLibComponent.SELECTED_OPTION;e+=this.bsPaymentDcnNumber?"&dcn="+this.bsPaymentDcnNumber:"",e+=this.paymentLibComponent.ISBSENABLE?"&isBulkScanning=Enable":"&isBulkScanning=Disable",e+=this.paymentLibComponent.ISTURNOFF?"&isTurnOff=Enable":"&isTurnOff=Disable",e+=this.paymentLibComponent.ISSFENABLE?"&isStFixEnable=Enable":"&isStFixEnable=Disable",e+="&caseType="+this.paymentLibComponent.CASETYPE,e+=this.isNewPcipalOff?"&isNewPcipalOff=Enable":"&isNewPcipalOff=Disable",e+=this.isOldPcipalOff?"&isOldPcipalOff=Enable":"&isOldPcipalOff=Disable";e="/payment-history/"+this.ccdCaseNumber+"?view=case-transactions&takePayment=true&"+e;this.router.navigateByUrl(e)},he.prototype.cancelRemission=function(){this.viewStatus="main"},he.prototype.redirectToFeeSearchPage=function(e,t){e.preventDefault();e=this.bsPaymentDcnNumber?"&dcn="+this.bsPaymentDcnNumber:"";e+=this.paymentLibComponent.ISBSENABLE?"&isBulkScanning=Enable":"&isBulkScanning=Disable",e+=this.paymentLibComponent.ISTURNOFF?"&isTurnOff=Enable":"&isTurnOff=Disable",e+=this.paymentLibComponent.ISSFENABLE?"&isStFixEnable=Enable":"&isStFixEnable=Disable",e+="&caseType="+this.paymentLibComponent.CASETYPE,e+=this.isNewPcipalOff?"&isNewPcipalOff=Enable":"&isNewPcipalOff=Disable",e+=this.isOldPcipalOff?"&isOldPcipalOff=Enable":"&isOldPcipalOff=Disable","feeRemovalConfirmation"!==this.viewStatus&&"add_remission"!==this.viewStatus?(e="/fee-search?ccdCaseNumber="+this.ccdCaseNumber+"&selectedOption="+this.paymentLibComponent.SELECTED_OPTION+"&paymentGroupRef="+this.paymentGroupRef+e,this.router.navigateByUrl(e)):this.viewStatus="main"},he.prototype.takePayment=function(){var t=this;this.isConfirmationBtnDisabled=!0;var e=new ue(this.ccdCaseNumber,this.outStandingAmount,this.caseType),n=new pe(this.ccdCaseNumber,this.outStandingAmount,this.caseType);"8x8"===this.platForm?this.paymentViewService.postPaymentToPayHub(e,this.paymentGroupRef).subscribe(function(e){t.location.go("payment-history?view=fee-summary"),t.payhubHtml=e,t.viewStatus="payhub_view",t.isBackButtonEnable=!1},function(e){t.errorMessage=e,t.isConfirmationBtnDisabled=!1,t.router.navigateByUrl("/pci-pal-failure")}):"Antenna"===this.platForm&&this.paymentViewService.postPaymentAntennaToPayHub(n,this.paymentGroupRef).subscribe(function(e){t.isBackButtonEnable=!1,window.location.href="/makePaymentByTelephoneyProvider"},function(e){t.errorMessage=e,t.isConfirmationBtnDisabled=!1,t.router.navigateByUrl("/pci-pal-failure")})},he.prototype.goToAllocatePage=function(e,t){0<e||0===e&&t?(this.paymentLibComponent.paymentGroupReference=this.paymentGroupRef,this.paymentLibComponent.viewName="allocate-payments"):this.loadCaseTransactionPage()},he.prototype.isCheckAmountdueExist=function(e){return void 0===e},he.decorators=[{type:f.Component,args:[{selector:"ccpay-fee-summary",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 \x3c!-- <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 <div class="govuk-grid-column-one-third" align="right">\n <button *ngIf="!isTurnOff" (click)="redirectToFeeSearchPage($event,\'summary\')"\n [disabled]="isPaymentExist"\n [ngClass]=\'isPaymentExist ? "button button--disabled govuk-!-margin-right-1" : "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>\t\n </div>\n </div> --\x3e\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 \x3c!-- <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">\t\n <label class="govuk-label govuk-radios__label" for="changed-name">\t\n 8x8\t\n </label>\t\n </div>\t\n <div class="govuk-radios__item">\t\n <input id="changed-name-2" class="govuk-radios__input" [(ngModel)]="platForm" type="radio" aria-label="Antenna" value="Antenna">\t\n <label class="govuk-label govuk-radios__label" for="changed-name-2">\t\n Antenna\t\n </label>\t\n </div>\t\n </div>\t\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> --\x3e\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 \x3c!-- <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> --\x3e\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>\t\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\x3c!-- \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> --\x3e\n\n <div class="govuk-form-group govuk-form-group--mg" *ngIf="!bsPaymentDcnNumber && isOldPcipalOff && isNewPcipalOff">\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 Select payment service\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">\t\n <label class="govuk-label govuk-radios__label" for="changed-name">\t\n 8x8\t\n </label>\t\n </div>\t\n <div class="govuk-radios__item">\t\n <input id="changed-name-2" class="govuk-radios__input" [(ngModel)]="platForm" type="radio" aria-label="Antenna" value="Antenna">\t\n <label class="govuk-label govuk-radios__label" for="changed-name-2">\t\n Antenna\t\n </label>\t\n </div>\t\n </div>\t\n </fieldset>\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 [isOldPcipalOff]="isOldPcipalOff" \n [isNewPcipalOff]="isNewPcipalOff" \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<div *ngIf="viewStatus === \'payhub_view\' && payhubHtml" [innerHTML]="payhubHtml | sanitizeHtml" id="payhub-html-id"></div>\n',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}"]}]}],he.ctorParameters=function(){return[{type:h.Router},{type:ie},{type:r.Location},{type:D},{type:k},{type:b}]},he.propDecorators={paymentGroupRef:[{type:f.Input}],ccdCaseNumber:[{type:f.Input}],isTurnOff:[{type:f.Input}],caseType:[{type:f.Input}],isOldPcipalOff:[{type:f.Input}],isNewPcipalOff:[{type:f.Input}]},he);function he(e,t,n,s,a,o){this.router=e,this.bulkScaningPaymentService=t,this.location=n,this.paymentViewService=s,this.paymentLibComponent=a,this.OrderslistService=o,this.viewStatus="main",this.service="",this.platForm="",this.isBackButtonEnable=!0,this.isFeeAmountZero=!1,this.totalAfterRemission=0,this.isConfirmationBtnDisabled=!1,this.isRemoveBtnDisabled=!1,this.isPaymentExist=!1,this.isRemissionsExist=!1,this.isRemissionsMatch=!1}var fe=(ye.prototype.ngOnInit=function(){},ye.decorators=[{type:f.Component,args:[{selector:"ccpay-error-banner",template:'<div class="govuk-error-summary" aria-labelledby="error-summary-title" role="alert" tabindex="-1" data-module="govuk-error-summary">\n <h2 class="govuk-error-summary__title govuk-error-summary__title-custom" id="error-summary-title">\n {{errorMessage.title}}\n </h2>\n <div class="govuk-error-summary__body">\n <ul class="govuk-list govuk-error-summary__list">\n <li>\n {{errorMessage.body}}\n </li>\n </ul>\n </div>\n</div>',styles:[".govuk-error-summary h2{font-size:24px}.govuk-error-summary__list li{font-size:19px}"]}]}],ye.ctorParameters=function(){return[]},ye.propDecorators={errorMessage:[{type:f.Input,args:["errorMessage"]}]},ye);function ye(){}var ve=function(e,t,n){this.payment_allocation_status={description:"",name:"Unidentified"},this.payment_group_reference=e,this.payment_reference=t,this.unidentified_reason=n},be=function(e,t,n,s,a){this.amount=t.amount,this.banked_date=t.date_banked,this.ccd_case_number=e,this.exception_record=s,this.currency=t.currency,this.document_control_number=t.dcn_reference,this.external_provider="exela",this.giro_slip_no=t.bgc_reference,this.payer_name=t.payer_name,this.payment_channel={description:"",name:"bulk scan"},this.payment_status={description:"bulk scan payment completed",name:"success"},this.payment_method=t.payment_method,this.case_type=n,a&&(this.payment_allocation_dto=a)},_e=(ke.prototype.ngOnInit=function(){this.viewStatus="mainForm",this.ccdCaseNumber=this.paymentLibComponent.CCD_CASE_NUMBER,this.bspaymentdcn=this.paymentLibComponent.bspaymentdcn,this.isStrategicFixEnable=this.paymentLibComponent.ISSFENABLE,this.getUnassignedPayment(),this.markPaymentUnidentifiedForm=this.formBuilder.group({investicationDetail:new g.FormControl("",g.Validators.compose([g.Validators.required,g.Validators.minLength(3),g.Validators.maxLength(255),g.Validators.pattern("^([a-zA-Z0-9\\s,\\.]*)$")]))})},ke.prototype.getUnassignedPayment=function(){var s=this;this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(function(e){s.errorMessage=s.getErrorMessage(!1),s.unassignedRecord=e.data.payments.filter(function(e){return e&&e.dcn_reference==s.bspaymentdcn})[0],s.siteID=e.data.responsible_service_id;var t=e.data.ccd_reference,n=e.data.exception_record_reference,e=t&&t===s.ccdCaseNumber?null:s.ccdCaseNumber;s.ccdReference=t||null,s.exceptionReference=n||e},function(e){s.errorMessage=s.getErrorMessage(!0)})},ke.prototype.trimUnderscore=function(e){return this.bulkScaningPaymentService.removeUnwantedString(e," ")},ke.prototype.saveAndContinue=function(){this.resetForm([!1,!1,!1,!1]);var e=this.markPaymentUnidentifiedForm.controls.investicationDetail,t=e.errors;this.markPaymentUnidentifiedForm.dirty&&this.markPaymentUnidentifiedForm.valid?(this.investigationComment=this.markPaymentUnidentifiedForm.controls.investicationDetail.value,this.viewStatus="unidentifiedContinueConfirm"):(""==e.value&&this.resetForm([!0,!1,!1,!1]),""!=e.value&&e.invalid&&this.resetForm([!1,!0,!1,!1]),t&&t.minlength&&t.minlength.actualLength<3&&this.resetForm([!1,!1,!0,!1]),t&&t.maxlength&&255<t.maxlength.actualLength&&this.resetForm([!1,!1,!1,!0]))},ke.prototype.resetForm=function(e){this.isInvesticationDetailEmpty=e[0],this.investicationDetailHasError=e[1],this.investicationDetailMinHasError=e[2],this.investicationDetailMaxHasError=e[3]},ke.prototype.confirmPayments=function(){var n=this;this.isConfirmButtondisabled=!0;var e,s=this.markPaymentUnidentifiedForm.get("investicationDetail").value;this.isStrategicFixEnable?this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference,"PROCESSED").subscribe(function(e){n.errorMessage=n.getErrorMessage(!1);var t=new be(n.ccdReference,n.unassignedRecord,n.siteID,n.exceptionReference);n.paymentViewService.postBSPayments(t).subscribe(function(e){n.errorMessage=n.getErrorMessage(!1);var t=JSON.parse(e),e=new ve(t.data.payment_group_reference,t.data.reference,s);t.success&&n.paymentViewService.postBSUnidentifiedPayments(e).subscribe(function(e){n.errorMessage=n.getErrorMessage(!1),JSON.parse(e).success&&n.gotoCasetransationPage()},function(e){n.bulkScaningPaymentService.patchBSChangeStatus(n.unassignedRecord.dcn_reference,"COMPLETE").subscribe(),n.errorMessage=n.getErrorMessage(!0),n.isConfirmButtondisabled=!1})},function(e){n.bulkScaningPaymentService.patchBSChangeStatus(n.unassignedRecord.dcn_reference,"COMPLETE").subscribe(),n.errorMessage=n.getErrorMessage(!0),n.isConfirmButtondisabled=!1})},function(e){n.errorMessage=n.getErrorMessage(!0),n.isConfirmButtondisabled=!1}):(e={allocation_status:"Unidentified",payment_allocation_status:{description:"",name:"Unidentified"},unidentified_reason:s,user_id:this.caseType},e=new be(this.ccdReference,this.unassignedRecord,this.caseType,this.exceptionReference,e),this.bulkScaningPaymentService.postBSWoPGStrategic(e).subscribe(function(e){n.errorMessage=n.getErrorMessage(!1),JSON.parse(e).success&&n.gotoCasetransationPage()},function(e){n.errorMessage=n.getErrorMessage(!0),n.isConfirmButtondisabled=!1}))},ke.prototype.cancelMarkUnidentifiedPayments=function(e){e&&"cancel"===e?""!==this.markPaymentUnidentifiedForm.get("investicationDetail").value?this.viewStatus="unidentifiedCancelConfirm":this.gotoCasetransationPage():this.viewStatus="mainForm"},ke.prototype.gotoCasetransationPage=function(){this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.TAKEPAYMENT=!0,this.paymentLibComponent.ISBSENABLE=!0},ke.prototype.getErrorMessage=function(e){return{title:"There is a problem with the service",body:"Try again later",showError:e}},ke.decorators=[{type:f.Component,args:[{selector:"app-mark-unidentified-payment",template:'<div class="mkpay-unidentified" >\n <div *ngIf="viewStatus === \'mainForm\'">\n <input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'MARKUNIDENTIFIED\'>\n <h1 class="heading-large">Mark payment as unidentified</h1>\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">Payment asset number (DCN)</td>\n <td class="govuk-table__header" scope="col">Banked date</td>\n <td class="govuk-table__header" scope="col">Amount</td>\n <td class="govuk-table__header" scope="col">Method</td>\n \n </tr>\n </thead>\n <tbody class="govuk-table__body">\n <tr class="govuk-table__row">\n <td class="govuk-table__cell">{{unassignedRecord.dcn_reference}}</td>\n <td class="govuk-table__cell"> {{unassignedRecord.date_banked | date:\'dd MMM yyyy\'}}</td>\n <td class="govuk-table__cell"> {{unassignedRecord.amount | currency :\'GBP\':\'symbol\':\'1.2-2\'}}</td>\n <td class="capitalize govuk-table__cell"> {{trimUnderscore(unassignedRecord.payment_method) | lowercase}} </td>\n </tr>\n </tbody>\n </table>\n </div>\n <form [formGroup]="markPaymentUnidentifiedForm" novalidate>\n <div class="govuk-form-group">\n <p class="unidentifiedSubText">\n Give a reason for marking this payment as unidentified.\n <br/>\n Include any investigations you\'ve made.\n </p>\n <label class="heading-small" for="investicationDetail">\n\n </label>\n <textarea class="form-control form-control-3-4" [ngClass]="{\'inline-error-class\': isInvesticationDetailEmpty || investicationDetailHasError || investicationDetailMinHasError || investicationDetailMaxHasError}" name="investicationDetail" id="investicationDetail" rows="5" formControlName="investicationDetail">\n </textarea>\n <p class="inline-error-message" *ngIf="isInvesticationDetailEmpty || investicationDetailHasError || investicationDetailMinHasError || investicationDetailMaxHasError">\n <span *ngIf="isInvesticationDetailEmpty">Enter a reason for marking this payment as unidentified.</span>\n <span *ngIf="investicationDetailHasError">Enter a vaild reason</span>\n <span *ngIf="investicationDetailMinHasError">Reason should be at least 3 characters.</span>\n <span *ngIf="investicationDetailMaxHasError">Reason should be 255 characters or under.</span>\n </p>\n </div>\n <div class="govuk-button--group">\n <button type="submit" class="button" (click)="saveAndContinue()">\n Continue\n </button>\n <button type="button" class="button govuk-button--secondary" (click)="cancelMarkUnidentifiedPayments(\'cancel\')">\n Cancel\n </button>\n </div>\n </form>\n </div>\n <ng-container *ngIf="viewStatus === \'unidentifiedContinueConfirm\'">\n <ccpay-error-banner *ngIf="errorMessage.showError" [errorMessage]="errorMessage"></ccpay-error-banner>\n <input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'UNIDENTIFIEDCONFIRMATION\'>\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 <h1 class="heading-small"> Are you sure you want to mark this payment as unidentified? </h1>\n \n </strong>\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">Investigations</td>\n </tr>\n </thead>\n <tbody class="govuk-table__body">\n <tr class="govuk-table__row">\n <td class="govuk-table__cell">{{investigationComment}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n </div>\n <div class="govuk-button--group">\n <button type="submit" class="button" [disabled]="isConfirmButtondisabled" (click)="confirmPayments()">\n Confirm\n </button>\n <button type="button" class="button govuk-button--secondary" (click)="cancelMarkUnidentifiedPayments()">\n Cancel\n </button>\n </div>\n </ng-container>\n <ng-container *ngIf="viewStatus === \'unidentifiedCancelConfirm\'">\n <input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'CANCELUNIDENTIFIED\'>\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 cancel?\n </strong>\n </div>\n <div class="govuk-button--group">\n <button type="submit" class="button" (click)="gotoCasetransationPage()">\n Yes\n </button>\n <button type="button" class="button govuk-button--secondary" (click)="cancelMarkUnidentifiedPayments()">\n No\n </button>\n </div>\n </ng-container>\n</div>\n',styles:[".mkpay-unidentified{margin:10px 0 20px}.mkpay-unidentified .govuk-button--group .govuk-button--secondary{margin-left:10px;background-color:#b3b8bdf2}.mkpay-unidentified .inline-error-class{outline:#a71414 solid 3px;outline-offset:0}.mkpay-unidentified .inline-error-message{color:#a71414;font-weight:700;margin-top:10px}.govuk-grid-column-full{padding:0}.unidentifiedSubText{line-height:45px}.govuk-warning-text__text{font-size:19px}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}"]}]}],ke.ctorParameters=function(){return[{type:g.FormBuilder},{type:D},{type:k},{type:ie}]},ke.propDecorators={caseType:[{type:f.Input}]},ke);function ke(e,t,n,s){this.formBuilder=e,this.paymentViewService=t,this.paymentLibComponent=n,this.bulkScaningPaymentService=s,this.isInvesticationDetailEmpty=!1,this.investicationDetailHasError=!1,this.investicationDetailMinHasError=!1,this.investicationDetailMaxHasError=!1,this.errorMessage=this.getErrorMessage(!1),this.siteID=null,this.isConfirmButtondisabled=!1,this.ccdReference=null,this.exceptionReference=null,this.isStrategicFixEnable=!0}var Re=function(e,t,n,s,a,o){this.payment_allocation_status={description:"",name:"Transferred"},this.payment_group_reference=e,this.payment_reference=t,this.unidentified_reason=n,this.receiving_office=s,this.receiving_email_address=o,this.sending_email_address=a},Se=(Ee.prototype.ngOnInit=function(){var t=this;this.resetForm([!1,!1,!1,!1,!1,!1],"all"),this.viewStatus="mainForm",this.ccdCaseNumber=this.paymentLibComponent.CCD_CASE_NUMBER,this.bspaymentdcn=this.paymentLibComponent.bspaymentdcn,this.isStrategicFixEnable=this.paymentLibComponent.ISSFENABLE,this.getUnassignedPayment(),this.paymentViewService.getSiteID().subscribe(function(e){t.isContinueButtondisabled=!1,t.errorMessage=t.getErrorMessage(!1),t.siteIDList=JSON.parse(e)},function(e){window.scrollTo(0,0),t.isContinueButtondisabled=!0,t.errorMessage=t.getErrorMessage(!0)}),this.markPaymentUnsolicitedForm=this.formBuilder.group({reason:new g.FormControl("",g.Validators.compose([g.Validators.required,g.Validators.minLength(3),g.Validators.maxLength(255),g.Validators.pattern("^([a-zA-Z0-9\\s,\\.]*)$")])),responsibleOffice:new g.FormControl("",g.Validators.compose([g.Validators.required,g.Validators.pattern("^([a-zA-Z0-9\\s\\n,\\.-:]*)$")])),responsiblePerson:new g.FormControl(""),emailId:new g.FormControl("")})},Ee.prototype.trimUnderscore=function(e){return this.bulkScaningPaymentService.removeUnwantedString(e," ")},Ee.prototype.confirmPayments=function(){var n=this;this.isConfirmButtondisabled=!0;var e,s=this.markPaymentUnsolicitedForm.controls;this.isStrategicFixEnable?this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference,"PROCESSED").subscribe(function(e){n.errorMessage=n.getErrorMessage(!1);JSON.parse(e);e=new be(n.ccdReference,n.unassignedRecord,n.siteID,n.exceptionReference);n.paymentViewService.postBSPayments(e).subscribe(function(e){n.errorMessage=n.getErrorMessage(!1);var t=JSON.parse(e),e=new Re(t.data.payment_group_reference,t.data.reference,s.reason.value,n.selectedSiteId,s.responsiblePerson.value,s.emailId.value);t.success&&n.paymentViewService.postBSUnsolicitedPayments(e).subscribe(function(e){n.errorMessage=n.getErrorMessage(!1),JSON.parse(e).success&&n.gotoCasetransationPage()},function(e){n.bulkScaningPaymentService.patchBSChangeStatus(n.unassignedRecord.dcn_reference,"COMPLETE").subscribe(),n.errorMessage=n.getErrorMessage(!0),n.isConfirmButtondisabled=!1})},function(e){n.bulkScaningPaymentService.patchBSChangeStatus(n.unassignedRecord.dcn_reference,"COMPLETE").subscribe(),n.errorMessage=n.getErrorMessage(!0),n.isConfirmButtondisabled=!1})},function(e){n.errorMessage=n.getErrorMessage(!0),n.isConfirmButtondisabled=!1}):(e={allocation_status:"Transferred",payment_allocation_status:{description:"",name:"Transferred"},unidentified_reason:s.reason.value,receiving_office:this.selectedSiteId,user_id:this.caseType},e=new be(this.ccdReference,this.unassignedRecord,this.caseType,this.exceptionReference,e),this.bulkScaningPaymentService.postBSWoPGStrategic(e).subscribe(function(e){n.errorMessage=n.getErrorMessage(!1),JSON.parse(e).success&&n.gotoCasetransationPage()},function(e){n.errorMessage=n.getErrorMessage(!0),n.isConfirmButtondisabled=!1}))},Ee.prototype.saveAndContinue=function(){this.resetForm([!1,!1,!1,!1,!1,!1],"all");var e,t=this.markPaymentUnsolicitedForm.controls.reason.errors,n=this.markPaymentUnsolicitedForm.controls.reason,s=this.markPaymentUnsolicitedForm.controls.responsibleOffice;this.markPaymentUnsolicitedForm.dirty&&this.markPaymentUnsolicitedForm.valid?(e=this.markPaymentUnsolicitedForm.controls,this.emailId=e.emailId.value,this.responsibleOffice=s.value,this.responsiblePerson=e.responsiblePerson.value,this.reason=e.reason.value,this.viewStatus="unsolicitedContinueConfirm"):(""==n.value&&this.resetForm([!0,!1,!1,!1,!1,!1],"reason"),""!=n.value&&this.markPaymentUnsolicitedForm.controls.reason.invalid&&this.resetForm([!1,!0,!1,!1,!1,!1],"reason"),t&&t.minlength&&t.minlength.actualLength<3&&this.resetForm([!1,!1,!0,!1,!1,!1],"reason"),t&&t.maxlength&&255<t.maxlength.actualLength&&this.resetForm([!1,!1,!1,!0,!1,!1],"reason"),""==s.value&&this.resetForm([!1,!1,!1,!1,!0,!1],"responsibleOffice"),""!=s.value&&s.invalid&&this.resetForm([!1,!1,!1,!1,!1,!0],"responsibleOffice"))},Ee.prototype.resetForm=function(e,t){"reason"!==t&&"all"!==t||(this.isReasonEmpty=e[0],this.reasonHasError=e[1],this.reasonMinHasError=e[2],this.reasonMaxHasError=e[3]),"responsibleOffice"!==t&&"all"!==t||(this.isResponsibleOfficeEmpty=e[4],this.responsibleOfficeHasError=e[5])},Ee.prototype.cancelMarkUnsolicitedPayments=function(e){e&&"cancel"===e?this.checkingFormValue()?this.viewStatus="unsolicitedCancelConfirm":this.gotoCasetransationPage():(this.markPaymentUnsolicitedForm.controls.responsibleOffice.setValue(""),this.viewStatus="mainForm")},Ee.prototype.checkingFormValue=function(){var e,t=this.markPaymentUnsolicitedForm.value,n=!1;for(e in t)if(t.hasOwnProperty(e)&&""!==t[e]){n=!0;break}return n},Ee.prototype.gotoCasetransationPage=function(){this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.TAKEPAYMENT=!0,this.paymentLibComponent.ISBSENABLE=!0},Ee.prototype.getUnassignedPayment=function(){var s=this;this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(function(e){s.unassignedRecord=e.data.payments.filter(function(e){return e&&e.dcn_reference==s.bspaymentdcn})[0],s.siteID=e.data.responsible_service_id;var t=e.data.ccd_reference,n=e.data.exception_record_reference,e=t&&t===s.ccdCaseNumber?null:s.ccdCaseNumber;s.ccdReference=t||null,s.exceptionReference=n||e},function(e){s.errorMessage=s.getErrorMessage(!0)})},Ee.prototype.getErrorMessage=function(e){return{title:"Something went wrong.",body:"Please try again later.",showError:e}},Ee.prototype.selectchange=function(e){this.selectedSiteId=e.target.value,this.selectedSiteName=e.target.options[e.target.selectedIndex].text},Ee.decorators=[{type:f.Component,args:[{selector:"app-mark-unsolicited-payment",template:'<div class="mkpay-unidentified">\n <div *ngIf="viewStatus === \'mainForm\'">\n <ccpay-error-banner *ngIf="errorMessage.showError" [errorMessage]="errorMessage"></ccpay-error-banner>\n <h1 class="heading-large">Mark payment as transferred</h1>\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">Payment asset number (DCN)</td>\n <td class="govuk-table__header" scope="col">Banked date</td>\n <td class="govuk-table__header" scope="col">Amount</td>\n <td class="govuk-table__header" scope="col">Method</td>\n </tr>\n </thead>\n <tbody class="govuk-table__body">\n <tr class="govuk-table__row">\n <td class="govuk-table__cell">{{unassignedRecord.dcn_reference}}</td>\n <td class="govuk-table__cell"> {{unassignedRecord.date_banked | date:\'dd MMM yyyy\'}}</td>\n <td class="govuk-table__cell"> {{unassignedRecord.amount | currency :\'GBP\':\'symbol\':\'1.2-2\'}}</td>\n <td class="capitalize govuk-table__cell"> {{trimUnderscore(unassignedRecord.payment_method) | lowercase}} </td>\n </tr>\n </tbody>\n </table>\n </div>\n \n <form [formGroup]="markPaymentUnsolicitedForm" novalidate>\n <input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'MARKTRANSFERRED\'>\n <div class="govuk-form-group">\n <label class="govuk-label custom-govuk-label custom-govuk-label" for="reason">\n Reason for payment being marked as transferred \n </label>\n <textarea class="form-control form-control-3-4" [ngClass]="{\'inline-error-class\': reasonHasError || reasonMinHasError || reasonMaxHasError}" name="reason" id="reason" rows="5" formControlName="reason">\n </textarea>\n <p class="inline-error-message" *ngIf="isReasonEmpty || reasonHasError || reasonMinHasError || reasonMaxHasError">\n <span *ngIf="isReasonEmpty">Enter a reason for marking this payment as transferred.</span>\n <span *ngIf="reasonHasError">Enter a valid reason</span>\n <span *ngIf="reasonMinHasError">Reason should be at least 3 characters.</span>\n <span *ngIf="reasonMaxHasError">Reason should be 255 characters or under.</span>\n </p>\n </div>\n <div class="govuk-form-group">\n <label class="govuk-label custom-govuk-label" for="responsibleOffice">\n Receiving Site ID (Receiving court/Bulk centre site ID) \n </label>\n <select class="form-control short-input" id="responsibleOffice" formControlName="responsibleOffice" (change)="selectchange($event)">\n <option value="" selected=\'selected\'>Please select</option>\n <option *ngFor="let siteID of siteIDList;" value="{{siteID.siteId}}">{{siteID.siteName}} ({{siteID.siteId}})</option>\n </select>\n <p class="inline-error-message" *ngIf="isResponsibleOfficeEmpty || responsibleOfficeHasError">\n <span *ngIf="isResponsibleOfficeEmpty">Please select Receiving Site ID</span>\n <span *ngIf="responsibleOfficeHasError">Please select a valid Receiving Site ID</span>\n </p>\n </div>\n <div class="govuk-button--group">\n <button type="submit" [disabled]="isContinueButtondisabled" class="button" (click)="saveAndContinue()">\n Confirm\n </button>\n <button type="button" class="button govuk-button--secondary" (click)="cancelMarkUnsolicitedPayments(\'cancel\')">\n Cancel\n </button>\n </div>\n </form>\n \n</div>\n <ng-container *ngIf="viewStatus === \'unsolicitedContinueConfirm\'">\n <ccpay-error-banner *ngIf="errorMessage.showError" [errorMessage]="errorMessage"></ccpay-error-banner>\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 <h1 class="heading-small"> Are you sure you want to mark this payment as transferred? </h1>\n </strong>\n <input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'TRANSFERREDCONFIRMATION\'>\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">Reason</td>\n <td class="govuk-table__header" scope="col">Receiving site ID</td>\n </tr>\n </thead>\n <tbody class="govuk-table__body">\n <tr class="govuk-table__row">\n <td class="govuk-table__cell">{{reason}}</td>\n <td class="govuk-table__cell">{{selectedSiteName}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n </div>\n <div class="govuk-button--group">\n <button type="submit" class="button" [disabled]="isConfirmButtondisabled" (click)="confirmPayments()">\n Confirm\n </button>\n <button type="button" class="button govuk-button--secondary" (click)="cancelMarkUnsolicitedPayments()">\n Cancel\n </button>\n </div>\n </ng-container>\n <ng-container *ngIf="viewStatus === \'unsolicitedCancelConfirm\'">\n <input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'CANCELTRANSFERRED\'>\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 cancel?\n </strong>\n </div>\n <div class="govuk-button--group">\n <button type="submit" class="button" (click)="gotoCasetransationPage()">\n Yes\n </button>\n <button type="button" class="button govuk-button--secondary" (click)="cancelMarkUnsolicitedPayments()">\n No\n </button>\n </div>\n </ng-container>\n</div>',styles:[".mkpay-unidentified{margin:10px 0 20px}.mkpay-unidentified .govuk-button--secondary{margin-left:10px;background-color:#b3b8bdf2}.mkpay-unidentified .inline-error-class{outline:#a71414 solid 3px;outline-offset:0}.mkpay-unidentified .inline-error-message{color:#a71414;font-weight:700;margin-top:10px}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.custom-govuk-label,.govuk-warning-text__text{font-size:19px}#responsibleOffice{color:#000;width:75%;font-weight:#fff}select option{background:#fff}"]}]}],Ee.ctorParameters=function(){return[{type:g.FormBuilder},{type:D},{type:k},{type:ie}]},Ee.propDecorators={caseType:[{type:f.Input}]},Ee);function Ee(e,t,n,s){this.formBuilder=e,this.paymentViewService=t,this.paymentLibComponent=n,this.bulkScaningPaymentService=s,this.reasonHasError=!1,this.isReasonEmpty=!1,this.reasonMinHasError=!1,this.reasonMaxHasError=!1,this.responsibleOfficeHasError=!1,this.isResponsibleOfficeEmpty=!1,this.errorMessage=this.getErrorMessage(!1),this.siteID=null,this.isConfirmButtondisabled=!1,this.isContinueButtondisabled=!1,this.ccdReference=null,this.exceptionReference=null,this.isStrategicFixEnable=!0}var we=(Ce.prototype.ngOnInit=function(){var t=this;this.ccdCaseNumber=this.paymentLibComponent.CCD_CASE_NUMBER,this.selectedOption=this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase(),this.dcnNumber=this.paymentLibComponent.DCN_NUMBER,this.isBulkScanEnable=this.paymentLibComponent.ISBSENABLE,this.isTurnOff=this.paymentLibComponent.ISTURNOFF,this.isNewpcipaloff=this.paymentLibComponent.ISNEWPCIPALOFF,this.isOldpcipaloff=this.paymentLibComponent.ISOLDPCIPALOFF,this.isStFixEnable=this.paymentLibComponent.ISSFENABLE,this.OrderslistService.getFeeExists().subscribe(function(e){return t.FEE_RECORDS_EXISTS=e}),this.getUnassignedPaymentlist()},Ce.prototype.getUnassignedPaymentlist=function(){var t=this;"dcn"===this.selectedOption?this.bulkScaningPaymentService.getBSPaymentsByDCN(this.dcnNumber).subscribe(function(e){e.data&&e.data.payments?t.setValuesForUnassignedRecord(e.data):e.payments?t.setValuesForUnassignedRecord(e):(t.upPaymentErrorMessage="error",t.getUnprocessedFeeCount.emit("0"))},function(e){t.upPaymentErrorMessage=e,t.getUnprocessedFeeCount.emit("0")}):this.bulkScaningPaymentService.getBSPaymentsByCCD(this.ccdCaseNumber).subscribe(function(e){e.data&&e.data.payments?t.setValuesForUnassignedRecord(e.data):e.payments?t.setValuesForUnassignedRecord(e):(t.upPaymentErrorMessage="error",t.getUnprocessedFeeCount.emit("0"))},function(e){t.upPaymentErrorMessage=e,t.getUnprocessedFeeCount.emit("0")})},Ce.prototype.setValuesForUnassignedRecord=function(e){this.unassignedRecordList=e.payments,this.unassignedRecordList&&(this.unassignedRecordListLength=e.payments.length),this.serviceId=e.responsible_service_id,e.ccd_reference===undefined&&(this.isExceptionCase=!0),this.getUnprocessedFeeCount.emit(this.unassignedRecordList.length),this.unprocessedPaymentSelectEvent(this.unassignedRecordList)},Ce.prototype.formatUnassignedRecordId=function(e){return"unassignrecord-"+e},Ce.prototype.trimUnderscore=function(e){return this.bulkScaningPaymentService.removeUnwantedString(e," ")},Ce.prototype.redirectToFeeSearchPage=function(e,t){e.preventDefault(),this.recordId=t;t=this.isBulkScanEnable?"&isBulkScanning=Enable":"&isBulkScanning=Disable";t+=this.ISTURNOFF?"&isTurnOff=Enable":"&isTurnOff=Disable",t+=this.isStFixEnable?"&isStFixEnable=Enable":"&isStFixEnable=Disable",t+="&caseType="+this.paymentLibComponent.CASETYPE,t+=this.isOldpcipaloff?"&isOldPcipalOff=Enable":"&isOldPcipalOff=Disable",t+=this.isNewpcipaloff?"&isNewPcipalOff=Enable":"&isNewPcipalOff=Disable",this.router.navigateByUrl("/fee-search?selectedOption="+this.selectedOption+"&ccdCaseNumber="+this.ccdCaseNumber+"&dcn="+this.recordId+t)},Ce.prototype.loadUnsolicitedPage=function(e,t){this.recordId=t,this.paymentLibComponent.bspaymentdcn=this.recordId,this.paymentLibComponent.viewName=e},Ce.prototype.unprocessedPaymentSelectEvent=function(e){this.isUnprocessedRecordSelected=!0,this.validateButtons(),this.selectedUnprocessedFeeEvent.emit(e)},Ce.prototype.resetButtons=function(){this.isUnprocessedRecordSelected=!1,this.isAllocateToExistingFeebtnEnabled=!1,this.isMarkAsUnidentifiedbtnEnabled=!1,this.isAllocatedToNewFeebtnEnabled=!1},Ce.prototype.goToAllocatePage=function(e){this.paymentLibComponent.bspaymentdcn=e,this.paymentLibComponent.unProcessedPaymentServiceId=this.serviceId,this.paymentLibComponent.isTurnOff=this.ISTURNOFF,this.paymentLibComponent.isNewPcipalOff=this.ISNEWPCIPALOFF,this.paymentLibComponent.isOldPcipalOff=this.ISOLDPCIPALOFF,this.paymentLibComponent.ISSFENABLE=this.isStFixEnable,this.ISTURNOFF?(this.paymentLibComponent.paymentGroupReference=this.PAYMENTREF,this.paymentLibComponent.viewName="fee-summary"):(this.paymentLibComponent.paymentGroupReference=null,this.paymentLibComponent.viewName="allocate-payments")},Ce.prototype.validateButtons=function(){this.isUnprocessedRecordSelected&&this.isExceptionCase?this.isMarkAsUnidentifiedbtnEnabled=!0:!this.isUnprocessedRecordSelected||this.isExceptionCase||this.FEE_RECORDS_EXISTS?this.isUnprocessedRecordSelected&&!this.isExceptionCase&&this.FEE_RECORDS_EXISTS&&(this.ISTURNOFF?(this.isAllocateToExistingFeebtnEnabled=this.IS_OS_AMT_AVAILABLE,this.isAllocatedToNewFeebtnEnabled=!0):(this.isAllocateToExistingFeebtnEnabled=!0,this.isAllocatedToNewFeebtnEnabled=!1)):(this.isAllocateToExistingFeebtnEnabled=!1,this.isAllocatedToNewFeebtnEnabled=!0)},Ce.prototype.unprocessedPaymentUnSelectEvent=function(e){e.preventDefault(),this.recordId=null,this.isUnprocessedRecordSelected=!1,this.isAllocateToExistingFeebtnEnabled=!1,this.isAllocatedToNewFeebtnEnabled=!1,this.isMarkAsUnidentifiedbtnEnabled=!1,this.selectedUnprocessedFeeEvent.emit("")},Ce.prototype.showDetailRow=function(e,t,n){e.preventDefault(),this.unassignedRecordSelectedList=t},Ce.decorators=[{type:f.Component,args:[{selector:"ccpay-app-unprocessed-payments",template:'\x3c!-- <ng-container *ngIf="IS_BUTTON_ENABLE">\n <div class="unprocessed-payments govuk-grid-column-full govuk-!-padding-bottom-3">\n <input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'CASETRANSACTION\'>\n <h3 class="heading-medium" *ngIf="!IS_BUTTON_ENABLE">Unprocessed payments</h3>\n <h3 class="heading-medium" *ngIf="IS_BUTTON_ENABLE">Unallocated 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" scope="col" *ngIf="IS_BUTTON_ENABLE && !isTurnOff">Select</td>\n <td class="govuk-table__header" scope="col" *ngIf="IS_BUTTON_ENABLE && isTurnOff"><a href="#" (click)="unprocessedPaymentUnSelectEvent($event)">Unselect</a></td>\n \n <td class="govuk-table__header" scope="col">Payment asset number (DCN)</td>\n <td class="govuk-table__header" scope="col">Banked date</td>\n <td class="govuk-table__header" scope="col">Amount</td>\n <td class="govuk-table__header" scope="col">Method</td>\n </tr>\n </thead>\n <tbody class="govuk-table__body" >\n <tr class="govuk-table__row" *ngFor="let unassignedRecord of unassignedRecordList; let i of index;">\n <td class="govuk-table__cell" *ngIf="IS_BUTTON_ENABLE">\n <div class="multiple-choice unprocessed-payments--radio-button">\n <input id="\'unpaiedFee\'+i+\'\'"\n aria-label="unassignedRecord"\n name="unassignedRecord"\n type="radio"\n [(ngModel)]="recordId"\n (click)="unprocessedPaymentSelectEvent(unassignedRecord.dcn_reference)"\n value="{{unassignedRecord.dcn_reference}}" />\n <label for="radio-inline-1"></label>\n </div>\n </td>\n <td class="govuk-table__cell whitespace-inherit">\n {{unassignedRecord.dcn_reference}}\n </td>\n <td class="govuk-table__cell whitespace-inherit"> {{unassignedRecord.date_banked | date:\'dd MMM yyyy\'}}</td>\n <td class="govuk-table__cell whitespace-inherit"> {{unassignedRecord.amount | currency :\'GBP\':\'symbol\':\'1.2-2\'}}</td>\n <td class="capitalize govuk-table__cell whitespace-inherit"> {{ trimUnderscore(unassignedRecord.payment_method) | lowercase}} </td>\n </tr>\n </tbody>\n <tbody class="govuk-table__body" *ngIf="upPaymentErrorMessage !== null">\n <td class="govuk-table__cell" colspan="6">No unallocated payments record available</td>\n </tbody>\n </table>\n <div class="button-grb" *ngIf="IS_BUTTON_ENABLE && !isTurnOff">\n <button type="button"\n [disabled]="!isAllocatedToNewFeebtnEnabled"\n [ngClass]="!isAllocatedToNewFeebtnEnabled ? \'button govuk-button--secondary button--disabled govuk-!-margin-right-1\' : \'button govuk-button--secondary govuk-!-margin-right-1\'" (click)="redirectToFeeSearchPage($event)">\n Allocate to a new fee\n </button>\n <button type="button" \n [disabled]="!isAllocateToExistingFeebtnEnabled"\n [ngClass]=\'!isAllocateToExistingFeebtnEnabled ? "button govuk-button--secondary button--disabled govuk-!-margin-right-1" : "button govuk-button--secondary govuk-!-margin-right-1"\' (click)="goToAllocatePage()">\n Allocate to an existing fee\n </button>\n <button type="button" \n [disabled]="!isMarkAsUnidentifiedbtnEnabled"\n [ngClass]=\'!isMarkAsUnidentifiedbtnEnabled ? "button govuk-button--secondary button--disabled govuk-!-margin-right-1" : "button govuk-button--secondary govuk-!-margin-right-1"\' (click)="loadUnsolicitedPage(\'unidentifiedPage\')">\n Mark as unidentified\n </button>\n <button type="button" \n [disabled]="!isUnprocessedRecordSelected"\n [ngClass]=\'!isUnprocessedRecordSelected ? "button govuk-button--secondary button--disabled govuk-!-margin-right-1" : "button govuk-button--secondary govuk-!-margin-right-1"\' (click)="loadUnsolicitedPage(\'unsolicitedPage\')">\n Mark as transferred\n </button> \n </div>\n \n <div class="button-grb" *ngIf="IS_BUTTON_ENABLE && isTurnOff">\n <button type="button"\n [disabled]="!isAllocatedToNewFeebtnEnabled"\n [ngClass]="!isAllocatedToNewFeebtnEnabled ? \'button button--disabled govuk-!-margin-right-1\' : \'button govuk-!-margin-right-1\'" (click)="redirectToFeeSearchPage($event)">\n Allocate to a new fee\n </button>\n <button type="button" \n [disabled]="!isAllocateToExistingFeebtnEnabled"\n [ngClass]=\'!isAllocateToExistingFeebtnEnabled ? "button button--disabled govuk-!-margin-right-1" : "button govuk-!-margin-right-1"\' (click)="goToAllocatePage()">\n Allocate to an existing fee\n </button>\n <button type="button" \n [disabled]="!isMarkAsUnidentifiedbtnEnabled"\n [ngClass]=\'!isMarkAsUnidentifiedbtnEnabled ? "button button--disabled govuk-!-margin-right-1" : "button govuk-!-margin-right-1"\' (click)="loadUnsolicitedPage(\'unidentifiedPage\')">\n Mark as unidentified\n </button>\n <button type="button" \n [disabled]="!isUnprocessedRecordSelected"\n [ngClass]=\'!isUnprocessedRecordSelected ? "button button--disabled govuk-!-margin-right-1" : "button govuk-!-margin-right-1"\' (click)="loadUnsolicitedPage(\'unsolicitedPage\')">\n Mark as transferred\n </button> \n </div>\n </div>\n</ng-container> --\x3e\n\n\n<ng-container *ngIf="!IS_BUTTON_ENABLE">\n <table class="govuk-table">\n \n <thead class="govuk-table__head" *ngIf=\'PAYMENTSLENGTH === 0 \'>\n \x3c!-- <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-14" scope="col">Date</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> --\x3e\n </thead>\n <tbody class="govuk-table__body">\n <tr class="govuk-table__row" *ngFor="let unassignedRecord of unassignedRecordList; let i of index;">\n <td class="govuk-table__cell whitespace-inherit" class="col-13">\n Unallocated \n </td>\n <td class="govuk-table__cell whitespace-inherit"> {{unassignedRecord.amount | currency :\'GBP\':\'symbol\':\'1.2-2\'}}</td>\n <td class="govuk-table__cell whitespace-inherit"></td>\n <td class="govuk-table__cell whitespace-inherit"></td>\n <td class="govuk-table__cell whitespace-inherit"></td>\n <td class="govuk-table__cell whitespace-inherit"></td>\n </tr>\n </tbody>\n \n </table>\n\n</ng-container>\n\n\n\x3c!--Orders Unallocated changes--\x3e\n<ng-container *ngIf="IS_BUTTON_ENABLE">\n <div class="unprocessed-payments">\n <input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'CASETRANSACTION\'>\n <table class="table">\n \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-9" scope="col">Amount</td>\n <td class="govuk-table__header col-16" scope="col">Date allocated</td>\n <td class="govuk-table__header col-24" colspan="3" scope="col">Request 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>\n <ng-container *ngFor="let unassignedRecord of unassignedRecordList; let i of index;">\n <tr>\n <td class="govuk-table__cell whitespace-inherit col-13" >\n Unallocated \n </td>\n <td class="govuk-table__cell whitespace-inherit col-10">\n {{unassignedRecord.amount | currency :\'GBP\':\'symbol\':\'1.2-2\'}}\n </td>\n <td class="govuk-table__cell whitespace-inherit" colspan="8">\n <div *ngIf="IS_BUTTON_ENABLE && !isTurnOff" class="alignright">\n <button type="button"\n [disabled]="!isAllocatedToNewFeebtnEnabled"\n [ngClass]="!isAllocatedToNewFeebtnEnabled ? \'button govuk-button--secondary button--disabled\' : \'button govuk-button--secondary\'" (click)="redirectToFeeSearchPage($event,unassignedRecord.dcn_reference)">\n Allocate to new service request\n </button><br/>\n <button type="button" \n [disabled]="!isAllocateToExistingFeebtnEnabled"\n [ngClass]=\'!isAllocateToExistingFeebtnEnabled ? "button govuk-button--secondary button--disabled" : "button govuk-button--secondary"\' (click)="goToAllocatePage(unassignedRecord.dcn_reference)">\n Allocate to existing service request \n </button>\n </div>\n \n </td>\n </tr>\n \n \x3c!-- <ng-container> --\x3e\n <tr>\n <td class="unassigned noborders" colspan="10">\n <summary (click)="unassignedRecord.expanded = !unassignedRecord.expanded" class="govuk-details__summary">\n <span class="govuk-details__summary-text">\n More details and actions\n </span>\n </summary>\n <div *ngIf="unassignedRecord.expanded" class="govuk-details__text govuk-!-margin-bottom-5 paddingright">\n <dl class="govuk-summary-list govuk-!-margin-bottom-5">\n <div class="govuk-summary-list__row">\n <dt class="govuk-summary-list__key">\n Method\n </dt>\n <dd class="govuk-summary-list__value">\n {{ trimUnderscore(unassignedRecord.payment_method) | lowercase}}\n </dd>\n </div>\n <div class="govuk-summary-list__row">\n <dt class="govuk-summary-list__key">\n Payment assest number (DCN) \n </dt>\n <dd class="govuk-summary-list__value">\n {{unassignedRecord.dcn_reference}}\n </dd>\n </div>\n </dl>\n <div class=" govuk-!-margin-bottom-5">\n <button type="button" \n [disabled]="!isMarkAsUnidentifiedbtnEnabled"\n [ngClass]=\'!isMarkAsUnidentifiedbtnEnabled ? "button govuk-button--secondary button--disabled" : "button govuk-button--secondary"\' (click)="loadUnsolicitedPage(\'unidentifiedPage\',unassignedRecord.dcn_reference)">\n Mark as unidentified\n </button>\n </div>\n <div>\n <button type="button" \n [disabled]="!isUnprocessedRecordSelected"\n [ngClass]=\'!isUnprocessedRecordSelected ? "button govuk-button--secondary button--disabled" : "button govuk-button--secondary"\' (click)="loadUnsolicitedPage(\'unsolicitedPage\',unassignedRecord.dcn_reference)">\n Mark as transferred\n </button> \n </div>\n\n </div>\n </td> \n </tr> \n \x3c!-- </ng-container> --\x3e\n </ng-container>\n </tbody>\n </table>\n \n </div>\n</ng-container>\n\n<ng-container *ngIf="viewStatus === \'main\'">\n\n</ng-container>\n\x3c!-- <ng-container *ngIf="PAYMENTSLENGTH === 0 && unassignedRecordListLength === 0">\n <br/>No payments.<br/>\n</ng-container> --\x3e\n\n',styles:[".unprocessed-payments .unprocessed-payments--radio-button{bottom:10px}.disable{text-decoration:none;padding:.526315em .789473em .263157em;cursor:default;color:#fff;background-color:#00823b;pointer-events:none;font-size:1em;line-height:1.25;outline:transparent solid 1px;outline-offset:-1px;-webkit-appearance:none;box-shadow:0 2px 0 #003618}.button.disabled,.button[disabled=disabled],.button[disabled]{zoom:1;opacity:.5}.button.disabled:active,.button[disabled=disabled]:active,.button[disabled]:active{top:0;box-shadow:0 2px 0 #003618}.button[disabled=disabled]{background:#00823b}.col-13{width:13%!important}.col-17{width:17%!important}.col-12{width:12%!important}.col-9{width:9%!important}.col-15{width:15%!important}.lowercase{text-transform:lowercase}.capitalize::first-letter{text-transform:uppercase}.whitespace-inherit{white-space:inherit!important}.top_row{display:table;width:100%}.top_row>div{display:table-cell;width:50%;border-bottom:1px solid #eee}.unassigned{border-top:hidden}.col-16{width:16%!important}.col-10{width:10%!important}.col-14{width:14%!important}.col-19{width:19%!important;padding-left:0!important}.col-18{width:18%!important;padding-left:0!important;padding-right:0!important}.col-21{width:21%!important}.col-20{width:20%!important}.col-11{width:11%!important}.col-37{width:37%!important}.noborders>td{border-color:transparent;border-top-style:hidden;border-right-style:hidden;border-left-style:hidden}.govuk-button--secondary{margin-bottom:10px}.govuk-summary-list{font-size:19px}.govuk-summary-list__key{width:35%}td{white-space:nowrap;overflow:hidden!important}table{table-layout:fixed;width:100%}td,th{word-wrap:break-word}.alignright{text-align:right}.paddingright{padding-right:0}"]}]}],Ce.ctorParameters=function(){return[{type:h.Router},{type:ie},{type:k},{type:D},{type:b}]},Ce.propDecorators={FEE_RECORDS_EXISTS:[{type:f.Input,args:["FEE_RECORDS_EXISTS"]}],PAYMENTREF:[{type:f.Input,args:["PAYMENTREF"]}],ISTURNOFF:[{type:f.Input,args:["ISTURNOFF"]}],IS_BUTTON_ENABLE:[{type:f.Input,args:["IS_BUTTON_ENABLE"]}],IS_OS_AMT_AVAILABLE:[{type:f.Input,args:["IS_OS_AMT_AVAILABLE"]}],ISNEWPCIPALOFF:[{type:f.Input,args:["ISNEWPCIPALOFF"]}],ISOLDPCIPALOFF:[{type:f.Input,args:["ISOLDPCIPALOFF"]}],ISSFENABLE:[{type:f.Input,args:["ISSFENABLE"]}],PAYMENTSLENGTH:[{type:f.Input,args:["PAYMENTSLENGTH"]}],LEVEL:[{type:f.Input,args:["LEVEL"]}],selectedUnprocessedFeeEvent:[{type:f.Output}],getUnprocessedFeeCount:[{type:f.Output}]},Ce);function Ce(e,t,n,s,a){this.router=e,this.bulkScaningPaymentService=t,this.paymentLibComponent=n,this.paymentViewService=s,this.OrderslistService=a,this.selectedUnprocessedFeeEvent=new f.EventEmitter,this.getUnprocessedFeeCount=new f.EventEmitter,this.viewStatus="main",this.upPaymentErrorMessage=null,this.recordId=null,this.isRecordExist=!1,this.dcnNumber=null,this.isUnprocessedRecordSelected=!0,this.isAllocateToExistingFeebtnEnabled=!1,this.isMarkAsUnidentifiedbtnEnabled=!1,this.isAllocatedToNewFeebtnEnabled=!1,this.isExceptionCase=!1,this.serviceId=null,this.isTurnOff=!0,this.unassignedRecordListLength=0}var Pe=(Ie.prototype.ngOnInit=function(){},Ie.prototype.trimUnderscore=function(e){return this.bulkScaningPaymentService.removeUnwantedString(e," ")},Ie.prototype.redirectToPaymentViewPage=function(e,t,n){this.goToPaymentViewComponent.emit({paymentGroupReference:e,paymentReference:t,paymentMethod:n})},Ie.decorators=[{type:f.Component,args:[{selector:"ccpay-app-processed-payments",template:'<div class="processed-payments govuk-grid-column-full govuk-!-padding-bottom-3">\n <h3 class="heading-medium">Processed 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" scope="col">Payment asset number (DCN)</td>\n <td class="govuk-table__header" scope="col">Banked date</td>\n <td class="govuk-table__header" scope="col">Amount</td>\n <td class="govuk-table__header" scope="col">Method</td>\n <td class="govuk-table__header" scope="col">Allocation status</td>\n </tr>\n </thead>\n <tbody class="govuk-table__body" >\n <tr class="govuk-table__row" *ngFor="let processedRecord of NONPAYMENTS">\n <td class="govuk-table__cell">\n <a href="javascript:void(0)" (click)="redirectToPaymentViewPage(processedRecord.paymentGroupReference, processedRecord.reference, processedRecord.method)">{{processedRecord.document_control_number}}</a>\n </td>\n <td class="govuk-table__cell"> {{processedRecord.banked_date | date:\'dd MMM yyyy\'}}</td>\n <td class="govuk-table__cell"> {{processedRecord.amount | currency :\'GBP\':\'symbol\':\'1.2-2\'}}</td>\n <td class="capitalize govuk-table__cell"> {{ trimUnderscore(processedRecord.method) | lowercase}} </td>\n <td class="capitalize govuk-table__cell"> {{ processedRecord.payment_allocation[0] ? processedRecord.payment_allocation[0].allocation_status : \'-\' }} </td>\n\n </tr>\n <tr class="govuk-table__row" *ngIf="NONPAYMENTS.length === 0">\n <td class="govuk-table__cell" colspan="5">\n No processed payments\n </td>\n\n </tr>\n\n </tbody>\n </table>\n</div>\n',styles:[".lowercase{text-transform:lowercase}.capitalize::first-letter{text-transform:uppercase}"]}]}],Ie.ctorParameters=function(){return[{type:h.Router},{type:ie}]},Ie.propDecorators={NONPAYMENTS:[{type:f.Input,args:["NONPAYMENTS"]}],goToPaymentViewComponent:[{type:f.Output}]},Ie);function Ie(e,t){this.router=e,this.bulkScaningPaymentService=t,this.goToPaymentViewComponent=new f.EventEmitter}var Oe=function(e,t,n,s,a){this.payment_allocation_status={description:"",name:"Allocated"},this.payment_group_reference=e,this.payment_reference=t,this.reason=n||null,this.explanation=s||null,this.user_name=a||null},Ae=(Fe.prototype.ngOnInit=function(){var t=this;this.viewStatus="mainForm",null!==this.paymentLibComponent.paymentGroupReference&&(this.viewStatus="allocatePaymentConfirmation"),this.ccdCaseNumber=this.paymentLibComponent.CCD_CASE_NUMBER,this.bspaymentdcn=this.paymentLibComponent.bspaymentdcn,this.paymentRef=this.paymentLibComponent.paymentGroupReference,this.selectedOption=this.paymentLibComponent.SELECTED_OPTION,this.isStrategicFixEnable=this.paymentLibComponent.ISSFENABLE,this.isTurnOff=this.paymentLibComponent.isTurnOff,this.overUnderPaymentForm=this.formBuilder.group({moreDetails:new g.FormControl("",g.Validators.compose([g.Validators.required,g.Validators.minLength(3),g.Validators.maxLength(255),g.Validators.pattern("^([a-zA-Z0-9\\s,\\.]*)$")])),userName:new g.FormControl("",g.Validators.compose([g.Validators.required,g.Validators.pattern("^([a-zA-Z0-9\\s]*)$")]))}),this.OrderslistService.getOrdersList().subscribe(function(e){return t.orderLevelFees=e.filter(function(e){return"Paid"!==e.orderStatus})}),this.OrderslistService.getCaseType().subscribe(function(e){return t.caseType=e}),this.getUnassignedPayment()},Fe.prototype.getGroupOutstandingAmount=function(e){return this.bulkScaningPaymentService.calculateOutStandingAmount(e)},Fe.prototype.getPaymentGroupDetails=function(){var n=this;this.isTurnOff?this.caseTransactionsService.getPaymentGroups(this.ccdCaseNumber).subscribe(function(e){n.errorMessage=n.errorHandlerService.getServerErrorMessage(!1),n.paymentGroups=e.payment_groups.filter(function(e){e.fees.forEach(function(e){0===e.calculated_amount&&(n.isFeeAmountZero=!0)});var t=n.getGroupOutstandingAmount(e),e=0<t||0==t&&n.isFeeAmountZero&&e.payment_group_reference===n.paymentRef;return n.paymentRef?e:0<t||0==t&&n.isFeeAmountZero})},function(e){n.errorMessage=n.errorHandlerService.getServerErrorMessage(!0)}):this.paymentViewService.getPaymentGroupDetails(this.paymentRef).subscribe(function(e){n.errorMessage=n.errorHandlerService.getServerErrorMessage(!1),n.paymentGroup=e,n.saveAndContinue()},function(e){n.errorMessage=n.errorHandlerService.getServerErrorMessage(!0)})},Fe.prototype.selectedPaymentGroup=function(e){this.isContinueButtondisabled=!1,this.paymentGroup=e},Fe.prototype.gotoCasetransationPage=function(){this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.isTurnOff=this.isTurnOff,this.paymentLibComponent.TAKEPAYMENT=!0,this.paymentLibComponent.ISBSENABLE=!0},Fe.prototype.gotoSummaryPage=function(e){e.preventDefault(),this.paymentLibComponent.viewName="fee-summary",this.paymentLibComponent.isTurnOff=this.isTurnOff,this.paymentLibComponent.TAKEPAYMENT=!0,this.paymentLibComponent.ISBSENABLE=!0},Fe.prototype.cancelAllocatePayment=function(e){e.preventDefault(),this.resetForm([!1,!1,!1,!1,!1,!1,!1,!1],"all"),this.isTurnOff?this.viewStatus="mainForm":(this.paymentLibComponent.viewName="fee-summary",this.paymentLibComponent.isTurnOff=this.isTurnOff,this.paymentLibComponent.TAKEPAYMENT=!0,this.paymentLibComponent.ISBSENABLE=!0)},Fe.prototype.confirmAllocatePayement=function(){this.enCookieUserName=document.cookie.split(";").find(function(e){return e.includes("user-info")}).split("=")[1].split(";"),this.cookieUserName=JSON.parse(decodeURIComponent(this.enCookieUserName));var e=this.cookieUserName.forename+" "+this.cookieUserName.surname,t=this.overUnderPaymentForm.controls.moreDetails,n=this.overUnderPaymentForm.controls.moreDetails.errors,s=e,a=this.paymentReason&&this.paymentExplanation,e="Other"===this.paymentExplanation;this.resetForm([!1,!1,!1,!1,!1,!1,!1,!1],"all"),!this.isRemainingAmountGtZero&&!this.isRemainingAmountLtZero||a&&(!e&&0<s.length||e&&0<s.length&&t.valid)?(this.isConfirmButtondisabled=!0,this.otherPaymentExplanation="Other"===this.paymentExplanation?t.value:this.paymentExplanation,this.userName=s,this.finalServiceCall()):(this.paymentReason||this.resetForm([!0,!1,!1,!1,!1,!1,!1,!1],"reason"),this.paymentExplanation||this.resetForm([!1,!0,!1,!1,!1,!1,!1,!1],"explanation"),this.paymentExplanation&&e&&(""==t.value&&this.resetForm([!1,!1,!0,!1,!1,!1,!1,!1],"other"),""!=t.value&&t.invalid&&this.resetForm([!1,!1,!1,!0,!1,!1,!1,!1],"other"),n&&n.minlength&&n.minlength.actualLength<3&&this.resetForm([!1,!1,!1,!1,!0,!1,!1,!1],"other"),n&&n.maxlength&&255<n.maxlength.actualLength&&this.resetForm([!1,!1,!1,!1,!1,!0,!1,!1],"other")),0===s.length&&this.resetForm([!1,!1,!1,!1,!1,!1,!0,!1],"username"))},Fe.prototype.resetForm=function(e,t){"reason"!==t&&"all"!==t||(this.paymentReasonHasError=e[0]),"explanation"!==t&&"all"!==t||(this.paymentExplanationHasError=e[1]),"other"!==t&&"all"!==t||(this.isPaymentDetailsEmpty=e[2],this.isPaymentDetailsInvalid=e[3],this.paymentDetailsMinHasError=e[4],this.paymentDetailsMaxHasError=e[5]),"username"!==t&&"all"!==t||(this.isUserNameEmpty=e[6],this.isUserNameInvalid=e[7])},Fe.prototype.finalServiceCall=function(){var e,n=this;this.isStrategicFixEnable?this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference,"PROCESSED").subscribe(function(e){n.errorMessage=n.errorHandlerService.getServerErrorMessage(!1),JSON.parse(e).success&&(e=new be(n.ccdReference,n.unAllocatedPayment,n.siteID,n.exceptionReference),n.bulkScaningPaymentService.postBSAllocatePayment(e,n.paymentGroup.payment_group_reference).subscribe(function(e){n.errorMessage=n.errorHandlerService.getServerErrorMessage(!1);var t=JSON.parse(e),e=new Oe(t.data.payment_group_reference,t.data.reference,n.paymentReason,n.otherPaymentExplanation,n.userName);t.success&&n.paymentViewService.postBSAllocationPayments(e).subscribe(function(e){n.errorMessage=n.errorHandlerService.getServerErrorMessage(!1),JSON.parse(e).success&&n.gotoCasetransationPage()},function(e){n.bulkScaningPaymentService.patchBSChangeStatus(n.unAllocatedPayment.dcn_reference,"COMPLETE").subscribe(),n.errorMessage=n.errorHandlerService.getServerErrorMessage(!0),window.scrollTo(0,0),n.isConfirmButtondisabled=!1})},function(e){n.bulkScaningPaymentService.patchBSChangeStatus(n.unAllocatedPayment.dcn_reference,"COMPLETE").subscribe(),n.errorMessage=n.errorHandlerService.getServerErrorMessage(!0),window.scrollTo(0,0),n.isConfirmButtondisabled=!1}))},function(e){n.errorMessage=n.errorHandlerService.getServerErrorMessage(!0),window.scrollTo(0,0),n.isConfirmButtondisabled=!1}):(e={reason:this.paymentReason,allocation_status:"Allocated",explanation:this.otherPaymentExplanation,payment_allocation_status:{description:"",name:"Allocated"},payment_group_reference:this.paymentGroup.payment_group_reference,case_type:this.caseType,user_name:this.userName},e=new be(this.ccdReference,this.unAllocatedPayment,this.caseType,this.exceptionReference,e),this.bulkScaningPaymentService.postBSPaymentStrategic(e,this.paymentGroup.payment_group_reference).subscribe(function(e){n.errorMessage=n.errorHandlerService.getServerErrorMessage(!1),JSON.parse(e).success&&n.gotoCasetransationPage()},function(e){n.errorMessage=n.errorHandlerService.getServerErrorMessage(!0),window.scrollTo(0,0),n.isConfirmButtondisabled=!1}))},Fe.prototype.saveAndContinue=function(){var e,t;this.paymentGroup&&(this.isMoreDetailsBoxHide=!0,this.overUnderPaymentForm.get("moreDetails").reset(),this.overUnderPaymentForm.get("moreDetails").setValue(""),this.overUnderPaymentForm.get("userName").reset(),this.overUnderPaymentForm.get("userName").setValue(""),this.paymentReason="",this.paymentExplanation="",e=this.getGroupOutstandingAmount(this.paymentGroup),t=this.unAllocatedPayment.amount-e,this.isRemainingAmountGtZero=0<t,this.isRemainingAmountLtZero=t<0,this.paymentSectionLabel=this.isRemainingAmountGtZero?{title:"There is an Over payment of",reason:"Provide a reason. This will be used in the Refund process."}:this.isRemainingAmountLtZero?{title:"There is an Under payment of",reason:"Provide a reason"}:{title:"Amount left to be allocated",reason:""},this.feedbackUrlLabel=this.isRemainingAmountGtZero?"CONFIRMALLOCATION_SURPLUS":this.isRemainingAmountLtZero?"CONFIRMALLOCATION_SHORTFALL":"CONFIRMALLOCATION",this.remainingAmount=this.isRemainingAmountGtZero?t:this.isRemainingAmountLtZero?-1*t:0,this.afterFeeAllocateOutstanding=0<=t?0:-1*t,this.amountForAllocation=e>=this.unAllocatedPayment.amount?this.unAllocatedPayment.amount:e,this.isTurnOff&&(this.viewStatus="allocatePaymentConfirmation"))},Fe.prototype.getUnassignedPayment=function(){var s=this;this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(function(e){s.errorMessage=s.errorHandlerService.getServerErrorMessage(!1),s.unAllocatedPayment=e.data.payments.filter(function(e){return e&&e.dcn_reference==s.bspaymentdcn})[0],s.siteID=e.data.responsible_service_id;var t=e.data.ccd_reference,n=e.data.exception_record_reference,e=t&&t===s.ccdCaseNumber?null:s.ccdCaseNumber;s.ccdReference=t||null,s.exceptionReference=n||e,s.getPaymentGroupDetails()},function(e){s.errorMessage=s.errorHandlerService.getServerErrorMessage(!0)})},Fe.prototype.selectRadioButton=function(e,t){this.isMoreDetailsBoxHide=!0,"explanation"===t&&"other"===e&&(this.isPaymentDetailsEmpty=!1,this.isPaymentDetailsInvalid=!1,this.paymentDetailsMinHasError=!1,this.paymentDetailsMaxHasError=!1,this.isMoreDetailsBoxHide=!1)},Fe.prototype.OrderListSelectEvent=function(e){this.isContinueButtondisabled=!1,this.recordId=e},Fe.prototype.redirectToOrderFeeSearchPage=function(){this.paymentLibComponent.paymentGroupReference=this.recordId,this.paymentLibComponent.isTurnOff=this.isTurnOff,this.paymentLibComponent.viewName="fee-summary"},Fe.decorators=[{type:f.Component,args:[{selector:"app-allocate-payments",template:'<div class="allocate-payments">\n <ng-container *ngIf="viewStatus === \'mainForm\' && !isTurnOff">\n\n <div class="govuk-breadcrumbs">\n <ol class="govuk-breadcrumbs__list">\n <li class="govuk-breadcrumbs__list-item">\n <a (click)="gotoCasetransationPage()" class="govuk-back-link govuk-label">Back</a>\n </li>\n </ol>\n </div>\n \n <div class="paymentrequest">\n <h1 class="govuk-heading-xl govuk-!-margin-top-3 govuk-!-margin-bottom-4">Select payment request</h1>\n <p class="govuk-!-margin-top-5 casererf">Case reference: {{ccdReference}}</p>\n </div>\n \n <div *ngFor="let orderRef of orderLevelFees; let i of index;" class="multiple-choice unprocessed-payments--radio-button">\n <input id="\'orderfee\'+i+\'\'"\n aria-label="orderLevelRecord"\n name="orderLevelRecord"\n \n (click)="OrderListSelectEvent(orderRef.orderRefId)"\n type="radio"\n value="{{orderRef.orderTotalFees}}" />\n <label for="radio-inline-1"> {{orderRef.orderTotalFees | currency :\'GBP\':\'symbol\':\'1.2-2\'}}({{orderRef.orderStatus}})</label>\n </div>\n \n <div class="paymentrequest">\n <button [disabled]="isContinueButtondisabled" type="submit" (click)="redirectToOrderFeeSearchPage()" class="button allbtb button--disabled govuk-!-margin-right-1">\n Continue\n </button>\n </div>\n \n </ng-container>\n\n <div *ngIf="viewStatus===\'mainForm\' && isTurnOff">\n <input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'ALLOCATEPAYMENTS\'>\n <div class="govuk-breadcrumbs" *ngIf="paymentRef">\n <ol class="govuk-breadcrumbs__list">\n <li class="govuk-breadcrumbs__list-item">\n <a href="#" (click)="gotoSummaryPage($event)" class="govuk-back-link">Back</a>\n </li>\n </ol>\n </div>\n <div class="govuk-heading-section">\n <h1 class="govuk-heading-xl">Allocate payment to fee group</h1>\n <h2 class="govuk-heading-l">Amount left to be allocated:\n {{ unAllocatedPayment.amount | currency:\'GBP\':\'symbol-narrow\':\'1.2-2\' }}</h2>\n </div>\n <div class="payment-group-section" *ngFor="let paymentGroup of paymentGroups">\n <h3 class="govuk-heading-m">Group reference: {{paymentGroup.payment_group_reference}}</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"></td>\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" *ngFor="let fee of paymentGroup.fees; let i = index;">\n <td class="govuk-table__cell govuk-table__cell--col1 govuk-table__custom--col1"\n [attr.rowspan]="paymentGroup.fees.length" *ngIf="i==0">\n <div class="multiple-choice">\n <input id="unpaiedFee-{{i}}" name="unassignedRecord" type="radio"\n (click)="selectedPaymentGroup(paymentGroup)" />\n <label for="unpaiedFee-{{i}}"></label>\n </div>\n </td>\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"> {{fee.volume? fee.volume : \'-\'}} </td>\n <td class="govuk-table__cell govuk-table__cell--col4">\n {{ fee.fee_amount | currency:\'GBP\':\'symbol-narrow\':\'1.2-2\' }} </td>\n <td class="govuk-table__cell govuk-table__cell--col5">\n {{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"\n [attr.rowspan]="paymentGroup.fees.length" *ngIf="i==0">\n {{getGroupOutstandingAmount(paymentGroup) | currency:\'GBP\':\'symbol-narrow\':\'1.2-2\' }} </td>\n\n </tr>\n\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 class="govuk-button-group-allocate">\n <button type="button" class="button govuk-!-margin-right-1" [disabled]="isContinueButtondisabled"\n (click)="saveAndContinue()">\n Continue\n </button>\n <button type="button" class="button govuk-button--secondary" (click)="gotoCasetransationPage()">\n Cancel\n </button>\n </div>\n </div>\n\n <ng-container *ngIf="(viewStatus === \'mainForm\' && isTurnOff) || viewStatus === \'allocatePaymentConfirmation\'">\n <ccpay-error-banner *ngIf="errorMessage.showError" [errorMessage]="errorMessage"></ccpay-error-banner>\n <input #myInput type=\'hidden\' id=\'iFrameDrivenImageValue\' value=\'{{feedbackUrlLabel}}\'>\n <h1 class="govuk-heading-xl">Confirm allocation</h1>\n <h2 class="govuk-heading-l govuk-heading-l--custom">\n Amount to be allocated: {{amountForAllocation | currency:\'GBP\':\'symbol-narrow\':\'1.2-2\'}}\n </h2>\n <div class="payment-group-section" *ngIf="paymentGroup">\n <h3 class="govuk-heading-m--custom" *ngIf="isTurnOff">Group reference: {{paymentGroup.payment_group_reference}}\n </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">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 </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"> {{fee.volume? fee.volume : \'-\'}} </td>\n <td class="govuk-table__cell govuk-table__cell--col4">\n {{ fee.fee_amount | currency:\'GBP\':\'symbol-narrow\':\'1.2-2\' }} </td>\n <td class="govuk-table__cell govuk-table__cell--col5">\n {{fee.calculated_amount | currency:\'GBP\':\'symbol-narrow\':\'1.2-2\'}} </td>\n <td class="govuk-table__cell govuk-table__cell--col6" [attr.rowspan]="paymentGroup.fees.length"\n *ngIf="i==0"> {{afterFeeAllocateOutstanding | 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 class="govuk-warning-text" *ngIf="isRemainingAmountGtZero || isRemainingAmountLtZero || remainingAmount === 0">\n <span class="govuk-warning-text__icon" aria-hidden="true">!</span>\n <strong class="govuk-warning-text__text govuk-warning-text__custom">\n <span class="govuk-warning-text__assistive">Warning</span>\n {{paymentSectionLabel.title}} {{ remainingAmount | currency:\'GBP\':\'symbol-narrow\':\'1.2-2\' }}\n </strong>\n </div>\n <div class="govuk-form-group" *ngIf="isRemainingAmountGtZero || isRemainingAmountLtZero">\n <div class="govuk-form-group">\n <fieldset class="govuk-fieldset" aria-describedby="how-contacted-conditional-hint">\n <span id="how-contacted-conditional-hint" class="govuk-hint"\n [ngClass]="{\'inline-error-message\': paymentReasonHasError}">\n {{paymentSectionLabel.reason}}\n </span>\n <div\n [ngClass]="paymentReasonHasError ? \'govuk-radios govuk-radios--conditional form-group-error\' : \'govuk-radios govuk-radios--conditional\'"\n data-module="govuk-radios" *ngIf="isRemainingAmountGtZero">\n <div class="govuk-radios__item" *ngFor="let reason of reasonList.overPayment | keyValue">\n <input class="govuk-radios__input" id="{{reason.key}}" name="paymentReason" type="radio"\n [(ngModel)]="paymentReason" value={{reason.value}}>\n <label class="govuk-label govuk-radios__label govuk-font__custom" for="how-contacted-conditional">\n {{reason.value}}\n </label>\n </div>\n </div>\n <div\n [ngClass]="paymentReasonHasError ? \'govuk-radios govuk-radios--conditional form-group-error\' : \'govuk-radios govuk-radios--conditional\'"\n data-module="govuk-radios" *ngIf="isRemainingAmountLtZero">\n <div class="govuk-radios__item" *ngFor="let reason of reasonList.shortFall | keyValue">\n <input class="govuk-radios__input" id="{{reason.key}}" name="paymentReason" type="radio"\n [(ngModel)]="paymentReason" value={{reason.value}}>\n <label class="govuk-label govuk-radios__label govuk-font__custom" for="how-contacted-conditional">\n {{reason.value}}\n </label>\n </div>\n </div>\n </fieldset>\n </div>\n <div class="govuk-form-group">\n <fieldset class="govuk-fieldset" aria-describedby="how-contacted-conditional-hint">\n <span id="how-contacted-conditional-hint" class="govuk-hint"\n [ngClass]="{\'inline-error-message\': paymentExplanationHasError}">\n Provide an explanatory note\n </span>\n <div\n [ngClass]="paymentExplanationHasError ? \'govuk-radios govuk-radios--conditional form-group-error\' : \'govuk-radios govuk-radios--conditional\'"\n data-module="govuk-radios" *ngIf="isRemainingAmountGtZero">\n <div class="govuk-radios__item" *ngFor="let explanation of explanationList.overPayment | keyValue">\n <input class="govuk-radios__input" id="{{explanation.key}}" name="paymentExplanation" type="radio"\n [(ngModel)]="paymentExplanation" value={{explanation.value}}\n (click)="selectRadioButton(explanation.key, \'explanation\')">\n <label class="govuk-label govuk-radios__label govuk-font__custom" for="how-contacted-conditional">\n {{explanation.value}}\n </label>\n </div>\n </div>\n <div\n [ngClass]="paymentExplanationHasError ? \'govuk-radios govuk-radios--conditional form-group-error\' : \'govuk-radios govuk-radios--conditional\'"\n data-module="govuk-radios" *ngIf="isRemainingAmountLtZero">\n <div class="govuk-radios__item" *ngFor="let explanation of explanationList.shortFall | keyValue">\n <input class="govuk-radios__input" id="{{explanation.key}}" name="paymentExplanation" type="radio"\n [(ngModel)]="paymentExplanation" value={{explanation.value}}\n (click)="selectRadioButton(explanation.key, \'explanation\')">\n <label class="govuk-label govuk-radios__label govuk-font__custom" for="how-contacted-conditional">\n {{explanation.value}}\n </label>\n </div>\n </div>\n </fieldset>\n </div>\n </div>\n\n <form [formGroup]="overUnderPaymentForm" novalidate>\n <div\n [ngClass]="isMoreDetailsBoxHide ? \'govuk-radios__conditional govuk-radios__conditional--hidden\' : isPaymentDetailsEmpty || isPaymentDetailsInvalid || paymentDetailsMinHasError || paymentDetailsMaxHasError ? \'govuk-radios__conditional inline-error-border\' : \'govuk-radios__conditional\'"\n id="conditional-how-contacted-conditional-3">\n <div class="govuk-form-group">\n <span id="more-detail-hint" class="govuk-hint govuk-font__custom">\n Please enter details\n </span>\n <textarea class="govuk-textarea"\n [ngClass]="{\'inline-error-class\': isPaymentDetailsEmpty || isPaymentDetailsInvalid || paymentDetailsMinHasError || paymentDetailsMaxHasError}"\n id="moreDetails" name="moreDetails" rows="5" formControlName="moreDetails">\n </textarea>\n <p class="inline-error-message"\n *ngIf="isPaymentDetailsEmpty || isPaymentDetailsInvalid || paymentDetailsMinHasError || paymentDetailsMaxHasError">\n <span *ngIf="isPaymentDetailsEmpty">Enter a explanation</span>\n <span *ngIf="isPaymentDetailsInvalid">Enter a valid explanation</span>\n <span *ngIf="paymentDetailsMinHasError">Explanation should be at least 3 characters.</span>\n <span *ngIf="paymentDetailsMaxHasError">Explanation should be 255 characters or under.</span>\n </p>\n </div>\n </div>\n <div class="govuk-button--group">\n <button type="submit" [disabled]="isConfirmButtondisabled"\n [ngClass]="isConfirmButtondisabled ? \'button button--disabled\' : \'button\'"\n (click)="confirmAllocatePayement()">\n Confirm\n </button>\n <button type="button" class="button govuk-button--secondary" (click)="cancelAllocatePayment($event)">\n Cancel\n </button>\n </div>\n </form>\n </ng-container>\n</div>',styles:[".allocate-payments{margin:20px 0}.allocate-payments .govuk-table__cell--col1,.allocate-payments .govuk-table__cell--col3{width:10%}.allocate-payments .govuk-table__cell--col2,.allocate-payments .govuk-table__cell--col6{width:25%}.allocate-payments .govuk-table__cell--col4,.allocate-payments .govuk-table__cell--col5{width:15%}.allocate-payments .govuk-button-group-allocate{display:flex;justify-content:flex-start}.allocate-payments .govuk-button--secondary{margin-left:10px;background-color:#b3b8bdf2}.allocate-payments .govuk-custom-warning__message{font-size:30px;position:relative;top:12px;font-weight:700}.allocate-payments .govuk-warning-text-custom{margin-bottom:0!important;padding:10px 0 5px}.allocate-payments .govuk-table__custom--col1{padding-top:0;padding-bottom:20px;padding-left:15px}.allocate-payments .govuk-table__custom--col6{text-align:center}.allocate-payments .govuk-list__custom{padding-left:20px}.allocate-payments .govuk-font__custom,.allocate-payments .govuk-heading-m--custom,.allocate-payments .govuk-hint,.allocate-payments .govuk-label--m,.allocate-payments .govuk-list__custom,.allocate-payments .govuk-radios__item,.allocate-payments .govuk-warning-text__custom{font-size:19px}.allocate-payments .govuk-radios__conditional--hidden{display:none}.allocate-payments .form-group-error{border-left:5px solid #b10e1e;padding-left:15px}.allocate-payments .inline-error-class{outline:#a71414 solid 3px;outline-offset:0}.allocate-payments .inline-error-message{color:#a71414;font-weight:700;margin-top:10px}.allocate-payments .inline-error-border{border-color:#a71414}.allbtb{margin-top:2em}.govuk-back-link{font-size:1.5rem!important}.multiple-choice{font-size:19px}.casererf{align-self:flex-end;font-size:19px}.paymentrequest{display:flex;flex-direction:row;justify-content:space-between;width:960px}"]}]}],Fe.ctorParameters=function(){return[{type:S},{type:oe},{type:g.FormBuilder},{type:D},{type:k},{type:ie},{type:b}]},Fe.propDecorators={isTurnOff:[{type:f.Input}],caseType:[{type:f.Input}]},Fe);function Fe(e,t,n,s,a,o,r){this.errorHandlerService=e,this.caseTransactionsService=t,this.formBuilder=n,this.paymentViewService=s,this.paymentLibComponent=a,this.bulkScaningPaymentService=o,this.OrderslistService=r,this.unAllocatedPayment={amount:0},this.siteID=null,this.errorMessage=this.errorHandlerService.getServerErrorMessage(!1),this.paymentGroups=[],this.isMoreDetailsBoxHide=!0,this.isConfirmButtondisabled=!1,this.isContinueButtondisabled=!0,this.otherPaymentExplanation=null,this.selectedOption=null,this.isFeeAmountZero=!1,this.paymentReasonHasError=!1,this.paymentExplanationHasError=!1,this.isPaymentDetailsEmpty=!1,this.isPaymentDetailsInvalid=!1,this.paymentDetailsMinHasError=!1,this.paymentDetailsMaxHasError=!1,this.isUserNameEmpty=!1,this.isUserNameInvalid=!1,this.ccdReference=null,this.exceptionReference=null,this.paymentReason=null,this.paymentExplanation=null,this.userName=null,this.paymentRef=null,this.isStrategicFixEnable=!0,this.orderLevelFees=[],this.cookieUserName=[],this.userNameField=null,this.reasonList={overPayment:{hwfReward:"Help with Fees (HWF) awarded. Please include the HWF reference number in the explanatory note",wrongFee:"Incorrect payment received",notIssueCase:"Unable to issue case",otherDeduction:"Other"},shortFall:{helpWithFee:"Help with Fees (HWF) application declined",wrongFee:"Incorrect payment received",other:"Other"}},this.explanationList={overPayment:{referRefund:"Details in case notes. Refund due",noRefund:"Details in case notes. No refund due",noCase:"No case created. Refund due",other:"Other"},shortFall:{holdCase:"I have put a stop on the case and contacted the applicant requesting the balance of payment",heldCase:"I have put a stop on the case. The applicant needs to be contacted to request the balance of payment",other:"Other"}},this.refund={reason:{duplicate:"Duplicate payment",humanerror:"Human error",caseWithdrawn:"Case withdrawn",other:"Other"}}}var Te=function(e,t,n,s,a){this.ccd_case_number=e,this.fee=t,this.hwf_amount=n,this.hwf_reference=s,this.case_type=a},Le=function(e,t){this.hwf_amount=e,this.hwf_reference=t},De=function(e,t){this.payment_reference=e,this.refund_reason=t},Ne=function(e){this.remissionReference=e},xe=(Be.prototype.ngOnInit=function(){var t=this;this["default"]="Select a different reason",this.pattern1="^([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})$",this.pattern2="^([A-Za-z]{2}[0-9]{2})-([0-9]{6})$",""!==this.viewCompStatus&&this.viewCompStatus!==undefined&&(this.viewStatus=""),this.remission,this.fee&&(this.amount=this.fee.volume*this.fee.calculated_amount),this.payment&&(this.remessionPayment=this.payment,"Success"===this.payment.status&&(this.isPaymentSuccess=!0)),this.option=this.paymentLibComponent.SELECTED_OPTION,this.bsPaymentDcnNumber=this.paymentLibComponent.bspaymentdcn,this.remissionForm=this.formBuilder.group({remissionCode:new g.FormControl("",g.Validators.compose([g.Validators.required,g.Validators.pattern("("+this.pattern1+")|("+this.pattern2+")")])),amount:new g.FormControl("",g.Validators.compose([g.Validators.required,g.Validators.pattern("^[0-9]+(.[0-9]{1,2})?$")])),refundReason:new g.FormControl("",g.Validators.compose([g.Validators.required])),refundDDReason:new g.FormControl("",g.Validators.compose([g.Validators.required])),reason:new g.FormControl}),this.remissionForm.controls.refundDDReason.setValue("Select a different reason",{onlySelf:!0}),""===this.viewCompStatus&&(this.viewStatus="main"),"issuerefund"===this.viewCompStatus&&this.refundService.getRefundReasons().subscribe(function(e){t.refundReasons=e.filter(function(e){return!1===e.recently_used}),t.refundReasons=t.refundReasons.filter(function(e){return"Retrospective remission"!==e.name}),t.cd.detectChanges(),t.commonRefundReasons=e.filter(function(e){return!0===e.recently_used}),t.commonRefundReasons.sort(function(e,t){return e.toString().localeCompare(t)}),t.cd.detectChanges()}),"processretroremissonpage"===this.viewCompStatus&&this.isFromRefundListPage&&(this.viewStatus="processretroremissonpage")},Be.prototype.addRemission=function(){this.resetRemissionForm([!1,!1,!1,!1,!1,!1],"All");var e=this.remissionForm.controls,t=this.fee.calculated_amount>e.amount.value;this.remissionForm.controls.refundReason.setErrors(null),this.remissionForm.controls.refundDDReason.setErrors(null),this.remissionForm.dirty&&this.remissionForm.valid&&t?this.viewStatus="confirmation":(""==e.remissionCode.value&&this.resetRemissionForm([!0,!1,!1,!1,!1,!1],"remissionCode"),""!=e.remissionCode.value&&e.remissionCode.invalid&&this.resetRemissionForm([!1,!0,!1,!1,!1,!1],"remissionCode"),""==e.amount.value&&this.resetRemissionForm([!1,!1,!0,!1,!1,!1],"amount"),""!=e.amount.value&&e.amount.invalid&&this.resetRemissionForm([!1,!0,!1,!0,!1,!1],"amount"),e.amount.valid&&!t&&this.resetRemissionForm([!1,!1,!1,!1,!0,!1],"amount"))},Be.prototype.confirmRemission=function(){var t=this;this.isConfirmationBtnDisabled=!0;var e=this.remissionForm.controls.amount.value,e=this.fee.net_amount-e,e=new Te(this.ccdCaseNumber,this.fee,e,this.remissionForm.controls.remissionCode.value,this.caseType);this.paymentViewService.postPaymentGroupWithRemissions(decodeURIComponent(this.paymentGroupRef).trim(),this.fee.id,e).subscribe(function(e){JSON.parse(e).success&&(e=t.isTurnOff?"&isTurnOff=Enable":"&isTurnOff=Disable",e+="&caseType="+t.caseType,e+=t.isNewPcipalOff?"&isNewPcipalOff=Enable":"&isNewPcipalOff=Disable",e+=t.isOldPcipalOff?"&isOldPcipalOff=Enable":"&isOldPcipalOff=Disable",t.paymentLibComponent.bspaymentdcn?(t.router.routeReuseStrategy.shouldReuseRoute=function(){return!1},t.router.onSameUrlNavigation="reload",t.router.navigateByUrl("/payment-history/"+t.ccdCaseNumber+"?view=fee-summary&selectedOption="+t.option+"&paymentGroupRef="+t.paymentGroupRef+"&dcn="+t.paymentLibComponent.bspaymentdcn+e)):t.gotoCasetransationPage())},function(e){t.errorMessage=e,t.isConfirmationBtnDisabled=!1})},Be.prototype.resetRemissionForm=function(e,t){"All"===t?(this.isRemissionCodeEmpty=e[0],this.remissionCodeHasError=e[1],this.isAmountEmpty=e[2],this.amountHasError=e[3],this.isRemissionLessThanFeeError=e[4],this.isReasonEmpty=e[5]):"remissionCode"===t||"All"===t?(this.isRemissionCodeEmpty=e[0],this.remissionCodeHasError=e[1]):"amount"===t||"All"===t?(this.isAmountEmpty=e[2],this.amountHasError=e[3],this.isRemissionLessThanFeeError=e[4]):"reason"!==t&&"All"!==t||(this.isReasonEmpty=e[5])},Be.prototype.addRemissionCode=function(){this.errorMessage=!1,this.viewStatus="",this.isRefundRemission=!1,this.resetRemissionForm([!1,!1,!1,!1,!1,!1],"All");var e=this.remissionForm.controls;this.remissionForm.controls.refundReason.setErrors(null),this.remissionForm.controls.refundDDReason.setErrors(null),this.remissionForm.controls.amount.setErrors(null),this.remissionForm.dirty&&this.remissionForm.valid?(this.viewCompStatus="",this.viewStatus="processretroremissonpage"):(""==e.remissionCode.value&&this.resetRemissionForm([!0,!1,!1,!1,!1],"remissionCode"),""!=e.remissionCode.value&&e.remissionCode.invalid&&this.resetRemissionForm([!1,!0,!1,!1,!1],"remissionCode"),""==e.amount.value&&this.resetRemissionForm([!1,!1,!0,!1,!1],"amount"),""!=e.amount.value&&e.amount.invalid&&this.resetRemissionForm([!1,!0,!1,!0,!1],"amount"),""==e.reason.value&&this.resetRemissionForm([!1,!1,!1,!0,!1,!0],"reason"),e.amount.valid&&this.resetRemissionForm([!1,!1,!1,!1,!0],"amount"))},Be.prototype.gotoAddRetroRemissionCodePage=function(){return this.errorMessage=!1,this.isRefundRemission?(this.paymentLibComponent.iscancelClicked=!0,this.refundListAmount.emit(),void(this.paymentLibComponent.isFromRefundStatusPage=!0)):this.isFromRefundListPage?(this.paymentLibComponent.iscancelClicked=!0,this.refundListReason.emit({reason:this.selectedRefundReason,code:this.refundReason}),void(this.paymentLibComponent.isFromRefundStatusPage=!0)):(this.viewStatus="",this.selectedValue="yes",this.viewCompStatus="addremission",this.isRefundRemission=!0,this.errorMessage="",void(this.isFromPaymentDetailPage&&(this.paymentLibComponent.viewName="payment-view")))},Be.prototype.gotoCheckRetroRemissionPage=function(e){var t,n;this.paymentLibComponent.iscancelClicked=!1,this.errorMessage="",this.resetRemissionForm([!1,!1,!1,!1,!1],"All"),this.isRefundRemission?""==(t=this.remissionForm.controls).amount.value||t.amount.value<0?this.resetRemissionForm([!1,!1,!0,!1,!1],"amount"):(this.viewCompStatus="",this.viewStatus="checkretroremissionpage",this.refundListAmount.emit(t.amount.value)):(t=this.remissionForm.controls,n=this.fee.calculated_amount>=t.amount.value,this.remissionForm.dirty&&(""==t.amount.value||t.amount.value<0?this.resetRemissionForm([!1,!1,!0,!1,!1],"amount"):""!=t.amount.value&&t.amount.invalid?this.resetRemissionForm([!1,!1,!1,!0,!1],"amount"):t.amount.valid&&!n?this.resetRemissionForm([!1,!1,!1,!1,!0],"amount"):(this.viewCompStatus="",this.viewStatus="checkretroremissionpage")))},Be.prototype.gotoProcessRetroRemissionPage=function(){this.viewStatus="",this.viewCompStatus="addremission",this.isRefundRemission=!0,this.errorMessage=""},Be.prototype.confirmRetroRemission=function(){var e,t=this;this.isConfirmationBtnDisabled||(this.retroRemission=!0,this.remissionamt=this.remissionForm.controls.amount.value,e=new Le(this.remissionamt,this.remissionForm.controls.remissionCode.value),this.paymentViewService.postPaymentGroupWithRetroRemissions(decodeURIComponent(this.paymentGroupRef).trim(),this.fee.id,e).subscribe(function(e){JSON.parse(e)&&(t.isRemissionApplied=!0,t.viewCompStatus="",t.viewStatus="retroremissionconfirmationpage",t.remissionReference=JSON.parse(e).remission_reference)},function(e){t.errorMessage=e,t.isConfirmationBtnDisabled=!1,t.cd.detectChanges()}))},Be.prototype.processRefund=function(){var t=this;this.errorMessage="",this.isConfirmationBtnDisabled=!0,this.isRefundRemission&&(this.retroRemission=!0),this.remissionReference!==undefined&&""!==this.remissionReference||(this.remissionReference=this.remission.remission_reference);var e=new Ne(this.remissionReference);this.paymentViewService.postRefundRetroRemission(e).subscribe(function(e){JSON.parse(e)&&(t.viewCompStatus="",t.viewStatus="refundconfirmationpage",t.refundReference=JSON.parse(e).refund_reference,t.refundAmount=JSON.parse(e).refund_amount)},function(e){t.errorMessage=e,t.isConfirmationBtnDisabled=!1})},Be.prototype.gotoIssueRefundConfirmation=function(e){this.paymentLibComponent.iscancelClicked=!1,"true"===this.paymentLibComponent.REFUNDLIST&&(this.isFromRefundListPage=!0),this.errorMessage="",this.refundReason=(null===this.remissionForm.controls.refundReason.value?this.remissionForm.controls.refundDDReason:this.remissionForm.controls.refundReason).value,this.refundReason&&"Select a different reason"!==this.refundReason?!this.selectedRefundReason.includes("Other")||""!=this.remissionForm.controls.reason.value&&null!=this.remissionForm.controls.reason.value?this.selectedRefundReason.includes("Other")&&""!==this.remissionForm.controls.reason.value?(this.refundHasError=!1,this.refundReason+="-"+this.remissionForm.controls.reason.value,this.displayRefundReason=this.selectedRefundReason+"-"+this.remissionForm.controls.reason.value,this.isFromRefundListPage?this.refundListReason.emit({reason:this.displayRefundReason,code:this.refundReason}):(this.viewCompStatus="",this.viewStatus="checkissuerefundpage")):(this.displayRefundReason=this.selectedRefundReason,this.isFromRefundListPage?(this.paymentLibComponent.isFromRefundStatusPage=!0,this.refundListReason.emit({reason:this.selectedRefundReason,code:this.refundReason})):(this.viewCompStatus="",this.viewStatus="checkissuerefundpage")):this.resetRemissionForm([!1,!1,!1,!0,!1,!0],"reason"):this.refundHasError=!0},Be.prototype.gotoIssueRefundPage=function(){this.errorMessage="",this.viewCompStatus="issuerefund",this.viewStatus="",this.isRefundRemission=!0,this.errorMessage=!1,this.refundHasError=!1,this.isReasonEmpty=!1},Be.prototype.changeIssueRefundReason=function(){this.errorMessage="",this.refundHasError=!1,this.isReasonEmpty=!1,this.viewCompStatus="issuerefund",this.viewStatus="",this.isRefundRemission=!0},Be.prototype.confirmIssueRefund=function(){var t=this;this.isConfirmationBtnDisabled=!0,this.errorMessage="",this.isRefundRemission&&(this.retroRemission=!0);var e=new De(this.payment.reference,this.refundReason);this.paymentViewService.postRefundsReason(e).subscribe(function(e){JSON.parse(e)&&(t.viewCompStatus="",t.viewStatus="refundconfirmationpage",t.refundReference=JSON.parse(e).refund_reference,JSON.parse(e).refund_amount&&(t.refundAmount=JSON.parse(e).refund_amount))},function(e){t.errorMessage=e,t.isConfirmationBtnDisabled=!1,t.cd.detectChanges()})},Be.prototype.confirmRetroRefund=function(){var t=this;this.isConfirmationBtnDisabled=!0,this.errorMessage="",this.isRefundRemission&&(this.retroRemission=!0);var e=new De(this.payment.reference,"RR004-Retrospective remission");this.paymentViewService.postRefundsReason(e).subscribe(function(e){JSON.parse(e)&&(t.viewCompStatus="",t.viewStatus="retrorefundconfirmationpage",t.refundReference=JSON.parse(e).refund_reference,JSON.parse(e).refund_amount&&(t.refundAmount=JSON.parse(e).refund_amount))},function(e){t.errorMessage=e,t.isConfirmationBtnDisabled=!1})},Be.prototype.selectRadioButton=function(e,t){localStorage.setItem("myradio",e);var n=this.remissionForm.controls;n.refundDDReason.setValue("Select a different reason",{onlySelf:!0}),n.reason.reset(),this.isRefundReasonsSelected=!0,this.errorMessage=!1,this.isReasonEmpty=!1,this.showReasonText=!1,this.refundHasError=!1,this.selectedRefundReason=e,this.selectedRefundReason.includes("Other")&&(this.showReasonText=!0,this.refundHasError=!1,this.refundReason=e)},Be.prototype.selectchange=function(e){var t=this.remissionForm.controls;t.refundReason.reset(),t.reason.reset(),this.isRefundReasonsSelected=!1,this.showReasonText=!1,this.refundHasError=!1,this.selectedRefundReason=e.target.options[e.target.options.selectedIndex].id,this.reasonLength=29-this.selectedRefundReason.split("- ")[1].length,this.selectedRefundReason.includes("Other")&&(this.showReasonText=!0,this.refundHasError=!1,this.refundReason=e.target.options[e.target.options.selectedIndex].id)},Be.prototype.gotoServiceRequestPage=function(e){var t=this;this.errorMessage="",e.preventDefault(),this.isFromServiceRequestPage&&!this.isFromPaymentDetailPage?(this.viewStatus="order-full-view",this.viewCompStatus=""):this.isFromRefundListPage?(this.paymentLibComponent.iscancelClicked=!0,this.refundListReason.emit({reason:this.selectedRefundReason,code:this.refundReason}),this.paymentLibComponent.isFromRefundStatusPage=!0):(this.paymentLibComponent.paymentMethod=this.payment.method,this.paymentLibComponent.paymentGroupReference=this.paymentLibComponent.paymentGroupReference,this.paymentLibComponent.paymentReference=this.payment.reference,this.paymentLibComponent.viewName="payment-view",this.OrderslistService.setOrderRef(this.orderRef),this.OrderslistService.setorderCCDEvent(this.orderCCDEvent),this.OrderslistService.setorderCreated(this.orderCreated),this.OrderslistService.setorderDetail(this.orderDetail),this.OrderslistService.setorderParty(this.orderParty),this.OrderslistService.setorderTotalPayments(this.orderTotalPayments),this.OrderslistService.setorderRemissionTotal(this.orderRemissionTotal),this.OrderslistService.setorderFeesTotal(this.orderFeesTotal),this.viewStatus="payment-view",this.sendOrderDetail=this.orderDetail,this.sendOrderRef=this.orderRef,this.LOGGEDINUSERROLES===undefined&&this.OrderslistService.getUserRolesList().subscribe(function(e){return t.LOGGEDINUSERROLES=e}),this.viewCompStatus="")},Be.prototype.gotoCasetransationPage=function(){this.OrderslistService.setnavigationPage("casetransactions"),this.errorMessage="",this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.VIEW="case-transactions",this.paymentLibComponent.ISTURNOFF=this.isTurnOff,this.paymentLibComponent.ISNEWPCIPALOFF=this.isNewPcipalOff,this.paymentLibComponent.ISOLDPCIPALOFF=this.isOldPcipalOff,this.paymentLibComponent.isFromServiceRequestPage=!0,this.resetOrderData();var e=this.bsPaymentDcnNumber?"&dcn="+this.bsPaymentDcnNumber:"";e+=this.paymentLibComponent.ISBSENABLE?"&isBulkScanning=Enable":"&isBulkScanning=Disable",e+=this.paymentLibComponent.ISTURNOFF?"&isTurnOff=Enable":"&isTurnOff=Disable",e+=this.isStrategicFixEnable?"&isStFixEnable=Enable":"&isStFixEnable=Disable",e+="&caseType="+this.caseType,e+=this.paymentLibComponent.ISNEWPCIPALOFF?"&isNewPcipalOff=Enable":"&isNewPcipalOff=Disable",e+=this.paymentLibComponent.ISOLDPCIPALOFF?"&isOldPcipalOff=Enable":"&isOldPcipalOff=Disable";e="/payment-history/"+this.ccdCaseNumber+"?view=case-transactions&takePayment="+this.paymentLibComponent.TAKEPAYMENT+"&selectedOption="+this.option+e;this.router.routeReuseStrategy.shouldReuseRoute=function(){return!1},this.router.onSameUrlNavigation="reload",this.router.navigateByUrl(e)},Be.prototype.gotoCasetransationPageCancelBtnClicked=function(e){e.preventDefault(),this.paymentLibComponent.isFromServiceRequestPage?this.paymentLibComponent.REFUNDLIST?this.paymentLibComponent.viewName="refund-list":(this.paymentLibComponent.TAKEPAYMENT===undefined&&this.paymentLibComponent.SERVICEREQUEST===undefined&&(this.paymentLibComponent.SERVICEREQUEST="false"),this.OrderslistService.setisFromServiceRequestPage(!1),this.OrderslistService.setpaymentPageView({method:"",payment_group_reference:"",reference:""}),this.OrderslistService.setnavigationPage("casetransactions"),this.errorMessage="",this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.ISTURNOFF=this.isTurnOff,this.paymentLibComponent.ISNEWPCIPALOFF=this.isNewPcipalOff,this.paymentLibComponent.ISOLDPCIPALOFF=this.isOldPcipalOff,this.paymentLibComponent.isFromServiceRequestPage=!0,this.paymentLibComponent.ISBSENABLE=!0,e=this.bsPaymentDcnNumber?"&dcn="+this.bsPaymentDcnNumber:"",e+=this.paymentLibComponent.ISBSENABLE?"&isBulkScanning=Enable":"&isBulkScanning=Disable",e+=this.paymentLibComponent.ISTURNOFF?"&isTurnOff=Enable":"&isTurnOff=Disable",e+=this.isStrategicFixEnable?"&isStFixEnable=Enable":"&isStFixEnable=Disable",e+="&caseType="+this.caseType,e+=this.paymentLibComponent.ISNEWPCIPALOFF?"&isNewPcipalOff=Enable":"&isNewPcipalOff=Disable",e+=this.paymentLibComponent.ISOLDPCIPALOFF?"&isOldPcipalOff=Enable":"&isOldPcipalOff=Disable",this.isFromPaymentDetailPage&&(e+=this.paymentLibComponent.isFromPaymentDetailPage),e=this.paymentLibComponent.SERVICEREQUEST?"/payment-history/"+this.ccdCaseNumber+"?selectedOption="+this.option+e:"/payment-history/"+this.ccdCaseNumber+"?view=case-transactions&takePayment="+this.paymentLibComponent.TAKEPAYMENT+"&selectedOption="+this.option+e,this.router.routeReuseStrategy.shouldReuseRoute=function(){return!1},this.router.onSameUrlNavigation="reload",this.router.navigateByUrl(e)):(this.OrderslistService.setnavigationPage("casetransactions"),this.OrderslistService.setisFromServiceRequestPage(!1),this.paymentLibComponent.VIEW="case-transactions",this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.ISBSENABLE=!0,this.paymentLibComponent.isRefundStatusView=!1)},Be.prototype.resetOrderData=function(){this.OrderslistService.setOrderRef(null),this.OrderslistService.setorderCCDEvent(null),this.OrderslistService.setorderCreated(null),this.OrderslistService.setorderDetail(null),this.OrderslistService.setorderParty(null),this.OrderslistService.setorderTotalPayments(null),this.OrderslistService.setorderRemissionTotal(null),this.OrderslistService.setorderFeesTotal(null)},Be.prototype.getFormattedCurrency=function(e){return e.toString().includes(".")?e:e.toString().concat(".00")},Be.decorators=[{type:f.Component,args:[{selector:"ccpay-add-remission",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">£</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 \x3c!-- Add retro remission changes--\x3e\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">£</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">£{{ 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 \x3c!-- Issue Refund Section --\x3e\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’re 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 \x3c!-- <div *ngIf = "{{refund.name}} !== \'Retrospective remission\'"> --\x3e\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’re 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 \x3c!-- </div> --\x3e\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 \x3c!-- <option value="" selected=\'selected\'>Select a different reason</option> --\x3e\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’re 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 \x3c!--Retro Refund--\x3e\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 [isOldPcipalOff] = "isOldPcipalOff"\n [isNewPcipalOff] = "isNewPcipalOff"\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',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}"]}]}],Be.ctorParameters=function(){return[{type:g.FormBuilder},{type:h.Router},{type:D},{type:k},{type:M},{type:f.ChangeDetectorRef},{type:b}]},Be.propDecorators={fee:[{type:f.Input}],payment:[{type:f.Input}],remission:[{type:f.Input}],ccdCaseNumber:[{type:f.Input}],caseType:[{type:f.Input}],viewCompStatus:[{type:f.Input}],paymentGroupRef:[{type:f.Input}],isTurnOff:[{type:f.Input}],isRefundRemission:[{type:f.Input}],isOldPcipalOff:[{type:f.Input}],isNewPcipalOff:[{type:f.Input}],isStrategicFixEnable:[{type:f.Input}],paidAmount:[{type:f.Input}],isFromRefundListPage:[{type:f.Input}],isFromPaymentDetailPage:[{type:f.Input}],isFromServiceRequestPage:[{type:f.Input}],feeamount:[{type:f.Input}],LOGGEDINUSERROLES:[{type:f.Input,args:["LOGGEDINUSERROLES"]}],orderDetail:[{type:f.Input,args:["orderDetail"]}],orderRef:[{type:f.Input,args:["orderRef"]}],orderStatus:[{type:f.Input,args:["orderStatus"]}],orderParty:[{type:f.Input,args:["orderParty"]}],orderCreated:[{type:f.Input,args:["orderCreated"]}],orderCCDEvent:[{type:f.Input,args:["orderCCDEvent"]}],takePayment:[{type:f.Input,args:["takepayment"]}],orderFeesTotal:[{type:f.Input,args:["orderFeesTotal"]}],orderTotalPayments:[{type:f.Input,args:["orderTotalPayments"]}],orderRemissionTotal:[{type:f.Input,args:["orderRemissionTotal"]}],cancelRemission:[{type:f.Output}],refundListReason:[{type:f.Output}],refundListAmount:[{type:f.Output}]},Be);function Be(e,t,n,s,a,o,r){this.formBuilder=e,this.router=t,this.paymentViewService=n,this.paymentLibComponent=s,this.refundService=a,this.cd=o,this.OrderslistService=r,this.cancelRemission=new f.EventEmitter,this.refundListReason=new f.EventEmitter,this.refundListAmount=new f.EventEmitter,this.refund={reason:{duplicate:"Duplicate payment",humanerror:"Human error",caseWithdrawn:"Case withdrawn",other:"Other"}},this.hasErrors=!1,this.viewStatus="main",this.errorMessage=null,this.option=null,this.isConfirmationBtnDisabled=!1,this.selectedValue="yes",this.retroRemission=!1,this.remissionReference="",this.paymentExplanationHasError=!1,this.isRemissionCodeEmpty=!1,this.remissionCodeHasError=!1,this.isAmountEmpty=!1,this.isReasonEmpty=!1,this.amountHasError=!1,this.isRemissionLessThanFeeError=!1,this.refundHasError=!1,this.isPaymentSuccess=!1,this.isRemissionApplied=!1,this.commonRefundReasons=[]}var Me=(Ge.prototype.transform=function(e,t){var n=/^([0-9]{4})+([0-9]{4})+([0-9]{4})+([0-9]{4})$/;return e.match(n)?e.replace(n,"$1-$2-$3-$4"):e},Ge.decorators=[{type:f.Pipe,args:[{name:"ccdHyphens"}]}],Ge.ctorParameters=function(){return[]},Ge);function Ge(){}var Ue=(He.prototype.transform=function(e,t){return e&&e[0].toUpperCase()+e.slice(1)||""},He.decorators=[{type:f.Pipe,args:[{name:"capitalize"}]}],He.ctorParameters=function(){return[]},He);function He(){}var Ve=(je.prototype.transform=function(e){var t,n=[];for(t in e)e.hasOwnProperty(t)&&n.push({key:t,value:e[t]});return n},je.decorators=[{type:f.Pipe,args:[{name:"keyValue"}]}],je.ctorParameters=function(){return[]},je);function je(){}var qe=(ze.prototype.transform=function(e){return this.sanitizer.bypassSecurityTrustHtml(e)},ze.decorators=[{type:f.Pipe,args:[{name:"sanitizeHtml"}]}],ze.ctorParameters=function(){return[{type:n.DomSanitizer}]},ze);function ze(e){this.sanitizer=e}var Ye=(We.prototype.exportAsExcelFile=function(e,t){var n=(n=null!==t.match("Data_Loss")?(n=l.utils.json_to_sheet(e,{header:["loss_resp","payment_asset_dcn","env_ref","env_item","resp_service_id","resp_service_name","date_banked","bgc_batch","payment_method","amount"]}),this.setDataLossReportHeaders(n)):null!==t.match("Unprocessed")?(n=l.utils.json_to_sheet(e,{header:["resp_service_id","resp_service_name","exception_ref","ccd_ref","date_banked","bgc_batch","payment_asset_dcn","env_ref","env_item","payment_method","amount"]}),this.setUnprocessedReportHeaders(n)):null!==t.match("Processed_Unallocated")?(n=l.utils.json_to_sheet(e,{header:["resp_service_id","resp_service_name","allocation_status","receiving_office","allocation_reason","ccd_exception_reference","ccd_case_reference","payment_asset_dcn","env_ref","env_item","date_banked","bgc_batch","payment_method","amount"]}),this.setProcessedUnallocatedReportHeaders(n)):(n=l.utils.json_to_sheet(e,{header:["resp_service_id","resp_service_name","surplus_shortfall","balance","payment_amount","ccd_case_reference","ccd_exception_reference","processed_date","reason","explanation","user_name"]}),this.setShortFallReportHeaders(n)),this.autoFitColumns(n,e)),n=l.write({Sheets:{data:n},SheetNames:["data"]},{bookType:"xlsx",type:"array"});this.saveAsExcelFile(n,t)},We.prototype.autoFitColumns=function(e,t){for(var n=[],s=[],a=Object,o=0;o<t.length;o++)for(var r=a.values(t[o]),i=a.keys(t[o]),l=0;l<r.length;l++)null===r[l]&&(r[l]=""),n[l]=i[l].length>=r[l].length?i[l].length+2:r[l].length+1,r[l].length===undefined&&(n[l]=i[l].length+2),s.push({width:+n[l]});return e["!cols"]=s,e},We.prototype.setDataLossReportHeaders=function(e){return e.A1.v="Loss_Resp",e.B1.v="Payment_Asset_DCN",e.C1.v="Envelope_Ref",e.D1.v="Envelope_Item",e.E1.v="Resp_Service ID",e.F1.v="Resp_Service Name",e.G1.v="Date_Banked",e.H1.v="BGC_Batch",e.I1.v="Payment_Method",e.J1.v="Amount",e},We.prototype.setUnprocessedReportHeaders=function(e){return e.A1.v="Resp_Service ID",e.B1.v="Resp_Service Name",e.C1.v="Exception_Ref",e.D1.v="CCD_Ref",e.E1.v="Date_Banked",e.F1.v="BGC_Batch",e.G1.v="Payment_Asset_DCN",e.H1.v="Envelope_Ref",e.I1.v="Envelope_Item",e.J1.v="Payment_Method",e.K1.v="Amount",e},We.prototype.setProcessedUnallocatedReportHeaders=function(e){return e.A1.v="Resp_Service ID",e.B1.v="Resp_Service Name",e.C1.v="Allocation_Status",e.D1.v="Receiving_Office",e.E1.v="Allocation_Reason",e.F1.v="CCD_Exception_Ref",e.G1.v="CCD_Case_Ref",e.H1.v="Payment_Asset_DCN",e.I1.v="Envelope_Ref",e.J1.v="Envelope_Item",e.K1.v="Date_Banked",e.L1.v="BGC_Batch",e.M1.v="Payment_Method",e.N1.v="Amount",e},We.prototype.setShortFallReportHeaders=function(e){return e.A1.v="Resp_Service ID",e.B1.v="Resp_Service Name",e.C1.v="Over Payment_Under Payment",e.D1.v="Balance",e.E1.v="Payment_Amount",e.F1.v="CCD_Case_Ref",e.G1.v="Exception_Ref",e.H1.v="Processed_Date",e.I1.v="Reason",e.J1.v="Explanation",e.K1.v="Updated Name",e},We.prototype.saveAsExcelFile=function(e,t){e=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8"});i.saveAs(e,t+".xlsx")},We.decorators=[{type:f.Injectable}],We.ctorParameters=function(){return[]},We);function We(){}var $e=(Je.prototype.ngOnInit=function(){this.fromValidation()},Je.prototype.getToday=function(){return(new Date).toISOString().split("T")[0]},Je.prototype.getSelectedFromDate=function(){this.validateDates(this.reportsForm.get("selectedreport").value)},Je.prototype.validateDates=function(e){var t=this.tranformDate(this.reportsForm.get("startDate").value),n=this.tranformDate(this.reportsForm.get("endDate").value),s=7<(new Date(t)-new Date(n))/-864e5;new Date(t)>new Date(n)&&""!==n?(this.reportsForm.get("startDate").setValue(""),this.isDateRangeBetnWeek=!1,this.isStartDateLesthanEndDate=!0):(this.isDateRangeBetnWeek=!(!e||"SURPLUS_AND_SHORTFALL"!==e||!s),this.isStartDateLesthanEndDate=!1)},Je.prototype.fromValidation=function(){this.reportsForm=this.formBuilder.group({selectedreport:new g.FormControl(""),startDate:new g.FormControl(""),endDate:new g.FormControl("")})},Je.prototype.downloadReport=function(){var a=this;this.isDownLoadButtondisabled=!0;var s=[{loss_resp:"",payment_asset_dcn:"",env_ref:"",env_item:"",resp_service_id:"",resp_service_name:"",date_banked:"",bgc_batch:"",payment_method:"",amount:""}],o=[{resp_service_id:"",resp_service_name:"",exception_ref:"",ccd_ref:"",date_banked:"",bgc_batch:"",payment_asset_dcn:"",env_ref:"",env_item:"",payment_method:"",amount:""}],r=[{resp_service_id:"",resp_service_name:"",allocation_status:"",receiving_office:"",allocation_reason:"",ccd_exception_ref:"",ccd_case_ref:"",payment_asset_dcn:"",env_ref:"",env_item:"",date_banked:"",bgc_batch:"",payment_method:"",amount:"",updated_by:""}],i=[{resp_service_id:"",resp_service_name:"",surplus_shortfall:"",balance:"",payment_amount:"",ccd_case_reference:"",ccd_exception_reference:"",processed_date:"",reason:"",explanation:"",user_name:""}],l=this.reportsForm.get("selectedreport").value,c=this.tranformDate(this.reportsForm.get("startDate").value),d=this.tranformDate(this.reportsForm.get("endDate").value);"PROCESSED_UNALLOCATED"===l||"SURPLUS_AND_SHORTFALL"===l?this.paymentViewService.downloadSelectedReport(l,c,d).subscribe(function(e){a.errorMessage=a.errorHandlerService.getServerErrorMessage(!1);var e=JSON.parse(e),t={data:a.applyDateFormat(e)};if(0===t.data.length&&"PROCESSED_UNALLOCATED"===l?t.data=r:0===t.data.length&&"SURPLUS_AND_SHORTFALL"===l&&(t.data=i),0<e.data.length)for(var n=0;n<t.data.length;n++){t.data[n].payment_asset_dcn!==undefined&&(t.data[n].env_ref=t.data[n].payment_asset_dcn.substr(0,13),t.data[n].env_item=t.data[n].payment_asset_dcn.substr(13,21)),t.data[n].amount!==undefined&&(t.data[n].amount=a.convertToFloatValue(t.data[n].amount)),t.data[n].balance!==undefined&&(t.data[n].balance=a.convertToFloatValue(t.data[n].balance));var s=t.data[n].surplus_shortfall;s!==undefined&&(t.data[n].surplus_shortfall="Surplus"==s?"Over payment":"Under payment"),t.data[n].payment_amount!==undefined&&(t.data[n].payment_amount=a.convertToFloatValue(t.data[n].payment_amount))}a.isDownLoadButtondisabled=!1,a.xlFileService.exportAsExcelFile(t.data,a.getFileName(a.reportsForm.get("selectedreport").value,c,d))},function(e){a.isDownLoadButtondisabled=!1,a.errorMessage=a.errorHandlerService.getServerErrorMessage(!0)}):this.bulkScaningPaymentService.downloadSelectedReport(l,c,d).subscribe(function(e){a.errorMessage=a.errorHandlerService.getServerErrorMessage(!1);var e=JSON.parse(e),t={data:a.applyDateFormat(e)};if(0===t.data.length&&"DATA_LOSS"===l?t.data=s:0===t.data.length&&"UNPROCESSED"===l&&(t.data=o),0<e.data.length)for(var n=0;n<t.data.length;n++)t.data[n].amount!==undefined&&(t.data[n].amount=a.convertToFloatValue(t.data[n].amount)),t.data[n].payment_asset_dcn!==undefined&&(t.data[n].env_ref=t.data[n].payment_asset_dcn.substr(0,13),t.data[n].env_item=t.data[n].payment_asset_dcn.substr(13,21));a.isDownLoadButtondisabled=!1,a.xlFileService.exportAsExcelFile(t.data,a.getFileName(a.reportsForm.get("selectedreport").value,c,d))},function(e){a.isDownLoadButtondisabled=!1,a.errorMessage=a.errorHandlerService.getServerErrorMessage(!0)})},Je.prototype.getFileName=function(e,t,n){var s="en-US",a=r.formatDate(t,"ddMMyy",s),t=r.formatDate(n,"ddMMyy",s),n=new Date,n=r.formatDate(n,"ddMMyy",s)+"_"+this.getTwodigit(n.getHours())+this.getTwodigit(n.getMinutes())+this.getTwodigit(n.getSeconds());return this.getCamelCaseString(e)+"_"+a+"_To_"+t+"_Run_"+n},Je.prototype.tranformDate=function(e){var t="";return t=e?(e=e.split("-"))[1]+"/"+e[2]+"/"+e[0]:t},Je.prototype.getTwodigit=function(e){return("0"+e).slice(-2)},Je.prototype.getCamelCaseString=function(e){var t;switch(e){case"UNPROCESSED":t="Unprocessed";break;case"DATA_LOSS":t="Data_Loss";break;case"PROCESSED_UNALLOCATED":t="Processed_Unallocated";break;case"SURPLUS_AND_SHORTFALL":t="Over Payment_Under Payment";break;default:t=e}return t},Je.prototype.applyDateFormat=function(e){return e.data.map(function(e){return e.date_banked&&(e.date_banked=r.formatDate(e.date_banked,"dd/MM/yyyy","en-US")),e})},Je.prototype.convertToFloatValue=function(e){return e?Number.parseFloat(e).toFixed(2):"0.00"},Je.decorators=[{type:f.Component,args:[{selector:"ccpay-reports",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 ‘Unidentified’ or ‘Transferred’ (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 \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',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}"]}]}],Je.ctorParameters=function(){return[{type:Ye},{type:S},{type:g.FormBuilder},{type:ie},{type:D}]},Je);function Je(e,t,n,s,a){this.xlFileService=e,this.errorHandlerService=t,this.formBuilder=n,this.bulkScaningPaymentService=s,this.paymentViewService=a,this.isDownLoadButtondisabled=!1,this.isStartDateLesthanEndDate=!1,this.isDateRangeBetnWeek=!1,this.errorMessage=this.errorHandlerService.getServerErrorMessage(!1),this.paymentGroups=[]}var Ke=(Ze.prototype.ngOnInit=function(){this.errorMessage=this.errorMessage,"sent for approval"===this.STATUS.toLowerCase()?this.isApprovalFlow=!0:this.isApprovalFlow=!1,this.refundList=this.DATASOURCE,this.dataSource=new c.MatTableDataSource(this.refundList),this.actualcount=this.dataSource.data.length,this.refundList!==undefined&&(this.userLst=this.refundList.reduce(function(e,t){return e[t.user_full_name]="",e},{}),this.userLst=Object.keys(this.userLst)),this.userLst.sort(function(e,t){return e.toString().localeCompare(t)})},Ze.prototype.ngAfterViewInit=function(){this.dataSource.sort=this.sort,this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.cdRef.detectChanges()},Ze.prototype.applyFilter=function(e){e=(e=e.trim()).toLowerCase(),this.dataSource.filter=e},Ze.prototype.selectchange=function(e){this.dataSource.filter=e.target.value,this.actualcount=this.dataSource.data.length,this.dataSource.paginator=this.paginator},Ze.prototype.goToRefundProcessComponent=function(e,t){this.paymentLibComponent.refundlistsource=t,this.paymentLibComponent.refundReference=e,this.paymentLibComponent.viewName="process-refund"},Ze.prototype.goToRefundViewComponent=function(e,t){this.OrderslistService.setRefundView(t),this.paymentLibComponent.viewName="refundstatuslist",this.paymentLibComponent.CCD_CASE_NUMBER=t.ccd_case_number,this.paymentLibComponent.isRefundStatusView=!0,this.paymentLibComponent.isCallFromRefundList=!0},Ze.prototype.goToCaseReview=function(e,t){this.router.navigate(["/cases/case-details/"+e],{relativeTo:this.activeRoute})},Ze.decorators=[{type:f.Component,args:[{selector:"ccpay-table",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> <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',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}"]}]}],Ze.ctorParameters=function(){return[{type:k},{type:f.ChangeDetectorRef},{type:b},{type:h.Router},{type:h.ActivatedRoute}]},Ze.propDecorators={DATASOURCE:[{type:f.Input,args:["DATASOURCE"]}],STATUS:[{type:f.Input,args:["STATUS"]}],errorMessage:[{type:f.Input,args:["errorMessage"]}],paginator:[{type:f.ViewChild,args:[d.MatPaginator]}],sort:[{type:f.ViewChild,args:[u.MatSort]}]},Ze);function Ze(e,t,n,s,a){this.paymentLibComponent=e,this.cdRef=t,this.OrderslistService=n,this.router=s,this.activeRoute=a,this.displayedColumns=["ccd_case_number","refund_reference","user_full_name","date_created","date_updated","Action"]}var Xe=function(e,t){this.refund_reason=e,this.amount=t},Qe=(et.prototype.ngOnInit=function(){var t=this;if(this.resetRemissionForm([!1,!1,!1,!1],"All"),this.bsPaymentDcnNumber=this.paymentLibComponent.bspaymentdcn,this.isCallFromRefundList=this.paymentLibComponent.isCallFromRefundList,this.paymentLibComponent.isRefundStatusView?(this.viewName="refundview",this.OrderslistService.getRefundView().subscribe(function(e){return t.refundlist=e}),this.OrderslistService.getCCDCaseNumberforRefund.subscribe(function(e){return t.ccdCaseNumber=e})):(this.viewName="refundstatuslist",this.refundService.getRefundStatusList(this.ccdCaseNumber).subscribe(function(e){t.rejectedRefundList=e.refund_list})),this.refundStatusForm=this.formBuilder.group({amount:new g.FormControl("",g.Validators.compose([g.Validators.required,g.Validators.pattern("^[0-9]+(.[0-9]{1,2})?$")])),refundReason:new g.FormControl("",g.Validators.compose([g.Validators.required])),reason:new g.FormControl}),this.refundlist!==undefined){if(this.getRefundsStatusHistoryList(),this.LOGGEDINUSERROLES.some(function(e){return e.includes("payments-refund-approver")}))return this.isProcessRefund=!0,void(this.refundButtonState=this.refundlist.refund_status.name);this.LOGGEDINUSERROLES.some(function(e){return e.includes("payments-refund")})&&(this.isProcessRefund=!1,this.refundButtonState=this.refundlist.refund_status.name)}},et.prototype.getRefundsStatusHistoryList=function(){var t=this;this.refundlist!==undefined&&this.refundService.getRefundStatusHistory(this.refundlist.refund_reference).subscribe(function(e){t.refundStatusHistories=e.status_history_dto_list,t.isLastUpdatedByCurrentUser=e.last_updated_by_current_user})},et.prototype.goToRefundView=function(e,t){this.OrderslistService.setRefundView(e),this.OrderslistService.setCCDCaseNumber(this.ccdCaseNumber),this.paymentLibComponent.viewName="refundstatuslist",this.paymentLibComponent.isRefundStatusView=!0,this.refundlist=e,this.OrderslistService.setnavigationPage(t)},et.prototype.loadCaseTransactionPage=function(){this.OrderslistService.setnavigationPage("casetransactions"),this.OrderslistService.setisFromServiceRequestPage(!1),this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.ISBSENABLE=!0,this.paymentLibComponent.isRefundStatusView=!1},et.prototype.loadRefundListPage=function(){var t=this;this.OrderslistService.getnavigationPageValue().subscribe(function(e){return t.navigationpage=e}),"casetransactions"===this.navigationpage?this.loadCaseTransactionPage():this.paymentLibComponent.viewName="refund-list"},et.prototype.gotoReviewDetailsPage=function(e){this.errorMessage=!1,this.paymentLibComponent.isRefundStatusView=!0,this.ngOnInit()},et.prototype.gotoReviewAndReSubmitPage=function(){var t=this;this.viewName="reviewandsubmitview",this.oldRefundReason=this.refundlist.reason,this.changedAmount=this.refundlist.amount,this.refundreason=this.refundStatusHistories.filter(function(e){return"update required"===e.status.toLowerCase()})[0].notes,this.refundService.getRefundReasons().subscribe(function(e){t.refundReasons=e})},et.prototype.gotoRefundReasonPage=function(){this.isRefundBtnDisabled=!1,this.paymentLibComponent.REFUNDLIST="true",this.paymentLibComponent.isFromRefundStatusPage=!0,this.ccdCaseNumber=this.paymentLibComponent.CCD_CASE_NUMBER,this.errorMessage=!1,this.viewName="issuerefund"},et.prototype.gotoAmountPage=function(){this.errorMessage=!1,this.paymentLibComponent.REFUNDLIST="true",this.isRefundBtnDisabled=!1,this.ccdCaseNumber=this.paymentLibComponent.CCD_CASE_NUMBER,this.paymentLibComponent.isFromRefundStatusPage=!0,this.viewName="processretroremissonpage"},et.prototype.goToReviewAndSubmitView=function(){var e=this.refundStatusForm.controls;this.refundStatusForm.dirty&&(""==e.amount.value?this.resetRemissionForm([!0,!1,!1,!1],"amount"):""!=e.amount.value&&e.amount.invalid?this.resetRemissionForm([!1,!0,!1,!1],"amount"):""==e.reason.value?this.resetRemissionForm([!1,!1,!1,!0],"reason"):(this.refundlist.reason=e.reason.value,this.viewName="reviewandsubmitview"))},et.prototype.resetRemissionForm=function(e,t){"All"===t?(this.isAmountEmpty=e[0],this.amountHasError=e[1],this.isRemissionLessThanFeeError=e[2],this.isReasonEmpty=e[3]):"amount"===t||"All"===t?(this.isAmountEmpty=e[0],this.amountHasError=e[1],this.isRemissionLessThanFeeError=e[2]):"reason"!==t&&"All"!==t||(this.isReasonEmpty=e[3])},et.prototype.selectRadioButton=function(e,t){this.refundHasError=!1,"Other"===(this.selectedRefundReason=e)&&(this.refundHasError=!1,this.refundReason=e)},et.prototype.getRefundListReason=function(e){this.paymentLibComponent.isFromRefundStatusPage&&!this.paymentLibComponent.iscancelClicked?(this.refundlist.reason=e.reason,this.refundCode=e.code):this.isRefundBtnDisabled=!0,this.viewName="reviewandsubmitview",this.paymentLibComponent.CCD_CASE_NUMBER=this.ccdCaseNumber},et.prototype.getRefundAmount=function(e){this.paymentLibComponent.isFromRefundStatusPage&&!this.paymentLibComponent.iscancelClicked?0<e&&(this.changedAmount=e):this.isRefundBtnDisabled=!0,this.viewName="reviewandsubmitview",this.paymentLibComponent.CCD_CASE_NUMBER=this.ccdCaseNumber},et.prototype.gotoReviewRefundConfirmationPage=function(){var t=this;this.oldRefundReason===this.refundlist.reason&&(this.refundCode="");var e=new Xe(this.refundCode,this.changedAmount);this.refundService.patchResubmitRefund(e,this.refundlist.refund_reference).subscribe(function(e){JSON.parse(e)&&(t.refundReference=JSON.parse(e).refund_reference,t.refundAmount=JSON.parse(e).refund_amount,t.viewName="reviewrefundconfirmationpage")},function(e){t.errorMessage=e.replace(/"/g,"")})},et.prototype.goToRefundProcessComponent=function(e,t){this.paymentLibComponent.refundlistsource=t,this.paymentLibComponent.refundReference=e,this.paymentLibComponent.viewName="process-refund"},et.decorators=[{type:f.Component,args:[{selector:"ccpay-refund-status",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 \x3c!-- payments --\x3e\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">£{{ 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>£{{refundlist?.amount | number:\'.2\' }}</td>\n </tr>\n\n </tbody>\n </table>\n\n \x3c!-- Status history --\x3e\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\'">\n <div *ngIf="refundButtonState===\'Update required\'">\n \x3c!-- <div *ngIf="refundButtonState===\'sent back\'"> --\x3e\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 \x3c!-- <div *ngIf="isProcessRefund && !isLastUpdatedByCurrentUser && refundButtonState===\'sent for approval\'"> --\x3e\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 \x3c!-- <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> --\x3e\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 \x3c!-- <td class="govuk-table__cell">{{ refundlist?.reason }}</td>\n <a (click)="gotoRefundReasonPage()" class="govuk-link right">Change</a> --\x3e\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"> £{{ 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 \x3c!-- <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> --\x3e\n \x3c!-- <p>\n <a (click)="loadRefundListPage()" href="" class="cancelbtn">Cancel</a>\n </p> --\x3e\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',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}"]}]}],et.ctorParameters=function(){return[{type:g.FormBuilder},{type:M},{type:k},{type:D},{type:h.Router},{type:b}]},et.propDecorators={LOGGEDINUSERROLES:[{type:f.Input,args:["LOGGEDINUSERROLES"]}],isOldPcipalOff:[{type:f.Input}],isNewPcipalOff:[{type:f.Input}],ccdCaseNumber:[{type:f.Input}],isTurnOff:[{type:f.Input}]},et);function et(e,t,n,s,a,o){var r=this;this.formBuilder=e,this.refundService=t,this.paymentLibComponent=n,this.paymentViewService=s,this.router=a,this.OrderslistService=o,this.LOGGEDINUSERROLES=[],this.rejectedRefundList=[],this.approvalStatus="Sent for approval",this.rejectStatus="Update required",this.errorMessage=null,this.refundButtonState="",this.isAmountEmpty=!1,this.isReasonEmpty=!1,this.amountHasError=!1,this.isRemissionLessThanFeeError=!1,this.refundHasError=!1,this.refundReasons=[],this.isRefundBtnDisabled=!0,this.isLastUpdatedByCurrentUser=!0,this.isProcessRefund=!1,this.allowedRolesToAccessRefund=["payments-refund-approver","payments-refund"],this.check4AllowedRoles2AccessRefund=function(){return r.allowedRolesToAccessRefund.some(function(e){return-1!==r.LOGGEDINUSERROLES.indexOf(e)})}}var tt=(nt.prototype.ngOnInit=function(){var t=this;this.viewStatus===undefined&&(this.viewStatus=this.paymentLibComponent.viewName),this.paymentLibComponent.isFromServiceRequestPage&&this.paymentLibComponent.isFromPaymentDetailPage&&this.paymentLibComponent.isFromPaymentDetailPage&&this.paymentLibComponent.isFromServiceRequestPage&&(this.OrderslistService.getorderRefs().subscribe(function(e){return t.orderRef=e}),this.OrderslistService.getorderCCDEvents().subscribe(function(e){return t.orderCCDEvent=e}),this.OrderslistService.getorderCreateds().subscribe(function(e){return t.orderCreated=e}),this.OrderslistService.getorderDetail().subscribe(function(e){return t.orderDetail=e}),this.OrderslistService.getorderPartys().subscribe(function(e){return t.orderParty=e}),this.OrderslistService.getorderRemissionTotals().subscribe(function(e){return t.orderRemissionTotal=e}),this.OrderslistService.getorderFeesTotals().subscribe(function(e){return t.orderFeesTotal=e}),this.OrderslistService.getoorderTotalPaymentss().subscribe(function(e){return t.orderTotalPayments=e}))},nt.prototype.goToServiceRequestPage=function(){this.goToServiceRquestComponent.emit()},nt.prototype.goToCaseTransationPage=function(e){e.preventDefault(),this.OrderslistService.setnavigationPage("servicerequestpage"),this.OrderslistService.setisFromServiceRequestPage(!1),this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.ISBSENABLE=!0,this.paymentLibComponent.isTakePayment=this.paymentLibComponent.TAKEPAYMENT,this.takePayment&&(this.paymentLibComponent.isTakePayment=this.takePayment),this.paymentLibComponent.SERVICEREQUEST="true",this.paymentLibComponent.isFromServiceRequestPage=!1,"false"!==this.isServiceRequest&&(this.paymentLibComponent.isFromServiceRequestPage=!0),this.paymentLibComponent.isFromRefundStatusPage=!1,this.paymentLibComponent.viewName="case-transactions",this.resetOrderData();e=this.paymentLibComponent.ISBSENABLE?"&isBulkScanning=Enable":"&isBulkScanning=Disable";e+=this.paymentLibComponent.ISTURNOFF?"&isTurnOff=Enable":"&isTurnOff=Disable","false"===this.isServiceRequest&&(e+=this.paymentLibComponent.TAKEPAYMENT?"&takePayment=true":"&takePayment=false"),e+=this.isStrategicFixEnable?"&isStFixEnable=Enable":"&isStFixEnable=Disable",e+="false"!==this.isServiceRequest?"&servicerequest=true":"&servicerequest=false",e+="&caseType="+this.paymentLibComponent.CASETYPE,e+=this.paymentLibComponent.ISNEWPCIPALOFF?"&isNewPcipalOff=Enable":"&isNewPcipalOff=Disable",e+=this.paymentLibComponent.ISOLDPCIPALOFF?"&isOldPcipalOff=Enable":"&isOldPcipalOff=Disable";e="/payment-history/"+this.paymentLibComponent.CCD_CASE_NUMBER+"?view=case-transactions&selectedOption="+this.paymentLibComponent.SELECTED_OPTION+e;this.router.routeReuseStrategy.shouldReuseRoute=function(){return!1},this.router.onSameUrlNavigation="reload",this.router.navigateByUrl(e)},nt.prototype.chkForAddRemission=function(e){var t,n;if(this.chkForPBAPayment()&&this.check4AllowedRoles2AccessRefund()){if(0<this.orderDetail[0].remissions.length)try{for(var s=F(this.orderDetail[0].remissions),a=s.next();!a.done;a=s.next())if(a.value.fee_code===e)return!1}catch(o){t={error:o}}finally{try{a&&!a.done&&(n=s["return"])&&n.call(s)}finally{if(t)throw t.error}}return!0}return!1},nt.prototype.chkForPBAPayment=function(){var t=this;if(null!==this.orderDetail&&this.orderDetail!==undefined)return this.orderDetail.forEach(function(e){e.payments&&e.payments.forEach(function(e){"payment by account"===e.method.toLocaleLowerCase()&&t.allowFurtherAccessAfter4Days(e)&&(t.paymentLibComponent.paymentReference=e.reference,t.isPBA=!0)})}),!!this.isPBA},nt.prototype.addRemission=function(e){var t=this;this.chkForAddRemission(e.code)&&(this.feeId=e,this.viewStatus="addremission",this.payment=this.orderDetail[0].payments[0],this.paymentViewService.getApportionPaymentDetails(this.orderDetail[0].payments[0].reference).subscribe(function(e){t.paymentGroup=e,t.paymentGroup.payments=t.paymentGroup.payments.filter(function(e){return e.reference.includes(t.paymentLibComponent.paymentReference)}),t.payment=t.paymentGroup.payments[0]},function(e){return t.errorMessage=e.replace(/"/g,"")}))},nt.prototype.addRefundForRemission=function(e,t,n){var s=this;this.viewStatus="addrefundforremission",this.payment=e,this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(function(e){s.paymentGroup=e,s.paymentGroup.payments=s.paymentGroup.payments.filter(function(e){return e.reference.includes(s.payment.reference)}),s.payment=s.paymentGroup.payments[0],s.remissions=t,s.remissionFeeAmt=n.filter(function(e){return e.code===s.remissions.fee_code})[0].net_amount},function(e){return s.errorMessage=e})},nt.prototype.cancelRemoval=function(){this.viewStatus="main"},nt.prototype.removeFee=function(e){var t=this;this.isRemoveBtnDisabled=!0,this.paymentViewService.deleteFeeFromPaymentGroup(e).subscribe(function(e){window.location.reload()},function(e){t.errorMessage=e,t.isRemoveBtnDisabled=!1})},nt.prototype.chkIssueRefundBtnEnable=function(e){return this.check4AllowedRoles2AccessRefund()&&this.allowFurtherAccessAfter4Days(e)&&"payment by account"===e.method&&"success"===e.status.toLocaleLowerCase()&&(this.isIssueRefunfBtnEnable=!0),!!this.isIssueRefunfBtnEnable},nt.prototype.chkIsRefundRemissionBtnEnable=function(){var t=this;if(null!==this.orderDetail&&this.orderDetail!==undefined)return this.paymentLibComponent.isFromServiceRequestPage=!0,this.orderDetail.forEach(function(e){e.payments&&e.payments.forEach(function(e){"payment by account"===e.method.toLocaleLowerCase()&&"success"===e.status.toLocaleLowerCase()&&t.allowFurtherAccessAfter4Days(e)&&(t.isRefundRemissionBtnEnable=!0)})}),!!this.isRefundRemissionBtnEnable},nt.prototype.issueRefund=function(e){null!==e&&e!==undefined&&this.chkIssueRefundBtnEnable(e)&&(this.viewStatus="issuerefund",this.payment=e,this.paymentLibComponent.isFromServiceRequestPage=!0,this.isRefundRemission=!0)},nt.prototype.goToPayementView=function(e,t,n){this.goToPaymentViewComponent({paymentGroupReference:e,paymentReference:t,paymentMethod:n})},nt.prototype.goToPaymentViewComponent=function(e){this.paymentLibComponent.paymentMethod=e.paymentMethod,this.paymentLibComponent.isFromServiceRequestPage=!0,this.paymentLibComponent.paymentGroupReference=e.paymentGroupReference,this.paymentLibComponent.paymentReference=e.paymentReference,this.OrderslistService.setOrderRef(this.orderRef),this.OrderslistService.setorderCCDEvent(this.orderCCDEvent),this.OrderslistService.setorderCreated(this.orderCreated),this.OrderslistService.setorderDetail(this.orderDetail),this.OrderslistService.setorderParty(this.orderParty),this.OrderslistService.setorderTotalPayments(this.orderTotalPayments),this.OrderslistService.setorderRemissionTotal(this.orderRemissionTotal),this.OrderslistService.setorderFeesTotal(this.orderFeesTotal),this.viewStatus="payment-view"},nt.prototype.resetOrderData=function(){this.OrderslistService.setOrderRef(null),this.OrderslistService.setorderCCDEvent(null),this.OrderslistService.setorderCreated(null),this.OrderslistService.setorderDetail(null),this.OrderslistService.setorderParty(null),this.OrderslistService.setorderTotalPayments(null),this.OrderslistService.setorderRemissionTotal(null),this.OrderslistService.setorderFeesTotal(null)},nt.decorators=[{type:f.Component,args:[{selector:"ccpay-service-request",template:'\x3c!-- Order Full View Details--\x3e\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()" 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 \x3c!-- remissions --\x3e\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 \x3c!-- <td class="govuk-table__cell refundBtn whitespace-inherit" >\n \n </td> --\x3e\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 \x3c!--Payments--\x3e\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 \x3c!-- <td *ngIf="!chkIssueRefundBtnEnable(payment)" class="govuk-table__cell" style="text-align: right;">\n </td> --\x3e\n </tr>\n </tbody>\n </table>\n \n <div *ngIf="order.payments === undefined || order.payments === null">\n \x3c!-- <h3 class="heading-medium mar-17">Payments</h3> --\x3e\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 \n</ng-container>\n<ccpay-add-remission *ngIf="viewStatus === \'addremission\' && feeId"\n[isTurnOff]="isTurnOff"\n[isStrategicFixEnable]="isStrategicFixEnable" \n[isOldPcipalOff]="isOldPcipalOff" \n[viewCompStatus]= "viewStatus"\n[isNewPcipalOff]="isNewPcipalOff" \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[isOldPcipalOff]="isOldPcipalOff" \n[viewCompStatus]= "viewStatus"\n[isNewPcipalOff]="isNewPcipalOff" \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[isOldPcipalOff]="isOldPcipalOff" \n[viewCompStatus]= "viewStatus"\n[isNewPcipalOff]="isNewPcipalOff" \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[isOldPcipalOff] = "isOldPcipalOff"\n[isNewPcipalOff] = "isNewPcipalOff"\n[orderFeesTotal] = "orderFeesTotal"\n[orderTotalPayments] = "orderTotalPayments"\n[orderRemissionTotal] = "orderRemissionTotal">\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>',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}.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%}"]}]}],nt.ctorParameters=function(){return[{type:k},{type:D},{type:b},{type:h.Router}]},nt.propDecorators={LOGGEDINUSERROLES:[{type:f.Input,args:["LOGGEDINUSERROLES"]}],viewStatus:[{type:f.Input,args:["viewStatus"]}],orderDetail:[{type:f.Input,args:["orderDetail"]}],orderRef:[{type:f.Input,args:["orderRef"]}],orderStatus:[{type:f.Input,args:["orderStatus"]}],orderParty:[{type:f.Input,args:["orderParty"]}],orderCreated:[{type:f.Input,args:["orderCreated"]}],orderCCDEvent:[{type:f.Input,args:["orderCCDEvent"]}],orderFeesTotal:[{type:f.Input,args:["orderFeesTotal"]}],orderTotalPayments:[{type:f.Input,args:["orderTotalPayments"]}],orderRemissionTotal:[{type:f.Input,args:["orderRemissionTotal"]}],takePayment:[{type:f.Input,args:["takePayment"]}],ccdCaseNumber:[{type:f.Input,args:["ccdCaseNumber"]}],isServiceRequest:[{type:f.Input,args:["isServiceRequest"]}],goToServiceRquestComponent:[{type:f.Output}]},nt);function nt(e,t,n,s){var a=this;this.paymentLibComponent=e,this.paymentViewService=t,this.OrderslistService=n,this.router=s,this.goToServiceRquestComponent=new f.EventEmitter,this.paymentGroups=[],this.payments=[],this.nonPayments=[],this.allPayments=[],this.remissions=[],this.fees=[],this.isRefundRemission=!0,this.isAddFeeBtnEnabled=!0,this.isExceptionRecord=!1,this.isUnprocessedRecordSelected=!1,this.isAnyFeeGroupAvilable=!0,this.isHistoricGroupAvailable=!1,this.isRemoveBtnDisabled=!1,this.clAmountDue=0,this.isFeeRecordsExist=!1,this.isGrpOutstandingAmtPositive=!1,this.isAddRemissionEnable=!1,this.orderRemissionDetails=[],this.orderLevelFees=[],this.cpoDetails=null,this.isPBA=!1,this.isIssueRefunfBtnEnable=!1,this.isAddRemissionBtnEnabled=!1,this.isRefundRemissionBtnEnable=!1,this.allowedRolesToAccessRefund=["payments-refund-approver","payments-refund"],this.check4AllowedRoles2AccessRefund=function(){return a.allowedRolesToAccessRefund.some(function(e){return-1!==a.LOGGEDINUSERROLES.indexOf(e)})},this.allowFurtherAccessAfter4Days=function(e){if(null!==e&&e!==undefined){var t=new Date;return t.setDate(t.getDate()-4),t>=new Date(e.date_created)}}}var st=function(e){this.amount=e,this.currency="GBP",this.language="string"},at=function(e,t,n,s){this.account_number=e,this.amount=t,this.currency="GBP",this.customer_reference=n,this.organisation_name=s},ot=(rt.prototype.ngOnInit=function(){var t=this;this.pbaPayOrderRef=this.paymentLibComponent.pbaPayOrderRef,this.viewStatus="pba-payment",this.errorMsg=null,this.paymentViewService.getPBAaccountDetails().subscribe(function(e){t.isGetPBAAccountSucceed=!0,t.orgName=e.organisationEntityResponse.name,t.pbaAccountList=e.organisationEntityResponse.paymentAccount},function(e){t.errorMsg=e})},rt.prototype.selectpbaaccount=function(e){"pbaAccountNumber"===e.currentTarget.id&&(this.isPBADropdownSelected=!0,this.selectedPbaAccount=e.target.value),"pbaAccountRef"===e.currentTarget.id&&(this.pbaAccountRef=e.target.value),""!==this.selectedPbaAccount&&""!==this.pbaAccountRef?this.isContinueButtondisabled=!1:this.isContinueButtondisabled=!0},rt.prototype.saveAndContinue=function(){var e,n=this;this.isPbaAccountSelected?(this.isInSufficiantFund=!1,this.isPBAAccountNotExist=!1,this.isPBAServerError=!1,this.isPBAAccountPaymentSuccess=!1,-1!==this.pbaAccountList.indexOf(this.selectedPbaAccount)?(e=new at(this.selectedPbaAccount,this.pbaPayOrderRef.orderTotalFees,this.pbaAccountRef,this.orgName),this.paymentViewService.postPBAaccountPayment(this.pbaPayOrderRef.orderRefId,e).subscribe(function(e){try{n.pbaAccountrPaymentResult=JSON.parse(e)}catch(t){n.pbaAccountrPaymentResult=e}n.isPBAAccountPaymentSuccess=!0},function(e){"402"==e.status?n.isInSufficiantFund=!0:"410"==e.status?n.isPBAAccountNotExist=!0:"412"==e.status?n.isPBAAccountHold=!0:n.isPBAServerError=!0})):this.isPBAServerError=!0):this.isCardPaymentSelected&&this.cardPayment()},rt.prototype.cardPayment=function(){var t=this;this.isCardPaymentSuccess=!0;var e=new st(this.pbaPayOrderRef.orderTotalFees);this.paymentViewService.postWays2PayCardPayment(this.pbaPayOrderRef.orderRefId,e).subscribe(function(e){e=JSON.parse(e).next_url;window.location.href=e},function(e){t.isCardPaymentSuccess=!1})},rt.prototype.selectPaymentMethod=function(e){"PBA"===e?(this.isPbaAccountSelected=!0,this.isCardPaymentSelected=!1,this.isPBADropdownSelected=!1,this.isContinueButtondisabled=!0,this.selectedPbaAccount=null):"CARD"===e&&(this.isPbaAccountSelected=!1,this.isCardPaymentSelected=!0,this.isPBADropdownSelected=!1,this.isContinueButtondisabled=!1)},rt.prototype.gotoCasetransationPage=function(){this.paymentLibComponent.viewName="case-transactions",this.paymentLibComponent.TAKEPAYMENT=!1,this.paymentLibComponent.ISBSENABLE=!0,this.paymentLibComponent.isFromServiceRequestPage=!0},rt.decorators=[{type:f.Component,args:[{selector:"ccpay-pba-payment",template:'<ng-container *ngIf="viewStatus === \'pba-payment\'">\n\n <div class="govuk-breadcrumbs" *ngIf="!errorMsg && !isPBAAccountPaymentSuccess && !isCardPaymentSuccess">\n <ol class="govuk-breadcrumbs__list">\n <li class="govuk-breadcrumbs__list-item">\n <a href="javascript:void(0)" (click)="gotoCasetransationPage()" class="govuk-back-link pba-payments-16-font">Back</a>\n </li>\n </ol>\n </div>\n <div class="pba-payment" *ngIf="(pbaAccountList?.length > 0 || errorMsg) && !isInSufficiantFund && !isPBAAccountNotExist && !isPBAServerError && !isPBAAccountHold && !isPBAAccountPaymentSuccess && isCardPaymentSuccess">\n \n <div *ngIf="errorMsg" class="govuk-error-summary pba-payments-error-box--size" aria-labelledby="error-summary-title" >\n <h2 class="govuk-error-summary__title govuk-error-summary__title-custom pba-payments-24-font" id="error-summary-title">\n There is a problem\n </h2>\n <div class="govuk-error-summary__body">\n <ul class="govuk-list govuk-error-summary__list">\n <li class="pba-payments-error-16-font">\n Your PBA account cannot be found.\n </li>\n <li class="pba-payments-error-16-font">\n If you know your organisation has a PBA, try again.\n </li>\n <li class="pba-payments-error-16-font">\n You can also pay by credit or debit card.\n </li>\n </ul>\n </div>\n </div>\n \x3c!-- <h1 class="heading-medium margin-top-10-px">Pay fee using Payment by Account (PBA)</h1> --\x3e\n <div class="govuk-form-group margin-top-10-px">\n <label class="govuk-label pba-payments-govuk__label pba-payments-19-font">\n Amount to pay \n </label>\n <span class="pba-payments-19-font">{{pbaPayOrderRef.orderTotalFees | currency :\'GBP\':\'symbol\':\'1.2-2\'}}</span>\n </div>\n\n <div class="govuk-form-group" *ngIf="!errorMsg">\n <fieldset class="govuk-fieldset" aria-describedby="contact-hint">\n <div class="govuk-radios" data-module="govuk-radios">\n <div class="govuk-radios__item">\n <input class="govuk-radios__input" id="pbaAccount" name="paymentSelection" type="radio" value="PBA" (click)="selectPaymentMethod(\'PBA\')" data-aria-controls="pba-account">\n <label class="govuk-label govuk-radios__label pba-payments-19-font pba-payments-font-bld" for="pbaAccount">\n Pay fee using Payment by Account (PBA)\n </label>\n </div>\n <div class="govuk-radios__conditional" id="conditional-contact" *ngIf="isPbaAccountSelected">\n <div class="govuk-form-group pba-payments-select-box--size">\n <label class="govuk-label pba-payments-govuk__label pba-payments-19-font" for="pbaAccountNumber">\n Select a PBA \n </label>\n <select class="form-control short-input" id="pbaAccountNumber" (change)="selectpbaaccount($event)">\n <option value="" selected=\'selected\'>Select option</option>\n <option *ngFor="let pbaAccount of pbaAccountList;" value="{{pbaAccount}}">{{pbaAccount}}</option>\n </select>\n </div>\n <div class="govuk-form-group" *ngIf="!errorMsg && selectedPbaAccount">\n <label class="govuk-label pba-payments-govuk__label pba-payments-24-font" for="pbaAccountNumber">\n Enter a reference for your PBA account statements \n </label>\n <div id="event-name-hint" class="govuk-hint pba-payments-19-font pba-payment-width">\n This should be your own unique reference to identify the case. It will appear on your statements.\n </div>\n <input class="govuk-input pba-payments-ref-box--size pba-payments-19-font" id="pbaAccountRef" (change)="selectpbaaccount($event)" name="pbaAccountRef" type="text" aria-describedby="pbaAccountRef-hint">\n </div>\n \n </div>\n <div class="govuk-radios__item">\n <input class="govuk-radios__input" id="cardPayment" name="paymentSelection" type="radio" value="card" (click)="selectPaymentMethod(\'CARD\')" data-aria-controls="card-payment">\n <label class="govuk-label govuk-radios__label pba-payments-19-font pba-payments-font-bld" for="cardPayment">\n Pay by credit or debit card\n </label>\n </div>\n </div>\n </fieldset>\n </div>\n\n <div class="govuk-button--group" *ngIf="errorMsg">\n <button type="button" class="button pba-payments-19-font govuk-button--secondary pba-payments-margin-10" (click)="gotoCasetransationPage()">\n View Service Request\n </button>\n <button type="submit" class="button pba-payments-19-font pba-payments-20-margin" (click)="cardPayment()">\n Pay by card\n </button>\n </div>\n <div class="govuk-button--group" *ngIf="!errorMsg">\n <button type="submit" [disabled]="isContinueButtondisabled" class="button pba-payments-19-font pba-payments-20-margin" (click)="saveAndContinue()">\n <span *ngIf="!isPBADropdownSelected">Continue</span>\n <span *ngIf="isPBADropdownSelected">Confirm payment</span>\n </button>\n </div>\n </div>\n<ng-container *ngIf="pbaAccountList?.length <= 0 && !errorMsg && isGetPBAAccountSucceed && isCardPaymentSuccess">\n <div class="govuk-width-container">\n <main class="govuk-main-wrapper govuk-main-wrapper--l" id="main-content" role="main">\n <div class="govuk-grid-row">\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 <h2 class="warning-heading-m">You don’t have a registered PBA.</h2>\n </strong>\n </div>\n <div class="pba-payments-margin-top-10">\n <h2 class="heading-medium">Pay by credit or debit card</h2>\n <p class="govuk-body pba-payments-19-font">\n We recommend that you apply to get a new PBA to pay for fees.\n </p>\n <p class="govuk-bod ypba-payments-19-font">\n you can also pay by credit or debit card if you need to pay now\n </p>\n <p class="govuk-body">\n <button type="submit" (click)="cardPayment()" class="button pba-payments-19-font pba-payments-20-margin">\n Pay by card\n </button>\n </p>\n \n </div>\n <div class="pba-payments-margin-top-10">\n <h2 class="heading-medium">Register an existing PBA with MyHMCTS</h2>\n <p class="govuk-body pba-payments-19-font">\n You may find it easier in future to pay by PBA, your organisation administrator will need to \n email <a href="mailto: MyHMCTSsupport@justice.gov.uk">MyHMCTSsupport@justice.gov.uk</a> to ask for your PBA to be registered with your \n MyHMCTS account. You should include your organisation name and PBA number.\n </p>\n <p class="govuk-body pba-payments-19-font">\n It can then take up to 3 days for your account to be updated. You’ll need to start your claim \n again to pay the fee.\n </p>\n </div>\n <div class="pba-payments-margin-top-10">\n <h2 class="heading-medium">Apply to get a new PBA </h2>\n <p class="govuk-body pba-payments-19-font">\n You’ll need to provide details for you and your organisation, including the required credit\n limit for your account.\n </p>\n <p class="govuk-body pba-payments-19-font">\n Once your account has been registered, you’ll need to start your claim again to pay the fee.\n </p>\n <p class="govuk-body pba-payments-19-font">\n Read more information on <a target="_blank" href="https://www.gov.uk/guidance/hmcts-payment-by-account-for-online-services">registering for PBA</a>.\n </p>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n\n<ng-container *ngIf="isInSufficiantFund && isCardPaymentSuccess">\n <div class="govuk-width-container">\n <main class="govuk-main-wrapper govuk-main-wrapper--l" id="main-content" role="main">\n <div class="govuk-grid-row">\n <div class="govuk-error-summary pba-payments-error-box--size" aria-labelledby="error-summary-title">\n <h2 class="govuk-error-summary__title govuk-error-summary__title-custom pba-payments-24-font" id="error-summary-title">\n There is a problem\n </h2>\n <div class="govuk-error-summary__body">\n <ul class="govuk-list govuk-error-summary__list">\n <li class="pba-payments-error-16-font">\n You don\'t have enough funds in your PBA account to pay for this fee.\n </li>\n <li class="pba-payments-error-16-font">\n If you have already topped up your PBA account, wait up to 24 hours for the new balance to become available.\n </li>\n </ul>\n </div>\n </div>\n <div class="pba-payments-margin-top-10">\n <h2 class="heading-medium">Should you need any further advice</h2>\n <p class="govuk-body pba-payments-19-font">\n Email <a href="mailto:MiddleOffice.DDservices@liberata.com">MiddleOffice.DDservices@liberata.com</a> or call <a href="tel:01633-652-125">01633 652 125</a> (option 3) to try to fix the issue.\n </p>\n <p class="govuk-body pba-payments-19-font">\n you can also pay by credit or debit card.\n </p>\n <div class="govuk-button--group">\n <button type="button" class="button pba-payments-19-font govuk-button--secondary pba-payments-margin-10" (click)="gotoCasetransationPage()">\n View Service Request\n </button>\n <button type="submit" class="button pba-payments-19-font pba-payments-20-margin" (click)="cardPayment()">\n Pay by card\n </button>\n </div>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n<ng-container *ngIf="isPBAAccountNotExist && isCardPaymentSuccess">\n <div class="govuk-width-container">\n <main class="govuk-main-wrapper govuk-main-wrapper--l" id="main-content" role="main">\n <div class="govuk-grid-row">\n <div class="govuk-error-summary pba-payments-error-box--size" aria-labelledby="error-summary-title">\n <h2 class="govuk-error-summary__title govuk-error-summary__title-custom pba-payments-24-font" id="error-summary-title">\n There is a problem\n </h2>\n <div class="govuk-error-summary__body">\n <ul class="govuk-list govuk-error-summary__list">\n <li class="pba-payments-error-16-font">\n Your PBA account ({{selectedPbaAccount}}) no longer exists.\n </li>\n </ul>\n </div>\n </div>\n <div class="pba-payments-margin-top-10">\n <h2 class="heading-medium">Should you need any further advice</h2>\n <p class="govuk-body pba-payments-19-font govuk-body-width">\n Email <a href="mailto:MiddleOffice.DDservices@liberata.com">MiddleOffice.DDservices@liberata.com</a> or call <a href="tel:01633-652-125">01633 652 125</a> (option 3) to try to fix the issue.\n </p>\n <p class="govuk-body pba-payments-19-font">\n you can also pay by credit or debit card.\n </p>\n <div class="govuk-button--group">\n <button type="button" class="button pba-payments-19-font govuk-button--secondary pba-payments-margin-10" (click)="gotoCasetransationPage()">\n View Service Request\n </button>\n <button type="submit" class="button pba-payments-19-font pba-payments-20-margin" (click)="cardPayment()">\n Pay by card\n </button>\n </div>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n<ng-container *ngIf="isPBAAccountHold && isCardPaymentSuccess">\n <div class="govuk-width-container">\n <main class="govuk-main-wrapper govuk-main-wrapper--l" id="main-content" role="main">\n <div class="govuk-grid-row">\n <div class="govuk-error-summary pba-payments-error-box--size" aria-labelledby="error-summary-title">\n <h2 class="govuk-error-summary__title govuk-error-summary__title-custom pba-payments-24-font" id="error-summary-title">\n There is a problem\n </h2>\n <div class="govuk-error-summary__body">\n <ul class="govuk-list govuk-error-summary__list">\n <li class="pba-payments-error-16-font">\n Your PBA account ({{selectedPbaAccount}}) has been put on hold.\n </li>\n </ul>\n </div>\n </div>\n <div class="pba-payments-margin-top-10">\n <h2 class="heading-medium">Should you need any further advice</h2>\n <p class="govuk-body pba-payments-19-font govuk-body-width">\n Email <a href="mailto:MiddleOffice.DDservices@liberata.com">MiddleOffice.DDservices@liberata.com</a> or call <a href="tel:01633-652-125">01633 652 125</a> (option 3) to try to fix the issue.\n </p>\n <p class="govuk-body pba-payments-19-font">\n you can also pay by credit or debit card.\n </p>\n <div class="govuk-button--group">\n <button type="button" class="button pba-payments-19-font govuk-button--secondary pba-payments-margin-10" (click)="gotoCasetransationPage()">\n View Service Request\n </button>\n <button type="submit" class="button pba-payments-19-font pba-payments-20-margin" (click)="cardPayment()">\n Pay by card\n </button>\n </div>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n<ng-container *ngIf="isPBAServerError && isCardPaymentSuccess">\n <div class="govuk-width-container">\n <main class="govuk-main-wrapper govuk-main-wrapper--l" id="main-content" role="main">\n <div class="govuk-grid-row">\n <div class="pba-payments-margin-top-10">\n <h2 class="pba-payments-heading-lg">Sorry, there is a problem with the service</h2>\n <p class="govuk-body pba-payments-19-font">\n Try again later.\n </p>\n <p class="govuk-body pba-payments-19-font">\n you can also pay by credit or debit card.\n </p>\n <div class="govuk-button--group">\n <button type="button" class="button pba-payments-19-font govuk-button--secondary pba-payments-margin-10" (click)="gotoCasetransationPage()">\n View Service Request\n </button>\n <button type="submit" class="button pba-payments-19-font pba-payments-20-margin" (click)="cardPayment()">\n Pay by card\n </button>\n </div>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n\n<ng-container *ngIf="isPBAAccountPaymentSuccess && isCardPaymentSuccess">\n <div class="govuk-width-container">\n <main class="govuk-main-wrapper govuk-main-wrapper--l" id="main-content" role="main">\n <div class="govuk-grid-row">\n <div class="govuk-panel govuk-panel--confirmation pba-payments--confirmation">\n <h1 class="govuk-panel__title pba-payments--title">\n Payment successful\n </h1>\n <div class="govuk-panel__body pba-payments__body">\n Your payment reference is <br><strong>{{pbaAccountrPaymentResult.payment_reference}}</strong>\n </div>\n </div>\n <p class="govuk-body pba-payments-19-font">\n <a href="javascript:void(0)" (click)="gotoCasetransationPage()">View service requests</a>\n </p>\n </div>\n </main>\n </div>\n</ng-container>\n\n<ng-container *ngIf="!isCardPaymentSuccess">\n <div class="govuk-width-container">\n <main class="govuk-main-wrapper govuk-main-wrapper--l" id="main-content" role="main">\n <div class="govuk-grid-row">\n <div class="pba-payments-margin-top-10">\n <h2 class="pba-payments-heading-lg">Sorry, there is a problem with the service</h2>\n <p class="govuk-body pba-payments-19-font">\n Try again later.\n </p>\n \x3c!-- <p class="govuk-body pba-payments-19-font">\n you can also <a href="javascript:void(0)" (click)="cardPayment()" >pay by credit or debit card</a>.\n </p> --\x3e\n <p class="govuk-body pba-payments-19-font">\n <a href="javascript:void(0)" (click)="gotoCasetransationPage()">View service requests</a>\n </p>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n</ng-container>\n\n\n\n',styles:[".pba-payments-govuk__label{font-weight:700;line-height:1.31578947}.pba-payments-19-font{font-size:19px}.pba-payments-font-bld{font-weight:700}.pba-payments-16-font{font-size:16px}.pba-payments-24-font{font-size:24px}.pba-payments-20-margin{margin-bottom:20px}.pba-payments-select-box--size{width:40%}.pba-payments-error-box--size{width:80%}.pba-payments-ref-box--size{width:60%}.pba-payments-error-16-font{font-size:16px;line-height:34px}.pba-payments-margin-10{margin-right:10px}.pba-payments-margin-top-10{margin-top:15px}.pba-payments-heading-lg{font-size:40px;font-weight:700;line-height:72px}.pba-payments--confirmation{background:#00703c!important}.pba-payments__body{font-size:36px!important}.pba-payments--title{font-size:48px!important}.warning-heading-m{font-size:29px;font-weight:700}.pba-payment-width{width:75%}.margin-top-10-px{margin-top:10px}.govuk-error-summary:focus{outline:#fd0 solid 3px}.govuk-body-width{width:750px}"]}]}],rt.ctorParameters=function(){return[{type:k},{type:D}]},rt.propDecorators={pbaPayOrderRef:[{type:f.Input}]},rt);function rt(e,t){this.paymentLibComponent=e,this.paymentViewService=t,this.isPBAAccountHold=!1,this.isCardPaymentSuccess=!0,this.isInSufficiantFund=!1,this.isPBAAccountNotExist=!1,this.isPBAServerError=!1,this.isGetPBAAccountSucceed=!1,this.selectedPbaAccount="",this.pbaAccountRef="",this.isPbaAccountSelected=!1,this.isCardPaymentSelected=!1,this.isPBADropdownSelected=!1,this.isContinueButtondisabled=!0,this.isPBAAccountPaymentSuccess=!1,this.orgName=""}it.decorators=[{type:f.NgModule,args:[{imports:[r.CommonModule,s.HttpClientModule,g.FormsModule,g.ReactiveFormsModule,c.MatTableModule,d.MatPaginatorModule,u.MatSortModule,p.MatFormFieldModule,m.MatInputModule],declarations:[k,O,x,ot,U,V,Y,$,X,_e,Se,we,Pe,Ae,ee,ce,ge,xe,Me,Ue,Ve,qe,$e,fe,Ke,Qe,tt],exports:[k],providers:[{provide:w,useClass:se},Ye,T]}]}],m=it;function it(){}e.PaymentLibService=y,e.PaymentLibComponent=k,e.PaymentLibModule=m,e.ɵbb=xe,e.ɵw=Ae,e.ɵm=Y,e.ɵz=ce,e.ɵbi=fe,e.ɵba=ge,e.ɵr=_e,e.ɵt=Se,e.ɵo=$,e.ɵb=O,e.ɵf=x,e.ɵy=ee,e.ɵi=ot,e.ɵj=U,e.ɵv=Pe,e.ɵl=V,e.ɵbk=Qe,e.ɵbg=$e,e.ɵbl=tt,e.ɵp=X,e.ɵbj=Ke,e.ɵu=we,e.ɵbd=Ue,e.ɵbc=Me,e.ɵbe=Ve,e.ɵbf=qe,e.ɵs=ie,e.ɵn=q,e.ɵx=oe,e.ɵa=b,e.ɵc=P,e.ɵg=D,e.ɵk=M,e.ɵe=S,e.ɵh=T,e.ɵbm=se,e.ɵd=w,e.ɵq=K,e.ɵbh=Ye,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
2
2
|
//# sourceMappingURL=hmcts-ccpay-web-component.umd.min.js.map
|