iptdevs-design-system 2.7.139 → 2.7.141

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.
@@ -3581,20 +3581,28 @@ class CodFormStepFourComponent extends CodFormSteps {
3581
3581
  agreementSelected = this.localStorageCOD.getCodFormData(1, 'agreement_by_category');
3582
3582
  }
3583
3583
  if (this.codFormStepFour.controls['payment_method'].value === '1') {
3584
- console.log(agreementSelected);
3585
- this.searchPriceByTypePayment(agreementSelected, 'cuotas', '1');
3586
- const aux = this.codPrices.filter(codPrice => codPrice.agreement === Number(agreementSelected))[0];
3587
- this.codFormStepFour.controls['quota_times'].setValue(this.codPrices[0].code);
3588
- this.codFormStepFour.controls['program_price'].setValue(this.codPrices[0].normal_price);
3584
+ let request = {
3585
+ agreement: Number(agreementSelected),
3586
+ payment_method: 'cuota'
3587
+ };
3588
+ this.commercialService.getCodPricesByAgreementTypePayment(request).subscribe((response) => {
3589
+ this.codPrices = response.data;
3590
+ this.codFormStepFour.controls['quota_times'].setValue(this.codPrices[0].code);
3591
+ this.codFormStepFour.controls['program_price'].setValue(this.codPrices[0].normal_price);
3592
+ });
3589
3593
  }
3590
3594
  else {
3591
3595
  if (this.codFormStepFour.controls['payment_method'].value === '2') {
3592
- console.log(agreementSelected);
3593
- this.searchPriceByTypePayment(agreementSelected, 'contado', '2');
3594
- const aux = this.codPrices.filter(codPrice => codPrice.fee_number === 1)[0];
3595
- this.codFormStepFour.controls['quota_times'].setValue(this.codPrices[0].code);
3596
- this.codFormStepFour.controls['program_price'].setValue(this.codPrices[0].normal_price);
3597
- this.codFormStepFour.controls['total_price'].setValue(this.codPrices[0].enrollment);
3596
+ let request = {
3597
+ agreement: Number(agreementSelected),
3598
+ payment_method: 'conta'
3599
+ };
3600
+ this.commercialService.getCodPricesByAgreementTypePayment(request).subscribe((response) => {
3601
+ this.codPrices = response.data;
3602
+ this.codFormStepFour.controls['quota_times'].setValue(this.codPrices[0].code);
3603
+ this.codFormStepFour.controls['program_price'].setValue(this.codPrices[0].normal_price);
3604
+ this.codFormStepFour.controls['total_price'].setValue(this.codPrices[0].enrollment);
3605
+ });
3598
3606
  }
3599
3607
  }
3600
3608
  // this.commercialService.getCodPricesByAgreement(Number(agreementSelected)).subscribe({
@@ -3641,10 +3649,6 @@ class CodFormStepFourComponent extends CodFormSteps {
3641
3649
  this.commercialService.getCodPricesByAgreementTypePayment(request).subscribe((response) => {
3642
3650
  this.codPrices = response.data;
3643
3651
  console.log(this.codPrices);
3644
- // Actualizar para que se tomen los cambios
3645
- this.updateValueAndValidity();
3646
- // Actualizar los controls globales
3647
- this.updateGlobalControls(change);
3648
3652
  });
3649
3653
  }
3650
3654
  initForm() {