-- option explicit
This commit is contained in:
@@ -981,10 +981,7 @@ Partial Class Clientes
|
||||
DdlClasificacion.DataBind()
|
||||
DdlClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub CargaEstados(Optional ClaveSATPais As String = "MEX")
|
||||
|
||||
DdlEstadoSAT.Items.Clear()
|
||||
@@ -1161,7 +1158,7 @@ Partial Class Clientes
|
||||
Private Sub CargaDdlCuentasContables(Ddl As DropDownList, Optional CveFuncionalidad As Integer = -1)
|
||||
Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjContabilidad.GetCuentasRecursiva(CveFuncionalidad, 1) Then
|
||||
Dim Seleccionado = Ddl.SelectedValue
|
||||
Dim Seleccionado As String = Ddl.SelectedValue
|
||||
Ddl.Items.Clear()
|
||||
Ddl.Items.Add(New ListItem("Seleccione", "0"))
|
||||
Ddl.DataSource = ObjContabilidad.DtResultados
|
||||
@@ -2559,10 +2556,9 @@ Partial Class Clientes
|
||||
' ObjContaAC.Dispose()
|
||||
'End If
|
||||
|
||||
|
||||
Dim CodigoCuentaAltaCompaq As String = ""
|
||||
Dim NombreCuentaCuentaAltaCompaq As String = ""
|
||||
Dim IdCuentaAltaCompaq As Integer = -1
|
||||
'Dim CodigoCuentaAltaCompaq As String = ""
|
||||
'Dim NombreCuentaCuentaAltaCompaq As String = ""
|
||||
'Dim IdCuentaAltaCompaq As Integer = -1
|
||||
'Si tiene contabilizacion automatica y la funcionalidad de carga cuenta automatica o UsaAC le agregamos automaticamente una cuenta al cliente
|
||||
'If UsuarioActual.Empresa.Funcionalidad(211).ToEntero() > 0 AndAlso (UsuarioActual.Empresa.Funcionalidad(200).ToEntero() > 0 Or UsuarioActual.Empresa.UsaAC) AndAlso DdlCtaContableClientes.SelectedValue.ToEntero() < 1 Then
|
||||
' If Not AgregarCuentaContable(BtnActivaRegistroClientes, DdlCtaContableClientes, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq) Then
|
||||
@@ -2721,7 +2717,7 @@ Partial Class Clientes
|
||||
If EstatusAnteriorCliente <> ChkEstado.Checked Then
|
||||
|
||||
Dim DTVendedor As New DataTable
|
||||
DTVendedor = GlobalDTVendedores(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" CveVendedor = " & DdlVendedor.SelectedValue.ToEntero())
|
||||
DTVendedor = GlobalDTVendedores(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" CveVendedor = " & DdlVendedor.SelectedValue)
|
||||
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
Dim DtVendedores As DataTable = Nothing
|
||||
@@ -2757,14 +2753,11 @@ Partial Class Clientes
|
||||
MandaCorreo(Asunto, Para + "", SBBody.ToString())
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
CargaHistorial()
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
UpnHistorial.Update()
|
||||
|
||||
End If
|
||||
End If
|
||||
ObjClientes.Dispose()
|
||||
@@ -2920,7 +2913,7 @@ Partial Class Clientes
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(247) Then
|
||||
If CType(sender, GridView).ID = "GVAnticipos" And e.Row.DBCampo("CveVenta").ToEntero() > 0 And e.Row.DBCampo("Tipo") = "NC" Then
|
||||
Dim Parametros = Encripta($"CveVenta={e.Row.DBCampo("CveVenta").ToEntero()}&SerieFolio={e.Row.DBCampo("Folio")}&CveMoneda={e.Row.DBCampo("CveMoneda")}&CveCliente={CveCliente}&Saldo={e.Row.DBCampo("Saldo")}&Original={e.Row.DBCampo("Original")}&CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}")
|
||||
Dim Parametros As String = Encripta($"CveVenta={e.Row.DBCampo("CveVenta").ToEntero()}&SerieFolio={e.Row.DBCampo("Folio")}&CveMoneda={e.Row.DBCampo("CveMoneda")}&CveCliente={CveCliente}&Saldo={e.Row.DBCampo("Saldo")}&Original={e.Row.DBCampo("Original")}&CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}")
|
||||
e.Row.FCHyperLink("HLDevolverDinero").Visible = True
|
||||
e.Row.FCHyperLink("HLDevolverDinero").NavigateUrl = $"/Bancos/IE.aspx?Opcion=DevDinV&P={Parametros}"
|
||||
End If
|
||||
@@ -3481,7 +3474,7 @@ Partial Class Clientes
|
||||
' AGREGA PERMISO A MODULO PORTALCLIENTE
|
||||
If ObjUsuario.UpdateUsuariosModulos(CveUsr, 1101, True, UsuarioActual.CveUsuario) Then
|
||||
'AGREGAMOS PERMISOS A ADMIN
|
||||
For Each permiso In Permisos
|
||||
For Each permiso As Integer In Permisos
|
||||
If Not ObjUsuario.UpdateUsuariosProcesos(CveUsr, permiso, True, UsuarioActual.CveUsuario) Then
|
||||
ErrorUsuario = True
|
||||
Exit For
|
||||
@@ -3502,7 +3495,7 @@ Partial Class Clientes
|
||||
If ObjUsuario.UpdateUsuarioPortal(Usuario, "Admin", CorreoUsuario, True, ContraseñaPredeterminadaEncriptada, CveCliente, -1, CveUsr, UsuarioActual.CveUsuario) Then
|
||||
|
||||
'ACTUALIZAMOS PERMISOS A ADMIN
|
||||
For Each permiso In Permisos
|
||||
For Each permiso As Integer In Permisos
|
||||
If Not ObjUsuario.UpdateUsuariosProcesos(CveUsr, permiso, True, UsuarioActual.CveUsuario) Then
|
||||
ErrorUsuario = True
|
||||
Exit For
|
||||
@@ -3916,16 +3909,14 @@ Partial Class Clientes
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.rpt", UsuarioActual.Empresa.Ruta))
|
||||
Dim RutaReporteGrales As New System.IO.FileInfo($"{DirectorioEmpresas}Grales\Formatos\RepClientesCxC.rpt")
|
||||
|
||||
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
'OBTENEMOS LOS DATOS
|
||||
Dim DtCxCFact As DataTable = Nothing
|
||||
|
||||
Dim FI = If(TxtFechaInicioCxP.Text = "" Or TxtFechaInicioCxP.Text = "__/__/____", "-1", TxtFechaInicioCxP.Text)
|
||||
Dim FF = If(TxtFechaFinCxP.Text = "" Or TxtFechaFinCxP.Text = "__/__/____", "-1", TxtFechaFinCxP.Text)
|
||||
Dim FI As String = If(TxtFechaInicioCxP.Text = "" Or TxtFechaInicioCxP.Text = "__/__/____", "-1", TxtFechaInicioCxP.Text)
|
||||
Dim FF As String = If(TxtFechaFinCxP.Text = "" Or TxtFechaFinCxP.Text = "__/__/____", "-1", TxtFechaFinCxP.Text)
|
||||
|
||||
Dim SaldoIngDolares As Double = 0
|
||||
Dim SaldoIngPesos As Double = 0
|
||||
@@ -4233,9 +4224,9 @@ Partial Class Clientes
|
||||
Private Sub EnviaCorreo(Liga As String, LigaActivar As String)
|
||||
|
||||
Try
|
||||
Dim Para = TxtEmail.Text.Trim
|
||||
Dim Asunto = "ACTIVACIÓN DEL PORTAL DE CLIENTE"
|
||||
Dim Usuario = TxtEmail.Text.Trim
|
||||
Dim Para As String = TxtEmail.Text.Trim
|
||||
Dim Asunto As String = "ACTIVACIÓN DEL PORTAL DE CLIENTE"
|
||||
Dim Usuario As String = TxtEmail.Text.Trim
|
||||
|
||||
Dim SBBody As New StringBuilder
|
||||
'Linia de estilos
|
||||
@@ -6036,24 +6027,24 @@ Partial Class Clientes
|
||||
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
|
||||
Dim dt As New DataTable
|
||||
Dim Conexion As Odbc.OdbcConnection = Nothing
|
||||
Dim ErrorArchivo = False
|
||||
Dim ErrorArchivo As Boolean = False
|
||||
Try
|
||||
Select Case Tipo
|
||||
Case "CSV"
|
||||
Conexion = New Odbc.OdbcConnection("Driver={Microsoft Access Text Driver (*.txt, *.csv)};Dbq=" + Ruta + ";Extensions=asc,csv,tab,txt;")
|
||||
Conexion.Open()
|
||||
Dim cmd = Conexion.CreateCommand()
|
||||
Dim cmd As Odbc.OdbcCommand = Conexion.CreateCommand()
|
||||
cmd.CommandType = CommandType.Text
|
||||
cmd.CommandText = $"SELECT * FROM [{FileName}]"
|
||||
Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||
Dim DataAdapter As New Odbc.OdbcDataAdapter(cmd)
|
||||
DataAdapter.Fill(dt)
|
||||
Case "EXCEL"
|
||||
Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
||||
Conexion.Open()
|
||||
Dim cmd = Conexion.CreateCommand()
|
||||
Dim cmd As Odbc.OdbcCommand = Conexion.CreateCommand()
|
||||
cmd.CommandType = CommandType.Text
|
||||
cmd.CommandText = "SELECT * FROM [Hoja1$]"
|
||||
Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||
Dim DataAdapter As New Odbc.OdbcDataAdapter(cmd)
|
||||
DataAdapter.Fill(dt)
|
||||
Case Else
|
||||
Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
|
||||
@@ -6113,8 +6104,8 @@ Partial Class Clientes
|
||||
Private Sub EnviaCorreo2(Liga As String, LigaActivar As String)
|
||||
|
||||
Try
|
||||
Dim Para = TxtCorreoUsuarioPortal.Text.Trim
|
||||
Dim Asunto = "ACTIVACIÓN DEL PORTAL DE CLIENTE"
|
||||
Dim Para As String = TxtCorreoUsuarioPortal.Text.Trim
|
||||
Dim Asunto As String = "ACTIVACIÓN DEL PORTAL DE CLIENTE"
|
||||
Dim SBBody As New StringBuilder
|
||||
'Linia de estilos
|
||||
SBBody.Append("<style> .mailbody{ background-color:#EEF1F5; padding:15px; font-family :'Open Sans', sans-serif; } .mailcontent{ background-color:#fff; font-size: 14px; color: #333; padding:0px 15px ; } .mailtitle{padding:8px;color:#32C5D2; font-size: 18px;font-weight: 700!important;border-bottom:2px solid #EEF1F5;text-transform: uppercase;}.marco{border: 1px solid #869ab3;border-top: 0;background-color: #67809F; margin: 10px 15px 25px 15px;color: #fff;}.marco-title{padding: 10px 10px;text-transform: uppercase;font-weight: 700!important;}.marco-body{color:#333;background-color:#fff;}.nota{background: #E5E5E5;padding:15px;color:#333;} .logo { font-size:12px; font-style:italic; text-align:right; } .col1{width:180px;font-weight: 700!important;display:inline-block;} .col2{min-width:260px;display:inline-block;} </style>")
|
||||
@@ -6189,15 +6180,15 @@ Partial Class Clientes
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnCobranzaSMS_Click(sender As Object, e As EventArgs)
|
||||
Dim Telefono = CobranzaTelefono
|
||||
Dim Telefono As String = CobranzaTelefono
|
||||
If Telefono.Length <> 10 Then
|
||||
Alert("El telefono de cobranza no tiene el formato correcto y es necesario.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim DtCxC As DataTable
|
||||
Dim FI = If(TxtFechaInicioCxP.Text = "" Or TxtFechaInicioCxP.Text = "__/__/____", "-1", TxtFechaInicioCxP.Text)
|
||||
Dim FF = If(TxtFechaFinCxP.Text = "" Or TxtFechaFinCxP.Text = "__/__/____", "-1", TxtFechaFinCxP.Text)
|
||||
Dim FI As String = If(TxtFechaInicioCxP.Text = "" Or TxtFechaInicioCxP.Text = "__/__/____", "-1", TxtFechaInicioCxP.Text)
|
||||
Dim FF As String = If(TxtFechaFinCxP.Text = "" Or TxtFechaFinCxP.Text = "__/__/____", "-1", TxtFechaFinCxP.Text)
|
||||
Dim StrSaldo As String = ""
|
||||
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
@@ -6217,7 +6208,7 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
If StrSaldo.Length > 0 Then
|
||||
Dim Mensaje = ""
|
||||
Dim Mensaje As String = ""
|
||||
Select Case UsuarioActual.CveEmpresa
|
||||
Case 4
|
||||
Mensaje = $"Cliente de VSH Seguridad su saldo pendiente es de $ {StrSaldo} fecha limite 25/{Now.ToString("MM/yyyy")} llamar al 6622106400 #REFERENCIA {CodigoCliente} "
|
||||
@@ -6238,16 +6229,12 @@ Partial Class Clientes
|
||||
Else
|
||||
Alert("No hay saldo pendiente del cliente. Por lo cual no se envió el mensaje.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "IMPRIMIR GVHistorial"
|
||||
|
||||
|
||||
Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs)
|
||||
Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs)
|
||||
Dim retorno As Byte() = Nothing
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
@@ -6668,7 +6655,7 @@ Partial Class Clientes
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("AgrupadoPor", String.Format("<b>Cliente: </b>{0}", TxtNombreComercial.Text)))
|
||||
@@ -7526,8 +7513,6 @@ Partial Class Clientes
|
||||
Else
|
||||
LnkDownLoadDoc.Visible = True
|
||||
ScriptManager.GetCurrent(Me).RegisterPostBackControl(ImgDownLoadFormato)
|
||||
|
||||
|
||||
End If
|
||||
|
||||
txtFechaLimite.Text = e.Row.DBCampo("FechaLimite").ToString().ToDate().ToString("dd/MM/yyyy")
|
||||
@@ -7568,27 +7553,21 @@ Partial Class Clientes
|
||||
End Sub
|
||||
Public Sub DownLoadFormato_ClickDocumentacion(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim Adjunto As String = GvRow.DataKey("Adjunto")
|
||||
|
||||
If GvRow.DataKey("Documentacion").ToUpper = "Pagaré".ToUpper AndAlso UsuarioActual.CveEmpresa = 140 Then
|
||||
|
||||
|
||||
stringDescargaDocumento = UsuarioActual.Empresa.Ruta & "Formatos\Pagaré.docx"
|
||||
linkDescargaPagare = stringDescargaDocumento
|
||||
If GvRow.DataKey("Documentacion").ToUpper = "Pagaré".ToUpper AndAlso UsuarioActual.CveEmpresa = 140 Then
|
||||
|
||||
linkDescargaPagare = UsuarioActual.Empresa.Ruta & "Formatos\Pagaré.docx"
|
||||
TxtDireccionAval.Text = ""
|
||||
TxtAval.Text = ""
|
||||
TxtCiudadAval.Text = ""
|
||||
TxtTelefonoAval.Text = ""
|
||||
|
||||
RegistraScript("$('#ModalDivPagare').modal('show')")
|
||||
|
||||
Else
|
||||
|
||||
Dim CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero()
|
||||
'Dim CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero()
|
||||
Dim DocumentacionFormato As String = CveDocumentacion & "_" & GvRow.DataKey("DocumentacionFormato")
|
||||
|
||||
DescarFormato(DocumentacionFormato)
|
||||
End If
|
||||
|
||||
@@ -8784,7 +8763,7 @@ Partial Class Clientes
|
||||
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
|
||||
|
||||
If drPS IsNot Nothing Then
|
||||
Dim Precio = drPS("Precio").ToString().ToDouble
|
||||
Dim Precio As Double = drPS("Precio").ToString().ToDouble
|
||||
LbPrecioG.Text = Precio.FormatoNumero()
|
||||
LbPrecioA.Text = ((Precio * TxtPorcentajePS.Text.ToDecimal()) / 100).FormatoNumero()
|
||||
End If
|
||||
@@ -9459,7 +9438,7 @@ Partial Class Clientes
|
||||
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
||||
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
||||
ObjFactura.CveVenta = -1
|
||||
ObjFactura.Version = "3.3"
|
||||
ObjFactura.Version = "4.0"
|
||||
ObjFactura.TipoCambio = 1
|
||||
ObjFactura.TipoCambioDolares = 0
|
||||
ObjFactura.ConvertirPesos = False
|
||||
@@ -9570,7 +9549,6 @@ Partial Class Clientes
|
||||
ObjFactura.Timbre.CFDIRelacionados.TipoRelacion = "03"
|
||||
ObjFactura.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If ObjFactura.TipoDocto.Contiene("Egs", "RNC") Then
|
||||
@@ -9830,10 +9808,10 @@ Partial Class Clientes
|
||||
|
||||
Dim Url As New Uri(String.Format("{0}api/cliente/GetHistorialVentas?CveCliente={1}&SelectTop={2}&CveClienteSucursal={3}&TipoDocto={4}", "https://localhost:5001/", CveCliente, SelectTop, CveClienteSucursal, "-1"))
|
||||
|
||||
Dim response = cliente.GetAsync(Url).Result
|
||||
Dim response As HttpResponseMessage = cliente.GetAsync(Url).Result
|
||||
|
||||
If response.StatusCode = 200 Then
|
||||
Dim json = response.Content.ReadAsStringAsync().Result
|
||||
Dim json As String = response.Content.ReadAsStringAsync().Result
|
||||
retorno = Newtonsoft.Json.JsonConvert.DeserializeObject(Of DataTable)(json)
|
||||
End If
|
||||
|
||||
@@ -9865,9 +9843,9 @@ Partial Class Clientes
|
||||
Dim response As HttpResponseMessage = cliente.PostAsync(Url, New StringContent(Parametros.ToString(), Encoding.UTF8, "application/json")).Result
|
||||
|
||||
If response.StatusCode = 200 Then
|
||||
Dim json = response.Content.ReadAsStringAsync().Result
|
||||
Dim json As String = response.Content.ReadAsStringAsync().Result
|
||||
|
||||
Dim result = JsonConvert.DeserializeObject(Of MResult)(json)
|
||||
Dim result As MResult = JsonConvert.DeserializeObject(Of MResult)(json)
|
||||
|
||||
If result.isSuccess Then
|
||||
|
||||
|
||||
Reference in New Issue
Block a user