cambios de extensiones .SUM de double a decimal
This commit is contained in:
@@ -63,7 +63,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
'EnviarCorreoFactura(New Modelos.Factura(Usuario, 844966, 1, context.ModExtensiones.DirectorioBaseEmpresas), Usuario)
|
||||
|
||||
If String.IsNullOrEmpty(pFechaI) AndAlso String.IsNullOrEmpty(pFechaF) Then
|
||||
Dim FechaReferencia = ClsPaginas.NowADS()
|
||||
Dim FechaReferencia As Date = ClsPaginas.NowADS()
|
||||
If FechaReferencia.DayOfWeek = DayOfWeek.Sunday Then
|
||||
Dim Sabado = FechaReferencia.AddDays(-1)
|
||||
Dim DomingoAnterior = FechaReferencia.AddDays(-7)
|
||||
@@ -273,7 +273,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
ObjFolios.Dispose()
|
||||
|
||||
Dim ObjFactura = New Modelos.Factura(UsuarioActual)
|
||||
Dim ObjFactura As New Modelos.Factura(UsuarioActual)
|
||||
ObjFactura.TipoMensajeRespuesta = Modelos.TipoMensajeRespuesta.TextoLimpio
|
||||
ObjFactura.Serie = Serie
|
||||
ObjFactura.Folio = Folio.ToEntero()
|
||||
@@ -361,12 +361,12 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
ObjFactura.DtRemisionesPS = DTRemisionesPS
|
||||
|
||||
Dim TotalImporte As Decimal = ObjFactura.DtDetalle.SUM("TotalImporte").ToDecimal()
|
||||
Dim ImporteIVA As Decimal = ObjFactura.DtDetalle.SUM("ImporteIVA").ToDecimal()
|
||||
Dim ImporteRetIVA As Decimal = ObjFactura.DtDetalle.SUM("ImporteRetIVA").ToDecimal()
|
||||
Dim ImporteRetISR As Decimal = ObjFactura.DtDetalle.SUM("ImporteRetISR").ToDecimal()
|
||||
Dim ImporteIEPS As Decimal = ObjFactura.DtDetalle.SUM("ImporteIEPS").ToDecimal()
|
||||
Dim Descuento As Decimal = ObjFactura.DtDetalle.SUM("Descuento").ToDecimal()
|
||||
Dim TotalImporte As Decimal = ObjFactura.DtDetalle.SUM("TotalImporte")
|
||||
Dim ImporteIVA As Decimal = ObjFactura.DtDetalle.SUM("ImporteIVA")
|
||||
Dim ImporteRetIVA As Decimal = ObjFactura.DtDetalle.SUM("ImporteRetIVA")
|
||||
Dim ImporteRetISR As Decimal = ObjFactura.DtDetalle.SUM("ImporteRetISR")
|
||||
Dim ImporteIEPS As Decimal = ObjFactura.DtDetalle.SUM("ImporteIEPS")
|
||||
Dim Descuento As Decimal = ObjFactura.DtDetalle.SUM("Descuento")
|
||||
Dim Amortizacion As Decimal = 0
|
||||
|
||||
Dim Total As Decimal = (TotalImporte + ImporteIVA + ImporteIEPS) - (ImporteRetIVA + ImporteRetISR + Descuento + Amortizacion)
|
||||
@@ -530,7 +530,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Return Timbre
|
||||
End Function
|
||||
Private Function CreaDTDetalle(ByRef Retorno As Modelos.Factura.MMensajeFactura, UsuarioActual As Usuario, DtRemisionesPS As DataTable) As DataTable
|
||||
Dim TmpDT = New DataTable
|
||||
Dim TmpDT As New DataTable
|
||||
TmpDT.Columns.Add("CveVenta", GetType(Integer))
|
||||
TmpDT.Columns.Add("Consec", GetType(Integer))
|
||||
TmpDT.Columns.Add("Cantidad", GetType(Decimal))
|
||||
@@ -770,9 +770,9 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim Url = New Uri(String.Format("{0}Compras/PopUpVerFactura.aspx?P={1}", ClsPaginas.UrlSitio, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
||||
Dim File As Byte() = Nothing
|
||||
Try
|
||||
Using httpClient = New HttpClient()
|
||||
Using httpClient As New HttpClient()
|
||||
httpClient.Timeout = New TimeSpan(0, 15, 0)
|
||||
Using request = New HttpRequestMessage(HttpMethod.Get, Url)
|
||||
Using request As New HttpRequestMessage(HttpMethod.Get, Url)
|
||||
request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CVEUSUARIO=100", CveEmpresa, DateTime.UtcNow.Ticks)))
|
||||
Dim response = httpClient.SendAsync(request).Result
|
||||
If response.StatusCode = Net.HttpStatusCode.OK Then
|
||||
@@ -795,8 +795,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim Mail As String = ""
|
||||
Dim MailCC As String = ""
|
||||
|
||||
Dim ArchivoXML = ""
|
||||
Dim ArchivoPDF = ""
|
||||
Dim ArchivoXML As String = ""
|
||||
Dim ArchivoPDF As String = ""
|
||||
Dim ArchivoPDFBytes As Byte() = Nothing
|
||||
Dim ExistePDF As Boolean = False
|
||||
Try
|
||||
@@ -812,7 +812,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
If ObjFactura.CveClienteSucursal > 0 Then
|
||||
If ObjCliente.GetSucursales(ObjFactura.CveCliente, ObjFactura.CveClienteSucursal) Then
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
Dim Correo = ObjCliente.DtResultados.Rows(0)("Correo").ToString
|
||||
Dim Correo As String = ObjCliente.DtResultados.Rows(0)("Correo").ToString
|
||||
If Correo.Trim.Length > 0 Then
|
||||
Mail = Correo
|
||||
End If
|
||||
@@ -839,7 +839,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim Cuerpo As String = String.Empty
|
||||
Dim ResultadoMail As Integer = 0
|
||||
|
||||
Dim TipoComprobante = ""
|
||||
Dim TipoComprobante As String = ""
|
||||
|
||||
If ObjFactura.TipoDocto = "Ing" Then TipoComprobante = "Factura"
|
||||
If ObjFactura.TipoDocto = "Egs" Then TipoComprobante = "Nota de Crédito"
|
||||
|
||||
Reference in New Issue
Block a user