From 02b6d00f8eecfad0f9a6f88ebdf7a1a4797e1184 Mon Sep 17 00:00:00 2001 From: roberto Date: Wed, 5 Dec 2007 18:48:14 +0000 Subject: [PATCH] Arreglo de dia de pago de los clientes teniendo en cuenta el mes de febrero git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES/trunk@194 c93665c3-c93d-084d-9b98-7d5f4a9c3376 --- .../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 e576c047..6a734530 100644 --- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas +++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas @@ -1067,6 +1067,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);