This commit is contained in:
AbrahamCastilloV
2023-12-21 19:11:09 -07:00
14 changed files with 214 additions and 212 deletions

View File

@@ -1146,7 +1146,7 @@ Public Class ClsBancos
Ventas.Timbre = Timbre Ventas.Timbre = Timbre
Ventas.Cliente = Cliente Ventas.Cliente = Cliente
Dim CvePACEspecial As Integer = -1 Dim CvePACEspecial As Integer = If(UsuarioActual.Empresa.CvePAC = 5, 4, -1) 'por default estará tomando con el PAC:4, si se usa el PAC 5
If UsuarioActual.CveEmpresa = 3 Then CvePACEspecial = 4 If UsuarioActual.CveEmpresa = 3 Then CvePACEspecial = 4
Ventas.TipoDocto = "Pag" Ventas.TipoDocto = "Pag"

View File

@@ -234,7 +234,7 @@ Public Class ClsMovimientos
Gpo As Integer, CveResponsable As Integer, Gpo As Integer, CveResponsable As Integer,
TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1", TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1",
Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional FechaCorte As Date = Nothing, Optional EstatusCliente As Integer = -1, Optional CveUsuarioConsulta As Integer = -1, Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional FechaCorte As Date = Nothing, Optional EstatusCliente As Integer = -1, Optional CveUsuarioConsulta As Integer = -1,
Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1, Optional AplicaAnticiposPagados As Integer = 1, Optional CveMoneda As Integer = -1, Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1, Optional CveMoneda As Integer = -1,
Optional TieneLineaAdicional As Integer = -1, Optional CveContrato As Integer = -1) As Boolean Optional TieneLineaAdicional As Integer = -1, Optional CveContrato As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -268,7 +268,6 @@ Public Class ClsMovimientos
.Add("@CveCobranzaEstatus", SqlDbType.Int).Value = CveCobranzaEstatus .Add("@CveCobranzaEstatus", SqlDbType.Int).Value = CveCobranzaEstatus
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
.Add("@AplicaAnticiposPagados", SqlDbType.Int).Value = AplicaAnticiposPagados
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@TieneLineaAdicional", SqlDbType.Int).Value = TieneLineaAdicional .Add("@TieneLineaAdicional", SqlDbType.Int).Value = TieneLineaAdicional
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato .Add("@CveContrato", SqlDbType.Int).Value = CveContrato
@@ -322,7 +321,7 @@ Public Class ClsMovimientos
CveResponsable As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1", CveResponsable As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1",
Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1, Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1,
Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional LimiteCredito As Decimal = -1, Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional LimiteCredito As Decimal = -1,
Optional TipoCliente As Integer = -1, Optional CveMoneda As Integer = -1, Optional EstatusCliente As Integer = -1, Optional AplicaAnticiposPagados As Integer = 1, Optional TipoCliente As Integer = -1, Optional CveMoneda As Integer = -1, Optional EstatusCliente As Integer = -1,
Optional TieneLineaAdicional As Integer = -1, Optional CveContrato As Integer = -1) As Boolean Optional TieneLineaAdicional As Integer = -1, Optional CveContrato As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -362,7 +361,6 @@ Public Class ClsMovimientos
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@EstatusCliente", SqlDbType.Int).Value = EstatusCliente .Add("@EstatusCliente", SqlDbType.Int).Value = EstatusCliente
.Add("@AplicaAnticiposPagados", SqlDbType.Int).Value = AplicaAnticiposPagados
.Add("@TieneLineaAdicional", SqlDbType.Int).Value = TieneLineaAdicional .Add("@TieneLineaAdicional", SqlDbType.Int).Value = TieneLineaAdicional
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato .Add("@CveContrato", SqlDbType.Int).Value = CveContrato
End With End With

View File

@@ -86,14 +86,16 @@ Public Class E119 : Implements IHttpHandler
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
Dim retorno As String = "" Dim retorno As String = ""
Dim MsgLog As New StringBuilder
MsgLog.AppendLine("Inicia Petición.")
Try Try
Dim Metodo As String = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString()) Dim Metodo As String = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString())
MsgLog.AppendLine(Metodo)
If Metodo = "BASF_POG40" Then If Metodo = "BASF_POG40" Then
context.Response.ContentType = "application/json" context.Response.ContentType = "application/json"
Dim Auth As AuthMessage = ValidarSolicitud(context) Dim Auth As AuthMessage = ValidarSolicitud(context)
If Auth.IsSucces Then If Auth.IsSuccess Then
retorno = ConsultaDatos(context) retorno = ConsultaDatos(context)
Else Else
context.Response.StatusCode = Auth.StatusCode context.Response.StatusCode = Auth.StatusCode
@@ -106,7 +108,7 @@ Public Class E119 : Implements IHttpHandler
context.Response.ContentType = "application/json" context.Response.ContentType = "application/json"
Dim Auth As AuthMessage = ValidarSolicitud(context) Dim Auth As AuthMessage = ValidarSolicitud(context)
If Auth.IsSucces Then If Auth.IsSuccess Then
retorno = ConsultaProductos(context) retorno = ConsultaProductos(context)
Else Else
context.Response.StatusCode = Auth.StatusCode context.Response.StatusCode = Auth.StatusCode
@@ -118,7 +120,7 @@ Public Class E119 : Implements IHttpHandler
context.Response.ContentType = "application/json" context.Response.ContentType = "application/json"
Dim Auth As AuthMessage = ValidarSolicitud(context) Dim Auth As AuthMessage = ValidarSolicitud(context)
If Auth.IsSucces Then If Auth.IsSuccess Then
retorno = ConsultaClasificaciones(context) retorno = ConsultaClasificaciones(context)
Else Else
context.Response.StatusCode = Auth.StatusCode context.Response.StatusCode = Auth.StatusCode
@@ -130,7 +132,7 @@ Public Class E119 : Implements IHttpHandler
context.Response.ContentType = "application/json" context.Response.ContentType = "application/json"
Dim Auth As AuthMessage = ValidarSolicitud(context) Dim Auth As AuthMessage = ValidarSolicitud(context)
If Auth.IsSucces Then If Auth.IsSuccess Then
retorno = RegistraRemision(context) retorno = RegistraRemision(context)
Else Else
context.Response.StatusCode = Auth.StatusCode context.Response.StatusCode = Auth.StatusCode
@@ -142,14 +144,17 @@ Public Class E119 : Implements IHttpHandler
Catch ex As Exception Catch ex As Exception
context.Response.ContentType = "text/html" context.Response.ContentType = "text/html"
MsgLog.AppendLine("Error de procesamiento:" & ex.Message)
Dim respuesta As New AuthMessage Dim respuesta As New AuthMessage
respuesta.ErrorMessage = New ResponseMsgError() With {.message = "La solicitud no se pudo procesar."} respuesta.ErrorMessage = New ResponseMsgError() With {.message = "La solicitud no se pudo procesar."}
respuesta.IsSucces = False respuesta.IsSuccess = False
respuesta.StatusCode = 200 respuesta.StatusCode = 200
retorno = JsonConvert.SerializeObject(respuesta.ErrorMessage) retorno = JsonConvert.SerializeObject(respuesta.ErrorMessage)
context.Response.Write(retorno) context.Response.Write(retorno)
End Try End Try
MsgLog.ToString.GuardaLogAD("LogE119")
End Sub End Sub
Private Function ValidarSolicitud(ByVal context As HttpContext) As AuthMessage Private Function ValidarSolicitud(ByVal context As HttpContext) As AuthMessage
@@ -168,7 +173,7 @@ Public Class E119 : Implements IHttpHandler
Else Else
respuesta.ErrorMessage = New ResponseMsgError() With {.message = "el usuario y/o contraseña son requeridos"} respuesta.ErrorMessage = New ResponseMsgError() With {.message = "el usuario y/o contraseña son requeridos"}
respuesta.IsSucces = False respuesta.IsSuccess = False
respuesta.StatusCode = 200 respuesta.StatusCode = 200
Return respuesta Return respuesta
@@ -176,13 +181,13 @@ Public Class E119 : Implements IHttpHandler
If unauthorized Then If unauthorized Then
respuesta.ErrorMessage = New ResponseMsgError() With {.message = "el usuario y/o contraseña no son validos"} respuesta.ErrorMessage = New ResponseMsgError() With {.message = "el usuario y/o contraseña no son validos"}
respuesta.IsSucces = False respuesta.IsSuccess = False
respuesta.StatusCode = 200 respuesta.StatusCode = 200
Return respuesta Return respuesta
Else Else
respuesta.ErrorMessage = Nothing respuesta.ErrorMessage = Nothing
respuesta.IsSucces = True respuesta.IsSuccess = True
respuesta.StatusCode = 200 respuesta.StatusCode = 200
Return respuesta Return respuesta
@@ -337,112 +342,114 @@ Public Class E119 : Implements IHttpHandler
Dim Respuesta As New ResponseMsg Dim Respuesta As New ResponseMsg
Dim RespuestaError As New ResponseMsgError Dim RespuestaError As New ResponseMsgError
Dim MsgLog As New StringBuilder Dim MsgLog As New StringBuilder
Try
MsgLog.Append("1.0 Registra") MsgLog.AppendLine("1.0 Registra")
If context.Request.InputStream IsNot Nothing Then If context.Request.InputStream IsNot Nothing Then
Using reader As New StreamReader(context.Request.InputStream) Using reader As New StreamReader(context.Request.InputStream)
Dim json As String = reader.ReadToEnd Dim json As String = reader.ReadToEnd
json = json.TrimStart("["c).TrimEnd("]"c) 'quito corchetes que están conteniendo el json, elimino al inicio y al final
If Not String.IsNullOrEmpty(json) Then If Not String.IsNullOrEmpty(json) Then
JsonRequest = JObject.Parse(json) JsonRequest = JObject.Parse(json)
If JsonRequest Is Nothing Then If JsonRequest Is Nothing Then
TieneError = True TieneError = True
End If
Else
TieneError = True
End If
End Using
End If
MsgLog.Append("1.1 accedido")
If TieneError Then
RespuestaError.message = "No se pudo procesar la solicitud - Formato mal formado"
context.Response.StatusCode = 200
Return JsonConvert.SerializeObject(RespuestaError)
End If
If Not TieneError Then
Dim Usuario As Usuario = ValidaUsuarioSistema(100, CveEmpresa)
Dim ObjFactura As Modelos.Factura = Nothing
Dim Resp As New Modelos.Factura.MMensajeFactura
If Usuario IsNot Nothing Then
MsgLog.Append("1.1 Validado")
Dim ObjClientes As New ClsClientes()
Dim ObjInventario As New ClsInventarios(ObjClientes.IniciaTransacSQL())
Dim CveSubProyecto, CveCliente, CveMoneda, CvePS As Integer
Dim Cantidad, PU, Descuento As Decimal
Dim Obs As String = ""
CveSubProyecto = 12659 ' fijo Ecommerce
CveCliente = 0
CveMoneda = 1
Descuento = 0
MsgLog.Append("1.3 billing")
Dim RFC As String = If(JsonRequest("billing") Is Nothing, "", JsonRequest("billing")("first_name").ToString())
Dim NombreCliente As String = If(JsonRequest("billing") Is Nothing, "", JsonRequest("billing")("first_name").ToString() & " " & JsonRequest("billing")("last_name").ToString())
'BUSCAR SI ESTÁ REGISTRADO EL CLIENTE
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", RFC, "-1", "-1", -1, CveEmpresa, 1, TipoCliente:=-1, TopSelect:=1) Then
If ObjClientes.DtResultados.Rows.Count > 0 Then
'Resp.TieneError = False
CveCliente = ObjClientes.CveCliente
'Resp.Mensajes.Add("El RFC ya existe en el sistema")
End If
End If
MsgLog.Append("1.4 verificar cliente")
If CveCliente = 0 Then
' 'DATOS DE BILLING
MsgLog.Append("1.5 crear cliente")
If JsonRequest("billing") IsNot Nothing Then
Dim CveEstado As Integer = -1
Dim Direccion As String = If(JsonRequest("billing")("address_1") Is Nothing, "", JsonRequest("billing")("address_1").ToString())
Dim NumExt As String = ""
Dim NumInt As String = ""
Dim Colonia As String = ""
Dim Ciudad As String = If(JsonRequest("billing")("city") Is Nothing, "", JsonRequest("billing")("city").ToString())
Dim Localidad As String = If(JsonRequest("billing")("city") Is Nothing, "", JsonRequest("billing")("city").ToString())
Dim CP As String = If(JsonRequest("billing")("postcode") Is Nothing, "", JsonRequest("billing")("postcode").ToString())
Dim Telefono As String = If(JsonRequest("billing")("phone") Is Nothing, "", JsonRequest("billing")("phone").ToString())
Dim Correo As String = If(JsonRequest("billing")("email") Is Nothing, "", JsonRequest("billing")("email").ToString())
Dim Estado As String = If(JsonRequest("billing")("state") Is Nothing, "", JsonRequest("billing")("state").ToString())
If Not String.IsNullOrEmpty(Estado) Then
CveEstado = ClsPaginas.GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{Estado.Trim}'").ToEntero()
If CveEstado <= 0 Then 'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA
CveEstado = 26
End If
Else
CveEstado = 26
End If
If ObjClientes.AgregarClienteNoFrecuente(NombreCliente, Direccion, NumExt, NumInt, Colonia, Localidad, Ciudad, CveEstado, RFC, CP, Telefono, Correo, CveSubProyecto, CveUsuario, CveEmpresa, "", -1, -1) Then
If ObjClientes.DtResultados.Rows.Count > 0 Then
CveCliente = ObjClientes.DtResultados(0)("CveCliente").ToString().ToEntero()
MsgLog.Append("1.5.5 cliente creado")
End If
End If End If
Else Else
MsgLog.Append("1.5.9 sin datos cliente")
TieneError = True TieneError = True
Resp.Mensajes.Add("no existen datos del cliente")
End If End If
End Using
End If
End If MsgLog.AppendLine("1.1 accedido")
If TieneError Then
RespuestaError.message = "No se pudo procesar la solicitud - Formato mal formado"
context.Response.StatusCode = 200
Return JsonConvert.SerializeObject(RespuestaError)
End If
Try
MsgLog.Append("1.6 inicio generar venta") If Not TieneError Then
Dim Usuario As Usuario = ValidaUsuarioSistema(100, CveEmpresa)
Dim ObjFactura As Modelos.Factura = Nothing
Dim Resp As New Modelos.Factura.MMensajeFactura
If Usuario IsNot Nothing Then
MsgLog.AppendLine("1.1 Validado")
Dim ObjClientes As New ClsClientes()
Dim ObjInventario As New ClsInventarios(ObjClientes.IniciaTransacSQL())
Dim CveSubProyecto, CveCliente, CveMoneda, CvePS As Integer
Dim Cantidad, PU, Descuento As Decimal
Dim Obs As String = ""
CveSubProyecto = 12659 ' fijo Ecommerce
CveCliente = 0
CveMoneda = 1
Descuento = 0
MsgLog.AppendLine("1.3 billing")
Dim RFC As String = If(JsonRequest("billing") Is Nothing, "", JsonRequest("billing")("first_name").ToString())
Dim NombreCliente As String = If(JsonRequest("billing") Is Nothing, "", JsonRequest("billing")("first_name").ToString() & " " & JsonRequest("billing")("last_name").ToString())
'BUSCAR SI ESTÁ REGISTRADO EL CLIENTE
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", RFC, "-1", "-1", -1, CveEmpresa, 1, TipoCliente:=-1, TopSelect:=1) Then
If ObjClientes.DtResultados.Rows.Count > 0 Then
'Resp.TieneError = False
CveCliente = ObjClientes.CveCliente
'Resp.Mensajes.Add("El RFC ya existe en el sistema")
End If
End If
MsgLog.AppendLine("1.4 verificar cliente")
If CveCliente = 0 Then
' 'DATOS DE BILLING
MsgLog.AppendLine("1.5 crear cliente")
If JsonRequest("billing") IsNot Nothing Then
Dim CveEstado As Integer = -1
Dim Direccion As String = If(JsonRequest("billing")("address_1") Is Nothing, "", JsonRequest("billing")("address_1").ToString())
Dim NumExt As String = ""
Dim NumInt As String = ""
Dim Colonia As String = ""
Dim Ciudad As String = If(JsonRequest("billing")("city") Is Nothing, "", JsonRequest("billing")("city").ToString())
Dim Localidad As String = If(JsonRequest("billing")("city") Is Nothing, "", JsonRequest("billing")("city").ToString())
Dim CP As String = If(JsonRequest("billing")("postcode") Is Nothing, "", JsonRequest("billing")("postcode").ToString())
Dim Telefono As String = If(JsonRequest("billing")("phone") Is Nothing, "", JsonRequest("billing")("phone").ToString())
Dim Correo As String = If(JsonRequest("billing")("email") Is Nothing, "", JsonRequest("billing")("email").ToString())
Dim Estado As String = If(JsonRequest("billing")("state") Is Nothing, "", JsonRequest("billing")("state").ToString())
If Not String.IsNullOrEmpty(Estado) Then
CveEstado = ClsPaginas.GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{Estado.Trim}'").ToEntero()
If CveEstado <= 0 Then 'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA
CveEstado = 26
End If
Else
CveEstado = 26
End If
If ObjClientes.AgregarClienteNoFrecuente(NombreCliente, Direccion, NumExt, NumInt, Colonia, Localidad, Ciudad, CveEstado, RFC, CP, Telefono, Correo, CveSubProyecto, CveUsuario, CveEmpresa, "", -1, -1) Then
If ObjClientes.DtResultados.Rows.Count > 0 Then
CveCliente = ObjClientes.DtResultados(0)("CveCliente").ToString().ToEntero()
MsgLog.AppendLine("1.5.5 cliente creado")
End If
End If
Else
MsgLog.AppendLine("1.5.9 sin datos cliente")
TieneError = True
Resp.Mensajes.Add("no existen datos del cliente")
End If
End If
' shiping
'shiping_lines/ method_id: free_shipping/local_pickup
MsgLog.AppendLine("1.6 inicio generar venta")
ObjFactura = Modelos.Factura.CrearVentaNueva(Usuario, CveSubProyecto, CveCliente, CveMoneda, "Rem") ObjFactura = Modelos.Factura.CrearVentaNueva(Usuario, CveSubProyecto, CveCliente, CveMoneda, "Rem")
MsgLog.AppendFormat("1.6.0 objeto creado {0}", If(ObjFactura IsNot Nothing, "si", "no")) MsgLog.AppendFormat("1.6.0 objeto creado {0}", If(ObjFactura IsNot Nothing, "si", "no"))
If JsonRequest("line_items") IsNot Nothing Then If JsonRequest("line_items") IsNot Nothing Then
Dim ListaPS As JArray = JArray.Parse(JsonRequest("line_items").ToString()) Dim ListaPS As JArray = JArray.Parse(JsonRequest("line_items").ToString())
Dim Consec As Integer = 1 Dim Consec As Integer = 1
MsgLog.Append("1.6.1 recorrer ps") MsgLog.AppendLine("1.6.1 recorrer ps")
For Each JsonPS As JObject In ListaPS For Each JsonPS As JObject In ListaPS
Cantidad = JsonPS("quantity").ToString.ToDecimal() Cantidad = JsonPS("quantity").ToString.ToDecimal()
PU = JsonPS("price").ToString.ToDecimal() PU = JsonPS("price").ToString.ToDecimal()
CvePS = ClsPaginas.GlobalDTPSSimplificado(CveEmpresa, Codigo:=JsonPS("sku").ToString()).FiltroPrimeroValor("CvePS").ToEntero() CvePS = ClsPaginas.GlobalDTPSSimplificado(CveEmpresa, Codigo:=JsonPS("sku").ToString()).FiltroPrimeroValor("CvePS").ToEntero()
ObjFactura.AgregarPS(CvePS, Cantidad, PU, Descuento, Obs, CveSubProyecto:=CveSubProyecto) ObjFactura.AgregarPS(CvePS, Cantidad, PU, Descuento, Obs, CveSubProyecto:=CveSubProyecto)
MsgLog.Append("1.6.1 agregar ps a venta") MsgLog.AppendLine("1.6.1 agregar ps a venta")
''VALIDAR QUE SEA EL MISMO PRODUCTO ''VALIDAR QUE SEA EL MISMO PRODUCTO
If CvePS <= 0 Then If CvePS <= 0 Then
TieneError = True TieneError = True
@@ -459,11 +466,11 @@ Public Class E119 : Implements IHttpHandler
End If End If
If ObjFactura IsNot Nothing AndAlso Not TieneError Then If ObjFactura IsNot Nothing AndAlso Not TieneError Then
MsgLog.Append("1.7 agregar la remision") MsgLog.AppendLine("1.7 agregar la remision")
Resp = ObjFactura.EmitirFactura(False, Transac:=ObjClientes.IniciaTransacSQL()) Resp = ObjFactura.EmitirFactura(False, Transac:=ObjClientes.IniciaTransacSQL())
If Resp.CveVenta > 0 Then If Resp.CveVenta > 0 Then
MsgLog.Append("2.0 remisión registrada") MsgLog.AppendLine("2.0 remisión registrada")
Dim data As New JArray Dim data As New JArray
Dim objSucursal As New JObject( Dim objSucursal As New JObject(
New JProperty("Cve", Resp.CveVenta), New JProperty("Cve", Resp.CveVenta),
@@ -473,7 +480,7 @@ Public Class E119 : Implements IHttpHandler
Respuesta.status = "success" Respuesta.status = "success"
Respuesta.data = data Respuesta.data = data
Else Else
MsgLog.Append("1.8 error al agregar la remision") MsgLog.AppendLine("1.8 error al agregar la remision")
TieneError = True TieneError = True
End If End If
@@ -493,32 +500,30 @@ Public Class E119 : Implements IHttpHandler
RespuestaError.message = sb.ToString() RespuestaError.message = sb.ToString()
End If End If
Catch ex As Exception If TieneError Then
TieneError = True ObjClientes.RollBack()
End Try ObjClientes.Dispose()
ObjInventario.Dispose()
Dim sb As New StringBuilder()
For Each msg As String In Resp.Mensajes
sb.AppendFormat("{0}. ", msg)
Next
RespuestaError.message = sb.ToString()
If TieneError Then MsgLog.Append("99.0 ocurrió un error en el proceso")
Else
ObjClientes.RollBack() MsgLog.Append("4.0 proceso terminado")
ObjClientes.Dispose() ObjClientes.Commit()
ObjInventario.Dispose() ObjClientes.Dispose()
Dim sb As New StringBuilder() ObjInventario.Dispose()
For Each msg As String In Resp.Mensajes End If
sb.AppendFormat("{0}. ", msg) If ObjFactura IsNot Nothing Then ObjFactura.Dispose()
Next
RespuestaError.message = sb.ToString()
MsgLog.Append("99.0 ocurrió un error en el proceso")
Else
MsgLog.Append("4.0 proceso terminado")
ObjClientes.Commit()
ObjClientes.Dispose()
ObjInventario.Dispose()
End If End If
If ObjFactura IsNot Nothing Then ObjFactura.Dispose()
End If End If
End If
Catch ex As Exception
TieneError = True
End Try
MsgLog.ToString.GuardaLogAD("LogE119") MsgLog.ToString.GuardaLogAD("LogE119")
If TieneError Then If TieneError Then
@@ -548,7 +553,7 @@ Public Class E119 : Implements IHttpHandler
End Class End Class
Private Class AuthMessage Private Class AuthMessage
Public Property IsSucces As Boolean Public Property IsSuccess As Boolean
Public Property ErrorMessage As ResponseMsgError Public Property ErrorMessage As ResponseMsgError
Public Property StatusCode As Integer Public Property StatusCode As Integer
End Class End Class

View File

@@ -1419,7 +1419,6 @@ Partial Class Bancos_ProveedoresAbonar
#Region "SALDAR CUENTAS" #Region "SALDAR CUENTAS"
Private Sub BtnSaldarCuentasSinPagar_Click(sender As Object, e As EventArgs) Handles BtnSaldarCuentasSinPagar.Click Private Sub BtnSaldarCuentasSinPagar_Click(sender As Object, e As EventArgs) Handles BtnSaldarCuentasSinPagar.Click
Dim ObjConta As New ClsContabilidad Dim ObjConta As New ClsContabilidad
ObjConta.IniciaTransacSQL() ObjConta.IniciaTransacSQL()
@@ -1431,7 +1430,6 @@ Partial Class Bancos_ProveedoresAbonar
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/ProveedoresAbonar/Saldar", 98, 0, 0, 1, TxtFechaIncobrable.Text.ToDate, "Saldado de facturas", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CvePrePoliza = ObjConta.AddPrePolizas("Bancos/ProveedoresAbonar/Saldar", 98, 0, 0, 1, TxtFechaIncobrable.Text.ToDate, "Saldado de facturas", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
For Each gr As GridViewRow In GvCxP.Rows For Each gr As GridViewRow In GvCxP.Rows
If gr.FCCheckBox("Chk").Checked Then If gr.FCCheckBox("Chk").Checked Then
Dim Saldo As Decimal = gr.FCTextBox("TxtAbonar").Text.ToDecimal 'gr.DataKey("Saldo").ToDecimal Dim Saldo As Decimal = gr.FCTextBox("TxtAbonar").Text.ToDecimal 'gr.DataKey("Saldo").ToDecimal
@@ -1440,7 +1438,6 @@ Partial Class Bancos_ProveedoresAbonar
Dim CveMoneda As Integer = gr.DataKey("CveMoneda").ToEntero Dim CveMoneda As Integer = gr.DataKey("CveMoneda").ToEntero
Dim FechaCompra As Date = gr.DataKey("Fecha").ToDate Dim FechaCompra As Date = gr.DataKey("Fecha").ToDate
Dim CveSubProyecto As Integer = gr.DataKey("CveSubProyecto").ToEntero Dim CveSubProyecto As Integer = gr.DataKey("CveSubProyecto").ToEntero
Dim UsaComplementariaProveedores As Boolean = If(UsuarioActual.CveEmpresa.Contiene(119, 158), True, False)
Dim CveConceptoContablePago As Integer = 17 Dim CveConceptoContablePago As Integer = 17
If gr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoContablePago = 308 'cuando es acreedor If gr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoContablePago = 308 'cuando es acreedor
@@ -1460,14 +1457,16 @@ Partial Class Bancos_ProveedoresAbonar
Dim ConceptoPartida As String = String.Format("Saldar compra {0}", gr.DataKey("SerieFolio").ToString) Dim ConceptoPartida As String = String.Format("Saldar compra {0}", gr.DataKey("SerieFolio").ToString)
If CveMoneda > 1 AndAlso (UsaComplementariaProveedores) Then If CveMoneda > 1 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, 0.00D, (Saldo * TCCompra - Saldo).RoundSQL, CveConceptoContableComplementaria, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteME:=Saldo, TipoCambio:=TCCompra, Contabilizable:=EsContabilizable) Then
MsgError = "No se pudo insertar la póliza"
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Saldo, Saldo, CveConceptoContablePago, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, TipoCambio:=TCCompra, ImporteME:=If(CveMoneda > 1, Saldo, 0), Contabilizable:=EsContabilizable) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Saldo, Saldo, CveConceptoContablePago, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, TipoCambio:=TCCompra, ImporteME:=If(CveMoneda > 1, Saldo, 0), Contabilizable:=EsContabilizable) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, 0.00D, (Saldo * TCCompra - Saldo).RoundSQL, CveConceptoContableComplementaria, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteME:=Saldo, TipoCambio:=TCCompra, Contabilizable:=EsContabilizable) Then
MsgError = "No se pudo insertar la póliza"
End If
Else Else
TCPago = 1
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Saldo, If(CveMoneda = 1, Saldo, Saldo * TCCompra), CveConceptoContablePago, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteME:=If(CveMoneda > 1, Saldo, 0), TipoCambio:=TCCompra, Contabilizable:=EsContabilizable) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Saldo, If(CveMoneda = 1, Saldo, Saldo * TCCompra), CveConceptoContablePago, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteME:=If(CveMoneda > 1, Saldo, 0), TipoCambio:=TCCompra, Contabilizable:=EsContabilizable) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
@@ -1497,10 +1496,12 @@ Partial Class Bancos_ProveedoresAbonar
' se manda al ot ingresos, los impuestos por acreditar ' se manda al ot ingresos, los impuestos por acreditar
If MsgError = "" Then If MsgError = "" Then
Dim tcvecon As Integer = 78 Dim tcvecon As Integer = 78
Dim tTipoMovto As Boolean = True
If Saldo < 0 Then If Saldo < 0 Then
tcvecon = 211 tcvecon = 211
tTipoMovto = False
End If End If
If MsgError = "" AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Saldo, If(CveMoneda = 1, Saldo, Saldo * TCPago), tcvecon, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, TipoCambio:=TCCompra, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto, Contabilizable:=EsContabilizable) Then If MsgError = "" AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tTipoMovto, Saldo, (Saldo * TCPago).RoundSQL, tcvecon, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, TipoCambio:=TCCompra, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto, Contabilizable:=EsContabilizable) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
End If End If
@@ -1522,7 +1523,6 @@ Partial Class Bancos_ProveedoresAbonar
End If End If
End If End If
End If End If
End If End If
Next Next

View File

@@ -73,6 +73,10 @@
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="" align="right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<asp:GridView runat="server" ID="GvDatos" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover ScrollAD" <asp:GridView runat="server" ID="GvDatos" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover ScrollAD"
DataKeyNames="CveCuentaAsignacion,CveConceptoContable,CveCuenta,IdCuenta,CveProveedor,CveCliente,CvePersonal,CveClasificacion,CveAlmacen,PorcentajeIVA,CveConceptoNomina,CveBancoCuenta,CveActivoFijo,CveSubProyecto,CveTipoGasto,CveCredito,CveColectiva" AutoGenerateColumns="False" DataKeyNames="CveCuentaAsignacion,CveConceptoContable,CveCuenta,IdCuenta,CveProveedor,CveCliente,CvePersonal,CveClasificacion,CveAlmacen,PorcentajeIVA,CveConceptoNomina,CveBancoCuenta,CveActivoFijo,CveSubProyecto,CveTipoGasto,CveCredito,CveColectiva" AutoGenerateColumns="False"
Style=" width:100%" GridLines="None"> Style=" width:100%" GridLines="None">

View File

@@ -271,6 +271,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
End If End If
ObjG.Dispose() ObjG.Dispose()
DdlColectivas.DataBind() DdlColectivas.DataBind()
DdlColectivas.Items.Insert(0, New ListItem("-", "-1"))
If OpAgregar Then If OpAgregar Then
DdlColectivas.Enabled = True DdlColectivas.Enabled = True

View File

@@ -353,9 +353,7 @@
<asp:ListItem Text="Dolares" Value="2"></asp:ListItem> <asp:ListItem Text="Dolares" Value="2"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-2">
<asp:CheckBox ID="ChkAnticipos" runat="server" Text="Incluye Anticipos" TextAlign="Left" Checked="true" Visible="false" />
</div>
</div> </div>
<div class="row"> <div class="row">

View File

@@ -108,8 +108,7 @@ Partial Class RepCxC
CargaCombos() CargaCombos()
CargaGvPersonalizarRangoColumnas() CargaGvPersonalizarRangoColumnas()
ProcesaRequest() ProcesaRequest()
CargaDatos() CargaDatos()
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146, 119) Then ChkAnticipos.Visible = True
ActivaEnviarEstadoCuenta() ActivaEnviarEstadoCuenta()
If UsuarioActual.CveRol = 1 Or UsuarioActual.TienePermisoProceso(243) Then LnkDescargarSegmentos.Visible = True If UsuarioActual.CveRol = 1 Or UsuarioActual.TienePermisoProceso(243) Then LnkDescargarSegmentos.Visible = True
End If End If
@@ -234,15 +233,15 @@ Partial Class RepCxC
CveCobranzaEstatus = DdlCobranzaEstatus.SelectedValue.ToEntero CveCobranzaEstatus = DdlCobranzaEstatus.SelectedValue.ToEntero
CveClienteClasificacion = DdlClienteClasificacion.SelectedValue.ToEntero CveClienteClasificacion = DdlClienteClasificacion.SelectedValue.ToEntero
Dim CveCliente As Integer = If(DdlClientesWS.SelectedValue.ToEntero > 0, DdlClientesWS.SelectedValue.ToEntero, -1) Dim CveCliente As Integer = If(DdlClientesWS.SelectedValue.ToEntero > 0, DdlClientesWS.SelectedValue.ToEntero, -1)
Dim AplicaAnticipos As Integer = If(ChkAnticipos.Checked, 1, 0)
If ObjMovtos.GetCxC(FechaI, FechaF, CveCliente, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, -1, If ObjMovtos.GetCxC(FechaI, FechaF, CveCliente, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, -1,
"-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico,
If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM), FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM), FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero,
CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=CveCobranzaEstatus, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=CveCobranzaEstatus, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, AplicaAnticiposPagados:=AplicaAnticipos, CveMoneda:=DdlMoneda.SelectedValue.ToEntero(), TieneLineaAdicional:=DdlTieneLineaAdicional.SelectedValue.ToEntero(), CveContrato:=DdlContrato.SelectedValue.ToEntero()) Then TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CveMoneda:=DdlMoneda.SelectedValue.ToEntero(), TieneLineaAdicional:=DdlTieneLineaAdicional.SelectedValue.ToEntero(), CveContrato:=DdlContrato.SelectedValue.ToEntero()) Then
GvDatos.DataSource = ObjMovtos.DtResultados GvDatos.DataSource = ObjMovtos.DtResultados
DtDatos = ObjMovtos.DtResultados DtDatos = ObjMovtos.DtResultados
@@ -421,55 +420,53 @@ Partial Class RepCxC
End If End If
End If End If
Dim AplicaAnticipos As Integer = If(ChkAnticipos.Checked, 1, 0)
Dim Liga1 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C1&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", Dim Liga1 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C1&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, 1, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato"))
Dim Liga2 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C2&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", Dim Liga2 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C2&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, 1, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato"))
Dim Liga3 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C3&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", Dim Liga3 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C3&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, 1, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato"))
Dim Liga4 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C4&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", Dim Liga4 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C4&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, 1, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato"))
Dim Liga5 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C5&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente{26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", Dim Liga5 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C5&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente{26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, 1, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato"))
Dim Liga6 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C6&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", Dim Liga6 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C6&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, 1, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato"))
Dim Liga7 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C7&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", Dim Liga7 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C7&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, 1, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato"))
Dim Liga8 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C8&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", Dim Liga8 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C8&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, 1, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato"))
Dim Liga9 As String = String.Format("/CxC/RepCxCDetalle.aspx.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", Dim Liga9 As String = String.Format("/CxC/RepCxCDetalle.aspx.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, 1, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato"))
Dim Liga10 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", Dim Liga10 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, 1, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato"))
Dim Liga11 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TPV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", Dim Liga11 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TPV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, 1, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato"))
Dim LigaTot As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", Dim LigaTot As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, 1, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato"))
e.Row.FCHyperLink("HplSaldo").NavigateUrl = LigaTot e.Row.FCHyperLink("HplSaldo").NavigateUrl = LigaTot
@@ -693,7 +690,7 @@ Partial Class RepCxC
For Each Dt As DataRow In DtDatos.Rows For Each Dt As DataRow In DtDatos.Rows
For Cont = 9 To NumCol + 1 Step -1 For Cont As Integer = 9 To NumCol + 1 Step -1
Dt($"Columna{Cont}") = Dt($"Columna{Cont - 1}") Dt($"Columna{Cont}") = Dt($"Columna{Cont - 1}")
Dt($"TC{Cont}") = Dt($"TC{Cont - 1}") Dt($"TC{Cont}") = Dt($"TC{Cont - 1}")
@@ -732,23 +729,23 @@ Partial Class RepCxC
TCEspecifico = -1 TCEspecifico = -1
End If End If
Dim CveCliente = If(DdlClientesWS.SelectedValue.ToEntero > 0, DdlClientesWS.SelectedValue.ToEntero, -1) Dim CveCliente As Integer = If(DdlClientesWS.SelectedValue.ToEntero > 0, DdlClientesWS.SelectedValue.ToEntero, -1)
Dim Cliente = If(DdlClientesWS.SelectedValue = "-1", "", $"&emsp;<b>Cliente:</b>&nbsp;{DdlClientesWS.SelectedText}") Dim Cliente As String = If(DdlClientesWS.SelectedValue = "-1", "", $"&emsp;<b>Cliente:</b>&nbsp;{DdlClientesWS.SelectedText}")
Dim Sucursal = If(DdlSubProyecto.SelectedValue = "-1", "", $"&emsp;<b>Sucursal:</b>&nbsp;{DdlSubProyecto.SelectedItem.Text}") Dim Sucursal As String = If(DdlSubProyecto.SelectedValue = "-1", "", $"&emsp;<b>Sucursal:</b>&nbsp;{DdlSubProyecto.SelectedItem.Text}")
Dim Grupo = $"&emsp;<b>Agrupado Por:</b>&nbsp;{DdlGrupo.SelectedItem.Text}" 'If(DdlGrupo.SelectedValue = "5", "", $"&emsp;<b>Agrupado Por:</b>&nbsp;{DdlGrupo.SelectedItem.Text}") Dim Grupo As String = $"&emsp;<b>Agrupado Por:</b>&nbsp;{DdlGrupo.SelectedItem.Text}" 'If(DdlGrupo.SelectedValue = "5", "", $"&emsp;<b>Agrupado Por:</b>&nbsp;{DdlGrupo.SelectedItem.Text}")
Dim TipoDocto = If(DdlTipoDocto.GetSelectedText = "Ingresos,Remisión,Anticipos,Egresos,Ingresos X Comp,Devolución" Or DdlTipoDocto.GetSelectedText = "", "", $"&emsp;<b>Documentos:</b>&nbsp;{DdlTipoDocto.GetSelectedText}") Dim TipoDocto As String = If(DdlTipoDocto.GetSelectedText = "Ingresos,Remisión,Anticipos,Egresos,Ingresos X Comp,Devolución" Or DdlTipoDocto.GetSelectedText = "", "", $"&emsp;<b>Documentos:</b>&nbsp;{DdlTipoDocto.GetSelectedText}")
Dim Vendedor = If(DdlVendedor.SelectedValue = "-1", "", $"&emsp;<b>Vendedor:</b>&nbsp;{DdlVendedor.SelectedItem.Text}") Dim Vendedor As String = If(DdlVendedor.SelectedValue = "-1", "", $"&emsp;<b>Vendedor:</b>&nbsp;{DdlVendedor.SelectedItem.Text}")
Dim FechaIn As String = If(txtFechaI.Text = "", "", $"&emsp;<b>Fecha Inicio Docto:</b>&nbsp;{txtFechaI.Text}") Dim FechaIn As String = If(txtFechaI.Text = "", "", $"&emsp;<b>Fecha Inicio Docto:</b>&nbsp;{txtFechaI.Text}")
Dim FechaFn As String = If(txtFechaF.Text = "", "", $"&emsp;<b>Fecha Fin Docto:</b>&nbsp;{txtFechaF.Text}") Dim FechaFn As String = If(txtFechaF.Text = "", "", $"&emsp;<b>Fecha Fin Docto:</b>&nbsp;{txtFechaF.Text}")
Dim FVI As String = If(txtFechaVI.Text = "", "", $"&emsp;<b>Fecha Venc. Inic.:</b>&nbsp;{txtFechaVI.Text}") Dim FVI As String = If(txtFechaVI.Text = "", "", $"&emsp;<b>Fecha Venc. Inic.:</b>&nbsp;{txtFechaVI.Text}")
Dim FVF As String = If(txtFechaVF.Text = "", "", $"&emsp;<b>Fecha Venc. Final:</b>&nbsp;{txtFechaVF.Text}") Dim FVF As String = If(txtFechaVF.Text = "", "", $"&emsp;<b>Fecha Venc. Final:</b>&nbsp;{txtFechaVF.Text}")
Dim Registro = If(DdlUsuario.SelectedValue = "-1", "", $"&emsp;<b>Registró:</b>&nbsp;{DdlUsuario.SelectedItem.Text}") Dim Registro As String = If(DdlUsuario.SelectedValue = "-1", "", $"&emsp;<b>Registró:</b>&nbsp;{DdlUsuario.SelectedItem.Text}")
Dim Responsable = If(DdlResponsable.SelectedValue = "-1", "", $"&emsp;<b>Responsable:</b>&nbsp;{DdlResponsable.SelectedItem.Text}") Dim Responsable As String = If(DdlResponsable.SelectedValue = "-1", "", $"&emsp;<b>Responsable:</b>&nbsp;{DdlResponsable.SelectedItem.Text}")
Dim EstatusCob = If(DdlCobranzaEstatus.SelectedValue = "-1", "", $"&emsp;<b>Estatus Cobranza:</b>&nbsp;{DdlCobranzaEstatus.SelectedItem.Text}") Dim EstatusCob As String = If(DdlCobranzaEstatus.SelectedValue = "-1", "", $"&emsp;<b>Estatus Cobranza:</b>&nbsp;{DdlCobranzaEstatus.SelectedItem.Text}")
Dim CorteA As String = If(txtCorteA.Text = "31/12/2019", "", $"&emsp;<b>Corte A:</b>&nbsp;{txtCorteA.Text}") Dim CorteA As String = If(txtCorteA.Text = "31/12/2019", "", $"&emsp;<b>Corte A:</b>&nbsp;{txtCorteA.Text}")
Dim EstatusCli = If(DdlEstatusCliente.SelectedValue = "-1", "", $"&emsp;<b>Clientes:</b>&nbsp;{DdlEstatusCliente.SelectedItem.Text}") Dim EstatusCli As String = If(DdlEstatusCliente.SelectedValue = "-1", "", $"&emsp;<b>Clientes:</b>&nbsp;{DdlEstatusCliente.SelectedItem.Text}")
Dim ClasificacionCli = If(DdlClienteClasificacion.SelectedValue = "-1", "", $"&emsp;<b>Clasificación Cliente:</b>&nbsp;{DdlClienteClasificacion.SelectedItem.Text}") Dim ClasificacionCli As String = If(DdlClienteClasificacion.SelectedValue = "-1", "", $"&emsp;<b>Clasificación Cliente:</b>&nbsp;{DdlClienteClasificacion.SelectedItem.Text}")
Dim TituloReporte As String = "REPORTE DE CUENTAS POR COBRAR DEL CLIENTE" Dim TituloReporte As String = "REPORTE DE CUENTAS POR COBRAR DEL CLIENTE"
'If UsuarioActual.CveEmpresa = 72 Then 'If UsuarioActual.CveEmpresa = 72 Then

View File

@@ -288,11 +288,8 @@
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator3" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator3" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<div class="col-md-1 truncate"> <div class="col-md-1 truncate">
Estatus Cliente: Estatus Cliente:
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlEstatusCliente" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%"> <asp:DropDownList ID="DdlEstatusCliente" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%">
@@ -301,8 +298,6 @@
<asp:ListItem Text="Activos" Value="1"></asp:ListItem> <asp:ListItem Text="Activos" Value="1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
<div class="row"> <div class="row">

View File

@@ -472,7 +472,7 @@ Partial Class RepCxCDetalle
RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM), FechaVI, FechaVF, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM), FechaVI, FechaVF,
FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=DdlCobranzaEstatusFiltro.SelectedValue.ToEntero, FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=DdlCobranzaEstatusFiltro.SelectedValue.ToEntero,
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, LimiteCredito:=LimiteCredito, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, LimiteCredito:=LimiteCredito, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero,
CveMoneda:=CveMoneda, EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticiposPagados:=If(ChkAnticipos.Checked, 1, 0), TieneLineaAdicional:=DdlTieneLineaAdicional.SelectedValue.ToEntero(), CveMoneda:=CveMoneda, EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, TieneLineaAdicional:=DdlTieneLineaAdicional.SelectedValue.ToEntero(),
CveContrato:=DdlContrato.SelectedValue.ToEntero) Then CveContrato:=DdlContrato.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjMovtos.DSResultados.Tables(0) GvDatos.DataSource = ObjMovtos.DSResultados.Tables(0)

View File

@@ -1445,7 +1445,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
LogicNominas lognom = new LogicNominas(); LogicNominas lognom = new LogicNominas();
string Msg = ""; string Msg = "";
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, CvePAC: UsuarioActual.Empresa.CvePAC); Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, CvePAC: 4);
if (Msg != null && Msg.Length > 0) if (Msg != null && Msg.Length > 0)
{ {
@@ -1718,7 +1718,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
//CURP = drow["CURP"].ToString(); //CURP = drow["CURP"].ToString();
} }
string Msg = "";// lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, (UsuarioActual.CveUsuario == 100 ? 4 : 4)); string Msg = "";// lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, (UsuarioActual.CveUsuario == 100 ? 4 : 4));
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, CvePAC: UsuarioActual.Empresa.CvePAC, versionTimbre: VersionTimbradoEnum.Version4_0); Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, CvePAC: 4, versionTimbre: VersionTimbradoEnum.Version4_0);
if (Msg != null && Msg.Length > 0)//<pre>{4}</pre><span style='display:none'>{1}</span> if (Msg != null && Msg.Length > 0)//<pre>{4}</pre><span style='display:none'>{1}</span>
{ Alert(string.Format("El empleado no se pudo timbrar, el sat nos devolvio el siguiente mensaje:<br/>{1}", Msg, msgCorregidoSat(Msg, CvePersonal, RFC, CURP)), TipoMensaje.MsgAdvertencia); } { Alert(string.Format("El empleado no se pudo timbrar, el sat nos devolvio el siguiente mensaje:<br/>{1}", Msg, msgCorregidoSat(Msg, CvePersonal, RFC, CURP)), TipoMensaje.MsgAdvertencia); }

View File

@@ -213,7 +213,7 @@
<label for="<%= ChkAplicaComercioExterior.ClientID.ToString()%>">¿Aplica Comercio Exterior?</label> <label for="<%= ChkAplicaComercioExterior.ClientID.ToString()%>">¿Aplica Comercio Exterior?</label>
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6" id="divNoVerificaAlmacen" runat="server" visible="false">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:CheckBox ID="ChkNoVerificaAlmacen" runat="server" CssClass="form-control" /> <asp:CheckBox ID="ChkNoVerificaAlmacen" runat="server" CssClass="form-control" />
<label for="<%= ChkNoVerificaAlmacen.ClientID.ToString()%>">¿No verifica almacén?</label> <label for="<%= ChkNoVerificaAlmacen.ClientID.ToString()%>">¿No verifica almacén?</label>

View File

@@ -68,8 +68,12 @@ Partial Class CatSubProyectos
If UsuarioActual.Empresa.Funcionalidad(381).Trim() <> "" Then If UsuarioActual.Empresa.Funcionalidad(381).Trim() <> "" Then
DivDeshabilitaAutorizaciones.Visible = True DivDeshabilitaAutorizaciones.Visible = True
End If
If UsuarioActual.CveEmpresa = 119 Then
divNoVerificaAlmacen.Visible = True
End If End If
CargaProyecto() CargaProyecto()
CargaSegmentosNegocio() CargaSegmentosNegocio()
@@ -244,7 +248,7 @@ Partial Class CatSubProyectos
Dim index As Integer = Convert.ToInt32(e.CommandArgument) Dim index As Integer = Convert.ToInt32(e.CommandArgument)
Dim row As GridViewRow = GvDatos.Rows(index) Dim row As GridViewRow = GvDatos.Rows(index)
Dim SubProyecto = GvDatos.Rows(index).DataKey("SubProyecto").ToString Dim SubProyecto As String = GvDatos.Rows(index).DataKey("SubProyecto").ToString
Dim CveSegmento As Integer = ObjContpaQ.AddSegmentosNegocio(SubProyecto) Dim CveSegmento As Integer = ObjContpaQ.AddSegmentosNegocio(SubProyecto)
Dim CveSubProyecto As Integer = GvDatos.DataKeys(index).Value.ToString.ToEntero Dim CveSubProyecto As Integer = GvDatos.DataKeys(index).Value.ToString.ToEntero
Dim ErrorSubProyecto As Boolean = False Dim ErrorSubProyecto As Boolean = False
@@ -535,7 +539,7 @@ Partial Class CatSubProyectos
Dim DTExcel As New Data.DataTable Dim DTExcel As New Data.DataTable
Dim conn As Odbc.OdbcConnection = Nothing Dim conn As Odbc.OdbcConnection = Nothing
Dim ErrorExcel = False Dim ErrorExcel As Boolean = False
Try Try
conn = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" & FilePath & ";") conn = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" & FilePath & ";")

View File

@@ -621,7 +621,7 @@ Partial Class Sistemas_UsuarioDetalle
If CveUsuario < 0 Then Exit Sub If CveUsuario < 0 Then Exit Sub
If DtAsignacionesMultiEmpresa IsNot Nothing AndAlso DtAsignacionesMultiEmpresa.FiltraParametros(String.Format("CveEmpresa = {0}", DdlEmpresaAsignaciones.SelectedValue.ToEntero)).Rows.Count > 0 Then If DtAsignacionesMultiEmpresa IsNot Nothing AndAlso DtAsignacionesMultiEmpresa.FiltraParametros(String.Format("CveEmpresa = {0}", DdlEmpresaAsignaciones.SelectedValue.ToEntero)).Rows.Count > 0 Then
Dim dr = DtAsignacionesMultiEmpresa.Select(String.Format("CveEmpresa = {0}", DdlEmpresaAsignaciones.SelectedValue.ToEntero)) Dim dr As DataRow() = DtAsignacionesMultiEmpresa.Select(String.Format("CveEmpresa = {0}", DdlEmpresaAsignaciones.SelectedValue.ToEntero))
ViewState("CveSubProyecto") = dr(0)("CveSucursal") ViewState("CveSubProyecto") = dr(0)("CveSucursal")
ViewState("CveAlmacenAsignado") = dr(0)("CveAlmacen") ViewState("CveAlmacenAsignado") = dr(0)("CveAlmacen")
ViewState("CveVendedorAsignado") = dr(0)("CveVendedor") ViewState("CveVendedorAsignado") = dr(0)("CveVendedor")
@@ -650,7 +650,7 @@ Partial Class Sistemas_UsuarioDetalle
DdlRol.Items.Clear() DdlRol.Items.Clear()
If UsuarioActual.CveRol <> 1 Then If UsuarioActual.CveRol <> 1 Then
Dim CveEmpresaselected = DdlEmpresa.SelectedValue.ToEntero Dim CveEmpresaselected As Integer = DdlEmpresa.SelectedValue.ToEntero
If CveEmpresaselected > 0 Then If CveEmpresaselected > 0 Then
If UsuarioControlado Then If UsuarioControlado Then
DdlRol.DataSource = DTRolesControlado.FiltraParametros($"CveRol NOT IN (1) AND CveEmpresa = {CveEmpresaselected}") DdlRol.DataSource = DTRolesControlado.FiltraParametros($"CveRol NOT IN (1) AND CveEmpresa = {CveEmpresaselected}")
@@ -683,7 +683,7 @@ Partial Class Sistemas_UsuarioDetalle
End Sub End Sub
Public Sub CargarEmpresa() Public Sub CargarEmpresa()
Dim ClsUsuarios As New ClsSisUsuarios Dim ClsUsuarios As New ClsSisUsuarios
Dim Tipo = If(UsuarioActual.CveRol = 1, -1, UsuarioActual.CveUsuario) Dim Tipo As Integer = If(UsuarioActual.CveRol = 1, -1, UsuarioActual.CveUsuario)
If ClsUsuarios.GetEmpresasAcceso(Tipo, CveUsuario) Then If ClsUsuarios.GetEmpresasAcceso(Tipo, CveUsuario) Then
DtEmpresasUsuario = ClsUsuarios.DtResultados DtEmpresasUsuario = ClsUsuarios.DtResultados
DtEmpresasUsuario.Columns.Add("Accion", GetType(Integer)) DtEmpresasUsuario.Columns.Add("Accion", GetType(Integer))
@@ -830,7 +830,7 @@ Partial Class Sistemas_UsuarioDetalle
'Cargo la ultima empresa consultada en asignaciones 'Cargo la ultima empresa consultada en asignaciones
Dim DtValida As DataTable = DtAsignacionesMultiEmpresa.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresaAnterior)) Dim DtValida As DataTable = DtAsignacionesMultiEmpresa.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresaAnterior))
If DtValida.Rows.Count > 0 Then If DtValida.Rows.Count > 0 Then
Dim dr As DataRow = DtAsignacionesMultiEmpresa.Select(String.Format("CveEmpresa = {0}", CveEmpresaAnterior)) Dim dr As DataRow() = DtAsignacionesMultiEmpresa.Select(String.Format("CveEmpresa = {0}", CveEmpresaAnterior))
dr(0)("CveEmpresa") = CveEmpresaAnterior dr(0)("CveEmpresa") = CveEmpresaAnterior
dr(0)("CvePersonal") = DdlPersonal.SelectedValue.ToEntero dr(0)("CvePersonal") = DdlPersonal.SelectedValue.ToEntero
dr(0)("CveVendedor") = DdlVendedor.SelectedValue.ToEntero dr(0)("CveVendedor") = DdlVendedor.SelectedValue.ToEntero
@@ -1490,7 +1490,7 @@ Partial Class Sistemas_UsuarioDetalle
Dim DtValida As DataTable = DtAsignacionesMultiEmpresa.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresaAnterior)) Dim DtValida As DataTable = DtAsignacionesMultiEmpresa.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresaAnterior))
If DtValida.Rows.Count > 0 Then If DtValida.Rows.Count > 0 Then
Dim dr As DataRow = DtAsignacionesMultiEmpresa.Select(String.Format("CveEmpresa = {0}", CveEmpresaAnterior)) Dim dr As DataRow() = DtAsignacionesMultiEmpresa.Select(String.Format("CveEmpresa = {0}", CveEmpresaAnterior))
dr(0)("CveEmpresa") = CveEmpresaAnterior dr(0)("CveEmpresa") = CveEmpresaAnterior
dr(0)("CvePersonal") = DdlPersonal.SelectedValue.ToEntero dr(0)("CvePersonal") = DdlPersonal.SelectedValue.ToEntero
dr(0)("CveVendedor") = DdlVendedor.SelectedValue.ToEntero dr(0)("CveVendedor") = DdlVendedor.SelectedValue.ToEntero
@@ -1556,7 +1556,7 @@ Partial Class Sistemas_UsuarioDetalle
If UsuarioControlado Then If UsuarioControlado Then
DdlProyecto.DataSource = GetProyectosSinGV(DtSubProyectosControlado.FiltraParametros($"CveEmpresa = {DdlEmpresaAsignaciones.SelectedValue}")) DdlProyecto.DataSource = GetProyectosSinGV(DtSubProyectosControlado.FiltraParametros($"CveEmpresa = {DdlEmpresaAsignaciones.SelectedValue}"))
Else Else
DdlProyecto.DataSource = GetProyectosSinGV(GlobalDTSubProyectos(-1, -1, DdlEmpresaAsignaciones.SelectedValue.ToEntero)) DdlProyecto.DataSource = GetProyectosSinGV(GlobalDTSubProyectos(-1, -1, DdlEmpresaAsignaciones.SelectedValue.ToEntero).FiltraParametros("", DistinctColumns:={"CveProyecto", "Proyecto"}))
End If End If
End If End If
DdlProyecto.DataBind() DdlProyecto.DataBind()
@@ -1686,18 +1686,18 @@ Partial Class Sistemas_UsuarioDetalle
Dim DtValida As DataTable = DtSubProyectos.FiltraParametros(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue)) Dim DtValida As DataTable = DtSubProyectos.FiltraParametros(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue))
If DtValida.Rows.Count > 0 Then If DtValida.Rows.Count > 0 Then
If DtValida.Rows(0)("Accion").ToString = "2" Then If DtValida.Rows(0)("Accion").ToString = "2" Then
Dim dr As DataRow = DtSubProyectos.Select(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue)) Dim dr As DataRow() = DtSubProyectos.Select(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue))
dr(0)("Accion") = 0 dr(0)("Accion") = 0
dr(0).AcceptChanges() dr(0).AcceptChanges()
ElseIf DtValida.Rows(0)("Accion").ToString = "3" Then ElseIf DtValida.Rows(0)("Accion").ToString = "3" Then
Dim dr = DtSubProyectos.Select(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue)) Dim dr As DataRow() = DtSubProyectos.Select(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue))
dr(0)("Accion") = 1 dr(0)("Accion") = 1
dr(0).AcceptChanges() dr(0).AcceptChanges()
Else Else
Alert("El SubProyecto ya se encuentra agregado.", TipoMensaje.MsgAdvertencia) Alert("El SubProyecto ya se encuentra agregado.", TipoMensaje.MsgAdvertencia)
End If End If
Else Else
Dim dr = DtSubProyectos.NewRow Dim dr As DataRow = DtSubProyectos.NewRow
dr("CveProyecto") = If(DdlEmpresaAsignaciones.SelectedValue.ToEntero = 66, "-1", DdlProyecto.SelectedValue) dr("CveProyecto") = If(DdlEmpresaAsignaciones.SelectedValue.ToEntero = 66, "-1", DdlProyecto.SelectedValue)
dr("Proyecto") = If(DdlEmpresaAsignaciones.SelectedValue.ToEntero = 66, "-1", DdlProyecto.SelectedItem.Text) dr("Proyecto") = If(DdlEmpresaAsignaciones.SelectedValue.ToEntero = 66, "-1", DdlProyecto.SelectedItem.Text)
@@ -2665,7 +2665,7 @@ Partial Class Sistemas_UsuarioDetalle
End If End If
'VALIDA LOS ESTATUS QUE TIENE EL USUARIO 'VALIDA LOS ESTATUS QUE TIENE EL USUARIO
If DTEstatusOCAsignar IsNot Nothing AndAlso DTEstatusOCAsignar.Rows.Count > 0 Then If DTEstatusOCAsignar IsNot Nothing AndAlso DTEstatusOCAsignar.Rows.Count > 0 Then
Dim dtReq = DTEstatusOCAsignar.FiltraParametros("Tipo='Req'") Dim dtReq As DataTable = DTEstatusOCAsignar.FiltraParametros("Tipo='Req'")
Dim DtValida As DataTable = dtReq.FiltraParametros($"CveEstatus={CveEstatus}") Dim DtValida As DataTable = dtReq.FiltraParametros($"CveEstatus={CveEstatus}")
Dim Habilitado As Boolean = (DtValida IsNot Nothing AndAlso DtValida.Rows.Count = 1) Dim Habilitado As Boolean = (DtValida IsNot Nothing AndAlso DtValida.Rows.Count = 1)
chkEstatus.Enabled = Habilitado chkEstatus.Enabled = Habilitado
@@ -2805,7 +2805,7 @@ Partial Class Sistemas_UsuarioDetalle
'VALIDA LOS ESTATUS QUE TIENE EL USUARIO 'VALIDA LOS ESTATUS QUE TIENE EL USUARIO
If DTEstatusOCAsignar IsNot Nothing AndAlso DTEstatusOCAsignar.Rows.Count > 0 Then If DTEstatusOCAsignar IsNot Nothing AndAlso DTEstatusOCAsignar.Rows.Count > 0 Then
Dim dtOC = DTEstatusOCAsignar.FiltraParametros("Tipo='OC'") Dim dtOC As DataTable = DTEstatusOCAsignar.FiltraParametros("Tipo='OC'")
Dim DtValida As DataTable = dtOC.FiltraParametros($"CveEstatus={CveEstatus}") Dim DtValida As DataTable = dtOC.FiltraParametros($"CveEstatus={CveEstatus}")
Dim Habilitado As Boolean = (DtValida IsNot Nothing AndAlso DtValida.Rows.Count = 1) Dim Habilitado As Boolean = (DtValida IsNot Nothing AndAlso DtValida.Rows.Count = 1)
chkEstatus.Enabled = Habilitado chkEstatus.Enabled = Habilitado
@@ -2956,7 +2956,7 @@ Partial Class Sistemas_UsuarioDetalle
Dim CveSubProyecto As Integer = Row.DataKey("CveSubProyecto").ToEntero Dim CveSubProyecto As Integer = Row.DataKey("CveSubProyecto").ToEntero
Dim CveProyecto As Integer = Row.DataKey("CveProyecto").ToEntero Dim CveProyecto As Integer = Row.DataKey("CveProyecto").ToEntero
Dim r As Integer = 1 Dim r As Integer = 1
For i = 0 To Row.Cells.Count - 1 For i As Integer = 0 To Row.Cells.Count - 1
Dim CveEstatus As Integer = If(IsNumeric(GvOS.Columns(i).FooterText), GvOS.Columns(i).FooterText.ToEntero, 0) Dim CveEstatus As Integer = If(IsNumeric(GvOS.Columns(i).FooterText), GvOS.Columns(i).FooterText.ToEntero, 0)
If CveEstatus > 0 Then If CveEstatus > 0 Then
If Row.FCCheckBox("chkEstatus" + r.ToString).Checked = False And Row.FCHiddenField("hdnCveEstatusUsuarios" + r.ToString).Value.ToEntero > 0 Then If Row.FCCheckBox("chkEstatus" + r.ToString).Checked = False And Row.FCHiddenField("hdnCveEstatusUsuarios" + r.ToString).Value.ToEntero > 0 Then
@@ -3334,9 +3334,9 @@ Partial Class Sistemas_UsuarioDetalle
ObjUsuario.Dispose() ObjUsuario.Dispose()
End Sub End Sub
Protected Sub ChkPermitirEmpresa_CheckedChanged(sender As Object, e As EventArgs) Protected Sub ChkPermitirEmpresa_CheckedChanged(sender As Object, e As EventArgs)
Dim check = CType(sender, CheckBox) Dim check As CheckBox = CType(sender, CheckBox)
Dim pCveEmpresa = CType(check.NamingContainer, GridViewRow).FCHiddenField("HdnCveEmpresa").Value Dim pCveEmpresa As String = CType(check.NamingContainer, GridViewRow).FCHiddenField("HdnCveEmpresa").Value
Dim pEmpresa = CType(check.NamingContainer, GridViewRow).FCHiddenField("HdnEmpresa").Value Dim pEmpresa As String = CType(check.NamingContainer, GridViewRow).FCHiddenField("HdnEmpresa").Value
If check.Checked Then If check.Checked Then
If DtEmpresasUsuario.FiltraParametros(String.Format("CveEmpresa = {0}", pCveEmpresa)).Rows.Count > 0 Then If DtEmpresasUsuario.FiltraParametros(String.Format("CveEmpresa = {0}", pCveEmpresa)).Rows.Count > 0 Then
@@ -3570,7 +3570,7 @@ Partial Class Sistemas_UsuarioDetalle
Row("IP") = TxtIP.Text.Trim Row("IP") = TxtIP.Text.Trim
Row("MAC") = TxtMAC.Text.Trim Row("MAC") = TxtMAC.Text.Trim
Dim HI1 = "", HF1 = "", HI2 = "", HF2 = "", HI3 = "", HF3 = "", HI4 = "", HF4 = "", HI5 = "", HF5 = "", HI6 = "", HF6 = "", HI7 = "", HF7 = "" Dim HI1 As String = "", HF1 As String = "", HI2 As String = "", HF2 As String = "", HI3 As String = "", HF3 As String = "", HI4 As String = "", HF4 As String = "", HI5 As String = "", HF5 As String = "", HI6 As String = "", HF6 As String = "", HI7 As String = "", HF7 As String = ""
If ChkAplicaRestriccion.Checked Then If ChkAplicaRestriccion.Checked Then
Row("AplicaRestriccion") = 1 Row("AplicaRestriccion") = 1
@@ -3798,7 +3798,7 @@ Partial Class Sistemas_UsuarioDetalle
Dim ObjUsuarios As New ClsSisUsuarios Dim ObjUsuarios As New ClsSisUsuarios
If ObjUsuarios.ClonarUsuarioCriterios(DdlUsuarioClonar.SelectedValue.ToEntero) Then If ObjUsuarios.ClonarUsuarioCriterios(DdlUsuarioClonar.SelectedValue.ToEntero) Then
Dim Dr = FiltroPrimero(ObjUsuarios.DtResultados, "") Dim Dr As DataRow = FiltroPrimero(ObjUsuarios.DtResultados, "")
If Dr("UsuarioEmpresas").ToString.ToEntero > 0 Then DivClonarEmpresas.Visible = True If Dr("UsuarioEmpresas").ToString.ToEntero > 0 Then DivClonarEmpresas.Visible = True
If Dr("UsuariosModulos").ToString.ToEntero > 0 Then DivClonarModulos.Visible = True If Dr("UsuariosModulos").ToString.ToEntero > 0 Then DivClonarModulos.Visible = True
@@ -3831,7 +3831,7 @@ Partial Class Sistemas_UsuarioDetalle
End Sub End Sub
Private Function ClonarUsuario(CveUsuarioClonado As Integer, ObjUsuarios As ClsSisUsuarios) As Boolean Private Function ClonarUsuario(CveUsuarioClonado As Integer, ObjUsuarios As ClsSisUsuarios) As Boolean
Dim Retorno = False Dim Retorno As Boolean = False
If CveUsuarioClonado > 0 Then If CveUsuarioClonado > 0 Then
If ObjUsuarios.ClonarUsuario(CveUsuario, CveUsuarioClonado, ChkEmpresas.Checked, ChkModulos.Checked, ChkPermisos.Checked, ChkProyectos.Checked, ChkAlmacenes.Checked, ChkEstatusOC.Checked, ChkEstatusOS.Checked, UsuarioActual.CveUsuario) Then If ObjUsuarios.ClonarUsuario(CveUsuario, CveUsuarioClonado, ChkEmpresas.Checked, ChkModulos.Checked, ChkPermisos.Checked, ChkProyectos.Checked, ChkAlmacenes.Checked, ChkEstatusOC.Checked, ChkEstatusOS.Checked, UsuarioActual.CveUsuario) Then
@@ -3930,11 +3930,11 @@ Partial Class Sistemas_UsuarioDetalle
End Sub End Sub
Protected Sub ChkPermitirEmpresaAsignar_CheckedChanged(sender As Object, e As EventArgs) Protected Sub ChkPermitirEmpresaAsignar_CheckedChanged(sender As Object, e As EventArgs)
Dim check = CType(sender, CheckBox) Dim check As CheckBox = CType(sender, CheckBox)
Dim pCveEmpresa = CType(check.NamingContainer, GridViewRow).FCHiddenField("HdnCveEmpresa").Value Dim pCveEmpresa As String = CType(check.NamingContainer, GridViewRow).FCHiddenField("HdnCveEmpresa").Value
Dim pEmpresa = CType(check.NamingContainer, GridViewRow).FCHiddenField("HdnEmpresa").Value Dim pEmpresa As String = CType(check.NamingContainer, GridViewRow).FCHiddenField("HdnEmpresa").Value
Dim Dr = DTEmpresasAsignar.Select($"CveEmpresa = {pCveEmpresa}") Dim Dr As DataRow() = DTEmpresasAsignar.Select($"CveEmpresa = {pCveEmpresa}")
If check.Checked Then If check.Checked Then
Dr(0)("TienePermiso") = 2 Dr(0)("TienePermiso") = 2
Else Else
@@ -3992,7 +3992,7 @@ Partial Class Sistemas_UsuarioDetalle
If DdlRolAsignar.SelectedValue = "-2" Then If DdlRolAsignar.SelectedValue = "-2" Then
DTRolesAsignar.Rows.Clear() DTRolesAsignar.Rows.Clear()
For Each Item As ListItem In DdlRolAsignar.Items For Each Item As ListItem In DdlRolAsignar.Items
Dim dr = DTRolesAsignar.NewRow Dim dr As DataRow = DTRolesAsignar.NewRow
If Item.Value <> "-1" AndAlso Item.Value <> "-2" Then If Item.Value <> "-1" AndAlso Item.Value <> "-2" Then
dr("CveRol") = Item.Value dr("CveRol") = Item.Value
dr("Rol") = Item.Text dr("Rol") = Item.Text
@@ -4004,18 +4004,18 @@ Partial Class Sistemas_UsuarioDetalle
Else Else
If DtValida.Rows.Count > 0 Then If DtValida.Rows.Count > 0 Then
If DtValida.Rows(0)("Accion").ToString = "2" Then If DtValida.Rows(0)("Accion").ToString = "2" Then
Dim dr = DTRolesAsignar.Select(String.Format("CveRol = {0}", DdlRolAsignar.SelectedValue)) Dim dr As DataRow() = DTRolesAsignar.Select(String.Format("CveRol = {0}", DdlRolAsignar.SelectedValue))
dr(0)("Accion") = 0 dr(0)("Accion") = 0
dr(0).AcceptChanges() dr(0).AcceptChanges()
ElseIf DtValida.Rows(0)("Accion").ToString = "3" Then ElseIf DtValida.Rows(0)("Accion").ToString = "3" Then
Dim dr = DTRolesAsignar.Select(String.Format("CveRol = {0}", DdlRolAsignar.SelectedValue)) Dim dr As DataRow() = DTRolesAsignar.Select(String.Format("CveRol = {0}", DdlRolAsignar.SelectedValue))
dr(0)("Accion") = 1 dr(0)("Accion") = 1
dr(0).AcceptChanges() dr(0).AcceptChanges()
Else Else
Alert("El Roles ya se encuentra agregado.", TipoMensaje.MsgAdvertencia) Alert("El Roles ya se encuentra agregado.", TipoMensaje.MsgAdvertencia)
End If End If
Else Else
Dim dr = DTRolesAsignar.NewRow Dim dr As DataRow = DTRolesAsignar.NewRow
dr("CveRol") = DdlRolAsignar.SelectedValue dr("CveRol") = DdlRolAsignar.SelectedValue
dr("Rol") = DdlRolAsignar.SelectedItem.Text dr("Rol") = DdlRolAsignar.SelectedItem.Text
@@ -4032,7 +4032,7 @@ Partial Class Sistemas_UsuarioDetalle
Protected Sub GvRolesAsignar_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvRolesAsignar.RowDeleting Protected Sub GvRolesAsignar_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvRolesAsignar.RowDeleting
Dim Dr = DTRolesAsignar.Select(String.Format("CveRol = {0}", GvRolesAsignar.Rows(e.RowIndex).DataKey("CveRol"))) Dim Dr As DataRow() = DTRolesAsignar.Select(String.Format("CveRol = {0}", GvRolesAsignar.Rows(e.RowIndex).DataKey("CveRol")))
If Dr(0)("Accion").ToString = "1" Then If Dr(0)("Accion").ToString = "1" Then
Dr(0)("Accion") = 3 Dr(0)("Accion") = 3
@@ -4125,7 +4125,7 @@ Partial Class Sistemas_UsuarioDetalle
Protected Sub GvAlmacenesAsignar_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GVAlmacenesAsignar.RowDeleting Protected Sub GvAlmacenesAsignar_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GVAlmacenesAsignar.RowDeleting
Dim Dr = DtAlmacenesAsignar.Select(String.Format("CveAlmacen = {0}", GVAlmacenesAsignar.Rows(e.RowIndex).DataKey("CveAlmacen"))) Dim Dr As DataRow() = DtAlmacenesAsignar.Select(String.Format("CveAlmacen = {0}", GVAlmacenesAsignar.Rows(e.RowIndex).DataKey("CveAlmacen")))
If Dr(0)("Accion").ToString = "1" Then If Dr(0)("Accion").ToString = "1" Then
Dr(0)("Accion") = 3 Dr(0)("Accion") = 3