fix: contador de meses
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user