fix: contador de meses

This commit is contained in:
2025-07-20 00:34:17 -03:00
parent af3933480d
commit a7355ea540

View File

@@ -180,12 +180,14 @@ public class ContratoController : ControllerBase
foreach (var i in list)
{
int totalMeses = (i.Fecha.Year - cont.Fechainicio.Year) * 12 + (i.Fecha.Month - cont.Fechainicio.Month);
int mesNum = totalMeses + 1;
var c = new CanonDtoBuilder()
.SetId(i.Id)
.SetPago(i.Idrecibo == null ? false : true)
.SetDivisa(divisa == "" ? "Ugh esta mal cargado la divisa en el contrato" : divisa)
.SetMes(i.Fecha)
.SetMesNum(int.Parse((i.Fecha.Month - cont.Fechainicio.Month).ToString()) + 1)
.SetMesNum(mesNum)
.SetMonto(i.Monto)
.Build();
d.Add(c);