fix: contador de meses
This commit is contained in:
@@ -180,12 +180,14 @@ public class ContratoController : ControllerBase
|
|||||||
|
|
||||||
foreach (var i in list)
|
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()
|
var c = new CanonDtoBuilder()
|
||||||
.SetId(i.Id)
|
.SetId(i.Id)
|
||||||
.SetPago(i.Idrecibo == null ? false : true)
|
.SetPago(i.Idrecibo == null ? false : true)
|
||||||
.SetDivisa(divisa == "" ? "Ugh esta mal cargado la divisa en el contrato" : divisa)
|
.SetDivisa(divisa == "" ? "Ugh esta mal cargado la divisa en el contrato" : divisa)
|
||||||
.SetMes(i.Fecha)
|
.SetMes(i.Fecha)
|
||||||
.SetMesNum(int.Parse((i.Fecha.Month - cont.Fechainicio.Month).ToString()) + 1)
|
.SetMesNum(mesNum)
|
||||||
.SetMonto(i.Monto)
|
.SetMonto(i.Monto)
|
||||||
.Build();
|
.Build();
|
||||||
d.Add(c);
|
d.Add(c);
|
||||||
|
|||||||
Reference in New Issue
Block a user