E119. Fluctuacion cambiaria mensual
This commit is contained in:
@@ -1496,20 +1496,30 @@ Partial Class Bancos_PopIEVentas
|
||||
Dim CuentasContablesInvalidasSIG As New StringBuilder
|
||||
Dim TipoCambioFluctuacion As Decimal = 1
|
||||
Dim FechaUltimaFluctuacion As Date = MinFecha
|
||||
If ObjIE.GetFluctuacionesBitacora(UsuarioActual.CveEmpresa) Then
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
Dim tFecha As Date = TxtFechaDocumento.Text.ToDate
|
||||
Dim strFecha As String = String.Format("{0}/{1}/{2}", tFecha.Year, tFecha.Month, tFecha.Day)
|
||||
Dim drr As DataRow = ObjIE.DtResultados.FiltroPrimero("Fecha < #" & strFecha & "#", "Fecha DESC")
|
||||
|
||||
If drr IsNot Nothing Then
|
||||
FechaUltimaFluctuacion = drr("Fecha").ToString.ToDate
|
||||
TipoCambioFluctuacion = drr("TipoCambio").ToString.ToDecimal
|
||||
End If
|
||||
End If
|
||||
Dim tFecha As Date = TxtFechaDocumento.Text.ToDate
|
||||
|
||||
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then
|
||||
If UltimaFluctuacion.FechaFluctuacion < tFecha Then
|
||||
FechaUltimaFluctuacion = UltimaFluctuacion.FechaFluctuacion
|
||||
TipoCambioFluctuacion = UltimaFluctuacion.TCFluctuacion
|
||||
End If
|
||||
End If
|
||||
|
||||
'If ObjIE.GetFluctuacionesBitacora(UsuarioActual.CveEmpresa) Then
|
||||
' If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
' Dim strFecha As String = String.Format("{0}/{1}/{2}", tFecha.Year, tFecha.Month, tFecha.Day)
|
||||
' Dim drr As DataRow = ObjIE.DtResultados.FiltroPrimero("Fecha < #" & strFecha & "#", "Fecha DESC")
|
||||
|
||||
' If drr IsNot Nothing Then
|
||||
' FechaUltimaFluctuacion = drr("Fecha").ToString.ToDate
|
||||
' TipoCambioFluctuacion = drr("TipoCambio").ToString.ToDecimal
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then 'Si la venta viene en Pesos y se va a pagar en Pesos
|
||||
tipoCambioPago = 1
|
||||
|
||||
Reference in New Issue
Block a user