@hmcts/ccpay-web-component 6.2.16-beta01 → 6.2.16-beta02

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.
@@ -3545,9 +3545,6 @@ class AddRemissionComponent {
3545
3545
  this.refundFeesList();
3546
3546
  }, (error) => this.errorMessage = error);
3547
3547
  }
3548
- if (this.fees && this.viewCompStatus === 'issuerefund') {
3549
- this.refundFeesList();
3550
- }
3551
3548
  if (this.viewCompStatus === '') {
3552
3549
  this.viewStatus = 'main';
3553
3550
  }
@@ -3623,10 +3620,16 @@ class AddRemissionComponent {
3623
3620
  const formArray = this.remissionForm.controls.feesList;
3624
3621
  if (this.isRemissionEnabled(formArray.value.at(index).code)) {
3625
3622
  let remission = this.getRemissions(formArray.value.at(index).code);
3626
- let feeAmount = this.paymentLibComponent.paymentGroup.fees.at(index).fee_amount;
3623
+ // Dump out the fees.at(index) to console for debugging
3624
+ //console.log(`fees.at(${index}):`, this.paymentLibComponent.paymentGroup.fees.at(index));
3625
+ let feeAmount = this.paymentLibComponent.paymentGroup.fees.at(index).calculated_amount;
3626
+ // Dump out parameters to console for debugging
3627
+ //console.log(`Calculating refund amount for index: ${index}, AppAmt: ${AppAmt}, feeAmount: ${feeAmount}, remission.hwf_amount: ${remission.hwf_amount}`);
3627
3628
  return this.getNetAmountFee(remission.hwf_amount, feeAmount);
3628
3629
  }
3629
3630
  else {
3631
+ // Dump out parameters to console for debugging
3632
+ //console.log(`Calculating refund amount for index: ${index}, AppAmt: ${AppAmt}`);
3630
3633
  return AppAmt;
3631
3634
  }
3632
3635
  }
@@ -3634,6 +3637,9 @@ class AddRemissionComponent {
3634
3637
  const ele = document.getElementById(v1);
3635
3638
  const formArray = this.remissionForm.controls.feesList;
3636
3639
  if (ele.checked) {
3640
+ // Dump out parameters to console for debugging
3641
+ //console.log(`Checkbox checked at index: ${i}, v1: ${v1}, AppAmt: ${AppAmt}, Volume: ${Volume}`);
3642
+ // Checkbox checked at index: 0, v1: 6012667, AppAmt: 100, Volume: 1
3637
3643
  let refundAmount = this.calculateRefundAmount(i, AppAmt);
3638
3644
  formArray.at(i).get('refund_amount').setValue(refundAmount);
3639
3645
  formArray.at(i).get('volume').setValue(Volume);