-- mejora en datos de póliza virtual, para que tome las credenciales de acceso en base a su sucursal

This commit is contained in:
2022-10-29 12:04:43 -07:00
parent 576144d365
commit 80a9b368bf
2 changed files with 18 additions and 18 deletions

View File

@@ -10371,6 +10371,8 @@ Namespace Modelos
Telefono = "" Telefono = ""
UTCOffsetVerano = -7 UTCOffsetVerano = -7
UTCOffsetInvierno = -7 UTCOffsetInvierno = -7
Acum_PortalUsuario = ""
Acum_PortalContrasena = ""
End Sub End Sub
Public Sub New() Public Sub New()
MyBase.New() MyBase.New()
@@ -10409,6 +10411,8 @@ Namespace Modelos
Public Property ImprimeNombre As String Public Property ImprimeNombre As String
Public Property UTCOffsetVerano As Integer Public Property UTCOffsetVerano As Integer
Public Property UTCOffsetInvierno As Integer Public Property UTCOffsetInvierno As Integer
Public Property Acum_PortalUsuario As String
Public Property Acum_PortalContrasena As String
End Class End Class

View File

@@ -8,6 +8,7 @@ Imports System.IO
Imports System.Net.Http Imports System.Net.Http
Imports System.Security.Cryptography.X509Certificates Imports System.Security.Cryptography.X509Certificates
Imports System.Xml Imports System.Xml
Imports ADSTimbrado
Imports Extensiones Imports Extensiones
Imports Microsoft.Reporting.WebForms Imports Microsoft.Reporting.WebForms
Imports Newtonsoft.Json.Linq Imports Newtonsoft.Json.Linq
@@ -33070,8 +33071,8 @@ Partial Class Ventas
obj.used_sale_date = FechaUsado obj.used_sale_date = FechaUsado
End If End If
ObjFactura.SetSubProyecto()
EnviarPolizaVentaWS(obj, CvePolizaVirtual) EnviarPolizaVentaWS(obj, CvePolizaVirtual, ObjFactura.SubProyecto.Acum_PortalUsuario, ObjFactura.SubProyecto.Acum_PortalContrasena)
End If End If
Next Next
@@ -33082,16 +33083,16 @@ Partial Class Ventas
End Sub End Sub
Protected Function EnviarPolizaVentaWS(obj As Modelos.MPolizaVentaWS, CvePolizaVirtual As Integer) As Boolean Protected Function EnviarPolizaVentaWS(obj As Modelos.MPolizaVentaWS, CvePolizaVirtual As Integer, Usuario As String, Contraseña As String) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
Dim Respuesta As String = "[]" Dim Respuesta As String = "[]"
Dim User As String = "" Dim User As String
Dim Password As String = "" Dim Password As String
If UsuarioActual.Empresa.FacturaProduccion Then If UsuarioActual.Empresa.FacturaProduccion Then
User = "cslth.2809@jcilink.com" User = Usuario '"cslth.2809@jcilink.com"
Password = "ff31580a95f36b51ad27f970428b77a5a9245076" Password = Contraseña ' "ff31580a95f36b51ad27f970428b77a5a9245076"
Else Else
User = "cslth.7777@lth.com" User = "cslth.7777@lth.com"
Password = "ff31580a95f36b51ad27f970428b77a5a9245076" Password = "ff31580a95f36b51ad27f970428b77a5a9245076"
@@ -33146,19 +33147,14 @@ Partial Class Ventas
If resp(0)("Codigo").ToString().Contiene("500", "501", "502", "503", "504", "505", "506", "507", "508", "510") Then If resp(0)("Codigo").ToString().Contiene("500", "501", "502", "503", "504", "505", "506", "507", "508", "510") Then
Retorno = True Retorno = True
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.UpdateEnvioPolizaVirtual(CvePolizaVirtual, True, Now, obj.product_unique_code, resp(0)("Descripcion").ToString()) Then
Alert(Msg.ToString(), TipoMensaje.MsgInformacion)
End If
ObjAcum.Dispose()
Else
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.UpdateEnvioPolizaVirtual(CvePolizaVirtual, False, Now, obj.product_unique_code, resp(0)("Descripcion").ToString()) Then
Alert(Msg.ToString(), TipoMensaje.MsgAdvertencia)
End If
ObjAcum.Dispose()
End If End If
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.UpdateEnvioPolizaVirtual(CvePolizaVirtual, Retorno, Now, obj.product_unique_code, resp(0)("Descripcion").ToString()) Then
Alert(Msg.ToString(), TipoMensaje.MsgInformacion)
End If
ObjAcum.Dispose()
Dim ObjEventos As New ClsOIEventos() Dim ObjEventos As New ClsOIEventos()
If Not ObjEventos.AddEventoBitacora(Msg.ToString(), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=Me.CveVenta) Then If Not ObjEventos.AddEventoBitacora(Msg.ToString(), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=Me.CveVenta) Then
ErrorList.Add("Ocurrió un error al agregar la bitacora de Póliza Virtual.") ErrorList.Add("Ocurrió un error al agregar la bitacora de Póliza Virtual.")