fixeado tema de control de pagos
This commit is contained in:
@@ -134,7 +134,7 @@ public class AdminController: ControllerBase
|
||||
|
||||
DateTime date = DateTime.Now;
|
||||
bool ret =list.Any(x=>x.Pagado ==0 && date > x.Fecha);
|
||||
if (ret == true) return BadRequest(new { message = "Este contrato no tiene canones vencidos"});
|
||||
if (ret != true) return BadRequest(new { message = "Este contrato no tiene canones vencidos"});
|
||||
|
||||
string divisa ="";
|
||||
if (cont.Iddivisa == 0) divisa = "AR$"; else if (cont.Iddivisa == 1) divisa = "US$";
|
||||
@@ -142,6 +142,8 @@ public class AdminController: ControllerBase
|
||||
List<CanonDto> d = new();
|
||||
|
||||
foreach (var i in list) {
|
||||
if (i.Fecha > date) continue;
|
||||
|
||||
var c = new CanonDtoBuilder()
|
||||
.SetId(i.Id)
|
||||
.SetPago(i.Idrecibo==null?false:true)
|
||||
|
||||
Reference in New Issue
Block a user