From 916d108e616f652d563bfbdd40a5224185589926 Mon Sep 17 00:00:00 2001 From: roberto Date: Wed, 5 Dec 2007 19:11:57 +0000 Subject: [PATCH] Arreglo de dia de pago del cliente para sus recibos teniendo en cuenta el mes de febrero git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@47 f4e31baf-9722-1c47-927c-6f952f962d4b --- .../Controller/uFacturasClienteController.pas | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas index b2bd4216..e298db0a 100644 --- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas +++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas @@ -1062,6 +1062,12 @@ begin else AFechaVencimiento := IncDay(AFechaVencimiento, (AFactura.Cliente.VENCIMIENTO_FACTURAS - DayOf(AFechaVencimiento))); end; + + //Comprobamos que la fecha de vencimiento no sea febrero si es asi hay que tratarlo + if (AFactura.Cliente.VENCIMIENTO_FACTURAS > 28) + and (MonthOf(AFechaVencimiento) = 3) and (DayOf(AFechaVencimiento) < 3) then + AFechaVencimiento := IncDay(AFechaVencimiento, - DayOf(AFechaVencimiento)); + ARecibos.FECHA_VENCIMIENTO := AFechaVencimiento; ARecibos.IMPORTE := AFactura.IMPORTE_TOTAL * (AFormaPago.Plazos.PORCENTAJE / 100);