restar a ot. ingresos, los impuestos por acreditar, no se deben de poner en acreditables
This commit is contained in:
@@ -5133,7 +5133,10 @@ Partial Class PV
|
||||
Private Sub CalculaMesesUso()
|
||||
Dim FechaI As Date = TxtFechaAjuste.Text.ToDate.AddDays(1)
|
||||
Dim FechaF As Date = Now
|
||||
Dim FechaT As Date = String.Format("{0}/{1}/{2}", FechaI.Day, FechaF.Month, FechaF.Year).ToDate 'armo la fecha con el día del mes actual
|
||||
Dim Dia As Integer = FechaI.Day
|
||||
'validación adicional, para saber si el mes tiene 31 días y el actua es menor.
|
||||
If FechaI.Day > Today.LastDayOfMonth.Day Then Dia = Today.LastDayOfMonth.Day
|
||||
Dim FechaT As Date = String.Format("{0}/{1}/{2}", Dia, FechaF.Month, FechaF.Year).ToDate 'armo la fecha con el día del mes actual
|
||||
|
||||
Dim MesesTrascurridos As Integer = Math.Round(DateDiff(DateInterval.Day, FechaI, FechaT) / 30.4, 2).ToEntero 'saco los meses y lo redondeo
|
||||
|
||||
|
||||
Reference in New Issue
Block a user