creditu-common-library 1.2.24 → 1.3.2

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.
@@ -10,7 +10,7 @@ export declare class AmortizationService {
10
10
  getAmortizationDiffGerman(previousBalance: number, balance: number, numberOfMonths: number): number;
11
11
  /**
12
12
  *
13
- * @param montlyRate Tasa mensual del crédito
13
+ * @param monthlyRate Tasa mensual del crédito
14
14
  * @param numberOfMonths Número de meses del crédito
15
15
  * @param previusBalance Balance anterior
16
16
  * @param balance Balance actual
@@ -20,13 +20,13 @@ export declare class AmortizationService {
20
20
  getAmortizationDiffFrench(monthlyRate: number, numberOfMonths: number, previusBalance: number, balance: number, paymentNumber: number): number;
21
21
  /**
22
22
  *
23
- * @param montlyRate Tasa mensual del crédito
23
+ * @param monthlyRate Tasa mensual del crédito
24
24
  * @param numberOfMonths Número de meses del crédito
25
25
  * @param balance Balance actual
26
26
  * @param paymentNumber Número de cuota
27
27
  * @returns
28
28
  */
29
- getAmortizationFrench(montlyRate: number, numberOfMonths: number, balance: number, paymentNumber: number): number;
29
+ getAmortizationFrench(monthlyRate: number, numberOfMonths: number, balance: number, paymentNumber: number): number;
30
30
  /**
31
31
  * Calcula la amortizacion
32
32
  * @param paymentNumber
@@ -11,11 +11,11 @@ var AmortizationService = /** @class */ (function () {
11
11
  this.interestService = new interest_service_1.InterestService(this.math);
12
12
  this.math = new math_1.MathService(true, 10);
13
13
  }
14
- AmortizationService.prototype.getMonthlyPayment = function (montlyRate, period, balance) {
15
- var a = Math.pow(this.math.add(1, montlyRate), period);
16
- var b = this.math.multiply(a, montlyRate);
17
- var c = this.math.subtract(a, 1);
18
- return this.math.multiply(this.math.divide(b, c), balance);
14
+ AmortizationService.prototype.getMonthlyPayment = function (monthlyRate, period, balance) {
15
+ var periodInterest = Math.pow(this.math.add(1, monthlyRate), period);
16
+ var interest = this.math.multiply(periodInterest, monthlyRate);
17
+ var periodRate = this.math.subtract(periodInterest, 1);
18
+ return this.math.multiply(this.math.divide(interest, periodRate), balance);
19
19
  };
20
20
  AmortizationService.prototype.getAmortizationIPC = function (upperBound, amortizationDiff, IPCAupdate) {
21
21
  return this.math.round(upperBound < IPCAupdate
@@ -28,7 +28,7 @@ var AmortizationService = /** @class */ (function () {
28
28
  };
29
29
  /**
30
30
  *
31
- * @param montlyRate Tasa mensual del crédito
31
+ * @param monthlyRate Tasa mensual del crédito
32
32
  * @param numberOfMonths Número de meses del crédito
33
33
  * @param previusBalance Balance anterior
34
34
  * @param balance Balance actual
@@ -47,16 +47,16 @@ var AmortizationService = /** @class */ (function () {
47
47
  };
48
48
  /**
49
49
  *
50
- * @param montlyRate Tasa mensual del crédito
50
+ * @param monthlyRate Tasa mensual del crédito
51
51
  * @param numberOfMonths Número de meses del crédito
52
52
  * @param balance Balance actual
53
53
  * @param paymentNumber Número de cuota
54
54
  * @returns
55
55
  */
56
- AmortizationService.prototype.getAmortizationFrench = function (montlyRate, numberOfMonths, balance, paymentNumber) {
56
+ AmortizationService.prototype.getAmortizationFrench = function (monthlyRate, numberOfMonths, balance, paymentNumber) {
57
57
  var period = this.math.subtract(this.math.add(numberOfMonths, 1), paymentNumber);
58
- var monthlyPayment = this.getMonthlyPayment(montlyRate, period, balance);
59
- var interest = this.math.multiply(balance, montlyRate);
58
+ var monthlyPayment = this.getMonthlyPayment(monthlyRate, period, balance);
59
+ var interest = this.math.multiply(balance, monthlyRate);
60
60
  return this.math.subtract(monthlyPayment, interest);
61
61
  };
62
62
  /**
@@ -51,14 +51,14 @@ var InstallmentService = /** @class */ (function () {
51
51
  var insurancePeriods = this.insuranceService.getInsurancePeriods(inputs.IPCAmap, inputs.paymentNumber.value(), inputs.numberOfMonths.value());
52
52
  var lifeInsuranceBalance = this.insuranceService.getLifeInsuranceBalance(IPCAByDates, balanceValues.balances);
53
53
  var debtorLifeInsuranceFee = this.insuranceService.getInsuranceFee(lifeInsuranceBalance, params.debtorLifeInsuranceRate, insurancePeriods);
54
- var codebtorLifeInsuranceFee = params.codebtorLifeInsuranceRate ? this.insuranceService.getInsuranceFee(lifeInsuranceBalance, params.codebtorLifeInsuranceRate, insurancePeriods) : 0;
54
+ var codebtorLifeInsuranceFee = 0;
55
55
  var propertyInsuranceFee = this.insuranceService.getInsuranceFee(inputs.propertyAmount, params.propertyInsuranceRate, insurancePeriods);
56
56
  var monthlyPaymentWithInsurances = this.monthlyPaymentService.getMonthlyPaymentWithInsurances(interest, interestDiff, amortizationIUB, amortizationIPCA, debtorLifeInsuranceFee, codebtorLifeInsuranceFee, propertyInsuranceFee);
57
57
  var dailyRate = this.interestService.getDailyInterestValue(params.annualRate);
58
58
  var lateChargesFineRate = params.lateChargesFineRate, lateChargesInterestRate = params.lateChargesInterestRate;
59
59
  var IPCAmapLate = inputs.IPCAmapLate, todayIn = inputs.today;
60
60
  var today = todayIn || new creditu_date_model_1.DateModel().toString();
61
- var _b = this.lateService.getTotalMonthlyPayment(endDate, today, monthlyPaymentWithInsurances, inputs.isGraceMonth, lateChargesFineRate, dailyRate, IPCAmapLate, lateChargesInterestRate), lateCharges = _b.lateCharges, lateInterest = _b.lateInterest, lateAmortizationIPCA = _b.lateAmortizationIPCA, lateChargesInterest = _b.lateChargesInterest, monthlyPaymentWithLate = _b.monthlyPaymentWithLate, lateDays = _b.lateDays;
61
+ var _b = this.lateService.getTotalMonthlyPayment(endDate, today, monthlyPaymentWithInsurances, lateChargesFineRate, dailyRate, IPCAmapLate, lateChargesInterestRate), lateCharges = _b.lateCharges, lateInterest = _b.lateInterest, lateAmortizationIPCA = _b.lateAmortizationIPCA, lateChargesInterest = _b.lateChargesInterest, monthlyPaymentWithLate = _b.monthlyPaymentWithLate, lateDays = _b.lateDays;
62
62
  var lateRate = this.lateService.getLateRate(lateChargesInterestRate, dailyRate, dailyIPCAvalues);
63
63
  return {
64
64
  IPCAByDates: IPCAByDates,
@@ -4,10 +4,10 @@ export declare class InterestService {
4
4
  constructor(math: MathService);
5
5
  /**
6
6
  * Método que calcula el interés diario a partir del interés anual.
7
- * @param annyalRate Tasa de interés anual.
7
+ * @param annualRate Tasa de interés anual.
8
8
  * @returns
9
9
  */
10
- getDailyInterestValue(annyalRate: number): number;
10
+ getDailyInterestValue(annualRate: number): number;
11
11
  /**
12
12
  * Método que calcula el interés mensual a partir del interés anual.
13
13
  * @param annualRate Tasa de interés anual.
@@ -16,7 +16,7 @@ export declare class InterestService {
16
16
  getMonthlyInterestValue(annualRate: number): number;
17
17
  /**
18
18
  * Método que calcula el interés de un periodo de tiempo a partir del interés anual.
19
- * @param annyalRate Tasa de interés anual.
19
+ * @param annualRate Tasa de interés anual.
20
20
  * @param period Periodo de tiempo para calcular la tasa, normalmente 360 para la tasa diaria o 12 para la tasa mensual.
21
21
  * @returns
22
22
  */
@@ -10,11 +10,11 @@ var InterestService = /** @class */ (function () {
10
10
  }
11
11
  /**
12
12
  * Método que calcula el interés diario a partir del interés anual.
13
- * @param annyalRate Tasa de interés anual.
13
+ * @param annualRate Tasa de interés anual.
14
14
  * @returns
15
15
  */
16
- InterestService.prototype.getDailyInterestValue = function (annyalRate) {
17
- return this.getPeriodInterestValue(annyalRate, 360);
16
+ InterestService.prototype.getDailyInterestValue = function (annualRate) {
17
+ return this.getPeriodInterestValue(annualRate, 360);
18
18
  };
19
19
  /**
20
20
  * Método que calcula el interés mensual a partir del interés anual.
@@ -26,14 +26,14 @@ var InterestService = /** @class */ (function () {
26
26
  };
27
27
  /**
28
28
  * Método que calcula el interés de un periodo de tiempo a partir del interés anual.
29
- * @param annyalRate Tasa de interés anual.
29
+ * @param annualRate Tasa de interés anual.
30
30
  * @param period Periodo de tiempo para calcular la tasa, normalmente 360 para la tasa diaria o 12 para la tasa mensual.
31
31
  * @returns
32
32
  */
33
- InterestService.prototype.getPeriodInterestValue = function (annyalRate, period) {
34
- if (!annyalRate)
33
+ InterestService.prototype.getPeriodInterestValue = function (annualRate, period) {
34
+ if (!annualRate)
35
35
  throw new Error('Invalid annual rate');
36
- var op1 = this.math.add(1, annyalRate);
36
+ var op1 = this.math.add(1, annualRate);
37
37
  var op2 = this.math.divide(1, period);
38
38
  var preResult = Math.pow(op1, op2);
39
39
  return this.math.round(this.math.subtract(preResult, 1), 10);
@@ -13,7 +13,7 @@ export declare class LateService {
13
13
  * * @param endDate
14
14
  */
15
15
  getLateDaysAndIPC(startDate: string, endDate: string, ipcaValues: Record<string, number>): any[];
16
- getTotalLates(dueDate: string, date: string, monthlyPaymentWithLate: number, isGraceMonth: boolean, lateChargesFineRate: number, dailyRateInterest: number, lateChargesInterestRate: number, ipcaValues: Record<string, number>): any;
17
- getTotalMonthlyPayment(dueDateIn: string, date: string, monthlyPaymentWithLate: number, isGraceMonth: boolean, lateChargesFineRate: number, dailyInterestRate: number, ipcaValues: Record<string, number>, lateChargesInterestRate: number): any;
16
+ getTotalLates(dueDate: string, date: string, monthlyPaymentWithLate: number, lateChargesFineRate: number, dailyRateInterest: number, lateChargesInterestRate: number, ipcaValues: Record<string, number>): any;
17
+ getTotalMonthlyPayment(dueDateIn: string, today: string, monthlyPaymentWithInsurances: number, lateChargesFineRate: number, dailyInterestRate: number, ipcaValues: Record<string, number>, lateChargesInterestRate: number): any;
18
18
  getLateRate(lateChargesInterestRate: number, dailyRate: number, dailyIPCAvalues: number[]): number;
19
19
  }
@@ -62,7 +62,7 @@ var LateService = /** @class */ (function () {
62
62
  };
63
63
  // Agregar ipca por cada dia de mora, mirando los ipcaValues dos meses atras
64
64
  // eslint-disable-next-line max-len
65
- LateService.prototype.getTotalLates = function (dueDate, date, monthlyPaymentWithLate, isGraceMonth, lateChargesFineRate, dailyRateInterest, lateChargesInterestRate, ipcaValues) {
65
+ LateService.prototype.getTotalLates = function (dueDate, date, monthlyPaymentWithLate, lateChargesFineRate, dailyRateInterest, lateChargesInterestRate, ipcaValues) {
66
66
  var _this = this;
67
67
  var lateCharges = this.getLate(monthlyPaymentWithLate, lateChargesFineRate);
68
68
  var lateDaysArray = this.getLateDaysAndIPC(dueDate, date, ipcaValues);
@@ -70,8 +70,8 @@ var LateService = /** @class */ (function () {
70
70
  var _a = lateDay.date.split('-'), year = _a[0], month = _a[1];
71
71
  var rateIPCA = _this.getDailyIPC(lateDay.ipca, _this.calculateDaysOfMonth(year, month));
72
72
  var lateChargesDailyRate = _this.getLateChargesDailyRate(date, lateChargesInterestRate);
73
- var lateInterest = isGraceMonth ? 0 : _this.getLate(acc.monthlyPaymentWithLate, dailyRateInterest);
74
- var lateAmortizationIPCA = isGraceMonth ? 0 : _this.getLate(acc.monthlyPaymentWithLate, rateIPCA);
73
+ var lateInterest = _this.getLate(acc.monthlyPaymentWithLate, dailyRateInterest);
74
+ var lateAmortizationIPCA = _this.getLate(acc.monthlyPaymentWithLate, rateIPCA);
75
75
  var lateChargesInterest = _this.getLate(acc.monthlyPaymentWithLate, lateChargesDailyRate);
76
76
  acc.lateInterest = _this.math.add(acc.lateInterest, lateInterest);
77
77
  acc.lateAmortizationIPCA = _this.math.add(acc.lateAmortizationIPCA, lateAmortizationIPCA);
@@ -86,19 +86,19 @@ var LateService = /** @class */ (function () {
86
86
  return lates;
87
87
  };
88
88
  // eslint-disable-next-line no-param-reassign
89
- LateService.prototype.getTotalMonthlyPayment = function (dueDateIn, date, monthlyPaymentWithLate, isGraceMonth, lateChargesFineRate, dailyInterestRate, ipcaValues, lateChargesInterestRate) {
90
- var lateDays = new creditu_date_model_1.DateModel(date).daysDiff(new creditu_date_model_1.DateModel(dueDateIn));
89
+ LateService.prototype.getTotalMonthlyPayment = function (dueDateIn, today, monthlyPaymentWithInsurances, lateChargesFineRate, dailyInterestRate, ipcaValues, lateChargesInterestRate) {
90
+ var lateDays = new creditu_date_model_1.DateModel(today).daysDiff(new creditu_date_model_1.DateModel(dueDateIn));
91
91
  if (lateDays <= 0) {
92
92
  return {
93
93
  lateCharges: 0,
94
94
  lateInterest: 0,
95
95
  lateAmortizationIPCA: 0,
96
96
  lateChargesInterest: 0,
97
- monthlyPaymentWithLate: monthlyPaymentWithLate,
97
+ monthlyPaymentWithLate: monthlyPaymentWithInsurances,
98
98
  lateDays: 0
99
99
  };
100
100
  }
101
- var lates = this.getTotalLates(new creditu_date_model_1.DateModel(dueDateIn).addDays(1).toString(), date, monthlyPaymentWithLate, isGraceMonth, lateChargesFineRate, dailyInterestRate, lateChargesInterestRate, ipcaValues);
101
+ var lates = this.getTotalLates(new creditu_date_model_1.DateModel(dueDateIn).addDays(1).toString(), today, monthlyPaymentWithInsurances, lateChargesFineRate, dailyInterestRate, lateChargesInterestRate, ipcaValues);
102
102
  lates.lateDays = lateDays;
103
103
  return lates;
104
104
  };
@@ -67,4 +67,18 @@ export declare class OfferInputs {
67
67
  * Se utiliza para aplicar o no lógico de doble cuota y setear los valores de: numberOfAnnualDoublePayments, indexOfFirstDoublePayment, indexOfSecondDoublePayment
68
68
  */
69
69
  useDoublePayments: boolean;
70
+ /**
71
+ * Estado de la propiedad
72
+ * true = Nueva
73
+ * false = Usada
74
+ */
75
+ isPropertyNew: boolean;
76
+ /**
77
+ * Distrito del cliente (Perú)
78
+ */
79
+ district: string;
80
+ /**
81
+ * Edad prospecto
82
+ */
83
+ prospectAge: number;
70
84
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "creditu-common-library",
3
- "version": "1.2.24",
3
+ "version": "1.3.2",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "files": [
@@ -1510,14 +1510,14 @@ describe('installment-service for french method', () => {
1510
1510
  interestDiff: 8.1492915458,
1511
1511
  interestIUB: 1292.4276568637,
1512
1512
  monthlyPayment: 177.7754709601,
1513
- monthlyPaymentWithInsurances: 1655.2241060841,
1513
+ monthlyPaymentWithInsurances: 1584.4958814739,
1514
1514
  amortization: -1106.5028943578,
1515
1515
  amortizationDiff: 0,
1516
1516
  amortizationIUB: 0,
1517
1517
  postponedInflationaryUpdate: 1106.5028943578,
1518
1518
  amortizationIPCA: 207,
1519
1519
  debtorLifeInsuranceFee: 70.7282246102,
1520
- codebtorLifeInsuranceFee: 70.7282246102,
1520
+ codebtorLifeInsuranceFee: 0,
1521
1521
  propertyInsuranceFee: 14.34,
1522
1522
  lateDays: 0,
1523
1523
  lateCharges: 0,
@@ -1525,7 +1525,7 @@ describe('installment-service for french method', () => {
1525
1525
  lateAmortizationIPCA: 0,
1526
1526
  lateChargesInterest: 0,
1527
1527
  lateRate: 0.0003875435,
1528
- monthlyPaymentWithLate: 1655.2241060841
1528
+ monthlyPaymentWithLate: 1584.4958814739
1529
1529
  };
1530
1530
  const amortizationMethod = AmortizationMethod.FRENCH;
1531
1531
  const paymentNumber = new PaymentNumber(1);
@@ -1637,14 +1637,14 @@ describe('installment-service for french method', () => {
1637
1637
  interestDiff: 8.9681456397,
1638
1638
  interestIUB: 1347.9316492677,
1639
1639
  monthlyPayment: 153.2086940493,
1640
- monthlyPaymentWithInsurances: 1634.2476474001,
1640
+ monthlyPaymentWithInsurances: 1598.7278997811,
1641
1641
  amortization: -1185.7548095787,
1642
1642
  amortizationDiff: 0,
1643
1643
  amortizationIUB: 0,
1644
1644
  postponedInflationaryUpdate: 1185.7548095787,
1645
1645
  amortizationIPCA: 208.1065028944,
1646
1646
  debtorLifeInsuranceFee: 35.519747619,
1647
- codebtorLifeInsuranceFee: 35.519747619,
1647
+ codebtorLifeInsuranceFee: 0,
1648
1648
  propertyInsuranceFee: 7.17,
1649
1649
  lateDays: 0,
1650
1650
  lateCharges: 0,
@@ -1652,7 +1652,7 @@ describe('installment-service for french method', () => {
1652
1652
  lateAmortizationIPCA: 0,
1653
1653
  lateChargesInterest: 0,
1654
1654
  lateRate: 0.0005488375,
1655
- monthlyPaymentWithLate: 1634.2476474001
1655
+ monthlyPaymentWithLate: 1598.7278997811
1656
1656
  };
1657
1657
  const amortizationMethod = AmortizationMethod.FRENCH;
1658
1658
  const paymentNumber = new PaymentNumber(2);
@@ -1761,14 +1761,14 @@ describe('installment-service for french method', () => {
1761
1761
  interestDiff: 12.0642793752,
1762
1762
  interestIUB: 1861.5760642211,
1763
1763
  monthlyPayment: 1129.7984759794,
1764
- monthlyPaymentWithInsurances: 3315.4991476599,
1764
+ monthlyPaymentWithInsurances: 3214.1189294405,
1765
1765
  amortization: -719.7133088665,
1766
1766
  amortizationDiff: 0,
1767
1767
  amortizationIUB: 0,
1768
1768
  postponedInflationaryUpdate: 719.7133088665,
1769
1769
  amortizationIPCA: 1217.862647,
1770
1770
  debtorLifeInsuranceFee: 101.3802182194,
1771
- codebtorLifeInsuranceFee: 101.3802182194,
1771
+ codebtorLifeInsuranceFee: 0,
1772
1772
  propertyInsuranceFee: 33.3,
1773
1773
  lateDays: 0,
1774
1774
  lateCharges: 0,
@@ -1776,7 +1776,7 @@ describe('installment-service for french method', () => {
1776
1776
  lateAmortizationIPCA: 0,
1777
1777
  lateChargesInterest: 0,
1778
1778
  lateRate: 0.0005488375,
1779
- monthlyPaymentWithLate: 3315.4991476599
1779
+ monthlyPaymentWithLate: 3214.1189294405
1780
1780
  };
1781
1781
 
1782
1782
  const amortizationMethod = AmortizationMethod.FRENCH;
@@ -72,7 +72,10 @@ describe('offerService', () => {
72
72
  numberOfGraceMonths: 0,
73
73
  operationalExpensesFinancing: OperationalExpensesFinancing.DEBTOR,
74
74
  useDoublePayments: true,
75
- clientAge: undefined
75
+ clientAge: undefined,
76
+ district: undefined,
77
+ isPropertyNew: undefined,
78
+ prospectAge: undefined
76
79
  };
77
80
  const offerParams: OfferParams = {
78
81
  purpose: Purpose.HOME,
@@ -218,7 +221,10 @@ describe('offerService', () => {
218
221
  numberOfGraceMonths: 0, // Meses de gracias(N)
219
222
  operationalExpensesFinancing: OperationalExpensesFinancing.DEBTOR,
220
223
  clientAge: 35,
221
- useDoublePayments: false
224
+ useDoublePayments: false,
225
+ district: undefined,
226
+ isPropertyNew: undefined,
227
+ prospectAge: undefined
222
228
  };
223
229
  const math = new MathService(true, 20);
224
230
  const offerService = new OfferService(math);
@@ -326,7 +332,10 @@ describe('offerService', () => {
326
332
  numberOfGraceMonths: 12, // Meses de gracias(N)
327
333
  operationalExpensesFinancing: OperationalExpensesFinancing.DEBTOR,
328
334
  clientAge: 35,
329
- useDoublePayments: false
335
+ useDoublePayments: false,
336
+ district: undefined,
337
+ isPropertyNew: undefined,
338
+ prospectAge: undefined
330
339
  };
331
340
  const math = new MathService(true, 20);
332
341
  const offerService = new OfferService(math);
@@ -436,7 +445,10 @@ describe('offerService', () => {
436
445
  numberOfGraceMonths: 0, // Meses de gracias(N)
437
446
  operationalExpensesFinancing: OperationalExpensesFinancing.DEBTOR,
438
447
  clientAge: 35,
439
- useDoublePayments: false
448
+ useDoublePayments: false,
449
+ district: undefined,
450
+ isPropertyNew: undefined,
451
+ prospectAge: undefined
440
452
  };
441
453
  const math = new MathService(true, 20);
442
454
  const offerService = new OfferService(math);
@@ -546,7 +558,10 @@ describe('offerService', () => {
546
558
  numberOfGraceMonths: 12, // Meses de gracias(N)
547
559
  operationalExpensesFinancing: OperationalExpensesFinancing.DEBTOR,
548
560
  clientAge: 35,
549
- useDoublePayments: false
561
+ useDoublePayments: false,
562
+ district: undefined,
563
+ isPropertyNew: undefined,
564
+ prospectAge: undefined
550
565
  };
551
566
  const math = new MathService(true, 20);
552
567
  const offerService = new OfferService(math);
@@ -656,7 +671,10 @@ describe('offerService', () => {
656
671
  numberOfGraceMonths: 0, // Meses de gracias(N)
657
672
  operationalExpensesFinancing: OperationalExpensesFinancing.DEBTOR,
658
673
  clientAge: 35,
659
- useDoublePayments: false
674
+ useDoublePayments: false,
675
+ district: undefined,
676
+ isPropertyNew: undefined,
677
+ prospectAge: undefined
660
678
  };
661
679
  const math = new MathService(true, 20);
662
680
  const offerService = new OfferService(math);
@@ -766,7 +784,10 @@ describe('offerService', () => {
766
784
  numberOfGraceMonths: 0, // Meses de gracias(N)
767
785
  operationalExpensesFinancing: OperationalExpensesFinancing.DEBTOR,
768
786
  clientAge: 35,
769
- useDoublePayments: false
787
+ useDoublePayments: false,
788
+ district: undefined,
789
+ isPropertyNew: undefined,
790
+ prospectAge: undefined
770
791
  };
771
792
  const math = new MathService(true, 20);
772
793
  const offerService = new OfferService(math);
@@ -876,7 +897,10 @@ describe('offerService', () => {
876
897
  numberOfGraceMonths: 12, // Meses de gracias(N)
877
898
  operationalExpensesFinancing: OperationalExpensesFinancing.DEBTOR,
878
899
  clientAge: 35,
879
- useDoublePayments: false
900
+ useDoublePayments: false,
901
+ district: undefined,
902
+ isPropertyNew: undefined,
903
+ prospectAge: undefined
880
904
  };
881
905
  const math = new MathService(true, 20);
882
906
  const offerService = new OfferService(math);
@@ -986,7 +1010,10 @@ describe('offerService', () => {
986
1010
  numberOfGraceMonths: 0, // Meses de gracias(N)
987
1011
  operationalExpensesFinancing: OperationalExpensesFinancing.DEBTOR,
988
1012
  clientAge: 35,
989
- useDoublePayments: false
1013
+ useDoublePayments: false,
1014
+ district: undefined,
1015
+ isPropertyNew: undefined,
1016
+ prospectAge: undefined
990
1017
  };
991
1018
  const math = new MathService(true, 20);
992
1019
  const offerService = new OfferService(math);
@@ -1095,7 +1122,10 @@ describe('offerService', () => {
1095
1122
  numberOfGraceMonths: 0, // Meses de gracias(N)
1096
1123
  operationalExpensesFinancing: OperationalExpensesFinancing.CREDITU,
1097
1124
  clientAge: 35,
1098
- useDoublePayments: false
1125
+ useDoublePayments: false,
1126
+ district: undefined,
1127
+ isPropertyNew: undefined,
1128
+ prospectAge: undefined
1099
1129
  };
1100
1130
  const math = new MathService(true, 20);
1101
1131
  const offerService = new OfferService(math);
@@ -1205,7 +1235,10 @@ describe('offerService', () => {
1205
1235
  numberOfGraceMonths: 0, // Meses de gracias(N)
1206
1236
  operationalExpensesFinancing: OperationalExpensesFinancing.DEBTOR,
1207
1237
  clientAge: 35,
1208
- useDoublePayments: false
1238
+ useDoublePayments: false,
1239
+ district: undefined,
1240
+ isPropertyNew: undefined,
1241
+ prospectAge: undefined
1209
1242
  };
1210
1243
  const math = new MathService(true, 20);
1211
1244
  const offerService = new OfferService(math);
@@ -1314,7 +1347,10 @@ describe('offerService', () => {
1314
1347
  numberOfGraceMonths: 0, // Meses de gracias(N)
1315
1348
  operationalExpensesFinancing: OperationalExpensesFinancing.DEBTOR,
1316
1349
  clientAge: 35,
1317
- useDoublePayments: false
1350
+ useDoublePayments: false,
1351
+ district: undefined,
1352
+ isPropertyNew: undefined,
1353
+ prospectAge: undefined
1318
1354
  };
1319
1355
  const math = new MathService(true, 20);
1320
1356
  const offerService = new OfferService(math);
@@ -1423,7 +1459,10 @@ describe('offerService', () => {
1423
1459
  numberOfGraceMonths: 0, // Meses de gracias(N)
1424
1460
  operationalExpensesFinancing: OperationalExpensesFinancing.DEBTOR,
1425
1461
  clientAge: 35,
1426
- useDoublePayments: false
1462
+ useDoublePayments: false,
1463
+ district: undefined,
1464
+ isPropertyNew: undefined,
1465
+ prospectAge: undefined
1427
1466
  };
1428
1467
  const math = new MathService(true, 20);
1429
1468
  const offerService = new OfferService(math);
@@ -1532,7 +1571,10 @@ describe('offerService', () => {
1532
1571
  numberOfGraceMonths: 0, // Meses de gracias(N)
1533
1572
  operationalExpensesFinancing: OperationalExpensesFinancing.DEBTOR,
1534
1573
  clientAge: 0,
1535
- useDoublePayments: false
1574
+ useDoublePayments: false,
1575
+ district: undefined,
1576
+ isPropertyNew: undefined,
1577
+ prospectAge: undefined
1536
1578
  };
1537
1579
  const math = new MathService(true, 20);
1538
1580
  const offerService = new OfferService(math);
@@ -1641,7 +1683,10 @@ describe('offerService', () => {
1641
1683
  numberOfGraceMonths: 0, // Meses de gracias(N)
1642
1684
  operationalExpensesFinancing: OperationalExpensesFinancing.DEBTOR,
1643
1685
  clientAge: null,
1644
- useDoublePayments: false
1686
+ useDoublePayments: false,
1687
+ district: undefined,
1688
+ isPropertyNew: undefined,
1689
+ prospectAge: undefined
1645
1690
  };
1646
1691
  const math = new MathService(true, 20);
1647
1692
  const offerService = new OfferService(math);
@@ -1750,7 +1795,10 @@ describe('offerService', () => {
1750
1795
  numberOfGraceMonths: 0, // Meses de gracias(N)
1751
1796
  operationalExpensesFinancing: OperationalExpensesFinancing.DEBTOR,
1752
1797
  clientAge: undefined,
1753
- useDoublePayments: false
1798
+ useDoublePayments: false,
1799
+ district: undefined,
1800
+ isPropertyNew: undefined,
1801
+ prospectAge: undefined
1754
1802
  };
1755
1803
  const math = new MathService(true, 20);
1756
1804
  const offerService = new OfferService(math);