-- unificación de globalDTs

This commit is contained in:
2023-02-18 13:40:31 -07:00
parent a8eb7895e0
commit e59d485489
6 changed files with 107 additions and 1076 deletions

View File

@@ -20,31 +20,6 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
Dim Retorno As Boolean = False
Try
'If context.Request.InputStream IsNot Nothing Then
' Using reader As New StreamReader(context.Request.InputStream)
' Dim json = reader.ReadToEnd
' If Not String.IsNullOrEmpty(json) Then
' Dim JsonRequest As JObject = JObject.Parse(json)
' If JsonRequest IsNot Nothing Then
' Dim Metodo = JsonRequest("Metodo").ToString()
' If Metodo = "FactMasivaRemisiones" Then
' Dim pCveEmpresa = JsonRequest("CveEmpresa").ToString()
' Dim pFechaI As String = ""
' Dim pFechaF As String = ""
' If JsonRequest("FechaI") IsNot Nothing AndAlso JsonRequest("FechaF") IsNot Nothing Then
' pFechaI = JsonRequest("FechaI")
' pFechaF = JsonRequest("FechaF")
' End If
' IniciaFacturacionMasiva(context, CveEmpresaFacturar, pFechaI, pFechaF)
' End If
' End If
' End If
' End Using
'End If
Dim Metodo = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString())
If Metodo = "FactMasivaRemisiones" Then
@@ -951,55 +926,6 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
ArchivoW.Dispose()
End Sub
Public Property GlobalTipoCambio(Optional Fecha As Date = MinFecha) As Double
Get
If GlobalTipoCambio <= 0 Then
'sino tiene dato lo recargo por si ya esta insertado
If Fecha = MinFecha Then Fecha = Now
Dim ObjGral As New ClsGenerales
If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
HttpContext.Current.Application("GlobalTipoCambio") = ObjGral.DtResultados.Rows(0)("TipoCambio").ToString.ToDouble
Else
HttpContext.Current.Application("GlobalTipoCambio") = 0
End If
ObjGral.Dispose()
End If
Return HttpContext.Current.Application("GlobalTipoCambio").ToString.ToDouble
End Get
Set(value As Double)
HttpContext.Current.Application("GlobalTipoCambio") = value
End Set
End Property
Public Property GlobalTipoCambioEuro(Optional Fecha As Date = MinFecha) As Double
Get
If GlobalTipoCambioEuro <= 0 Then
'sino tiene dato lo recargo por si ya esta insertado
If Fecha = MinFecha Then Fecha = Now
Dim ObjGral As New ClsGenerales
If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
HttpContext.Current.Application("GlobalTipoCambioEuro") = ObjGral.DtResultados.Rows(0)("TipoCambioEuro").ToString.ToDouble
Else
HttpContext.Current.Application("GlobalTipoCambioEuro") = 0
End If
ObjGral.Dispose()
End If
Return HttpContext.Current.Application("GlobalTipoCambioEuro").ToString.ToDouble
End Get
Set(value As Double)
HttpContext.Current.Application("GlobalTipoCambioEuro") = value
End Set
End Property