creditu-common-library 1.2.19 → 1.2.22

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.
@@ -29,9 +29,17 @@ export declare class DebtResponse {
29
29
  */
30
30
  dailyRate: number;
31
31
  /**
32
- * Interes
32
+ * Interes sin inflación
33
33
  */
34
34
  interest: number;
35
+ /**
36
+ * Diferencia entre inteëés sin ajuste monetario y con
37
+ */
38
+ interestDiff: number;
39
+ /**
40
+ * interest Inflationary Updated Balance
41
+ */
42
+ interestIUB: number;
35
43
  /**
36
44
  * Valor de la cuota
37
45
  */
@@ -19,8 +19,9 @@ var AmortizationService = /** @class */ (function () {
19
19
  // const condition1 = previousBalance * inflationaryUpperBound > IPCAupdate;
20
20
  var condition1 = this.math.multiply(previousBalance, inflationaryUpperBound) > this.math.subtract(IPCAupdate, amortizationDiff); // IPCAupdate - amortizationDiff
21
21
  if (!condition1) {
22
- // return this.math.round(this.math.subtract(this.math.multiply(previousBalance, inflationaryUpperBound), amortizationDiff), 2);
23
- return this.math.round(this.math.multiply(previousBalance, inflationaryUpperBound), 2);
22
+ // se reestablece el dia 25-03-2022 tras reunion con thais y el equipo, volviendo a resta la diferencia de amortizacion para este caso.
23
+ return this.math.round(this.math.subtract(this.math.multiply(previousBalance, inflationaryUpperBound), amortizationDiff), 2);
24
+ // return this.math.round(this.math.multiply(previousBalance, inflationaryUpperBound), 2);
24
25
  }
25
26
  return this.math.subtract(IPCAupdate, amortizationDiff);
26
27
  };
@@ -58,7 +58,9 @@ var InstallmentService = /** @class */ (function () {
58
58
  var startDate = Object.keys(inputs.IPCAmap)[0];
59
59
  var endDate = Object.keys(inputs.IPCAmap).pop();
60
60
  var proportionalDays = inputs.paymentNumber.value() === 1 ? this.interestService.getProportionalDays(startDate, endDate) : 1;
61
- var interest = this.interestService.getInterest(balanceValues.balances, params.annualRate, proportionalDays);
61
+ var interest = this.interestService.getInterest(inputs.previousBalance.value(), params.annualRate, proportionalDays);
62
+ var interestDiff = this.interestService.getInterestDiff(balanceValues.balances, params.annualRate, proportionalDays, interest);
63
+ var interestIUB = this.math.add(interest, interestDiff);
62
64
  var amortizationIUB;
63
65
  var amortizationDiff;
64
66
  if (inputs.amortizationMethod === amortization_method_enum_1.AmortizationMethod.GERMAN) {
@@ -73,9 +75,9 @@ var InstallmentService = /** @class */ (function () {
73
75
  var ipcaUpdate = this.ipcaService.getIPCAUpdate(balanceValues.balanceMonetaryUpdateValues);
74
76
  var postponedInflationaryUpdate = this.ipcaService.getPosponedInflationaryUpdate(inputs.previousBalance.value(), inputs.inflationaryUpperBound, ipcaUpdate, amortizationDiff);
75
77
  var amortizationIPCA = this.amortizationService.getAmortizationIPC(inputs.previousBalance.value(), inputs.inflationaryUpperBound, amortizationDiff, ipcaUpdate);
76
- var monthlyPayment = this.paymentService.getMonthlyPayment(interest, amortizationIUB, amortizationIPCA);
77
- // const balanceAfterOLD = this.balanceService.getBalanceAfter(inputs.previousBalance, ipcaUpdate, amortizationIUB, amortizationIPCA);
78
78
  var amortization = this.math.subtract(amortizationIUB, postponedInflationaryUpdate, amortizationDiff);
79
+ var monthlyPayment = this.paymentService.getMonthlyPayment(interest, amortization);
80
+ // const balanceAfterOLD = this.balanceService.getBalanceAfter(inputs.previousBalance, ipcaUpdate, amortizationIUB, amortizationIPCA);
79
81
  var balanceAfter = this.math.subtract(inputs.previousBalance.value(), amortization);
80
82
  // const diferencia = this.math.subtract(amortization, balanceAfter);
81
83
  // console.log('file: installment-service.ts ~ line 100 ~ diferencia', diferencia);
@@ -84,7 +86,9 @@ var InstallmentService = /** @class */ (function () {
84
86
  var debtorLifeInsuranceFee = this.insuranceService.getInsuranceFee(lifeInsuranceBalance, params.debtorLifeInsuranceRate, insurancePeriods);
85
87
  var codebtorLifeInsuranceFee = params.codebtorLifeInsuranceRate ? this.insuranceService.getInsuranceFee(lifeInsuranceBalance, params.codebtorLifeInsuranceRate, insurancePeriods) : 0;
86
88
  var propertyInsuranceFee = this.insuranceService.getInsuranceFee(inputs.propertyAmount, params.propertyInsuranceRate, insurancePeriods);
87
- var monthlyPaymentWithInsurances = this.math.add(monthlyPayment, debtorLifeInsuranceFee, codebtorLifeInsuranceFee, propertyInsuranceFee);
89
+ // TODO: Cambiar.
90
+ // const monthlyPaymentWithInsurances = this.math.add(monthlyPayment, debtorLifeInsuranceFee, codebtorLifeInsuranceFee, propertyInsuranceFee);
91
+ var monthlyPaymentWithInsurances = this.math.add(interest, interestDiff, amortizationIUB, amortizationIPCA, debtorLifeInsuranceFee, codebtorLifeInsuranceFee, propertyInsuranceFee);
88
92
  // const totalLateByDates = lateService.getTotalMonthlyPayment(payment.dueDate, today,
89
93
  // installment.monthlyPaymentWithInsurances, lateChargesFineRate,
90
94
  // dailyInterestRate, IPCAmapLate, lateChargesInterestRate);
@@ -101,6 +105,8 @@ var InstallmentService = /** @class */ (function () {
101
105
  ipcaUpdate: ipcaUpdate,
102
106
  dailyRate: dailyRate,
103
107
  interest: interest,
108
+ interestDiff: interestDiff,
109
+ interestIUB: interestIUB,
104
110
  monthlyPayment: monthlyPayment,
105
111
  monthlyPaymentWithInsurances: monthlyPaymentWithInsurances,
106
112
  monthlyPaymentWithLate: totalLateByDates.totalMonthlyPayment,
@@ -28,10 +28,11 @@ export declare class InterestService {
28
28
  */
29
29
  getProportionalDays(startDate: string, endDate: string): number;
30
30
  /**
31
- * Calcula el interes a partir del interes diario
31
+ * Calcula el interes (sin inflación) a partir del interes diario
32
32
  * @param balanceValues
33
33
  * @param annualRate
34
34
  * @param proportion
35
35
  */
36
- getInterest(balanceValues: number[], annualRate: number, proportion: number): number;
36
+ getInterestDiff(balanceValues: number[], annualRate: number, proportion: number, interest: any): number;
37
+ getInterest(previusBalance: number, annualRate: number, proportion: number): number;
37
38
  }
@@ -72,13 +72,20 @@ var InterestService = /** @class */ (function () {
72
72
  return proportion;
73
73
  };
74
74
  /**
75
- * Calcula el interes a partir del interes diario
75
+ * Calcula el interes (sin inflación) a partir del interes diario
76
76
  * @param balanceValues
77
77
  * @param annualRate
78
78
  * @param proportion
79
79
  */
80
- InterestService.prototype.getInterest = function (balanceValues, annualRate, proportion) {
81
- var interest = this.math.multiply(balanceValues[balanceValues.length - 1], this.getMonthlyInterestValue(annualRate));
80
+ InterestService.prototype.getInterestDiff = function (balanceValues, annualRate, proportion, interest) {
81
+ var lastBalance = balanceValues[balanceValues.length - 1];
82
+ var interestIPCA = this.math.multiply(lastBalance, this.getMonthlyInterestValue(annualRate), proportion);
83
+ var interestIPCAdiff = this.math.subtract(interestIPCA, interest);
84
+ return this.math.round(interestIPCAdiff, 2);
85
+ };
86
+ InterestService.prototype.getInterest = function (previusBalance, annualRate, proportion) {
87
+ // const lastBalance = balanceValues[balanceValues.length - 1];
88
+ var interest = this.math.multiply(previusBalance, this.getMonthlyInterestValue(annualRate));
82
89
  return this.math.round(this.math.multiply(interest, proportion), 2);
83
90
  };
84
91
  return InterestService;
@@ -8,5 +8,5 @@ export declare class PaymentService {
8
8
  * @param amortization
9
9
  * @param amortizationIPCA
10
10
  */
11
- getMonthlyPayment(interest: number, amortization: number, amortizationIPCA: number): number;
11
+ getMonthlyPayment(interest: number, amortization: number): number;
12
12
  }
@@ -13,14 +13,12 @@ var PaymentService = /** @class */ (function () {
13
13
  * @param amortization
14
14
  * @param amortizationIPCA
15
15
  */
16
- PaymentService.prototype.getMonthlyPayment = function (interest, amortization, amortizationIPCA) {
16
+ PaymentService.prototype.getMonthlyPayment = function (interest, amortization) {
17
17
  if (interest === undefined || interest === null)
18
18
  throw new Error('invalid interest on MonthlyPayment calculation');
19
19
  if (amortization === undefined || amortization === null)
20
20
  throw new Error('invalid amortization on MonthlyPayment calculation');
21
- if (amortizationIPCA === undefined || amortizationIPCA === null)
22
- throw new Error('invalid amortizationIPCA on MonthlyPayment calculation');
23
- return this.math.add(interest, amortization, amortizationIPCA);
21
+ return this.math.add(interest, amortization);
24
22
  };
25
23
  return PaymentService;
26
24
  }());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "creditu-common-library",
3
- "version": "1.2.19",
3
+ "version": "1.2.22",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "files": [
@@ -77,18 +77,20 @@ describe('installment-service for german method', () => {
77
77
  balanceAfter: 129723.261956824,
78
78
  ipcaUpdate: 614.569093194,
79
79
  dailyRate: 0.0002009109,
80
- interest: 330.09,
81
- monthlyPayment: 821.39713637,
82
- monthlyPaymentWithInsurances: 875.20713637,
80
+ interest: 328.53,
81
+ interestDiff: 1.56,
82
+ interestIUB: 330.09,
83
+ monthlyPayment: 205.268043176,
84
+ monthlyPaymentWithInsurances: 872.89713637,
83
85
  amortization: -123.261956824,
84
86
  amortizationDiff: 1.71,
85
87
  amortizationIUB: 361.70713637,
86
88
  postponedInflationaryUpdate: 483.259093194,
87
- amortizationIPCA: 129.6,
89
+ amortizationIPCA: 127.89,
88
90
  debtorLifeInsuranceFee: 44.21,
89
91
  codebtorLifeInsuranceFee: 0,
90
- propertyInsuranceFee: 9.6,
91
- monthlyPaymentWithLate: 875.20713637,
92
+ propertyInsuranceFee: 9,
93
+ monthlyPaymentWithLate: 872.89713637,
92
94
  lateCharges: 0,
93
95
  lateDays: 0,
94
96
  lateInterest: 0
@@ -101,7 +103,7 @@ describe('installment-service for german method', () => {
101
103
  const annualRate = 0.075;
102
104
  const debtorLifeInsuranceRate = new CreditInsuranceRate(0.00017);
103
105
  const inflationaryUpperBound = 0.001;
104
- const propertyAmount = 160000;
106
+ const propertyAmount = 150000;
105
107
  const propertyInsuranceRate = new CreditInsuranceRate(0.00003);
106
108
  const IPCAmap = {
107
109
  '2021-12-23': 0.0125,
@@ -124,7 +126,7 @@ describe('installment-service for german method', () => {
124
126
  propertyInsuranceRate
125
127
  };
126
128
  const result = service.getTotalMonthlyPayment(inputs, params);
127
- // console.log('file: installment.service.spec.ts ~ line 124 ~ result', result);
129
+ // console.log('file: installment.service.spec.ts ~ line 129 ~ result', result);
128
130
  expect(result).toEqual(expectedResult);
129
131
  });
130
132
  it('(WEDSON (Case 1 inflationaryUpperBound) should return the calculated installment', () => {
@@ -185,8 +187,10 @@ describe('installment-service for german method', () => {
185
187
  balanceAfter: 129240.00286363,
186
188
  ipcaUpdate: 614.569093194,
187
189
  dailyRate: 0.0002009109,
188
- interest: 330.09,
189
- monthlyPayment: 1304.656229564,
190
+ interest: 328.53,
191
+ interestDiff: 1.56,
192
+ interestIUB: 330.09,
193
+ monthlyPayment: 688.52713637,
190
194
  monthlyPaymentWithInsurances: 1358.466229564,
191
195
  amortizationIUB: 361.70713637,
192
196
  amortization: 359.99713637,
@@ -291,12 +295,14 @@ describe('installment-service for german method', () => {
291
295
  balanceAfter: 129240.00286363,
292
296
  ipcaUpdate: 614.569093194,
293
297
  dailyRate: 0.0002009109,
294
- interest: 330.09,
295
- monthlyPayment: 1304.656229564,
298
+ interest: 328.53,
299
+ interestDiff: 1.56,
300
+ monthlyPayment: 688.52713637,
296
301
  monthlyPaymentWithInsurances: 1358.466229564,
297
302
  amortizationIUB: 361.70713637,
298
303
  amortization: 359.99713637,
299
304
  amortizationDiff: 1.71,
305
+ interestIUB: 330.09,
300
306
  postponedInflationaryUpdate: 0,
301
307
  amortizationIPCA: 612.859093194,
302
308
  debtorLifeInsuranceFee: 44.21,
@@ -426,8 +432,10 @@ describe('installment-service for german method', () => {
426
432
  balanceAfter: 128879.9921928087,
427
433
  ipcaUpdate: 1198.2727816632,
428
434
  dailyRate: 0.0002009109,
429
- interest: 788.49,
430
- monthlyPayment: 2346.7705888545,
435
+ interest: 781.25,
436
+ interestDiff: 7.24,
437
+ interestIUB: 788.49,
438
+ monthlyPayment: 1141.2578071913,
431
439
  monthlyPaymentWithInsurances: 2373.7105888545,
432
440
  amortizationIUB: 363.3378071913,
433
441
  amortization: 360.0078071913,
@@ -572,18 +580,20 @@ describe('installment-service for german method', () => {
572
580
  balanceAfter: 129428.7349744719,
573
581
  ipcaUpdate: 1198.2727816632,
574
582
  dailyRate: 0.0002009109,
575
- interest: 788.49,
576
- monthlyPayment: 1798.0278071913,
577
- monthlyPaymentWithInsurances: 1824.9678071913,
583
+ interest: 781.25,
584
+ interestDiff: 7.24,
585
+ interestIUB: 788.49,
586
+ monthlyPayment: 592.5150255281,
587
+ monthlyPaymentWithInsurances: 1821.3378071913,
578
588
  amortizationIUB: 363.3378071913,
579
589
  amortization: -188.7349744719,
580
590
  amortizationDiff: 3.33,
581
591
  postponedInflationaryUpdate: 548.7427816632,
582
- amortizationIPCA: 646.2,
592
+ amortizationIPCA: 642.87,
583
593
  debtorLifeInsuranceFee: 22.14,
584
- propertyInsuranceFee: 4.8,
594
+ propertyInsuranceFee: 4.5,
585
595
  codebtorLifeInsuranceFee: 0,
586
- monthlyPaymentWithLate: 1824.9678071913,
596
+ monthlyPaymentWithLate: 1821.3378071913,
587
597
  lateCharges: 0,
588
598
  lateDays: 0,
589
599
  lateInterest: 0
@@ -591,11 +601,11 @@ describe('installment-service for german method', () => {
591
601
  const amortizationMethod = AmortizationMethod.GERMAN;
592
602
  const paymentNumber = new PaymentNumber(2);
593
603
  const numberOfMonths = new NumberOfMonths(360);
594
- const previousBalance = new PreviousBalance(129240);
604
+ const previousBalance = new PreviousBalance(129240.00);
595
605
  const annualRate = 0.075;
596
606
  const debtorLifeInsuranceRate = new CreditInsuranceRate(0.00017);
597
607
  const inflationaryUpperBound = 0.005;
598
- const propertyAmount = 160000;
608
+ const propertyAmount = 150000;
599
609
  const propertyInsuranceRate = new CreditInsuranceRate(0.00003);
600
610
  const IPCAmap = {
601
611
  '2021-01-05': 0.0095,
@@ -794,6 +804,7 @@ describe('installment-service for german method', () => {
794
804
  const result = service.getTotalMonthlyPayment(inputs, params);
795
805
  expect(result).toEqual(expectedResult);
796
806
  });
807
+ // anda bien
797
808
  it('WEDSON (Case internal backend) should return the calculated installment without dueLate', () => {
798
809
  const expectedResult = {
799
810
  IPCAByDates: [
@@ -892,18 +903,20 @@ describe('installment-service for german method', () => {
892
903
  balanceAfter: 129428.7349744719,
893
904
  ipcaUpdate: 1198.2727816632,
894
905
  dailyRate: 0.0002009109,
895
- interest: 788.49,
896
- monthlyPayment: 1798.0278071913,
897
- monthlyPaymentWithInsurances: 1824.9678071913,
906
+ interest: 781.25,
907
+ interestDiff: 7.24,
908
+ interestIUB: 788.49,
909
+ monthlyPayment: 592.5150255281,
910
+ monthlyPaymentWithInsurances: 1821.3378071913,
898
911
  amortizationIUB: 363.3378071913,
899
912
  amortization: -188.7349744719,
900
913
  amortizationDiff: 3.33,
901
914
  postponedInflationaryUpdate: 548.7427816632,
902
- amortizationIPCA: 646.2,
915
+ amortizationIPCA: 642.87,
903
916
  debtorLifeInsuranceFee: 22.14,
904
- propertyInsuranceFee: 4.8,
917
+ propertyInsuranceFee: 4.5,
905
918
  codebtorLifeInsuranceFee: 0,
906
- monthlyPaymentWithLate: 1824.9678071913,
919
+ monthlyPaymentWithLate: 1821.3378071913,
907
920
  lateCharges: 0,
908
921
  lateDays: 0,
909
922
  lateInterest: 0
@@ -916,7 +929,7 @@ describe('installment-service for german method', () => {
916
929
  const annualRate = 0.075;
917
930
  const debtorLifeInsuranceRate = new CreditInsuranceRate(0.00017);
918
931
  const inflationaryUpperBound = 0.005;
919
- const propertyAmount = 160000;
932
+ const propertyAmount = 150000;
920
933
  const propertyInsuranceRate = new CreditInsuranceRate(0.00003);
921
934
  const IPCAmap = { '2022-01-05': 0.0095, '2022-02-05': 0.0073 };
922
935
  const inputs: DebtInputs = {
@@ -996,8 +1009,10 @@ describe('installment-service for german method', () => {
996
1009
  balanceAfter: 129240.00286363,
997
1010
  ipcaUpdate: 614.569093194,
998
1011
  dailyRate: 0.0002009109,
999
- interest: 330.09,
1000
- monthlyPayment: 1304.656229564,
1012
+ interest: 328.53,
1013
+ interestDiff: 1.56,
1014
+ interestIUB: 330.09,
1015
+ monthlyPayment: 688.52713637,
1001
1016
  monthlyPaymentWithInsurances: 1358.466229564,
1002
1017
  amortization: 359.99713637,
1003
1018
  amortizationDiff: 1.71,
@@ -1108,13 +1123,15 @@ describe('installment-service for french method', () => {
1108
1123
  balanceAfter: 478369.497072,
1109
1124
  ipcaUpdate: 2386.1822123922,
1110
1125
  dailyRate: 0.0002266368,
1111
- interest: 1804.52,
1112
- monthlyPayment: 5821.2051403922,
1126
+ interest: 1795.59,
1127
+ interestDiff: 8.93,
1128
+ monthlyPayment: 3426.092928,
1113
1129
  monthlyPaymentWithInsurances: 6035.7051403922,
1114
1130
  amortizationIUB: 1638.6085052585,
1115
1131
  postponedInflationaryUpdate: 0,
1116
1132
  amortization: 1630.502928,
1117
1133
  amortizationDiff: 8.1055772585,
1134
+ interestIUB: 1804.52,
1118
1135
  amortizationIPCA: 2378.0766351337,
1119
1136
  debtorLifeInsuranceFee: 163.8,
1120
1137
  codebtorLifeInsuranceFee: 0,
@@ -1297,7 +1314,7 @@ describe('installment-service for french method', () => {
1297
1314
  expect(result).toEqual(expectedResult);
1298
1315
  });
1299
1316
  // Falla en el cálculo de la amortizationIPC
1300
- it.skip('Sylvio (inflationaryUpperBound 0.0036, installment 1) should return the calculated installment', () => {
1317
+ it('Sylvio (inflationaryUpperBound 0.0036, installment 1) should return the calculated installment', () => {
1301
1318
  const expectedResult = {
1302
1319
  IPCAByDates: [
1303
1320
  { date: '2022-01-19', ipca: 0.0095, dailyIPCA: 0.0003050516 },
@@ -1321,29 +1338,29 @@ describe('installment-service for french method', () => {
1321
1338
  ],
1322
1339
  balanceValues: {
1323
1340
  balances: [
1324
- 1110063.303319699, 1110401.929906478,
1325
- 1110740.6597918393, 1111079.493007294,
1341
+ 1110063.303319699, 1110401.929906478,
1342
+ 1110740.6597918393, 1111079.493007294,
1326
1343
  1111418.4295843632, 1111757.4695545775,
1327
- 1112096.6129494773, 1112435.859800612,
1328
- 1112775.2101395417, 1113114.663997835,
1329
- 1113454.221407071, 1113793.882398838,
1344
+ 1112096.6129494773, 1112435.859800612,
1345
+ 1112775.2101395417, 1113114.663997835,
1346
+ 1113454.221407071, 1113793.882398838,
1330
1347
  1114083.2471632792, 1114372.6871049756,
1331
1348
  1114662.2022434582, 1114951.7925982631,
1332
- 1115241.458188932
1349
+ 1115241.458188932
1333
1350
  ],
1334
1351
  balanceMonetaryUpdateValues: [
1335
- 338.5233196986, 338.626586779,
1352
+ 338.5233196986, 338.626586779,
1336
1353
  338.7298853611, 338.8332154546,
1337
1354
  338.9365770691, 339.0399702142,
1338
1355
  339.1433948996, 339.2468511348,
1339
1356
  339.3503389296, 339.4538582934,
1340
- 339.557409236, 339.660991767,
1357
+ 339.557409236, 339.660991767,
1341
1358
  289.3647644411, 289.4399416963,
1342
1359
  289.5151384826, 289.5903548051,
1343
1360
  289.6655906688
1344
1361
  ],
1345
1362
  balanceUpperBoundMonetaryUpdateValues: [
1346
- 128.647286516, 128.6865305766,
1363
+ 128.647286516, 128.6865305766,
1347
1364
  128.7257866087, 128.7650546158,
1348
1365
  128.8043346018, 128.8436265701,
1349
1366
  128.8829305245, 128.9222464687,
@@ -1362,23 +1379,30 @@ describe('installment-service for french method', () => {
1362
1379
  210.5171429598, 210.5813615511,
1363
1380
  160.2457582775, 146.4486938228,
1364
1381
  146.4867413399, 146.5247987418,
1365
- 146.562866031
1382
+ 146.562866031
1366
1383
  ]
1367
1384
  },
1368
1385
  balanceInflationaryUpdated: 1115241.458188932,
1369
- balanceAfter: 1110381.427286398,
1386
+ balanceAfter: 1110377.1280783976,
1370
1387
  ipcaUpdate: 5516.6781889309,
1371
1388
  dailyRate: 0.0002009109,
1372
- interest: 3696.98,
1373
- monthlyPayment: 8557.0109025334,
1374
- // monthlyPaymentWithInsurances: 8785.6909025334,
1375
- monthlyPaymentWithInsurances: 9034.23,
1376
- amortization: 869.3209025334,
1377
- // amortizationIPCA: 3990.71,
1378
- amortizationIPCA: 4010.57,
1379
- debtorLifeInsuranceFee: 189.59,
1380
- propertyInsuranceFee: 39.09,
1381
- codebtorLifeInsuranceFee: 0
1389
+ interest: 3678.69,
1390
+ interestDiff: 18.29,
1391
+ interestIUB: 3696.98,
1392
+ monthlyPayment: 3026.3419216025,
1393
+ monthlyPaymentWithInsurances: 9013.8809025334,
1394
+ monthlyPaymentWithLate: 9013.8809025334,
1395
+ amortization: -652.3480783975,
1396
+ amortizationDiff: 4.3002021014,
1397
+ amortizationIUB: 869.3209025334,
1398
+ postponedInflationaryUpdate: 1517.3687788294997,
1399
+ amortizationIPCA: 3990.71,
1400
+ debtorLifeInsuranceFee: 378.69,
1401
+ codebtorLifeInsuranceFee: 0,
1402
+ propertyInsuranceFee: 78.18,
1403
+ lateDays: 0,
1404
+ lateInterest: 0,
1405
+ lateCharges: 0
1382
1406
  };
1383
1407
 
1384
1408
  const amortizationMethod = AmortizationMethod.FRENCH;
@@ -1386,10 +1410,10 @@ describe('installment-service for french method', () => {
1386
1410
  const numberOfMonths = new NumberOfMonths(360);
1387
1411
  const previousBalance = new PreviousBalance(1109724.78); //
1388
1412
  const annualRate = 0.0750;
1389
- const debtorLifeInsuranceRate = new CreditInsuranceRate(0.017);
1413
+ const debtorLifeInsuranceRate = new CreditInsuranceRate(0.00017);
1390
1414
  const inflationaryUpperBound = 0.0036;
1391
1415
  const propertyAmount = 1303000;
1392
- const propertyInsuranceRate = new CreditInsuranceRate(0.003);
1416
+ const propertyInsuranceRate = new CreditInsuranceRate(0.00003);
1393
1417
  const IPCAmap = { '2022-01-19': 0.0095, '2022-02-05': 0.0073 };
1394
1418
  const inputs: DebtInputs = {
1395
1419
  amortizationMethod,