iptdevs-design-system 2.7.136 → 2.7.138

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.
@@ -3583,16 +3583,16 @@ class CodFormStepFourComponent extends CodFormSteps {
3583
3583
  if (this.codFormStepFour.controls['payment_method'].value === '1') {
3584
3584
  this.searchPriceByTypePayment(agreementSelected, 'cuotas');
3585
3585
  const aux = this.codPrices.filter(codPrice => codPrice.agreement === Number(agreementSelected))[0];
3586
- this.codFormStepFour.controls['quota_times'].setValue(aux.code);
3587
- this.codFormStepFour.controls['program_price'].setValue(aux.normal_price);
3586
+ this.codFormStepFour.controls['quota_times'].setValue(this.codPrices[0].code);
3587
+ this.codFormStepFour.controls['program_price'].setValue(this.codPrices[0].normal_price);
3588
3588
  }
3589
3589
  else {
3590
3590
  if (this.codFormStepFour.controls['payment_method'].value === '2') {
3591
3591
  this.searchPriceByTypePayment(agreementSelected, 'contado');
3592
3592
  const aux = this.codPrices.filter(codPrice => codPrice.fee_number === 1)[0];
3593
- this.codFormStepFour.controls['quota_times'].setValue(aux.code);
3594
- this.codFormStepFour.controls['program_price'].setValue(aux.normal_price);
3595
- this.codFormStepFour.controls['total_price'].setValue(aux.enrollment);
3593
+ this.codFormStepFour.controls['quota_times'].setValue(this.codPrices[0].code);
3594
+ this.codFormStepFour.controls['program_price'].setValue(this.codPrices[0].normal_price);
3595
+ this.codFormStepFour.controls['total_price'].setValue(this.codPrices[0].enrollment);
3596
3596
  }
3597
3597
  }
3598
3598
  // this.commercialService.getCodPricesByAgreement(Number(agreementSelected)).subscribe({
@@ -3634,10 +3634,11 @@ class CodFormStepFourComponent extends CodFormSteps {
3634
3634
  searchPriceByTypePayment(agreementSelected, type) {
3635
3635
  let request = {
3636
3636
  agreement: Number(agreementSelected),
3637
- payment_method: 'contad'
3637
+ payment_method: type
3638
3638
  };
3639
3639
  this.commercialService.getCodPricesByAgreementTypePayment(request).subscribe((response) => {
3640
3640
  this.codPrices = response.data;
3641
+ this.listenPaymentMethodField();
3641
3642
  });
3642
3643
  }
3643
3644
  initForm() {