From 80a9b368bf2df54561effe11f61c346576fc41eb Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 29 Oct 2022 12:04:43 -0700 Subject: [PATCH] =?UTF-8?q?--=20mejora=20en=20datos=20de=20p=C3=B3liza=20v?= =?UTF-8?q?irtual,=20para=20que=20tome=20las=20credenciales=20de=20acceso?= =?UTF-8?q?=20en=20base=20a=20su=20sucursal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/Modelos.vb | 4 ++++ Ventas/Ventas.aspx.vb | 32 ++++++++++++++------------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index f72a279b9..ab0e74c3a 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -10371,6 +10371,8 @@ Namespace Modelos Telefono = "" UTCOffsetVerano = -7 UTCOffsetInvierno = -7 + Acum_PortalUsuario = "" + Acum_PortalContrasena = "" End Sub Public Sub New() MyBase.New() @@ -10409,6 +10411,8 @@ Namespace Modelos Public Property ImprimeNombre As String Public Property UTCOffsetVerano As Integer Public Property UTCOffsetInvierno As Integer + Public Property Acum_PortalUsuario As String + Public Property Acum_PortalContrasena As String End Class diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index a23023adf..f29d85d84 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -8,6 +8,7 @@ Imports System.IO Imports System.Net.Http Imports System.Security.Cryptography.X509Certificates Imports System.Xml +Imports ADSTimbrado Imports Extensiones Imports Microsoft.Reporting.WebForms Imports Newtonsoft.Json.Linq @@ -33070,8 +33071,8 @@ Partial Class Ventas obj.used_sale_date = FechaUsado End If - - EnviarPolizaVentaWS(obj, CvePolizaVirtual) + ObjFactura.SetSubProyecto() + EnviarPolizaVentaWS(obj, CvePolizaVirtual, ObjFactura.SubProyecto.Acum_PortalUsuario, ObjFactura.SubProyecto.Acum_PortalContrasena) End If Next @@ -33082,16 +33083,16 @@ Partial Class Ventas 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 Respuesta As String = "[]" - Dim User As String = "" - Dim Password As String = "" + Dim User As String + Dim Password As String If UsuarioActual.Empresa.FacturaProduccion Then - User = "cslth.2809@jcilink.com" - Password = "ff31580a95f36b51ad27f970428b77a5a9245076" + User = Usuario '"cslth.2809@jcilink.com" + Password = Contraseña ' "ff31580a95f36b51ad27f970428b77a5a9245076" Else User = "cslth.7777@lth.com" 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 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 + 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() 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.")