This commit is contained in:
2020-05-28 17:16:59 -07:00
31 changed files with 511 additions and 236 deletions

View File

@@ -26,6 +26,9 @@ Public Class ClsBancos
'Atributos de la clase 'Atributos de la clase
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
'CONTROL DE LA CONEXION
Private CveConexion As Integer = 0
Private EsTransaccionCompartida As Boolean = False
#End Region #End Region
@@ -50,8 +53,7 @@ Public Class ClsBancos
Public Property FechaIngCancelacion As Date Public Property FechaIngCancelacion As Date
Public Property FechaCancelacion As Date Public Property FechaCancelacion As Date
'CONTROL DE LA CONEXION
Private CveConexion As Integer = 0
#End Region #End Region
#Region " P R O P I E D A D E S - B A N C O S - I E" #Region " P R O P I E D A D E S - B A N C O S - I E"
@@ -189,6 +191,7 @@ Public Class ClsBancos
Else Else
SqlConexion = TransaccionCompartida.Connection SqlConexion = TransaccionCompartida.Connection
SqlTransacc = TransaccionCompartida SqlTransacc = TransaccionCompartida
EsTransaccionCompartida = True
End If End If
SqlCommand = New SqlCommand("", SqlConexion) SqlCommand = New SqlCommand("", SqlConexion)
@@ -209,7 +212,7 @@ Public Class ClsBancos
#Region "Conexiones" #Region "Conexiones"
Private Sub ConexionAdd() Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try Try
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters

View File

@@ -19,6 +19,7 @@ Public Class ClsCGame
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
'REGISTRAR CONEXIÓN 'REGISTRAR CONEXIÓN
Private CveConexion As Integer = 0 Private CveConexion As Integer = 0
Private EsTransaccionCompartida As Boolean = False
Public ReadOnly Property DtResultados() As DataTable Public ReadOnly Property DtResultados() As DataTable
Get Get
@@ -54,6 +55,7 @@ Public Class ClsCGame
Else Else
SqlConexion = TransaccionCompartida.Connection SqlConexion = TransaccionCompartida.Connection
SqlTransacc = TransaccionCompartida SqlTransacc = TransaccionCompartida
EsTransaccionCompartida = True
End If End If
SqlAdapter = New SqlDataAdapter("", SqlConexion) SqlAdapter = New SqlDataAdapter("", SqlConexion)
@@ -71,7 +73,7 @@ Public Class ClsCGame
#Region "Conexiones" #Region "Conexiones"
Private Sub ConexionAdd() Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try Try
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters

View File

@@ -194,6 +194,10 @@ Public Class ClsClaseBase
SqlAdapter.Dispose() SqlAdapter.Dispose()
End If End If
If DTSet IsNot Nothing Then
DTSet.Dispose()
End If
GC.SuppressFinalize(Me) GC.SuppressFinalize(Me)
End Sub End Sub

View File

@@ -22,6 +22,7 @@ Public Class ClsCompras
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
'REGISTRAR CONEXIONES ABIERTAS 'REGISTRAR CONEXIONES ABIERTAS
Private CveConexion As Integer = 0 Private CveConexion As Integer = 0
Private EsTransaccionCompartida As Boolean = False
#End Region #End Region
@@ -63,6 +64,7 @@ Public Class ClsCompras
Else Else
SqlConexion = TransaccionCompartida.Connection SqlConexion = TransaccionCompartida.Connection
SqlTransacc = TransaccionCompartida SqlTransacc = TransaccionCompartida
EsTransaccionCompartida = True
End If End If
SqlAdapter = New SqlDataAdapter("", SqlConexion) SqlAdapter = New SqlDataAdapter("", SqlConexion)
@@ -83,7 +85,7 @@ Public Class ClsCompras
#Region "Conexiones" #Region "Conexiones"
Private Sub ConexionAdd() Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try Try
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters

View File

@@ -25,6 +25,7 @@ Public Class ClsContabilidad
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
'REGISTRAR CONEXIONES ABIERTAS 'REGISTRAR CONEXIONES ABIERTAS
Private CveConexion As Integer = 0 Private CveConexion As Integer = 0
Private EsTransaccionCompartida As Boolean = False
Public Property CvePrePolizaDetalle As Integer Public Property CvePrePolizaDetalle As Integer
#End Region #End Region
@@ -97,6 +98,7 @@ Public Class ClsContabilidad
Else Else
SqlConexion = TransaccionCompartida.Connection SqlConexion = TransaccionCompartida.Connection
SqlTransacc = TransaccionCompartida SqlTransacc = TransaccionCompartida
EsTransaccionCompartida = True
End If End If
Mensaje = New StringBuilder Mensaje = New StringBuilder
SqlAdapter = New SqlDataAdapter("", SqlConexion) SqlAdapter = New SqlDataAdapter("", SqlConexion)
@@ -115,7 +117,7 @@ Public Class ClsContabilidad
#Region "Conexiones" #Region "Conexiones"
Private Sub ConexionAdd() Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try Try
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -1120,14 +1122,12 @@ Public Class ClsContabilidad
If Empresa.TipoContabilizacion = 1 Then ' contabilidad en SIG If Empresa.TipoContabilizacion = 1 Then ' contabilidad en SIG
Retorno = ContabilizaDesContabilizaPrePoliza(CvePrePoliza, True, Empresa.CveEmpresa) Retorno = ContabilizaDesContabilizaPrePoliza(CvePrePoliza, True, Empresa.CveEmpresa)
If Retorno Then If Retorno Then
Mensaje.Append(String.Format("<a href='/Contabilidad/RegPrePolizaS.aspx?CvePrePoliza={0}' class='Texto' target='_blank'>{1}</a><br/>", CvePrePoliza, _ContaFolio)) Mensaje.Append(String.Format("<a href='/Contabilidad/RegPrePolizaS.aspx?CvePrePoliza={0}' class='Texto' target='_blank'>{1}</a><br/>", CvePrePoliza, _ContaFolio))
End If End If
Else Else
If CvePrePoliza <= 0 Then Return False If CvePrePoliza <= 0 Then Return False

View File

@@ -18,6 +18,7 @@ Public Class ClsContratos
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
'REGISTRAR CONEXIONES ABIERTAS 'REGISTRAR CONEXIONES ABIERTAS
Private CveConexion As Integer = 0 Private CveConexion As Integer = 0
Private EsTransaccionCompartida As Boolean = False
#End Region #End Region
#Region "Propiedades" #Region "Propiedades"
@@ -65,6 +66,7 @@ Public Class ClsContratos
Else Else
SqlConexion = TransaccionCompartida.Connection SqlConexion = TransaccionCompartida.Connection
SqlTransacc = TransaccionCompartida SqlTransacc = TransaccionCompartida
EsTransaccionCompartida = True
End If End If
SqlAdapter = New SqlDataAdapter("", SqlConexion) SqlAdapter = New SqlDataAdapter("", SqlConexion)
@@ -85,7 +87,7 @@ Public Class ClsContratos
#Region "Conexiones" #Region "Conexiones"
Private Sub ConexionAdd() Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try Try
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters

View File

@@ -19,6 +19,7 @@ Public Class ClsEdocumentacion
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
'REGISTRAR CONEXIONES ABIERTAS 'REGISTRAR CONEXIONES ABIERTAS
Private CveConexion As Integer = 0 Private CveConexion As Integer = 0
Private EsTransaccionCompartida As Boolean = False
Private Sub SqlDataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) Private Sub SqlDataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
With SqlAdapter.SelectCommand With SqlAdapter.SelectCommand
@@ -56,6 +57,7 @@ Public Class ClsEdocumentacion
Else Else
SqlConexion = TransaccionCompartida.Connection SqlConexion = TransaccionCompartida.Connection
SqlTransacc = TransaccionCompartida SqlTransacc = TransaccionCompartida
EsTransaccionCompartida = True
End If End If
SqlAdapter = New SqlDataAdapter("", SqlConexion) SqlAdapter = New SqlDataAdapter("", SqlConexion)
@@ -73,7 +75,7 @@ Public Class ClsEdocumentacion
#Region "Conexiones" #Region "Conexiones"
Private Sub ConexionAdd() Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try Try
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters

View File

@@ -19,6 +19,7 @@ Public Class ClsGenerales
Private disposedValue As Boolean = False Private disposedValue As Boolean = False
'REGISTRAR CONEXIONES ABIERTAS 'REGISTRAR CONEXIONES ABIERTAS
Private CveConexion As Integer = 0 Private CveConexion As Integer = 0
Private EsTransaccionCompartida As Boolean = False
#End Region #End Region
#Region "Propiedades" #Region "Propiedades"
@@ -74,6 +75,7 @@ Public Class ClsGenerales
Else Else
SqlConexion = TransaccionCompartida.Connection SqlConexion = TransaccionCompartida.Connection
SqlTransacc = TransaccionCompartida SqlTransacc = TransaccionCompartida
EsTransaccionCompartida = True
End If End If
SqlAdapter = New SqlDataAdapter("", SqlConexion) SqlAdapter = New SqlDataAdapter("", SqlConexion)
@@ -91,7 +93,7 @@ Public Class ClsGenerales
#Region "Conexiones" #Region "Conexiones"
Private Sub ConexionAdd() Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try Try
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters

View File

@@ -18,6 +18,7 @@ Public Class ClsInventarios
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
'REGISTRAR CONEXIONES ABIERTAS 'REGISTRAR CONEXIONES ABIERTAS
Private CveConexion As Integer = 0 Private CveConexion As Integer = 0
Private EsTransaccionCompartida As Boolean = False
#End Region #End Region
@@ -151,6 +152,7 @@ Public Class ClsInventarios
Else Else
SqlConexion = TransaccionCompartida.Connection SqlConexion = TransaccionCompartida.Connection
SqlTransacc = TransaccionCompartida SqlTransacc = TransaccionCompartida
EsTransaccionCompartida = True
End If End If
SqlAdapter = New SqlDataAdapter("", SqlConexion) SqlAdapter = New SqlDataAdapter("", SqlConexion)
@@ -169,7 +171,7 @@ Public Class ClsInventarios
#Region "Conexiones" #Region "Conexiones"
Private Sub ConexionAdd() Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try Try
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters

View File

@@ -2042,6 +2042,7 @@ Public Class ClsProductosServicios
' This code added by Visual Basic to correctly implement the disposable pattern. ' This code added by Visual Basic to correctly implement the disposable pattern.
Public Sub Dispose() Implements IDisposable.Dispose Public Sub Dispose() Implements IDisposable.Dispose
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above. ' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
ConexionClose()
Dispose(True) Dispose(True)
GC.SuppressFinalize(Me) GC.SuppressFinalize(Me)
End Sub End Sub

View File

@@ -53,17 +53,24 @@ Public Class ClsRH
End Property End Property
#End Region #End Region
Sub New() Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
SqlConexion = New SqlConnection
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
SqlAdapter = New SqlDataAdapter("", SqlConexion)
Try
SqlConexion.Open()
ConexionAdd()
Catch ex As Exception
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
End Try
If TransaccionCompartida Is Nothing Then
SqlConexion = New SqlConnection
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
Try
SqlConexion.Open()
Catch ex As Exception
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
End Try
Else
SqlConexion = TransaccionCompartida.Connection
SqlTransacc = TransaccionCompartida
EsTransaccionCompartida = True
End If
SqlAdapter = New SqlDataAdapter("", SqlConexion)
ConexionAdd()
End Sub End Sub
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
With SqlAdapter.SelectCommand With SqlAdapter.SelectCommand
@@ -74,11 +81,13 @@ Public Class ClsRH
Data = New DataTable Data = New DataTable
End Sub End Sub
Private CveConexion As Integer = 0 Private CveConexion As Integer = 0
Private EsTransaccionCompartida As Boolean = False
#Region "Conexiones" #Region "Conexiones"
Private Sub ConexionAdd() Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo 'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
@@ -95,6 +104,7 @@ Public Class ClsRH
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
End If End If
End Sub End Sub

View File

@@ -2041,12 +2041,16 @@ Public Class ClsSisNotificaciones
Using wc As New HttpClient() Using wc As New HttpClient()
Try Try
Dim Url = New Uri($"{ClsPaginas.UrlDirecciones}nominatim/reverseMultiple.php") Dim Url = New Uri(String.Format("{0}nominatim/reverseMultiple.php", ClsPaginas.UrlDirecciones))
Dim FormStuff = String.Format("formato=json&posiciones={0}", Base64array) Dim FormStuff = String.Format("formato=json&posiciones={0}", Base64array)
Dim content = New StringContent(FormStuff, Encoding.UTF8, "application/x-www-form-urlencoded") Dim content = New StringContent(FormStuff, Encoding.UTF8, "application/x-www-form-urlencoded")
Dim response = wc.PostAsync(Url, content).Result Dim response = wc.PostAsync(Url, content).Result
Dim result = response.Content.ReadAsStringAsync().Result Dim result = response.Content.ReadAsStringAsync().Result
retorno = JArray.Parse(result) retorno = JArray.Parse(result)
response.Dispose()
content = Nothing
Url = Nothing
FormStuff = Nothing
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al obtener las direcciones", ex) OnError("Ocurrió un error al obtener las direcciones", ex)
End Try End Try

View File

@@ -22,6 +22,8 @@ Public Class ClsVentas
'Atributos de la clase 'Atributos de la clase
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
Private CveConexion As Integer = 0
Private EsTransaccionCompartida As Boolean = False
#End Region #End Region
@@ -75,7 +77,7 @@ Public Class ClsVentas
Public Sub RollBack() Public Sub RollBack()
SqlTransacc.Rollback() SqlTransacc.Rollback()
End Sub End Sub
Private CveConexion As Integer = 0
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing) Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
If TransaccionCompartida Is Nothing Then If TransaccionCompartida Is Nothing Then
@@ -89,6 +91,7 @@ Public Class ClsVentas
Else Else
SqlConexion = TransaccionCompartida.Connection SqlConexion = TransaccionCompartida.Connection
SqlTransacc = TransaccionCompartida SqlTransacc = TransaccionCompartida
EsTransaccionCompartida = True
End If End If
SqlAdapter = New SqlDataAdapter("", SqlConexion) SqlAdapter = New SqlDataAdapter("", SqlConexion)
ConexionAdd() ConexionAdd()
@@ -107,7 +110,7 @@ Public Class ClsVentas
#Region "Conexiones" #Region "Conexiones"
Private Sub ConexionAdd() Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try Try
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -740,11 +743,13 @@ Public Class ClsVentas
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CvePAC", SqlDbType.SmallInt).Value = CvePAC .Add("@CvePAC", SqlDbType.SmallInt).Value = CvePAC
.Add("@CveEstatusRefacturacion", SqlDbType.TinyInt).Value = CveEstatusRefacturacion .Add("@CveEstatusRefacturacion", SqlDbType.TinyInt).Value = CveEstatusRefacturacion
.Add("@Cancelada", SqlDbType.SmallInt).Direction = ParameterDirection.Output
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Retorno = True Retorno = If(SqlAdapter.SelectCommand.Parameters("@Cancelada").Value.ToString.ToEntero = 1, True, False)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al Guardar el estatus de cancelacion Factura.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error al Guardar el estatus de cancelacion Factura.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try

View File

@@ -247,6 +247,7 @@ Namespace ADSSession
Dim resultado As String = "" Dim resultado As String = ""
Try Try
Dim request As Net.HttpWebRequest = CType(Net.HttpWebRequest.Create(URL), Net.HttpWebRequest) Dim request As Net.HttpWebRequest = CType(Net.HttpWebRequest.Create(URL), Net.HttpWebRequest)
request.Timeout = maxTimeMilliseconds request.Timeout = maxTimeMilliseconds
request.Method = "POST" request.Method = "POST"
@@ -263,10 +264,15 @@ Namespace ADSSession
End Using End Using
End Using End Using
Dim response As Net.WebResponse = CType(request.GetResponse(), Net.WebResponse) Using response As Net.WebResponse = CType(request.GetResponse(), Net.WebResponse)
Dim sr As IO.StreamReader = New IO.StreamReader(response.GetResponseStream()) Using sr As IO.StreamReader = New IO.StreamReader(response.GetResponseStream())
resultado = sr.ReadToEnd()
sr.Close() resultado = sr.ReadToEnd()
sr.Close()
End Using
End Using
request = Nothing
Catch ex As Exception Catch ex As Exception
'Extenciones.ApplicationParameter.GuardaLogEx(ex, $"SOAPAction : {SOAPAction} XML : {xml}") 'Extenciones.ApplicationParameter.GuardaLogEx(ex, $"SOAPAction : {SOAPAction} XML : {xml}")
End Try End Try

View File

@@ -96,7 +96,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Retorno = 200 Retorno = 200
End If End If
ObjConta.Dispose() ObjConta.Dispose()
Empresa = Nothing
'context.Response.Write(CveUsuario.ToString()) 'context.Response.Write(CveUsuario.ToString())
context.Response.StatusCode = Retorno context.Response.StatusCode = Retorno
End Sub End Sub
@@ -114,7 +114,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
context.Response.WriteFile(FileInfo.FullName) context.Response.WriteFile(FileInfo.FullName)
context.Response.End() context.Response.End()
End If End If
FileInfo = Nothing
Url = ""
End If End If
End Sub End Sub
@@ -127,6 +128,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
savepath = context.Server.MapPath(tempPath) savepath = context.Server.MapPath(tempPath)
Dim nombre As String = String.Format("{0}\{1}", savepath, context.Request("nombre")) Dim nombre As String = String.Format("{0}\{1}", savepath, context.Request("nombre"))
File.Delete(nombre) File.Delete(nombre)
tempPath = ""
savepath = ""
context.Response.StatusCode = 200 context.Response.StatusCode = 200
End Sub End Sub
@@ -149,16 +152,18 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
If copyFile <> "" Then If copyFile <> "" Then
Dim ext As Integer = copyFile.IndexOf(","c) + 1 Dim ext As Integer = copyFile.IndexOf(","c) + 1
Dim extncion As String = copyFile.Substring(5, ext - 5) Dim extension As String = copyFile.Substring(5, ext - 5)
If extncion.Contains("image/") Then extncion = extncion.Replace("image/", "").Replace(";base64,", "") If extension.Contains("image/") Then extension = extension.Replace("image/", "").Replace(";base64,", "")
'Dim extncion As String = 'Dim extncion As String =
filename = String.Format("{0}-{1}.{2}", tick, Cve, extncion) filename = String.Format("{0}-{1}.{2}", tick, Cve, extension)
Dim msf As New MemoryStream(Convert.FromBase64String(copyFile.Substring(ext))) Dim msf As New MemoryStream(Convert.FromBase64String(copyFile.Substring(ext)))
Dim stem As Stream = New FileStream(String.Format("{0}\{1}", savepath, filename), FileMode.Create) Dim stem As Stream = New FileStream(String.Format("{0}\{1}", savepath, filename), FileMode.Create)
msf.WriteTo(stem) msf.WriteTo(stem)
msf.Close() msf.Close()
stem.Close() stem.Close()
msf.Dispose()
stem.Dispose()
End If End If
Else Else
@@ -166,10 +171,13 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
postedFile = context.Request.Files(0) postedFile = context.Request.Files(0)
filename = String.Format("{0}-{1}", tick, postedFile.FileName) filename = String.Format("{0}-{1}", tick, postedFile.FileName)
postedFile.SaveAs((savepath & "\") + filename) postedFile.SaveAs(String.Format("{0}\{1}", savepath, filename))
End If End If
context.Response.Write(tick) context.Response.Write(tick)
context.Response.StatusCode = 200 context.Response.StatusCode = 200
savepath = ""
tempPath = "" : filename = ""
postedFile = Nothing
End Sub End Sub
#End Region #End Region
@@ -206,9 +214,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
'End If 'End If
'ObjClientes.Dispose() 'ObjClientes.Dispose()
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}") Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
DtRetorno = dt.FiltraParametros($"NombreComercial like '%{Name}%' OR Nombre like '%{Name}%' ") DtRetorno = dt.FiltraParametros(String.Format("NombreComercial like '%{0}%' OR Nombre like '%{0}%' ", Name))
End If End If
dt.Dispose() dt.Dispose()
End If End If
@@ -254,9 +262,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
' DtRetorno = ObjProveedores.DtResultados ' DtRetorno = ObjProveedores.DtResultados
'End If 'End If
'ObjProveedores.Dispose() 'ObjProveedores.Dispose()
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}") Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
DtRetorno = dt.FiltraParametros($"NombreCortoProveedor like '%{Name}%'") DtRetorno = dt.FiltraParametros(String.Format("NombreCortoProveedor like '%{0}%'", Name))
End If End If
dt.Dispose() dt.Dispose()
End If End If
@@ -321,6 +329,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Else Else
context.Response.Write("[]") context.Response.Write("[]")
End If End If
DtPSRetorno.Dispose()
Return retorno Return retorno
End Function End Function
@@ -485,9 +494,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
If usuario.TienePermisoProceso(300) And usuario.TienePermisoProceso(301) Then If usuario.TienePermisoProceso(300) And usuario.TienePermisoProceso(301) Then
DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados
ElseIf usuario.TienePermisoProceso(300) Then 'TipoComprobacion 1 Biaticos ElseIf usuario.TienePermisoProceso(300) Then 'TipoComprobacion 1 Viaticos
DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados.FiltraParametros("TipoComprobacion = 1") DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados.FiltraParametros("TipoComprobacion = 1")
Else 'TipoComprobacion 2 Compreobacines Else 'TipoComprobacion 2 caja chica
DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados.FiltraParametros("TipoComprobacion = 2") DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados.FiltraParametros("TipoComprobacion = 2")
End If End If
@@ -515,6 +524,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
'no regresar datos herror al consultar 'no regresar datos herror al consultar
DtPSRetorno.Clear() DtPSRetorno.Clear()
End If End If
DTTmp.Dispose()
ObjClasificaciones.Dispose()
End If End If
@@ -556,7 +567,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
#Region "Funciones" #Region "Funciones"
Public Function GetJson(ByVal dt As DataTable) As String Public Function GetJson(ByVal dt As DataTable) As String
Dim Retorno As String = ""
Dim serializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer() Dim serializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer()
Dim rows As New List(Of Dictionary(Of String, Object)) Dim rows As New List(Of Dictionary(Of String, Object))
Dim row As Dictionary(Of String, Object) Dim row As Dictionary(Of String, Object)
@@ -568,7 +579,11 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Next Next
rows.Add(row) rows.Add(row)
Next Next
Return serializer.Serialize(rows) If dt IsNot Nothing Then dt.Dispose()
Retorno = serializer.Serialize(rows)
rows = Nothing
serializer = Nothing
Return Retorno
End Function End Function
ReadOnly Property UsuarioActual(ByVal context As HttpContext) As Usuario ReadOnly Property UsuarioActual(ByVal context As HttpContext) As Usuario
Get Get
@@ -631,6 +646,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
DtPSRetorno.Columns("ClaveNombre").ColumnName = "text" DtPSRetorno.Columns("ClaveNombre").ColumnName = "text"
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
context.Response.Write(retorno) context.Response.Write(retorno)
DtPSRetorno.Dispose()
Else Else
context.Response.Write("[]") context.Response.Write("[]")
End If End If
@@ -738,6 +754,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Catch ex As Exception Catch ex As Exception
DtPSRetorno = Nothing DtPSRetorno = Nothing
End Try End Try
DTPS = Nothing
End If End If
End If End If
@@ -745,6 +763,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
DtPSRetorno.Columns("CvePS").ColumnName = "id" DtPSRetorno.Columns("CvePS").ColumnName = "id"
DtPSRetorno.Columns("PSCodigo").ColumnName = "text" DtPSRetorno.Columns("PSCodigo").ColumnName = "text"
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
DtPSRetorno.Dispose()
context.Response.Write(retorno) context.Response.Write(retorno)
Else Else
context.Response.Write("[]") context.Response.Write("[]")
@@ -795,6 +814,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
DtRetorno.Columns("CvePersonal").ColumnName = "id" DtRetorno.Columns("CvePersonal").ColumnName = "id"
DtRetorno.Columns("NombreCompleto").ColumnName = "text" DtRetorno.Columns("NombreCompleto").ColumnName = "text"
retorno = JsonConvert.SerializeObject(DtRetorno).ToString retorno = JsonConvert.SerializeObject(DtRetorno).ToString
DtRetorno.Dispose()
context.Response.Write(retorno) context.Response.Write(retorno)
Else Else
context.Response.Write("[]") context.Response.Write("[]")

View File

@@ -707,6 +707,7 @@ Partial Class Bancos_IE
Dim ObjIE2 As New ClsBancos() Dim ObjIE2 As New ClsBancos()
If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
If ObjIE.DtResultados.Rows.Count > 0 Then If ObjIE.DtResultados.Rows.Count > 0 Then
Dim NumComplementos As Integer
Try Try
Tipo = ObjIE.DtResultados.Rows(0)("Tipo").ToString Tipo = ObjIE.DtResultados.Rows(0)("Tipo").ToString
@@ -719,6 +720,7 @@ Partial Class Bancos_IE
Cuenta = ObjIE.DtResultados(0)("NumCuenta").ToString Cuenta = ObjIE.DtResultados(0)("NumCuenta").ToString
CveIEDeposito2 = ObjIE.DtResultados(0)("CveIEDeposito2").ToString.ToEntero CveIEDeposito2 = ObjIE.DtResultados(0)("CveIEDeposito2").ToString.ToEntero
NumComplementos = ObjIE.DtResultados(0)("NumComplementos").ToString.ToEntero
If UsuarioActual.TienePermisoProceso(99) Then If UsuarioActual.TienePermisoProceso(99) Then
'BtnActualizar.Visible = True 'BtnActualizar.Visible = True
@@ -887,10 +889,10 @@ Partial Class Bancos_IE
If UsuarioActual.TienePermisoProceso(85) Then LnkCancelar.Visible = True If UsuarioActual.TienePermisoProceso(85) Then LnkCancelar.Visible = True
'ELIMINAR IE SIN VALIDACIONES 'ELIMINAR IE SIN VALIDACIONES
If UsuarioActual.TienePermisoProceso(80) Then LnkEliminar.Visible = True If UsuarioActual.TienePermisoProceso(80) AndAlso NumComplementos = 0 Then LnkEliminar.Visible = True
'ELIMINA IE CUANDO ES EL MISMO USUARIO QUE LO CREO Y QUE NO ESTE CONTABILIZADO NI CONCILIADO 'ELIMINA IE CUANDO ES EL MISMO USUARIO QUE LO CREO Y QUE NO ESTE CONTABILIZADO NI CONCILIADO
If UsuarioActual.TienePermisoProceso(154) AndAlso ObjIE.CveUsuario = UsuarioActual.CveUsuario And Not ObjIE.IDPoliza > 0 Then If UsuarioActual.TienePermisoProceso(154) AndAlso ObjIE.CveUsuario = UsuarioActual.CveUsuario And Not ObjIE.IDPoliza > 0 AndAlso NumComplementos = 0 Then
LnkEliminar.Visible = True LnkEliminar.Visible = True
End If End If
End If End If
@@ -906,10 +908,10 @@ Partial Class Bancos_IE
LblEstatus.ForeColor = Drawing.Color.Red LblEstatus.ForeColor = Drawing.Color.Red
'ELIMINAR IE SIN VALIDACIONES 'ELIMINAR IE SIN VALIDACIONES
If UsuarioActual.TienePermisoProceso(80) Then LnkEliminar.Visible = True If UsuarioActual.TienePermisoProceso(80) AndAlso NumComplementos = 0 Then LnkEliminar.Visible = True
'ELIMINA IE CUANDO ES EL MISMO USUARIO QUE LO CREO Y QUE NO ESTE CONTABILIZADO NI CONCILIADO 'ELIMINA IE CUANDO ES EL MISMO USUARIO QUE LO CREO Y QUE NO ESTE CONTABILIZADO NI CONCILIADO
If UsuarioActual.TienePermisoProceso(154) AndAlso ObjIE.CveUsuario = UsuarioActual.CveUsuario And Not ObjIE.IDPoliza > 0 Then If UsuarioActual.TienePermisoProceso(154) AndAlso ObjIE.CveUsuario = UsuarioActual.CveUsuario And Not ObjIE.IDPoliza > 0 AndAlso NumComplementos = 0 Then
LnkEliminar.Visible = True LnkEliminar.Visible = True
End If End If
@@ -1089,7 +1091,7 @@ Partial Class Bancos_IE
'2019-08-28 unificados vista de controles complemento (Cancelado, conciliciado, Con complemento vigente, sin complemento vigente) '2019-08-28 unificados vista de controles complemento (Cancelado, conciliciado, Con complemento vigente, sin complemento vigente)
Dim ExistenComplementosVigentes As Boolean = VerificaComplementos(True) Dim ExistenComplementosVigentes As Boolean = VerificaComplementos(True)
Dim ExistenComplementos As Boolean = VerificaComplementos(False) 'Dim ExistenComplementos As Boolean = VerificaComplementos(False)
If Not ChkConciliado.Checked And ObjIE.CveEstatusIE <> 2 Then If Not ChkConciliado.Checked And ObjIE.CveEstatusIE <> 2 Then
@@ -3121,12 +3123,8 @@ Partial Class Bancos_IE
MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución" MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución"
End If End If
End If End If
End If End If
If Opcion.Contiene("EGSSINFACT") AndAlso CveSolicitudViatico > 0 AndAlso MsgError = "" Then If Opcion.Contiene("EGSSINFACT") AndAlso CveSolicitudViatico > 0 AndAlso MsgError = "" Then
If Not ObjIE.UpdateSolicitudesViaticosIE(CveSolicitudViatico, CveIE) Then If Not ObjIE.UpdateSolicitudesViaticosIE(CveSolicitudViatico, CveIE) Then
MsgError = "Ocurrió un error al vincular el egreso con la solicitud de viatico." MsgError = "Ocurrió un error al vincular el egreso con la solicitud de viatico."
@@ -3136,23 +3134,6 @@ Partial Class Bancos_IE
End Select End Select
'El movimiento 1 es el de Venta 'El movimiento 1 es el de Venta
'Conta SIG
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" AndAlso UsuarioActual.Empresa.UsaContabilidadSIG Then
If CveCuentaBeneficiario > 0 And CveCuentaConta > 0 Then
If ObjMov.ContabilizarPrePolizaSIG(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
IDPoliza = ObjMov.ContaIdPoliza
Else
Alert("Ocurrio un error al contabilizar en SIG, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
End If
Else
If CveCuentaConta < 1 Then
Alert("No se puede contabilizar la Prepoliza en SIG debido a que la cuenta de Bancos es invalida", TipoMensaje.MsgAdvertencia)
End If
If CveCuentaBeneficiario < 1 Then
Alert("No se puede contabilizar la Prepoliza en SIG debido a que las cuenta del Beneficiario es invalida", TipoMensaje.MsgAdvertencia)
End If
End If
End If
'Conta ContPAQ 'Conta ContPAQ
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
@@ -4761,16 +4742,33 @@ Partial Class Bancos_IE
Alert("El documento seleccionado no se puede eliminar porque se encuentra conciliado.", TipoMensaje.MsgError) Alert("El documento seleccionado no se puede eliminar porque se encuentra conciliado.", TipoMensaje.MsgError)
Exit Sub Exit Sub
End If End If
Dim ObjGral As New ClsGenerales
If ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, TxtDescripcion.Text, "Banco", TxtFolio.Text + " / " + Cuenta) Then
Dim ObjAC As ClsContPAQi = Nothing
Dim Banc As New ClsBancos
Dim ObjConta As New ClsContabilidad(Banc.IniciaTransacSQL())
Dim ObjGral As New ClsGenerales(Banc.IniciaTransacSQL())
Dim DescripcionAus As String = TxtDescripcion.Text
If DdlTipoTransaccion.SelectedItem.Text <> "Seleccione Tipo Movimiento" Then DescripcionAus = String.Format("{0} {1}", DescripcionAus, $"Movimiento:{DdlTipoTransaccion.SelectedItem.Text}")
If DdlCuenta.SelectedItem.Text <> "Seleccione" Then DescripcionAus = String.Format("{0} {1}", DescripcionAus, $"Cuenta:{DdlCuenta.SelectedItem.Text}")
If TxtFolio.Text <> "" Then DescripcionAus = String.Format("{0} {1}", DescripcionAus, $"Número:{TxtFolio.Text}")
If TxtImporte.Text <> "" AndAlso TxtImporte.Text <> "0" Then DescripcionAus = String.Format("{0} {1}", DescripcionAus, $"Importe:{TxtImporte.Text}")
If DdlCliente.Visible Then
DescripcionAus = String.Format("{0} {1}", DescripcionAus, $"Páguese A:{DdlCliente.SelectedText}")
ElseIf DdlProveedores.Visible Then
DescripcionAus = String.Format("{0} {1}", DescripcionAus, $"Páguese A:{DdlProveedores.SelectedText}")
ElseIf DdlPersonal.Visible Then
DescripcionAus = String.Format("{0} {1}", DescripcionAus, $"Páguese A:{DdlPersonal.SelectedItem.Text}")
End If
DescripcionAus = String.Format("{0} {1}", DescripcionAus, $"Fecha:{TxtFechaDocumento.Text}")
If ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, DescripcionAus, "Banco", TxtFolio.Text + " / " + Cuenta) Then
Borrar = True Borrar = True
End If End If
ObjGral.Dispose()
If Borrar = True Then
Dim ObjAC As ClsContPAQi = Nothing
Dim Banc As New ClsBancos
Dim ObjConta As New ClsContabilidad(Banc.IniciaTransacSQL())
If Borrar = True Then
Dim ErrorCompra = False Dim ErrorCompra = False
'VERIFICA SI EL IES ESTA VINCULADO A UNA SOLICITUD VIATICO 'VERIFICA SI EL IES ESTA VINCULADO A UNA SOLICITUD VIATICO
@@ -4827,6 +4825,7 @@ Partial Class Bancos_IE
If ObjAC IsNot Nothing Then ObjAC.Dispose() If ObjAC IsNot Nothing Then ObjAC.Dispose()
Banc.Dispose() Banc.Dispose()
ObjConta.Dispose() ObjConta.Dispose()
ObjGral.Dispose()
End If End If
Else Else
Alert("Tiene que decir el motivo de su eliminacion.", TipoMensaje.MsgInformacion) Alert("Tiene que decir el motivo de su eliminacion.", TipoMensaje.MsgInformacion)

View File

@@ -141,6 +141,11 @@
select.selecthidden { select.selecthidden {
display: none; display: none;
} }
radioContado {
border: 1px solid black;
width: 85%;
}
/*IPP*/ /*IPP*/
</style> </style>
</asp:Content> </asp:Content>
@@ -181,7 +186,7 @@
<asp:ListItem Text="Deudor" Value="2"></asp:ListItem> <asp:ListItem Text="Deudor" Value="2"></asp:ListItem>
<asp:ListItem Text="Acreedor" Value="3"></asp:ListItem> <asp:ListItem Text="Acreedor" Value="3"></asp:ListItem>
</asp:DropDownList>--%> </asp:DropDownList>--%>
<asp:LinkButton ID="LblProveedor" runat="server" Visible="true" class="whitoutcol linewhitsize comprasdfleft" Style="text-decoration:none">Proveedor:</asp:LinkButton> <asp:LinkButton ID="LblProveedor" runat="server" Visible="true" class="whitoutcol linewhitsize comprasdfleft" Style="text-decoration: none">Proveedor:</asp:LinkButton>
<%--<asp:Label ID="LblProveedor" runat="server" Visible="true" class="whitoutcol linewhitsize comprasdfleft">Proveedor:</asp:Label>--%> <%--<asp:Label ID="LblProveedor" runat="server" Visible="true" class="whitoutcol linewhitsize comprasdfleft">Proveedor:</asp:Label>--%>
<%-- <asp:Label ID="lblProveedor" runat="server" Visible="true" class="whitoutcol linewhitsize comprasdfleft">Proveedor:</asp:Label>--%> <%-- <asp:Label ID="lblProveedor" runat="server" Visible="true" class="whitoutcol linewhitsize comprasdfleft">Proveedor:</asp:Label>--%>
<div class="whitoutcol whitoutcol "> <div class="whitoutcol whitoutcol ">
@@ -408,6 +413,7 @@
<div class="whitoutcol whitoutcol"> <div class="whitoutcol whitoutcol">
<asp:HyperLink ID="HplImporte" CssClass="Texto thickbox" runat="server"></asp:HyperLink></td> <asp:HyperLink ID="HplImporte" CssClass="Texto thickbox" runat="server"></asp:HyperLink></td>
</div> </div>
</div> </div>
<div class="form-group proveedoreespes" id="trSaldo" runat="server" visible="False"> <div class="form-group proveedoreespes" id="trSaldo" runat="server" visible="False">
@@ -415,6 +421,7 @@
<div class="whitoutcol whitoutcol"> <div class="whitoutcol whitoutcol">
<asp:HyperLink ID="HplSaldoAuxiliar" CssClass="Texto thickbox" runat="server"></asp:HyperLink></td> <asp:HyperLink ID="HplSaldoAuxiliar" CssClass="Texto thickbox" runat="server"></asp:HyperLink></td>
</div> </div>
</div> </div>
<div class="form-group proveedoreespes" id="trContabilizada" runat="server" visible="true"> <div class="form-group proveedoreespes" id="trContabilizada" runat="server" visible="true">
@@ -592,8 +599,12 @@
<th style="width: 70px">Unidad</th> <th style="width: 70px">Unidad</th>
<th style="width: 222px">Clasificación <th style="width: 222px">Clasificación
<asp:HyperLink ID="HplAddClasificacion" data-toggle="tooltip" data-placement="top" NavigateUrl="/Ventas/CatClasificaciones.aspx" CssClass="btn btn-default btn-circle btn-xs " ToolTip="Agregar Clasificacion" runat="server"><i class="fa fa-plus" style="color:black" aria-hidden="true"></i></asp:HyperLink>&nbsp;&nbsp;&nbsp; <asp:HyperLink ID="HplAddClasificacion" data-toggle="tooltip" data-placement="top" NavigateUrl="/Ventas/CatClasificaciones.aspx" CssClass="btn btn-default btn-circle btn-xs " ToolTip="Agregar Clasificacion" runat="server"><i class="fa fa-plus" style="color:black" aria-hidden="true"></i></asp:HyperLink>&nbsp;&nbsp;&nbsp;
<span data-toggle="collapse" data-target="#DivReclasifica"> <span data-toggle="collapse" data-target="#DivReclasifica">
<div class="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" title="Reclasificar productos"><i class="fa fa-arrow-circle-down" style="color: green" aria-hidden="true"></i></div> <div class="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" title="Reclasificar productos"><i class="fa fa-arrow-circle-down" style="color: green" aria-hidden="true"></i></div>
<asp:LinkButton ID="ImgClasificacion" CssClass="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" ToolTip="Aplicar Clasificación a Productos" runat="server" Style="display: none;"><i class="fa fa-arrow-circle-down" style="color:green" aria-hidden="true"></i></asp:LinkButton> <asp:LinkButton ID="ImgClasificacion" CssClass="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" ToolTip="Aplicar Clasificación a Productos" runat="server" Style="display: none;"><i class="fa fa-arrow-circle-down" style="color:green" aria-hidden="true"></i></asp:LinkButton>
@@ -604,6 +615,8 @@
<th style="width: 150px"> <th style="width: 150px">
<asp:Literal ID="LitHProyecto" runat="server" Text="Proyecto<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"></asp:Literal><asp:Label runat="server" ID="LblSubProyectoHeader" Text="SubProyecto"></asp:Label>&nbsp; <asp:Literal ID="LitHProyecto" runat="server" Text="Proyecto<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"></asp:Literal><asp:Label runat="server" ID="LblSubProyectoHeader" Text="SubProyecto"></asp:Label>&nbsp;
<asp:LinkButton ID="ImgActualizarProyecto" CssClass="btn btn-default btn-circle" data-toggle="tooltip" data-placement="top" ToolTip="Actualizar Cambios" runat="server" Visible="False"><i class="fa fa-arrow-circle-down" aria-hidden="true"></i></asp:LinkButton> <asp:LinkButton ID="ImgActualizarProyecto" CssClass="btn btn-default btn-circle" data-toggle="tooltip" data-placement="top" ToolTip="Actualizar Cambios" runat="server" Visible="False"><i class="fa fa-arrow-circle-down" aria-hidden="true"></i></asp:LinkButton>
<span data-toggle="collapse" data-target="#DivReclasifica"> <span data-toggle="collapse" data-target="#DivReclasifica">
<div class="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" title="Cambiar sucursal"><i class="fa fa-arrow-circle-down" style="color: green" aria-hidden="true"></i></div> <div class="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" title="Cambiar sucursal"><i class="fa fa-arrow-circle-down" style="color: green" aria-hidden="true"></i></div>
@@ -612,6 +625,8 @@
</th> </th>
<th style="width: 80px">Tipo de Gasto <th style="width: 80px">Tipo de Gasto
<span data-toggle="collapse" data-target="#DivReclasifica"> <span data-toggle="collapse" data-target="#DivReclasifica">
<div class="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" title="Cambiar tipo de gasto"><i class="fa fa-arrow-circle-down" style="color: green" aria-hidden="true"></i></div> <div class="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" title="Cambiar tipo de gasto"><i class="fa fa-arrow-circle-down" style="color: green" aria-hidden="true"></i></div>
</span> </span>
@@ -780,6 +795,7 @@
<ItemTemplate> <ItemTemplate>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField> <asp:TemplateField>
@@ -806,6 +822,7 @@
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlAnticipos" runat="server" Text='<%# Eval("Importe", "{0:N2}") %>'></asp:Literal>&nbsp; <asp:Literal ID="LtlAnticipos" runat="server" Text='<%# Eval("Importe", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField> <asp:TemplateField>
@@ -813,6 +830,7 @@
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Moneda") %>'></asp:Literal>&nbsp; <asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Moneda") %>'></asp:Literal>&nbsp;
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="False"> <asp:TemplateField Visible="False">
@@ -893,6 +911,8 @@
<td align="right">&nbsp <td align="right">&nbsp
&nbsp; &nbsp;
<asp:HyperLink ID="HLAplicaNCFact" NavigateUrl="#" Visible="false" data-toggle="modal" data-target="#FacturaNC" runat="server"><i title="Aplicar Notas de Credito" data-toggle="tooltip" class='fa fa-money font-green'></i></asp:HyperLink> <asp:HyperLink ID="HLAplicaNCFact" NavigateUrl="#" Visible="false" data-toggle="modal" data-target="#FacturaNC" runat="server"><i title="Aplicar Notas de Credito" data-toggle="tooltip" class='fa fa-money font-green'></i></asp:HyperLink>
</td> </td>
</tr> </tr>
@@ -1012,6 +1032,8 @@
<div runat="server" id="DivTC" visible="false"> <div runat="server" id="DivTC" visible="false">
TC: TC:
<asp:TextBox ID="TxtTC" Text="" Width="50px" runat="server" /> <asp:TextBox ID="TxtTC" Text="" Width="50px" runat="server" />
</div> </div>
</ContentTemplate> </ContentTemplate>
@@ -1047,6 +1069,8 @@
<ul class="list-inline" style="font-size: 14px;"> <ul class="list-inline" style="font-size: 14px;">
<li>Aplica consignación: <li>Aplica consignación:
<asp:CheckBox Text="" ID="ChkConsignacion" OnCheckedChanged="ChkConsignacion_CheckedChanged" AutoPostBack="true" Enabled="false" runat="server" /> <asp:CheckBox Text="" ID="ChkConsignacion" OnCheckedChanged="ChkConsignacion_CheckedChanged" AutoPostBack="true" Enabled="false" runat="server" />
</li> </li>
<br /> <br />
@@ -1058,6 +1082,8 @@
</li> </li>
<li runat="server" id="LiConsignacion" visible="false">Consignación: <li runat="server" id="LiConsignacion" visible="false">Consignación:
<asp:DropDownList runat="server" ID="DdlConsignacion" DataValueField="CveConsignacion" DataTextField="SerieFolioFecha" Width="180px"></asp:DropDownList> <asp:DropDownList runat="server" ID="DdlConsignacion" DataValueField="CveConsignacion" DataTextField="SerieFolioFecha" Width="180px"></asp:DropDownList>
</li> </li>
<%--<li>Folio Consignación: <%--<li>Folio Consignación:
@@ -1332,6 +1358,8 @@
<ul class="list-inline" style="font-size: 14px;"> <ul class="list-inline" style="font-size: 14px;">
<li>Tipo Cambio: <li>Tipo Cambio:
<asp:TextBox ID="TxtTipoCambioOC" runat="server" align="right" MaxLength="12" Text="" Width="100px"></asp:TextBox> <asp:TextBox ID="TxtTipoCambioOC" runat="server" align="right" MaxLength="12" Text="" Width="100px"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtTipoCambioOC" FilterType="Custom, Numbers" ValidChars="." /> <ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtTipoCambioOC" FilterType="Custom, Numbers" ValidChars="." />
<asp:RequiredFieldValidator ID="RFVTipoCambioOC" runat="server" ControlToValidate="TxtTipoCambioOC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Cambio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTipoCambioOC"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVTipoCambioOC" runat="server" ControlToValidate="TxtTipoCambioOC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Cambio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTipoCambioOC"></asp:RequiredFieldValidator>
@@ -1732,9 +1760,12 @@
<HeaderTemplate> <HeaderTemplate>
Clasificación Clasificación
<br /> <br />
Producto/Servicio Producto/Servicio
</HeaderTemplate> </HeaderTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField HeaderText="Producto/Servicio SAT" DataField="SATClaveProductoServicio" ItemStyle-Width="60px" ItemStyle-HorizontalAlign="Left" Visible="false" /> <asp:BoundField HeaderText="Producto/Servicio SAT" DataField="SATClaveProductoServicio" ItemStyle-Width="60px" ItemStyle-HorizontalAlign="Left" Visible="false" />
@@ -1959,6 +1990,7 @@
<ItemTemplate> <ItemTemplate>
<asp:Label ID="LtlConsecutivo" runat="server" Text='<%# Eval("Consec", "{0:N0}") %>' Font-Size="6pt"></asp:Label></label> <asp:Label ID="LtlConsecutivo" runat="server" Text='<%# Eval("Consec", "{0:N0}") %>' Font-Size="6pt"></asp:Label></label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField> <asp:TemplateField>
@@ -2051,6 +2083,7 @@
<ItemTemplate> <ItemTemplate>
<asp:Label ID="LtlConsecutivo" runat="server" Text='<%# Eval("Consec", "{0:N0}") %>' Font-Size="6pt"></asp:Label></label> <asp:Label ID="LtlConsecutivo" runat="server" Text='<%# Eval("Consec", "{0:N0}") %>' Font-Size="6pt"></asp:Label></label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField> <asp:TemplateField>
@@ -2145,6 +2178,8 @@
</th> </th>
<th style="width: 20%">Personal <th style="width: 20%">Personal
<br /> <br />
<asp:DropDownList ID="DdlPersonalHeader" runat="server" AutoPostBack="true" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal" AppendDataBoundItems="true" Width="100%" CssClass="form-control input-sm select2me"> <asp:DropDownList ID="DdlPersonalHeader" runat="server" AutoPostBack="true" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal" AppendDataBoundItems="true" Width="100%" CssClass="form-control input-sm select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
@@ -2164,6 +2199,7 @@
<ItemTemplate> <ItemTemplate>
<asp:Label ID="LtlConsecutivo" runat="server" Text='<%# Eval("Consec", "{0:N0}") %>' Font-Size="6pt"></asp:Label></label> <asp:Label ID="LtlConsecutivo" runat="server" Text='<%# Eval("Consec", "{0:N0}") %>' Font-Size="6pt"></asp:Label></label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField> <asp:TemplateField>
@@ -2330,6 +2366,8 @@
<tr id="TrRembolsoUpdate" runat="server" visible="False"> <tr id="TrRembolsoUpdate" runat="server" visible="False">
<td>Rembolso: <td>Rembolso:
<asp:RadioButtonList ID="RblRembolso" OnSelectedIndexChanged="RblRembolso_SelectedIndexChanged" RepeatDirection="Horizontal" runat="server" AutoPostBack="True"> <asp:RadioButtonList ID="RblRembolso" OnSelectedIndexChanged="RblRembolso_SelectedIndexChanged" RepeatDirection="Horizontal" runat="server" AutoPostBack="True">
<asp:ListItem Value="1">Personal/Empleado</asp:ListItem> <asp:ListItem Value="1">Personal/Empleado</asp:ListItem>
<asp:ListItem Value="2">Caja Chica</asp:ListItem> <asp:ListItem Value="2">Caja Chica</asp:ListItem>
@@ -2600,6 +2638,7 @@
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Descripcion")%>'></asp:Literal>&nbsp; <asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Descripcion")%>'></asp:Literal>&nbsp;
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField> <asp:TemplateField>
@@ -2733,12 +2772,14 @@
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlAnticipos" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>&nbsp; <asp:Literal ID="LtlAnticipos" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Mon" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="Mon" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Moneda") %>'></asp:Literal>&nbsp; <asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Moneda") %>'></asp:Literal>&nbsp;
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Amort." ItemStyle-HorizontalAlign="Right"> <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Amort." ItemStyle-HorizontalAlign="Right">
@@ -2892,6 +2933,8 @@
<td colspan="2"> <td colspan="2">
<h4>Enviar <h4>Enviar
<asp:Label ID="lbPS" runat="server" ClientIDMode="Static"></asp:Label> <asp:Label ID="lbPS" runat="server" ClientIDMode="Static"></asp:Label>
a otro Almacén </h4> a otro Almacén </h4>
</td> </td>
@@ -3111,45 +3154,45 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<table width="100%"> <table width="100%">
<tr> <tr>
<td width="80px">Factura:</td> <td width="80px">Factura:</td>
<td> <td>
<asp:DropDownList runat="server" Width="100%" CssClass="form-control input-sm select2me" ID="DdlRefacturacionFacturas" DataTextField="SerieFolio" DataValueField="CveCompra" ValidationGroup="GrpVinculaFactura" AutoPostBack ="true"></asp:DropDownList> <asp:DropDownList runat="server" Width="100%" CssClass="form-control input-sm select2me" ID="DdlRefacturacionFacturas" DataTextField="SerieFolio" DataValueField="CveCompra" ValidationGroup="GrpVinculaFactura" AutoPostBack="true"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVRefacturacion" runat="server" ControlToValidate="DdlRefacturacionFacturas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Factura''</b> es necesario para cargar la Refacturación, por favor seleccione uno." ValidationGroup="GrpVinculaFactura"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVRefacturacion" runat="server" ControlToValidate="DdlRefacturacionFacturas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Factura''</b> es necesario para cargar la Refacturación, por favor seleccione uno." ValidationGroup="GrpVinculaFactura"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCERefacturacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVRefacturacion" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCERefacturacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVRefacturacion" Width="300px"></ajax:ValidatorCalloutExtender>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="120px">Refacturar X NC:</td> <td width="120px">Refacturar X NC:</td>
<td> <td>
<asp:CheckBox ID="ChkRefacNC" runat="server" /> <asp:CheckBox ID="ChkRefacNC" runat="server" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="120px"></td> <td width="120px"></td>
<td> <td>
<asp:CheckBox ID="ChkRefacturacionConAlmacen" Enabled="false" runat="server" Text="Con Almacen" /> <asp:CheckBox ID="ChkRefacturacionConAlmacen" Enabled="false" runat="server" Text="Con Almacen" />
<asp:HiddenField ID="HdnRefacturacionConcepto" runat="server" /> <asp:HiddenField ID="HdnRefacturacionConcepto" runat="server" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2" align="center"> <td colspan="2" align="center">
<asp:Button Text="Aplicar Factura" CssClass="btn btn-primary" ID="BtnRefacturacionAplicaFactura" ValidationGroup="GrpVinculaFactura" runat="server" /> <asp:Button Text="Aplicar Factura" CssClass="btn btn-primary" ID="BtnRefacturacionAplicaFactura" ValidationGroup="GrpVinculaFactura" runat="server" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<br /> <br />
</td> </td>
</tr> </tr>
</table> </table>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button id="CancelarDevolucionF" type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button> <button id="CancelarDevolucionF" type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
@@ -3624,6 +3667,7 @@
<div class="col-md-3" style="text-align: right;"> <div class="col-md-3" style="text-align: right;">
Tipo Cambio: Tipo Cambio:
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<asp:TextBox CssClass="form-control" ID="TxtConvertirPesos" runat="server" Width="100px"></asp:TextBox> <asp:TextBox CssClass="form-control" ID="TxtConvertirPesos" runat="server" Width="100px"></asp:TextBox>
@@ -3845,63 +3889,97 @@
</h4> </h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<asp:Panel ID="PnlContado" runat="server" Visible="False"> <div style="border: 1px solid black; width: 85%;">
<asp:RadioButtonList ID="RBLContado" runat="server" RepeatDirection="Horizontal" AutoPostBack="True"> <asp:Panel ID="PnlContado" runat="server" Visible="False">
<asp:ListItem Value="1" Selected="True">Bancos</asp:ListItem> <asp:RadioButtonList ID="RBLContado" runat="server" RepeatDirection="Horizontal" AutoPostBack="True" RepeatColumns="3">
<asp:ListItem Value="6">Caja Chica</asp:ListItem> <asp:ListItem Value="1" Selected="True">Bancos</asp:ListItem>
<asp:ListItem Value="2">Viaticos</asp:ListItem> <asp:ListItem Value="3">Créditos</asp:ListItem>
<asp:ListItem Value="4">Deudores</asp:ListItem> <asp:ListItem Value="5">Acreedores</asp:ListItem>
<asp:ListItem Value="5">Acreedores</asp:ListItem> <asp:ListItem Value="6">Caja Chica</asp:ListItem>
<asp:ListItem Value="3">Créditos</asp:ListItem> <asp:ListItem Value="2">Viaticos</asp:ListItem>
</asp:RadioButtonList> <asp:ListItem Value="4">Deudores</asp:ListItem>
</asp:Panel> </asp:RadioButtonList>
</asp:Panel>
</div>
<br />
<asp:CheckBox runat="server" ID="ChkCreditoMultiple" AutoPostBack="true" Text="Multiple Crédito" /> <asp:CheckBox runat="server" ID="ChkCreditoMultiple" AutoPostBack="true" Text="Multiple Crédito" />
<br />
<br /> <br />
<div runat="server" id="DivReembolso"> <div runat="server" id="DivReembolso">
<asp:Panel ID="Panel1" CssClass="chequesie text-small" runat="server" Width="470px" Visible="true">
<div class="chequesie1">
<div class="row">
<div class="col-md-2" style="width: 90%; margin-left: 5%; margin-right: 5%; text-align: left">
<label>Número de Reembolso:</label>
</div>
</div>
<div class="row">
<div class="col-md-2" style="width: 90%; margin-left: 5%; margin-right: 5%; text-align: left">
<asp:TextBox ID="TxtNumeroReembolso" runat="server" Width="100%" />
<asp:RequiredFieldValidator ID="RFVNumeroReembolso" runat="server" ControlToValidate="TxtNumeroReembolso" InitialValue="" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Numero de Reembolso''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCENumeroReembolso" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumeroReembolso" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div class="chequesie2">
<div class="row">
<div class="col-md-2" style="width: 90%; margin-left: 4%; margin-right: 5%; text-align: left">
<label>Caja Chica:</label>
</div>
</div>
<div id="DivPersonalReembolso" runat="server" visible="false" class="row">
<div class="col-md-2" style="width: 90%; margin-left: 4%; margin-right: 5%; text-align: left">
<asp:DropDownList ID="DdlPersonalReembolso" runat="server" CssClass="form-control input-sm select2me" Visible="false" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal" Width="103%" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="row">
<div class="col-md-2" style="width: 90%; margin-left: 4%; margin-right: 5%; text-align: left">
<asp:DropDownList ID="DdlCuentaCajaChicaReembolso" runat="server" CssClass="form-control input-sm select2me" Visible="False" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="103%" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione cuenta" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</asp:Panel>
<table> <table>
<tr> <tr>
<td runat="server" id="tdNumeroReembolso" visible="false">Número de Reembolso: <td runat="server" id="tdNumeroReembolso" visible="false"></td>
<asp:TextBox ID="TxtNumeroReembolso" runat="server" Width="100px" />
<asp:RequiredFieldValidator ID="RFVNumeroReembolso" runat="server" ControlToValidate="TxtNumeroReembolso" InitialValue="" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Numero de Reembolso''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCENumeroReembolso" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumeroReembolso" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr> </tr>
</table> </table>
<br /> <br />
<table style="width: 100%;"> <table style="width: 100%;">
<tr> <tr>
<td align="center" style="width: 100%;"> <td align="center" style="width: 100%;"></td>
<asp:DropDownList ID="DdlPersonalReembolso" runat="server" CssClass="form-control input-sm select2me" Visible="false" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal" Width="250px" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:DropDownList ID="DdlCuentaCajaChicaReembolso" runat="server" Visible="False" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="250px" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione cuenta" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
</tr> </tr>
</table> </table>
</div> </div>
<div runat="server" id="DivContado"> <div runat="server" id="DivContado">
<asp:Panel ID="PnlContadoBancos" CssClass="chequesie text-small" runat="server" Width="400px" Visible="true"> <asp:Panel ID="PnlContadoBancos" CssClass="chequesie text-small" runat="server" Width="470px" Visible="true">
<div class="chequesie1"> <div class="chequesie1">
<div class="row"> <div class="row">
<label class="col-md-2">Movimiento:</label> <div class="col-md-2" style="width: 25%; text-align: left">
<div class="col-md-6"> <label style="margin-left: 10px">Movimiento:</label>
<asp:DropDownList ID="DdlTipoTransaccion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" Width="156px" ValidationGroup="GrpContado"></asp:DropDownList> </div>
<div class="col-md-6" style="width: 75%; text-align: left">
<asp:DropDownList ID="DdlTipoTransaccion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" Width="95%" ValidationGroup="GrpContado"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipoTransaccion" runat="server" ControlToValidate="DdlTipoTransaccion" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpContado"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVTipoTransaccion" runat="server" ControlToValidate="DdlTipoTransaccion" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETipoTransaccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccion" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCETipoTransaccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccion" Width="300px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-md-2">Cuenta:</label> <div class="col-md-2" style="width: 25%; text-align: left">
<div class="col-md-6"> <label style="margin-left: 10px">Cuenta:</label>
<asp:DropDownList ID="DdlCuenta" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="200px" ValidationGroup="GrpContado"></asp:DropDownList> </div>
<div class="col-md-6" style="width: 75%; text-align: left">
<asp:DropDownList ID="DdlCuenta" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="95%" ValidationGroup="GrpContado"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVCuenta" runat="server" ControlToValidate="DdlCuenta" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpContado"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVCuenta" runat="server" ControlToValidate="DdlCuenta" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuenta" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCOCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
</div> </div>
@@ -3915,15 +3993,17 @@
</div> </div>
<div class="chequesie2"> <div class="chequesie2">
<div class="row"> <div class="row">
<label class="col-md-2"> <label class="col-md-2" style="width: 25%; padding-left: 20px; text-align: left">
<asp:Label ID="LblFolio" runat="server" Text="Número:"></asp:Label></label> <asp:Label ID="LblFolio" runat="server" Text="Número:"></asp:Label></label>
<div class="col-md-4"> <div class="col-md-4" style="width: 25%; text-align: left;">
<asp:TextBox ID="TxtDocumentoFolio" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="80px"></asp:TextBox> <asp:TextBox ID="TxtDocumentoFolio" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="80px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtDocumentoFolio" Display="None" ErrorMessage="El campo <b>''Folio''</b> es requerido por la aplicación, por favor ingrese uno." ValidationGroup="GrpContado"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtDocumentoFolio" Display="None" ErrorMessage="El campo <b>''Folio''</b> es requerido por la aplicación, por favor ingrese uno." ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
<label class="col-md-2">Importe</label> <div class="col-md-2" style="width: 24%; text-align: left">
<div class="col-md-4 input-icon"> <label>Importe</label>
</div>
<div class="col-md-4 input-icon" style="width: 25%; text-align: left">
<i style="margin: 0px;">$</i> <i style="margin: 0px;">$</i>
<asp:TextBox ID="TxtDocumentoImporte" CssClass="form-control input-sm " Enabled="False" runat="server" MaxLength="12" Width="80px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox> <asp:TextBox ID="TxtDocumentoImporte" CssClass="form-control input-sm " Enabled="False" runat="server" MaxLength="12" Width="80px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTBEDocumentoImporte" runat="server" TargetControlID="TxtDocumentoImporte" FilterType="Custom, Numbers" ValidChars=".," /> <ajax:FilteredTextBoxExtender ID="FTBEDocumentoImporte" runat="server" TargetControlID="TxtDocumentoImporte" FilterType="Custom, Numbers" ValidChars=".," />
@@ -3931,10 +4011,13 @@
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RVDocumentoImporte" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RVDocumentoImporte" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<div class="row" style="text-align: left; padding-left: 20px">
Observaciones:
</div>
<div class="row"> <div class="row">
<label class="col-md-2">Observaciones:</label> <div class="col-md-8" style="width: 100%; text-align: left">
<div class="col-md-8"> <asp:TextBox ID="TxtDocumentoObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="97%" Rows="3" TextMode="MultiLine"></asp:TextBox>
<asp:TextBox ID="TxtDocumentoObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="250px" Rows="3" TextMode="MultiLine"></asp:TextBox>
</div> </div>
</div> </div>
</div> </div>
@@ -4089,6 +4172,7 @@
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>&nbsp; <asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate> </ItemTemplate>
<ItemStyle HorizontalAlign="Right" /> <ItemStyle HorizontalAlign="Right" />
</asp:TemplateField> </asp:TemplateField>
@@ -4097,6 +4181,7 @@
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaDocumento", "{0:d}") %>'></asp:Literal>&nbsp; <asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaDocumento", "{0:d}") %>'></asp:Literal>&nbsp;
</ItemTemplate> </ItemTemplate>
<ItemStyle HorizontalAlign="Right" /> <ItemStyle HorizontalAlign="Right" />
</asp:TemplateField> </asp:TemplateField>
@@ -4159,6 +4244,7 @@
<div class="col-md-10"> <div class="col-md-10">
<asp:DropDownList ID="DdlCredito" Width="300px" CssClass="form-control input-sm select2me" DataTextField="ReferenciaImporte" DataValueField="CveCredito" runat="server" AutoPostBack="True"></asp:DropDownList></td> <asp:DropDownList ID="DdlCredito" Width="300px" CssClass="form-control input-sm select2me" DataTextField="ReferenciaImporte" DataValueField="CveCredito" runat="server" AutoPostBack="True"></asp:DropDownList></td>
</div> </div>
</div> </div>
<div class="row" id="DivCreditoMensualidad" runat="server"> <div class="row" id="DivCreditoMensualidad" runat="server">
@@ -4166,6 +4252,8 @@
<div class="col-md-10"> <div class="col-md-10">
<asp:DropDownList ID="DdlCreditoDetalle" Width="300px" CssClass="form-control input-sm select2me" DataValueField="CveCreditoDetalle" DataTextField="PeriodoTexto" runat="server"></asp:DropDownList></td> <asp:DropDownList ID="DdlCreditoDetalle" Width="300px" CssClass="form-control input-sm select2me" DataValueField="CveCreditoDetalle" DataTextField="PeriodoTexto" runat="server"></asp:DropDownList></td>
<asp:RequiredFieldValidator ID="RFVCreditoDetalle" runat="server" ControlToValidate="DdlCreditoDetalle" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Crédito''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpContado"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVCreditoDetalle" runat="server" ControlToValidate="DdlCreditoDetalle" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Crédito''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCECreditoDetalle" runat="server" HighlightCssClass="vco" TargetControlID="RFVCreditoDetalle" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCECreditoDetalle" runat="server" HighlightCssClass="vco" TargetControlID="RFVCreditoDetalle" Width="300px"></ajax:ValidatorCalloutExtender>
</div> </div>
@@ -4297,6 +4385,8 @@
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="ddlUM" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Width="100"></asp:DropDownList></td> <asp:DropDownList ID="ddlUM" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Width="100"></asp:DropDownList></td>
<label for="<%= ddlUM.ClientID.ToString()%>">Unidad de Medida:</label> <label for="<%= ddlUM.ClientID.ToString()%>">Unidad de Medida:</label>
</div> </div>
</ContentTemplate> </ContentTemplate>
@@ -4440,6 +4530,8 @@
<div class="col-md-6"> <div class="col-md-6">
<asp:Label ID="Label11" runat="server" Text="Total:"></asp:Label>&nbsp&nbsp$ <asp:Label ID="Label11" runat="server" Text="Total:"></asp:Label>&nbsp&nbsp$
<asp:Label ID="LblTotalPS" ClientIDMode="Static" runat="server" Text="0.00"></asp:Label> <asp:Label ID="LblTotalPS" ClientIDMode="Static" runat="server" Text="0.00"></asp:Label>
</div> </div>
@@ -4589,6 +4681,8 @@
<label class="col-md-3"> <label class="col-md-3">
1 1
<label id="LbUMActual" class="bold"></label> <label id="LbUMActual" class="bold"></label>
Equivale:</label> Equivale:</label>
<div class="col-md-9"> <div class="col-md-9">
@@ -4604,6 +4698,7 @@
<button id="btnAgregarUM" onclick="MostrarAgregarUM()" type="button" class="btn btn-default btn-xs" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro de agregar como NUEVA Unidad de Medida?" data-btn-ok-label="si"> <button id="btnAgregarUM" onclick="MostrarAgregarUM()" type="button" class="btn btn-default btn-xs" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro de agregar como NUEVA Unidad de Medida?" data-btn-ok-label="si">
Agregar como nueva unidad de medida Agregar como nueva unidad de medida
</button> </button>
</div> </div>
</div> </div>
@@ -4952,7 +5047,7 @@
<label class="col-md-2" style="margin-top: 5px;">Factura de:</label> <label class="col-md-2" style="margin-top: 5px;">Factura de:</label>
<div class="col-md-6" align="center"> <div class="col-md-6" align="center">
<asp:RadioButtonList ID="RblFleteImportacionOpcion" CssClass="iradio_square-blue" runat="server" RepeatDirection="Horizontal" Width="100%"> <asp:RadioButtonList ID="RblFleteImportacionOpcion" CssClass="iradio_square-blue" runat="server" RepeatDirection="Horizontal" Width="100%">
<%-- <asp:ListItem Value="1" Selected="True">Productos</asp:ListItem> <%-- <asp:ListItem Value="1" Selected="True">Productos</asp:ListItem>
<asp:ListItem Value="2">Gastos</asp:ListItem>--%> <asp:ListItem Value="2">Gastos</asp:ListItem>--%>
</asp:RadioButtonList> </asp:RadioButtonList>
</div> </div>

View File

@@ -12739,6 +12739,7 @@ Partial Class Compras_Compras
Select Case RBLContado.SelectedValue Select Case RBLContado.SelectedValue
Case "2" Case "2"
DdlPersonalReembolso.Visible = True DdlPersonalReembolso.Visible = True
DivPersonalReembolso.Visible = True
Case "6" Case "6"
DdlCuentaCajaChicaReembolso.Visible = True DdlCuentaCajaChicaReembolso.Visible = True
End Select End Select
@@ -12794,6 +12795,7 @@ Partial Class Compras_Compras
Select Case RBLContado.SelectedValue Select Case RBLContado.SelectedValue
Case "2" Case "2"
DdlPersonalReembolso.Visible = True DdlPersonalReembolso.Visible = True
DivPersonalReembolso.Visible = True
Case "6" Case "6"
DdlCuentaCajaChicaReembolso.Visible = True DdlCuentaCajaChicaReembolso.Visible = True
End Select End Select

View File

@@ -1265,9 +1265,9 @@
<ItemStyle HorizontalAlign="Left" /> <ItemStyle HorizontalAlign="Left" />
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="Descripcion" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="Descripcion" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" />
<asp:TemplateField HeaderText="Fecha"> <asp:TemplateField HeaderText="Fecha" SortExpression="">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal> <asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:dd/MM/yyyy}") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Sub Total"> <asp:TemplateField HeaderText="Sub Total">
@@ -1275,12 +1275,12 @@
<asp:Literal ID="LtlSubTotal" runat="server" Text='<%# If(CDbl(Eval("SubTotal")) = 0, "", Eval("SubTotal", "{0:N2}")) %>'></asp:Literal> <asp:Literal ID="LtlSubTotal" runat="server" Text='<%# If(CDbl(Eval("SubTotal")) = 0, "", Eval("SubTotal", "{0:N2}")) %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Descuento"> <asp:TemplateField HeaderText="Descuento" ItemStyle-HorizontalAlign="Right">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlDescuento" runat="server" Text='<%# If (CDbl(Eval("Descuento")) = 0, "", Eval("Descuento", "{0:N2}")) %>'></asp:Literal> <asp:Literal ID="LtlDescuento" runat="server" Text='<%# If (CDbl(Eval("Descuento")) = 0, "", Eval("Descuento", "{0:N2}")) %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Amortización"> <asp:TemplateField HeaderText="Amortización" ItemStyle-HorizontalAlign="Right">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlAmort" runat="server" Text='<%# If (CDbl(Eval("Amortizacion")) = 0, "", Eval("Amortizacion", "{0:N2}")) %>'></asp:Literal> <asp:Literal ID="LtlAmort" runat="server" Text='<%# If (CDbl(Eval("Amortizacion")) = 0, "", Eval("Amortizacion", "{0:N2}")) %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
@@ -1291,7 +1291,7 @@
</ItemTemplate> </ItemTemplate>
<ItemStyle HorizontalAlign="Right" /> <ItemStyle HorizontalAlign="Right" />
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="Abreviatura" HeaderText="Mon" /> <asp:BoundField DataField="Abreviatura" HeaderText="Mon" ItemStyle-HorizontalAlign="Center"/>
<%-- <asp:TemplateField> <%-- <asp:TemplateField>
<HeaderTemplate>Estatus</HeaderTemplate> <HeaderTemplate>Estatus</HeaderTemplate>
<ItemTemplate> <ItemTemplate>

View File

@@ -1742,12 +1742,16 @@ Partial Class GPS_Rastreo
Using wc As New HttpClient() Using wc As New HttpClient()
Try Try
Dim Url = New Uri($"{ClsPaginas.UrlDirecciones}nominatim/reverseMultiple.php") Dim Url = New Uri(String.Format("{0}nominatim/reverseMultiple.php", ClsPaginas.UrlDirecciones))
Dim FormStuff = String.Format("formato=json&posiciones={0}", Base64array) Dim FormStuff = String.Format("formato=json&posiciones={0}", Base64array)
Dim content = New StringContent(FormStuff, Encoding.UTF8, "application/x-www-form-urlencoded") Dim content = New StringContent(FormStuff, Encoding.UTF8, "application/x-www-form-urlencoded")
Dim response = wc.PostAsync(Url, content).Result Dim response = wc.PostAsync(Url, content).Result
Dim result = response.Content.ReadAsStringAsync().Result Dim result = response.Content.ReadAsStringAsync().Result
retorno = JArray.Parse(result) retorno = JArray.Parse(result)
response.Dispose()
content = Nothing
Url = Nothing
FormStuff = Nothing
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al obtener las direcciones", ex) OnError("Ocurrió un error al obtener las direcciones", ex)
End Try End Try
@@ -2214,12 +2218,16 @@ Partial Class GPS_Rastreo
Using wc As New HttpClient() Using wc As New HttpClient()
Try Try
Dim Url = New Uri($"{ClsPaginas.UrlDirecciones}nominatim/reverseMultiple.php") Dim Url = New Uri(String.Format("{0}nominatim/reverseMultiple.php", ClsPaginas.UrlDirecciones))
Dim FormStuff = String.Format("formato=json&posiciones={0}", Base64array) Dim FormStuff = String.Format("formato=json&posiciones={0}", Base64array)
Dim content = New StringContent(FormStuff, Encoding.UTF8, "application/x-www-form-urlencoded") Dim content = New StringContent(FormStuff, Encoding.UTF8, "application/x-www-form-urlencoded")
Dim response = wc.PostAsync(Url, content).Result Dim response = wc.PostAsync(Url, content).Result
Dim result = response.Content.ReadAsStringAsync().Result Dim result = response.Content.ReadAsStringAsync().Result
retorno = JArray.Parse(result) retorno = JArray.Parse(result)
response.Dispose()
content = Nothing
Url = Nothing
FormStuff = Nothing
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al obtener las direcciones", ex) OnError("Ocurrió un error al obtener las direcciones", ex)
End Try End Try

View File

@@ -186,12 +186,16 @@ Partial Class GPS_TrayectoDetalle
Using wc As New HttpClient() Using wc As New HttpClient()
Try Try
Dim Url = New Uri($"{ClsPaginas.UrlDirecciones}nominatim/reverseMultiple.php") Dim Url = New Uri(String.Format("{0}nominatim/reverseMultiple.php", ClsPaginas.UrlDirecciones))
Dim FormStuff = String.Format("formato=json&posiciones={0}", Base64array) Dim FormStuff = String.Format("formato=json&posiciones={0}", Base64array)
Dim content = New StringContent(FormStuff, Encoding.UTF8, "application/x-www-form-urlencoded") Dim content = New StringContent(FormStuff, Encoding.UTF8, "application/x-www-form-urlencoded")
Dim response = wc.PostAsync(Url, content).Result Dim response = wc.PostAsync(Url, content).Result
Dim result = response.Content.ReadAsStringAsync().Result Dim result = response.Content.ReadAsStringAsync().Result
retorno = JArray.Parse(result) retorno = JArray.Parse(result)
response.Dispose()
content = Nothing
Url = Nothing
FormStuff = Nothing
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al obtener las direcciones", ex) OnError("Ocurrió un error al obtener las direcciones", ex)
End Try End Try

View File

@@ -560,6 +560,7 @@ Partial Class Inicio
SBJSScript.AppendFormat("graficahighcharts2('{0}','{1}','{2}','{3}',[{4}],1,'{5}','{6}',[{8}],[{7}]);", divcontainer.ClientID, Titulo, SubTitulo, YReferencia, Info, XReferencia, Promedio, SBPie1, SBPie2) SBJSScript.AppendFormat("graficahighcharts2('{0}','{1}','{2}','{3}',[{4}],1,'{5}','{6}',[{8}],[{7}]);", divcontainer.ClientID, Titulo, SubTitulo, YReferencia, Info, XReferencia, Promedio, SBPie1, SBPie2)
RegistraScript(SBJSScript.ToString, Indicador) RegistraScript(SBJSScript.ToString, Indicador)
DTDatos.Dispose()
End Sub End Sub
Private Sub MuestraGrafica(DTDatos As DataTable, ColTitle As String, ColValue As String, TipoDato As String, DivId As String) Private Sub MuestraGrafica(DTDatos As DataTable, ColTitle As String, ColValue As String, TipoDato As String, DivId As String)
Dim Info As String = "" Dim Info As String = ""
@@ -928,7 +929,7 @@ Partial Class Inicio
Next Next
grafica.series.Add(serie) grafica.series.Add(serie)
Next Next
data.Dispose()
End If End If
Return grafica Return grafica
End Function End Function
@@ -1006,6 +1007,7 @@ Partial Class Inicio
grafica.series.Add(serie) grafica.series.Add(serie)
Next Next
End If End If
data.Dispose()
End If End If
Return grafica Return grafica
End Function End Function

View File

@@ -3711,7 +3711,10 @@ Partial Class Inventarios_EntradasSalidas
Dim tValorInventario As Decimal = ObjInventario.DtResultados.SUM("Total", "").ToDecimal.RoundSQL() Dim tValorInventario As Decimal = ObjInventario.DtResultados.SUM("Total", "").ToDecimal.RoundSQL()
ValorSalida = tValorInventario ValorSalida = tValorInventario
Dim drA2 As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen = {0}", DdlAlmacenInventarioFisico.SelectedValue)) Dim drA2 As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen = {0}", DdlAlmacenInventarioFisico.SelectedValue))
If drA2 IsNot Nothing Then idCtaContableSalida = drA2("IdCtaContable").ToString.ToEntero If drA2 IsNot Nothing Then
idCtaContableSalida = drA2("IdCtaContable").ToString.ToEntero
tCveSubProyecto = drA2("CveSubProyecto").ToString.ToEntero
End If
Else Else
ErrorMovInv = True ErrorMovInv = True
Mensaje = "Ocurrió un error al validar los movimientos contables de salida" Mensaje = "Ocurrió un error al validar los movimientos contables de salida"

View File

@@ -5182,7 +5182,7 @@ Partial Class OC
Protected Function ActualizarCotizacion(ByRef ObjVentas As ClsVentas) As Boolean Protected Function ActualizarCotizacion(ByRef ObjVentas As ClsVentas) As Boolean
Dim OcurrioError As Boolean = False Dim OcurrioError As Boolean = False
Try Try
Dim PorcentajeGanancia As Decimal = 0.1D Dim PorcentajeGanancia As Decimal = 0.3D
For Each Row As DataRow In DtDetalle.Rows For Each Row As DataRow In DtDetalle.Rows
Dim CvePS As Integer = Row("CvePS").ToString.ToEntero Dim CvePS As Integer = Row("CvePS").ToString.ToEntero
Dim DrPS = GlobalDTPS(CveEmpresaActual, CvePS:=CvePS).FiltroPrimero("") Dim DrPS = GlobalDTPS(CveEmpresaActual, CvePS:=CvePS).FiltroPrimero("")

View File

@@ -74,12 +74,16 @@ Partial Class PortalGPS_Penske
Using wc As New HttpClient() Using wc As New HttpClient()
Try Try
Dim Url = New Uri($"{ClsPaginas.UrlDirecciones}nominatim/reverseMultiple.php") Dim Url = New Uri(String.Format("{0}nominatim/reverseMultiple.php", ClsPaginas.UrlDirecciones))
Dim FormStuff = String.Format("formato=json&posiciones={0}", Base64array) Dim FormStuff = String.Format("formato=json&posiciones={0}", Base64array)
Dim content = New StringContent(FormStuff, Encoding.UTF8, "application/x-www-form-urlencoded") Dim content = New StringContent(FormStuff, Encoding.UTF8, "application/x-www-form-urlencoded")
Dim response = wc.PostAsync(Url, content).Result Dim response = wc.PostAsync(Url, content).Result
Dim result = response.Content.ReadAsStringAsync().Result Dim result = response.Content.ReadAsStringAsync().Result
retorno = JArray.Parse(result) retorno = JArray.Parse(result)
response.Dispose()
content = Nothing
Url = Nothing
FormStuff = Nothing
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al obtener las direcciones", ex) OnError("Ocurrió un error al obtener las direcciones", ex)
End Try End Try

View File

@@ -20,6 +20,10 @@
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
<li>
<asp:LinkButton ID="LBGC" runat="server" CausesValidation="False" Text="<i class='fa fa-pencil'></i> GC"
/>
</li>
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="HA" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="HA" runat="Server">
</asp:Content> </asp:Content>

View File

@@ -196,4 +196,45 @@ Partial Class SessionesActivas
Notificaciones.AlertaVentana(TxtMensaje.Text, lista, timeoutseconds:=0) Notificaciones.AlertaVentana(TxtMensaje.Text, lista, timeoutseconds:=0)
RegistraScript($"$(""#DivMensaje"").modal('hide');console.log('{Decripta(Context.User.Identity.Name)}')") RegistraScript($"$(""#DivMensaje"").modal('hide');console.log('{Decripta(Context.User.Identity.Name)}')")
End Sub End Sub
Private Sub VerGC()
Dim myGCCol As MyGCCollectClass = New MyGCCollectClass()
Console.WriteLine("The highest generation is {0}", GC.MaxGeneration)
myGCCol.MakeSomeGarbage()
Console.WriteLine("Generation: {0}", GC.GetGeneration(myGCCol))
Console.WriteLine("Total Memory: {0}", GC.GetTotalMemory(False))
GC.Collect(0)
Console.WriteLine("Generation: {0}", GC.GetGeneration(myGCCol))
Console.WriteLine("Total Memory: {0}", GC.GetTotalMemory(False))
GC.Collect(2)
Console.WriteLine("Generation: {0}", GC.GetGeneration(myGCCol))
Console.WriteLine("Total Memory: {0}", GC.GetTotalMemory(False))
Console.Read()
GC.Collect()
GC.WaitForPendingFinalizers()
End Sub
Private Sub LBGC_Click(sender As Object, e As EventArgs) Handles LBGC.Click
GC.Collect()
GC.WaitForPendingFinalizers()
End Sub
Class MyGCCollectClass
Public Sub MakeSomeGarbage()
Dim vt As Version
For i As Integer = 0 To 1000 - 1
vt = New Version()
Next
End Sub
End Class
End Class End Class

View File

@@ -381,7 +381,10 @@ Partial Class Site
End If End If
HeaderBar.AppendFormat("</li>{0}", ScriptColorGrupoModulo) HeaderBar.AppendFormat("</li>{0}", ScriptColorGrupoModulo)
BarraNavegacion.Text = HeaderBar.ToString BarraNavegacion.Text = HeaderBar.ToString
CargaMenu(MenuHTML) 'CargaMenu(MenuHTML)
Menu.Text = MenuHTML.ToString
MenuHTML.Clear()
HeaderBar.Clear()
End Sub End Sub
@@ -413,9 +416,9 @@ Partial Class Site
End Select End Select
End Function End Function
Private Sub CargaMenu(Texto As StringBuilder) 'Private Sub CargaMenu(Texto As StringBuilder)
Menu.Text = Texto.ToString ' Menu.Text = Texto.ToString
End Sub 'End Sub
#Region "Notificaciones" #Region "Notificaciones"
@@ -458,6 +461,7 @@ Partial Class Site
'OC.Dispose() 'OC.Dispose()
LtlMNotificaciones.Text = LtlMNotificaciones.Text & Notificaciones.ToString LtlMNotificaciones.Text = LtlMNotificaciones.Text & Notificaciones.ToString
Notificaciones.Clear()
End Sub End Sub
@@ -474,7 +478,10 @@ Partial Class Site
Dim x509 As New X509Certificate2() Dim x509 As New X509Certificate2()
x509.Import(Data) x509.Import(Data)
Return x509.NotAfter.ToShortDateString() Dim Retorno = x509.NotAfter.ToShortDateString()
x509 = Nothing
Data = Nothing
Return Retorno
End If End If
Catch ex As Exception Catch ex As Exception

View File

@@ -5728,6 +5728,8 @@ Partial Class Ventas
End If End If
If UsuarioActual.TienePermisoProceso(68) Then e.Row.FCTextBox("TxtPrecio").Enabled = False
'Si es una devolucion 'Si es una devolucion
If NuevaFactura = 0 Then If NuevaFactura = 0 Then
e.Row.FCDropDownList("DdlUnidadMedida").Enabled = False e.Row.FCDropDownList("DdlUnidadMedida").Enabled = False
@@ -5956,15 +5958,17 @@ Partial Class Ventas
If Not UsuarioActual.TienePermisoProceso(169) Then ' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR If Not UsuarioActual.TienePermisoProceso(169) Then ' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR
Dim CvePS As Integer = DatarowPS("CvePS").ToString().ToEntero() Dim CvePS As Integer = DatarowPS("CvePS").ToString().ToEntero()
Dim CveUM As Integer = DatarowPS("CveUM").ToString().ToEntero() Dim CveUM As Integer = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedValue.ToEntero() 'DatarowPS("CveUM").ToString().ToEntero()
Dim CveTipoPS As Integer = DatarowPS("CveTipoPS").ToString().ToEntero() Dim CveTipoPS As Integer = DatarowPS("CveTipoPS").ToString().ToEntero()
CantidadInventario = GvPS.Rows(e.RowIndex).DataKey("CantidadInventario").ToString().ToDecimal CantidadInventario = GvPS.Rows(e.RowIndex).DataKey("CantidadInventario").ToDecimal
Dim CveUMInicial As Integer = GvPS.Rows(e.RowIndex).DataKey("CveUM").ToEntero
Dim ValidaExistencia As Boolean = True Dim ValidaExistencia As Boolean = True
If (CantidadInventario > 0) OrElse (Cantidad <= CantidadOriginal) Then 'si ya hay algo surtido, que no valide existencia If (CantidadInventario > 0) OrElse (Cantidad <= CantidadOriginal) Then 'si ya hay algo surtido, que no valide existencia
ValidaExistencia = False ValidaExistencia = False
End If End If
If CveUM <> CveUMInicial Then ValidaExistencia = True
'SOLO VALIDA EXISTENCIAS Y COSTO: SI USA INVENTARIOS, SOLO PRODUCTOS TIPO PRODUCTO, SOLO REMISIONES E INGRESOS 'SOLO VALIDA EXISTENCIAS Y COSTO: SI USA INVENTARIOS, SOLO PRODUCTOS TIPO PRODUCTO, SOLO REMISIONES E INGRESOS
If UsuarioActual.Empresa.UsaInventarios AndAlso CveTipoPS = 2 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "PA") Or (DdlTipoComprobante.SelectedValue.Contiene("Cot") And UsuarioActual.CveEmpresa.Contiene(119))) Then If UsuarioActual.Empresa.UsaInventarios AndAlso CveTipoPS = 2 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "PA") Or (DdlTipoComprobante.SelectedValue.Contiene("Cot") And UsuarioActual.CveEmpresa.Contiene(119))) Then
@@ -6067,6 +6071,7 @@ Partial Class Ventas
Alert(String.Format(MensajeCosto.ToString()), TipoMensaje.MsgAdvertencia) Alert(String.Format(MensajeCosto.ToString()), TipoMensaje.MsgAdvertencia)
MensajeCosto.Clear()
e.Cancel = True e.Cancel = True
Exit Sub Exit Sub
End If End If
@@ -6080,6 +6085,7 @@ Partial Class Ventas
MensajeCosto.AppendFormat("El precio indicado es: <b>${0:#,###.00}</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, (If(Costo > 0, ((PU - Costo) * 100) / Costo, 0)).FormatoNumero) MensajeCosto.AppendFormat("El precio indicado es: <b>${0:#,###.00}</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, (If(Costo > 0, ((PU - Costo) * 100) / Costo, 0)).FormatoNumero)
End If End If
Alert(MensajeCosto.ToString(), TipoMensaje.MsgAdvertencia) Alert(MensajeCosto.ToString(), TipoMensaje.MsgAdvertencia)
MensajeCosto.Clear()
e.Cancel = True e.Cancel = True
Exit Sub Exit Sub
End If End If
@@ -6128,6 +6134,7 @@ Partial Class Ventas
PU = PU * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal) PU = PU * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
TmpDT.Rows(e.RowIndex)("PorcentajeIEPS") = 0 TmpDT.Rows(e.RowIndex)("PorcentajeIEPS") = 0
DrPS = Nothing
End If End If
Dim TotalCalculableImpuestos As Decimal = ((Cantidad * PU) - (ObjDescuento.ImporteDescuento)) Dim TotalCalculableImpuestos As Decimal = ((Cantidad * PU) - (ObjDescuento.ImporteDescuento))
@@ -6700,6 +6707,7 @@ Partial Class Ventas
If MensajeCosto.ToString().Length > 1 Then If MensajeCosto.ToString().Length > 1 Then
Alert(MensajeCosto.ToString(), TipoMensaje.MsgAdvertencia) Alert(MensajeCosto.ToString(), TipoMensaje.MsgAdvertencia)
MensajeCosto.Clear()
Exit Sub Exit Sub
End If End If
@@ -6816,6 +6824,7 @@ Partial Class Ventas
Next Next
Alert(str.ToString(), TipoMensaje.MsgAdvertencia) Alert(str.ToString(), TipoMensaje.MsgAdvertencia)
dttsat.Dispose() dttsat.Dispose()
str.Clear()
Exit Sub Exit Sub
End If End If
dttsat.Dispose() dttsat.Dispose()
@@ -7425,6 +7434,7 @@ Partial Class Ventas
Dim Liga = If(UsuarioActual.CveRol = 1165 Or UsuarioActual.CveEmpresa = 119, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", If(CveEmpresaCRM > 0, $"document.location.href=""/CRM/EmpresaCRM.aspx?CveEmpresaCRM={CveEmpresaCRM}"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}&Opt=3"";")) Dim Liga = If(UsuarioActual.CveRol = 1165 Or UsuarioActual.CveEmpresa = 119, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", If(CveEmpresaCRM > 0, $"document.location.href=""/CRM/EmpresaCRM.aspx?CveEmpresaCRM={CveEmpresaCRM}"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}&Opt=3"";"))
Alert(MensajeAlert.ToString(), TipoMensaje.MsgInformacion, Liga) Alert(MensajeAlert.ToString(), TipoMensaje.MsgInformacion, Liga)
MensajeAlert.Clear()
'LIMPIA CONDICIONES DE PAGO - CONTADO 'LIMPIA CONDICIONES DE PAGO - CONTADO
RBLPago.SelectedValue = "1" RBLPago.SelectedValue = "1"
@@ -7451,6 +7461,7 @@ Partial Class Ventas
ObjContr.Dispose() ObjContr.Dispose()
ObjDocCliente.Dispose() ObjDocCliente.Dispose()
'ObjFolios.Dispose() 'ObjFolios.Dispose()
ErrorList.Clear
ErrorList = Nothing ErrorList = Nothing
MensajeAlert = Nothing MensajeAlert = Nothing
If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose() If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose()
@@ -7473,13 +7484,17 @@ Partial Class Ventas
ObjContr.Dispose() ObjContr.Dispose()
ObjDocCliente.Dispose() ObjDocCliente.Dispose()
'ObjFolios.Dispose() 'ObjFolios.Dispose()
ErrorList.Clear()
ErrorList = Nothing ErrorList = Nothing
MensajeAlert = Nothing MensajeAlert = Nothing
If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose() If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose()
TmpDT = TmpDTError.Copy TmpDT = TmpDTError.Copy
End If End If
ObjFactura = Nothing
Obj2 = Nothing
End If End If
End If End If
End Sub End Sub
@@ -9481,7 +9496,7 @@ Partial Class Ventas
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=CveTipoRetencion) Then Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=CveTipoRetencion) Then
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico") ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
Else Else
If factura.TipoDocto.Contiene("Dev", "Egs") Or DtVentasNC IsNot Nothing Then If factura.TipoDocto.Contiene("Dev", "Egs") Or DtVentasNC IsNot Nothing Or CveEstatusRefacturacion = 1 Then
If DtVentasNC IsNot Nothing Then If DtVentasNC IsNot Nothing Then
For Each row As DataRow In DtVentasNC.Rows For Each row As DataRow In DtVentasNC.Rows
If Not row("CveVenta").ToString().ToEntero() = -1 Then If Not row("CveVenta").ToString().ToEntero() = -1 Then
@@ -13722,6 +13737,8 @@ Partial Class Ventas
TxtPrecio.Enabled = True TxtPrecio.Enabled = True
End If End If
If UsuarioActual.TienePermisoProceso(68) Then TxtPrecio.Enabled = False
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count = 0 Then If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count = 0 Then
DdlMoneda.SelectedValueExist(drPS("CveMoneda").ToString()) DdlMoneda.SelectedValueExist(drPS("CveMoneda").ToString())
CambiaMoneda() CambiaMoneda()
@@ -16739,7 +16756,7 @@ Partial Class Ventas
End If End If
End If End If
TextoExistencia.Clear()
Return TieneError Return TieneError
End Function End Function
'Protected Sub LbVerInventario_Click(sender As Object, e As EventArgs) Handles LbVerInventario.Click 'Protected Sub LbVerInventario_Click(sender As Object, e As EventArgs) Handles LbVerInventario.Click
@@ -19208,7 +19225,7 @@ Partial Class Ventas
Else Else
ResultadoMail = 0 ResultadoMail = 0
End If End If
sb.Clear()
End If End If
ObjVentas.Dispose() ObjVentas.Dispose()
End Sub End Sub
@@ -19227,7 +19244,7 @@ Partial Class Ventas
End If End If
LbCancelarDescripcion.Text = SbCondiciones.ToString() LbCancelarDescripcion.Text = SbCondiciones.ToString()
SbCondiciones.Clear()
UpCancelarDocumento.Update() UpCancelarDocumento.Update()
End Sub End Sub
@@ -19284,7 +19301,7 @@ Partial Class Ventas
RegistraScript("$('#ModalCancelarDocumento').modal();") RegistraScript("$('#ModalCancelarDocumento').modal();")
UpCancelarDocumento.Update() UpCancelarDocumento.Update()
sb.Clear()
Else Else
CancelarDocumento() CancelarDocumento()
End If End If
@@ -20718,7 +20735,7 @@ Partial Class Ventas
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error") RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error")
Exit Sub Exit Sub
End If End If
MensajeAlert.Clear()
Dim MensajeSinExistencias As New StringBuilder Dim MensajeSinExistencias As New StringBuilder
Dim ObjInventarios As New ClsInventarios Dim ObjInventarios As New ClsInventarios
@@ -20762,7 +20779,7 @@ Partial Class Ventas
Else Else
RegistraScript("playsonidito('beep-07.wav')", "Existo") RegistraScript("playsonidito('beep-07.wav')", "Existo")
End If End If
MensajeSinExistencias.Clear()
End Sub End Sub
Protected Sub GvSerie_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvSerie.RowDeleting Protected Sub GvSerie_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvSerie.RowDeleting
@@ -21841,13 +21858,12 @@ Partial Class Ventas
Cuerpo.AppendLine("</tr></table>") Cuerpo.AppendLine("</tr></table>")
End If End If
Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, Cuerpo.ToString()) Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, Cuerpo.ToString())
Cuerpo.Clear()
Exit Select Exit Select
End Select End Select
End Sub End Sub
Private Sub GuardarBitacora(CveVenta As Integer, RutaAdjunto As String, Obser As String) Private Sub GuardarBitacora(CveVenta As Integer, RutaAdjunto As String, Obser As String)
Dim ObjEventos As New ClsOIEventos() Dim ObjEventos As New ClsOIEventos()
@@ -23588,6 +23604,7 @@ Partial Class Ventas
DtCotizacionesPS = ObjClientes.DtResultados DtCotizacionesPS = ObjClientes.DtResultados
End If End If
ObjClientes.Dispose() ObjClientes.Dispose()
Cves.Clear()
If Not AgregaPSCotizacion() Then If Not AgregaPSCotizacion() Then
Alert("Ocurrió un error validar las partidas de las cotizaciones seleccionadas. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) Alert("Ocurrió un error validar las partidas de las cotizaciones seleccionadas. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
@@ -23962,6 +23979,7 @@ Partial Class Ventas
sb.Remove(sb.Length - 1, 1) sb.Remove(sb.Length - 1, 1)
CargaConceptosRemisionPorFacturar(sb.ToString(), If(ChkRemProductos.Checked, 2, 1)) CargaConceptosRemisionPorFacturar(sb.ToString(), If(ChkRemProductos.Checked, 2, 1))
sb.Clear()
End Select End Select
Dim CveTipoDocto = DdlTipoComprobante.SelectedValue Dim CveTipoDocto = DdlTipoComprobante.SelectedValue
@@ -24007,7 +24025,10 @@ Partial Class Ventas
DdlContrato.DataSource = DtContratos.FiltraParametros($"CveContrato = {CveContrato}") DdlContrato.DataSource = DtContratos.FiltraParametros($"CveContrato = {CveContrato}")
DdlContrato.DataBind() DdlContrato.DataBind()
End If End If
MensajeRemisiones.Clear()
ObsOC.Clear()
ObsPedido.Clear()
ObsInv.Clear()
End If End If
End If End If
@@ -24332,6 +24353,7 @@ Partial Class Ventas
DtPedidos2PS = ObjVentas.DtResultados DtPedidos2PS = ObjVentas.DtResultados
End If End If
ObjVentas.Dispose() ObjVentas.Dispose()
Cves.Clear()
If Not AgregaPSPedido2() Then If Not AgregaPSPedido2() Then
Alert("Ocurrió un error validar las partidas de los pedidos seleccionadas. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) Alert("Ocurrió un error validar las partidas de los pedidos seleccionadas. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
@@ -24364,6 +24386,10 @@ Partial Class Ventas
TxtPedidoContrato.Text = If(ObsPedido.ToString().Length > 0, ObsPedido.ToString().Substring(0, ObsPedido.ToString().Length - 2), "") TxtPedidoContrato.Text = If(ObsPedido.ToString().Length > 0, ObsPedido.ToString().Substring(0, ObsPedido.ToString().Length - 2), "")
TxtObsAlmacen.Text = If(ObsInv.ToString().Length > 0, ObsInv.ToString().Substring(0, ObsInv.ToString().Length - 2), "") TxtObsAlmacen.Text = If(ObsInv.ToString().Length > 0, ObsInv.ToString().Substring(0, ObsInv.ToString().Length - 2), "")
MensajePedidos2.Clear()
ObsOC.Clear()
ObsPedido.Clear()
ObsInv.Clear()
UpModalPedidos2.Update() UpModalPedidos2.Update()
UpFacturar.Update() UpFacturar.Update()
@@ -25402,6 +25428,7 @@ Partial Class Ventas
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.")
End If End If
ObjEventos.Dispose() ObjEventos.Dispose()
Msg.Clear()
Else Else
Alert("No se envió la poliza virtual", TipoMensaje.MsgAdvertencia) Alert("No se envió la poliza virtual", TipoMensaje.MsgAdvertencia)
End If End If

View File

@@ -36,7 +36,8 @@ Public Class WsTSoft
End If End If
objTsoft.Dispose() objTsoft.Dispose()
retorno = JsonConvert.SerializeObject(objRem) retorno = JsonConvert.SerializeObject(objRem)
Return retorno.ToString objRem = Nothing
Return retorno
End Function End Function
<WebMethod()> <WebMethod()>
@@ -54,7 +55,8 @@ Public Class WsTSoft
End If End If
objTsoft.Dispose() objTsoft.Dispose()
retorno = JsonConvert.SerializeObject(objRem) retorno = JsonConvert.SerializeObject(objRem)
Return retorno.ToString objRem = Nothing
Return retorno
End Function End Function
<WebMethod()> <WebMethod()>
Public Function GetUltimaPosicion(DevID As String) As String Public Function GetUltimaPosicion(DevID As String) As String
@@ -86,7 +88,8 @@ Public Class WsTSoft
End If End If
ObjGPS.Dispose() ObjGPS.Dispose()
retorno = JsonConvert.SerializeObject(ObjPos) retorno = JsonConvert.SerializeObject(ObjPos)
Return retorno.ToString ObjPos = Nothing
Return retorno
End Function End Function
<WebMethod()> <WebMethod()>
Public Function TerminoRemision(FolioRemision As String, NoEconomico As String) As String Public Function TerminoRemision(FolioRemision As String, NoEconomico As String) As String
@@ -103,7 +106,8 @@ Public Class WsTSoft
End If End If
objTsoft.Dispose() objTsoft.Dispose()
retorno = JsonConvert.SerializeObject(objRem) retorno = JsonConvert.SerializeObject(objRem)
Return retorno.ToString objRem = Nothing
Return retorno
End Function End Function
<WebMethod()> <WebMethod()>
Public Function GetRemisionHistorial(FolioRemision As String, NoEconomico As String) As String Public Function GetRemisionHistorial(FolioRemision As String, NoEconomico As String) As String
@@ -137,7 +141,8 @@ Public Class WsTSoft
End If End If
objTsoft.Dispose() objTsoft.Dispose()
retorno = JsonConvert.SerializeObject(objRem) retorno = JsonConvert.SerializeObject(objRem)
Return retorno.ToString retorno = Nothing
Return retorno
End Function End Function
<WebMethod()> <WebMethod()>
Public Function GetInfoEventos(FechaInicio As String, FechaFin As String) As String Public Function GetInfoEventos(FechaInicio As String, FechaFin As String) As String
@@ -167,7 +172,7 @@ Public Class WsTSoft
End If End If
objTsoft.Dispose() objTsoft.Dispose()
Return retorno.ToString Return retorno
End Function End Function
<WebMethod()> <WebMethod()>
Public Function TieneRemisionesActivas(NoEconomico As String) As String Public Function TieneRemisionesActivas(NoEconomico As String) As String
@@ -184,6 +189,7 @@ Public Class WsTSoft
} }
ObjTSoft.Dispose() ObjTSoft.Dispose()
retorno = JsonConvert.SerializeObject(objRem) retorno = JsonConvert.SerializeObject(objRem)
objRem = Nothing
Return retorno Return retorno
End Function End Function
@@ -203,12 +209,16 @@ Public Class WsTSoft
Using wc As New HttpClient() Using wc As New HttpClient()
Try Try
Dim Url = New Uri($"{ClsPaginas.UrlDirecciones}nominatim/reverseMultiple.php") Dim Url = New Uri(String.Format("{0}nominatim/reverseMultiple.php", ClsPaginas.UrlDirecciones))
Dim FormStuff = String.Format("formato=json&posiciones={0}", Base64array) Dim FormStuff = String.Format("formato=json&posiciones={0}", Base64array)
Dim content = New StringContent(FormStuff, Encoding.UTF8, "application/x-www-form-urlencoded") Dim content = New StringContent(FormStuff, Encoding.UTF8, "application/x-www-form-urlencoded")
Dim response = wc.PostAsync(Url, content).Result Dim response = wc.PostAsync(Url, content).Result
Dim result = response.Content.ReadAsStringAsync().Result Dim result = response.Content.ReadAsStringAsync().Result
retorno = JArray.Parse(result) retorno = JArray.Parse(result)
response.Dispose()
content = Nothing
Url = Nothing
FormStuff = Nothing
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al obtener las direcciones", ex) OnError("Ocurrió un error al obtener las direcciones", ex)
End Try End Try

View File

@@ -60,6 +60,10 @@