From 4c38be8e04be41f17aea2b75ee61f4fd97359d32 Mon Sep 17 00:00:00 2001 From: AbrahamCastilloV Date: Sat, 16 Dec 2023 13:26:39 -0700 Subject: [PATCH 01/64] =?UTF-8?q?--=20Se=20pas=C3=B3=20fecha=20inicial=20a?= =?UTF-8?q?bajo,=20se=20cambi=C3=B3=20CveRuta=20por=20Ruta=20descriptiva,?= =?UTF-8?q?=20se=20cambio=20"activo"=20por=20s=C3=AD=20en=20la=20columna?= =?UTF-8?q?=20de=20viajes=20masivos,=20se=20quit=C3=B3=20generar=20viajes?= =?UTF-8?q?=20masivos=20cuando=20es=20update,=20se=20implement=C3=B3=20bus?= =?UTF-8?q?cadores=20en=20Listado=20de=20viajes=20y=20contratos=20y=20se?= =?UTF-8?q?=20us=C3=B3=20funci=C3=B3n=20cargarDatos()=20en=20vez=20de=20re?= =?UTF-8?q?frescar=20la=20p=C3=A1gina?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/{ClsViajes.vb => ClsTransportes.vb} | 4 +- Transportes/ListadoContratos.aspx | 20 ++-- Transportes/ListadoContratos.aspx.vb | 72 +++++------- Transportes/ListadoViajes.aspx | 47 +++++--- Transportes/ListadoViajes.aspx.vb | 109 +++++++++---------- 5 files changed, 126 insertions(+), 126 deletions(-) rename App_Code/{ClsViajes.vb => ClsTransportes.vb} (98%) diff --git a/App_Code/ClsViajes.vb b/App_Code/ClsTransportes.vb similarity index 98% rename from App_Code/ClsViajes.vb rename to App_Code/ClsTransportes.vb index 3e11be332..1bbf82b53 100644 --- a/App_Code/ClsViajes.vb +++ b/App_Code/ClsTransportes.vb @@ -3,7 +3,7 @@ Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Public Class ClsViajes +Public Class ClsTransportes Implements IDisposable #Region "Campos" @@ -194,7 +194,7 @@ Public Class ClsViajes Return Retorno End Function - Public Function RemoveViaje(CveViaje As Integer, Optional CveMasivo As Integer = 0) As Boolean + Public Function RemoveViaje(Optional CveViaje As Integer = -1, Optional CveMasivo As Integer = -1) As Boolean Dim Retorno As Boolean = False diff --git a/Transportes/ListadoContratos.aspx b/Transportes/ListadoContratos.aspx index f8b159f6a..aa844b029 100644 --- a/Transportes/ListadoContratos.aspx +++ b/Transportes/ListadoContratos.aspx @@ -34,6 +34,9 @@ +
  • + Agregar Contrato +
  • Contratos @@ -42,22 +45,25 @@ Viajes
  • +
    +
    + " + style="display: inline-block; margin-right: -20px; width: 150px;" /> + " + style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> + +
    -
    - -
    - + data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF "> @@ -264,7 +270,7 @@ - +
    diff --git a/Transportes/ListadoContratos.aspx.vb b/Transportes/ListadoContratos.aspx.vb index ddec16a91..49595fc44 100644 --- a/Transportes/ListadoContratos.aspx.vb +++ b/Transportes/ListadoContratos.aspx.vb @@ -1,6 +1,6 @@ Option Explicit On Option Strict On -Imports Extensiones +Imports Extensiones.ModExtensiones Partial Class ListadoContratos Inherits ClsPaginas @@ -19,11 +19,11 @@ Partial Class ListadoContratos If ObjAF.GetActivosFijos(-1, 13, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, 1, "-1", -1, -1, -1) Then If ObjAF.DtResultados.Rows.Count > 0 Then DdlTransporte.DataSource = ObjAF.DtResultados - DdlTransporte.Items.Insert(0, New ListItem("Seleccione", "0")) + DdlTransporte.Items.Insert(0, New ListItem("Seleccione", "")) End If End If - ObjAF.Dispose() DdlTransporte.DataBind() + ObjAF.Dispose() End Sub Private Sub CargaDatos() @@ -35,7 +35,7 @@ Partial Class ListadoContratos GvContratos.DataBind() End Sub - Protected Sub MostrarModal(sender As Object, e As System.EventArgs) + Protected Sub MostrarModal() TxtDescripcion.Text = "" TxtFechaSalida.Text = "" TxtFechaRegreso.Text = "" @@ -45,7 +45,9 @@ Partial Class ListadoContratos BtnGuardar.Text = "Guardar" RegistraScript(String.Format("$('#{0}').modal('show');", "ModalAgregar")) End Sub - + Private Sub LBAgregarContrato_Click(sender As Object, e As EventArgs) Handles LBAgregarContrato.Click + MostrarModal() + End Sub Protected Sub AddContrato(sender As Object, e As EventArgs) If DdlClientes.SelectedValue = "" Then @@ -57,51 +59,29 @@ Partial Class ListadoContratos ObjContratos.IniciaTransacSQL() Try - If BtnGuardar.Text = "Guardar" Then - Dim CveEstatusInicial As Integer = 10 - Dim CveContratoHijo As Integer = -1 - Dim CveContratoTipo As Integer = 2 + Dim CveEstatusInicial As Integer = 10 + Dim CveContratoHijo As Integer = -1 + Dim CveContratoTipo As Integer = 2 - If ObjContratos.GetContratosEstatus(UsuarioActual.CveEmpresa) Then - CveEstatusInicial = ObjContratos.DtResultados.FiltroPrimeroValor("CveContratoEstatus", "TipoEstatus=1").ToEntero - End If + If ObjContratos.GetContratosEstatus(UsuarioActual.CveEmpresa) Then + CveEstatusInicial = ObjContratos.DtResultados.FiltroPrimeroValor("CveContratoEstatus", "TipoEstatus=1").ToEntero + End If - CveContratoHijo = ObjContratos.AddContratos("", TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero) + CveContratoHijo = ObjContratos.AddContratos("", TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero) - If CveContratoHijo > 0 Then - ObjContratos.Commit() - Alert("Agregado Correctamente.") - TxtDescripcion.Text = "" - TxtFechaSalida.Text = "" - TxtFechaRegreso.Text = "" - TxtObservaciones.Text = "" - TxtUbicacion.Text = "" - DdlClientes.SelectedValue = "" - DdlTransporte.SelectedValue = "" + If CveContratoHijo > 0 Then + ObjContratos.Commit() + Alert("Agregado Correctamente.") + TxtDescripcion.Text = "" + TxtFechaSalida.Text = "" + TxtFechaRegreso.Text = "" + TxtObservaciones.Text = "" + TxtUbicacion.Text = "" + DdlClientes.SelectedValue = "" + DdlTransporte.SelectedValue = "" - End If - Else - Dim id As Integer = Convert.ToInt32(Request.QueryString("CveContrato")) - - Dim ContratoEditado As New ClsContratos - ContratoEditado.GetContratos(id, UsuarioActual.CveEmpresa) - - Dim CveEstatusInicial As Integer = 10 - Dim Editar As Boolean = False - Dim CveContratoTipo As Integer = 2 - - If ContratoEditado.GetContratosEstatus(UsuarioActual.CveEmpresa) Then - CveEstatusInicial = ContratoEditado.DtResultados.FiltroPrimeroValor("CveContratoEstatus", "TipoEstatus=1").ToEntero - End If - - Editar = ContratoEditado.UpdateContratos(ContratoEditado.CveContrato, id.ToString, TxtDescripcion.Text, ContratoEditado.NumeroLicitacion, ContratoEditado.CveProveedor, ContratoEditado.CveCliente, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", ContratoEditado.CveSubProyecto, ContratoEditado.PorIVA, ContratoEditado.PorAnticipo, ContratoEditado.PorAmortizacionAnticipo, ContratoEditado.PorGarantia, "", "", ContratoEditado.CveContratoPadre, ContratoEditado.CveUsuario, ContratoEditado.CveEmpresa, False, -1, -1, -1, ContratoEditado.CveMoneda, ContratoEditado.ModalidadDetalle, CveContratoTipo:=ContratoEditado.CveContratoTipo, CveContratosEstatus:=ContratoEditado.CveContratosEstatus) - - If Editar = True Then - ContratoEditado.Commit() - Alert("El contrato se modificó correctamente.") - End If End If Catch ex As Exception @@ -116,9 +96,9 @@ Partial Class ListadoContratos End Sub Protected Sub UpdateContrato(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Page.Response.Write("") Dim fechaInicial As DateTime Dim fechaFinal As DateTime @@ -126,7 +106,7 @@ Partial Class ListadoContratos TxtDescripcion.Text = GvRow.DataKey("DescripcionContrato") TxtObservaciones.Text = GvRow.DataKey("DescripcionContrato") TxtUbicacion.Text = GvRow.DataKey("Ubicacion") - 'DdlTransporte.SelectedValue = GvRow.DataKey("CveActivoFijo") + DdlTransporte.SelectedValue = GvRow.DataKey("CveTipoAF") If DateTime.TryParse(GvRow.DataKey("FechaInicial").ToString, fechaInicial) And DateTime.TryParse(GvRow.DataKey("FechaFinal").ToString, fechaFinal) Then TxtFechaSalida.Text = fechaInicial.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T") TxtFechaRegreso.Text = fechaFinal.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T") diff --git a/Transportes/ListadoViajes.aspx b/Transportes/ListadoViajes.aspx index 9d52a1a92..c22a2f64a 100644 --- a/Transportes/ListadoViajes.aspx +++ b/Transportes/ListadoViajes.aspx @@ -14,17 +14,21 @@ .fecha { padding: 3px; } - .masivo{ - color:green; - } + .masivo { + color: green; + }
  • - Agregar viaje +
  • +
  • + Contratos
  • @@ -37,20 +41,22 @@ - -
    - +
    + " + style="display: inline-block; margin-right: -20px; width: 150px;" /> + " + style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    + data-sort="true" DataKeyNames="CveViaje, CveRuta, Fecha, CveAF, CvePersonal, CveEmpresa, CvePartida, CveDestino, CveMasivo, Ruta"> - + @@ -139,7 +145,7 @@
    -
    +
    +
    + +
    -
    +
    - +
    -
    +
    - +
    + + +
  • + Contratos +
  • +
  • + Viajes +
  • +
    +
    + + + +
    +
    +
    + + Datos del Cliente +
    + +
    + +
    + + + + +
    +
    + +
    + +
    + + + + +
    +
    + +
    + +
    + + + + +
    +
    + +
    + + + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
    + + Datos del Viaje +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + + + +
    +
    + + + + + + +
    +
    + +
    +
    + + + + + + +
    +
    + + + +
    + +
    + + +
    + + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + +      + + + +
    + + + +      + + + +
    + + + +      + + + +
    + + + +      + + + +
    + + + +      + + + +
    + + + +      + + + +
    + + + +      + + + +
    + + + +      + + + +
    + + + +      + + + +
    + + + +      + + + +
    + + + +      + + + +
    + + + +      + + + +
    + + + +
    +
    +
    +
    + + + <%-- --%> + + + diff --git a/Transportes/Boletos.aspx.vb b/Transportes/Boletos.aspx.vb new file mode 100644 index 000000000..f2d6fb379 --- /dev/null +++ b/Transportes/Boletos.aspx.vb @@ -0,0 +1,130 @@ + +Imports Extensiones + +Partial Class Boletos + Inherits ClsPaginas + Private Property asientoSeleccionado As String + Get + Return ViewState("asientoSeleccionado").ToString() + End Get + Set(value As String) + ViewState("asientoSeleccionado") = value + End Set + End Property + Private Property Importe As Decimal + Get + Return ViewState("Importe").ToString().ToDecimal + End Get + Set(value As Decimal) + ViewState("Importe") = value + End Set + End Property + + Private Property CveViaje As Decimal + Get + Return ViewState("CveViaje").ToString().ToDecimal + End Get + Set(value As Decimal) + ViewState("CveViaje") = value + End Set + End Property + + + Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load + If Not IsPostBack Then + If Request.QueryString("CveViaje") Is Nothing Then + Response.Redirect("/Transportes/ListadoViajes.aspx") + End If + CveViaje = Request.QueryString("CveViaje").ToEntero + + DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True + CargaDatos() + InicializaCombos() + + End If + End Sub + + Private Sub CargaDatos() + 'Datos Viaje + Dim ObjViaje As New ClsTransportes + Dim retorno = ObjViaje.GetViajes(CveViaje.ToEntero, UsuarioActual.CveEmpresa) + If retorno Then + TxtRuta.Text = ObjViaje.Ruta.ToString + TxtFecha.Text = ObjViaje.Fecha.ToString + End If + 'Lista Destinos''carga específicos + Dim ObjDestinos As New ClsDestinos() + If ObjDestinos.GetDestinos(-1, -1, -1, "", True, True, DateTime.Now) Then + + If ObjDestinos.DtResultados.Rows.Count > 0 Then + + DdlPartida.DataSource = ObjDestinos.DtResultados + DdlPartida.DataBind() + DdlPartida.Items.Insert(0, New ListItem("Seleccione Partida", "")) + + DdlDestino.DataSource = ObjDestinos.DtResultados + DdlDestino.DataBind() + DdlDestino.Items.Insert(0, New ListItem("Seleccione Destino", "")) + End If + End If + End Sub + + Protected Sub InicializaCombos() + + End Sub + + Protected Sub CotizarTarifa(sender As Object, e As EventArgs) + If DdlDestino.SelectedValue <> "" And DdlPartida.SelectedValue <> "" Then + + Dim ObjDestinos As New ClsTransportes() + If ObjDestinos.GetDestinosTarifas(DdlDestino.SelectedValue.ToEntero, DdlPartida.SelectedValue.ToEntero) Then + + If ObjDestinos.Importe > 0 Then + TxtCosto.Text = $"El precio de su boleto es ${ObjDestinos.Importe}" + BtnGuardar.Visible = True + upPanel.Visible = True + Importe = ObjDestinos.Importe.ToEntero + Else + TxtCosto.Text = "" + BtnGuardar.Visible = False + upPanel.Visible = False + Importe = 0 + End If + End If + End If + + End Sub + Protected Sub OnLinkButtonClick(sender As Object, e As EventArgs) + Dim linkButton As LinkButton = DirectCast(sender, LinkButton) + Dim buttonID As String = linkButton.ID + linkButton.CssClass += " activo" + asientoSeleccionado = buttonID + End Sub + Protected Sub AddBoleto(sender As Object, e As EventArgs) + + If asientoSeleccionado = "" Then + Alert("Se requiere seleccionar su asiento") + Exit Sub + End If + + 'Page.Response.Write("") + 'Page.Response.Write("") + + Dim ObjTransporte As New ClsTransportes() + ObjTransporte.IniciaTransacSQL() + + Try + Dim retorno As Integer = ObjTransporte.AddViajePasajero(CveViaje.ToEntero, DdlPartida.Text.ToEntero, DdlDestino.Text.ToEntero, 0.0, asientoSeleccionado, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario) + + If retorno > 1 Then + ObjTransporte.Commit() + End If + Catch ex As Exception + Alert($"No se pudo generar el boleto {ex}", TipoMensaje.MsgError) + Finally + ObjTransporte.Dispose() + + End Try + + End Sub +End Class From 69ddbc3e234381e3059f2d452534524059c4846a Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 21 Dec 2023 09:01:18 -0700 Subject: [PATCH 03/64] =?UTF-8?q?--=20cambios=20en=20revisi=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsTransportes.vb | 62 ++++++++++++++++++++++++++++++++++++- Transportes/Boletos.aspx.vb | 37 +++++++++++----------- 2 files changed, 80 insertions(+), 19 deletions(-) diff --git a/App_Code/ClsTransportes.vb b/App_Code/ClsTransportes.vb index 1bbf82b53..f57ddbbad 100644 --- a/App_Code/ClsTransportes.vb +++ b/App_Code/ClsTransportes.vb @@ -165,13 +165,14 @@ Public Class ClsTransportes Return Retorno End Function - Public Function GetViajes(Optional CveViaje As Integer = 0) As Boolean + Public Function GetViajes(CveViaje As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Trans_ViajesGet") If CveViaje > 0 Then With SqlAdapter.SelectCommand.Parameters .Add("@CveViajeSeleccionado", SqlDbType.Int).Value = CveViaje + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With End If Try @@ -194,6 +195,65 @@ Public Class ClsTransportes Return Retorno End Function + Public Function GetDestinosTarifas(CveDestinoOrigen As Integer, CveDestinoFinal As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Trans_ViajesGet") + If CveViaje > 0 Then + With SqlAdapter.SelectCommand.Parameters + .Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen + .Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal + End With + End If + Try + SqlAdapter.Fill(Data) + If CveViaje > 0 AndAlso Data IsNot Nothing AndAlso Data.Rows.Count > 0 Then + CveRuta = Data.Rows(0)("CveRuta").ToString.ToEntero + CveAF = Data.Rows(0)("CveAF").ToString.ToEntero + CvePersonal = Data.Rows(0)("CvePersonal").ToString.ToEntero + CveEmpresa = Data.Rows(0)("CveEmpresa").ToString.ToEntero + CvePartida = Data.Rows(0)("CvePartida").ToString.ToEntero + CveDestino = Data.Rows(0)("CveDestino").ToString.ToEntero + CveMasivo = Data.Rows(0)("CveMasivo").ToString.ToEntero + Fecha = Data.Rows(0)("Fecha").ToString.ToDate + End If + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el catálogo de viajes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + Public Function AddViajePasajero(CveRuta As Integer, CveAF As Integer, CvePersonal As Integer, CveEmpresa As Integer, Fecha As DateTime, CvePartida As Integer, CveDestino As Integer, Optional IsMasivo As Boolean = False, Optional CveMasivo As Integer = -1) As Integer + Dim Retorno As Integer = -1 + + DataAdapter("PA_Trans_ViajesAdd") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveViaje", SqlDbType.Int).Direction = ParameterDirection.Output + .Add("@CveRuta", SqlDbType.Int).Value = CveRuta + .Add("@CveAF", SqlDbType.Int).Value = CveAF + .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Fecha", SqlDbType.DateTime).Value = Fecha + .Add("@CvePartida", SqlDbType.Int).Value = CvePartida + .Add("@CveDestino", SqlDbType.Int).Value = CveDestino + .Add("@IsMasivo", SqlDbType.Bit).Value = IsMasivo + .Add("@CveMasivo", SqlDbType.Int).Value = CveMasivo + End With + + Try + SqlAdapter.Fill(Data) + Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveViaje").Value.ToString) + + Catch ex As Exception + OnError("Ocurrió un error al guardar el nuevo viaje.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + Public Function RemoveViaje(Optional CveViaje As Integer = -1, Optional CveMasivo As Integer = -1) As Boolean Dim Retorno As Boolean = False diff --git a/Transportes/Boletos.aspx.vb b/Transportes/Boletos.aspx.vb index f2d6fb379..249efca19 100644 --- a/Transportes/Boletos.aspx.vb +++ b/Transportes/Boletos.aspx.vb @@ -1,5 +1,4 @@ - -Imports Extensiones +Imports Extensiones Partial Class Boletos Inherits ClsPaginas @@ -20,11 +19,11 @@ Partial Class Boletos End Set End Property - Private Property CveViaje As Decimal + Private Property CveViaje As Integer Get - Return ViewState("CveViaje").ToString().ToDecimal + Return ViewState("CveViaje").ToString().toentero End Get - Set(value As Decimal) + Set(value As Integer) ViewState("CveViaje") = value End Set End Property @@ -38,8 +37,8 @@ Partial Class Boletos CveViaje = Request.QueryString("CveViaje").ToEntero DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True - CargaDatos() InicializaCombos() + CargaDatos() End If End Sub @@ -47,11 +46,15 @@ Partial Class Boletos Private Sub CargaDatos() 'Datos Viaje Dim ObjViaje As New ClsTransportes - Dim retorno = ObjViaje.GetViajes(CveViaje.ToEntero, UsuarioActual.CveEmpresa) + Dim retorno As Boolean = ObjViaje.GetViajes(CveViaje.ToEntero, UsuarioActual.CveEmpresa) If retorno Then - TxtRuta.Text = ObjViaje.Ruta.ToString + 'TxtRuta.Text = ObjViaje.Ruta.ToString TxtFecha.Text = ObjViaje.Fecha.ToString End If + + End Sub + + Protected Sub InicializaCombos() 'Lista Destinos''carga específicos Dim ObjDestinos As New ClsDestinos() If ObjDestinos.GetDestinos(-1, -1, -1, "", True, True, DateTime.Now) Then @@ -69,21 +72,17 @@ Partial Class Boletos End If End Sub - Protected Sub InicializaCombos() - - End Sub - Protected Sub CotizarTarifa(sender As Object, e As EventArgs) If DdlDestino.SelectedValue <> "" And DdlPartida.SelectedValue <> "" Then Dim ObjDestinos As New ClsTransportes() - If ObjDestinos.GetDestinosTarifas(DdlDestino.SelectedValue.ToEntero, DdlPartida.SelectedValue.ToEntero) Then - - If ObjDestinos.Importe > 0 Then - TxtCosto.Text = $"El precio de su boleto es ${ObjDestinos.Importe}" + If ObjDestinos.GetDestinosTarifas(DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero) Then + Dim tImporte As Decimal = ObjDestinos.DtResultados.FiltroPrimeroValor("Importe").ToDecimal + If tImporte > 0 Then + TxtCosto.Text = $"El precio de su boleto es ${tImporte}" BtnGuardar.Visible = True upPanel.Visible = True - Importe = ObjDestinos.Importe.ToEntero + Importe = tImporte Else TxtCosto.Text = "" BtnGuardar.Visible = False @@ -114,7 +113,9 @@ Partial Class Boletos ObjTransporte.IniciaTransacSQL() Try - Dim retorno As Integer = ObjTransporte.AddViajePasajero(CveViaje.ToEntero, DdlPartida.Text.ToEntero, DdlDestino.Text.ToEntero, 0.0, asientoSeleccionado, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario) + asientoSeleccionado = asientoSeleccionado.Replace("A", "") + Dim retorno As Integer = ObjTransporte.AddViajePasajero(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, 0.0, asientoSeleccionado.ToEntero, + TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario) If retorno > 1 Then ObjTransporte.Commit() From 149aa0dbeb7545a28d224eccd8ae3ae93f0377b6 Mon Sep 17 00:00:00 2001 From: AbrahamCastilloV Date: Thu, 21 Dec 2023 09:02:51 -0700 Subject: [PATCH 04/64] -- --- App_Code/ClsTransportes.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/App_Code/ClsTransportes.vb b/App_Code/ClsTransportes.vb index 1bbf82b53..4a1c3b569 100644 --- a/App_Code/ClsTransportes.vb +++ b/App_Code/ClsTransportes.vb @@ -36,6 +36,7 @@ Public Class ClsTransportes Public Property CveDestino As Integer Public Property CveMasivo As Integer Public Property Fecha As DateTime + Public Property Ruta As String #End Region #Region "Funciones básicas" From 42599d9a68df952fb0cd74f3929cc35125c70317 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 21 Dec 2023 12:22:02 -0700 Subject: [PATCH 05/64] - mejora saldar --- Bancos/ProveedoresAbonar.aspx.vb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 05470af13..562c77be4 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -1419,7 +1419,6 @@ Partial Class Bancos_ProveedoresAbonar #Region "SALDAR CUENTAS" - Private Sub BtnSaldarCuentasSinPagar_Click(sender As Object, e As EventArgs) Handles BtnSaldarCuentasSinPagar.Click Dim ObjConta As New ClsContabilidad 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) - For Each gr As GridViewRow In GvCxP.Rows If gr.FCCheckBox("Chk").Checked Then 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 FechaCompra As Date = gr.DataKey("Fecha").ToDate 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 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) - If CveMoneda > 1 AndAlso (UsaComplementariaProveedores) 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 CveMoneda > 1 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" 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 + 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 MsgError = "Ocurrio un error al saldar el movimiento" End If @@ -1497,10 +1496,12 @@ Partial Class Bancos_ProveedoresAbonar ' se manda al ot ingresos, los impuestos por acreditar If MsgError = "" Then Dim tcvecon As Integer = 78 + Dim tTipoMovto As Boolean = True If Saldo < 0 Then tcvecon = 211 + tTipoMovto = False 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" End If End If @@ -1522,7 +1523,6 @@ Partial Class Bancos_ProveedoresAbonar End If End If End If - End If Next From 640f45c77fd1e3d7db980cce51e9b7b9e0ecfd37 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 21 Dec 2023 13:33:00 -0700 Subject: [PATCH 06/64] -- activado el txt de filtrado --- Contabilidad2/CatCuentasAsignaciones.aspx | 4 ++++ Contabilidad2/CatCuentasAsignaciones.aspx.vb | 1 + 2 files changed, 5 insertions(+) diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx b/Contabilidad2/CatCuentasAsignaciones.aspx index 0669d4cdd..01910855b 100644 --- a/Contabilidad2/CatCuentasAsignaciones.aspx +++ b/Contabilidad2/CatCuentasAsignaciones.aspx @@ -73,6 +73,10 @@ +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx.vb b/Contabilidad2/CatCuentasAsignaciones.aspx.vb index 10f4a1223..6d2ceedfb 100644 --- a/Contabilidad2/CatCuentasAsignaciones.aspx.vb +++ b/Contabilidad2/CatCuentasAsignaciones.aspx.vb @@ -271,6 +271,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones End If ObjG.Dispose() DdlColectivas.DataBind() + DdlColectivas.Items.Insert(0, New ListItem("-", "-1")) If OpAgregar Then DdlColectivas.Enabled = True From e7e73b445f747c9f3ed1626b2f0e39cf56385613 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 21 Dec 2023 13:35:05 -0700 Subject: [PATCH 07/64] =?UTF-8?q?--=20se=20quit=C3=B3=20columna=20de=20chk?= =?UTF-8?q?=20AplicaAnticipos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsBancos.vb | 2 +- CxC/RepCxC.aspx | 4 +-- CxC/RepCxC.aspx.vb | 63 +++++++++++++++++++-------------------- CxC/RepCxCDetalle.aspx | 7 +---- CxC/RepCxCDetalle.aspx.vb | 2 +- 5 files changed, 34 insertions(+), 44 deletions(-) diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index b9bcdf016..964e509e8 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -1146,7 +1146,7 @@ Public Class ClsBancos Ventas.Timbre = Timbre Ventas.Cliente = Cliente - Dim CvePACEspecial As Integer = -1 + Dim CvePACEspecial As Integer = 4 'por default estará tomando con el PAC:4 If UsuarioActual.CveEmpresa = 3 Then CvePACEspecial = 4 Ventas.TipoDocto = "Pag" diff --git a/CxC/RepCxC.aspx b/CxC/RepCxC.aspx index 15630a45b..0a1eda4a2 100644 --- a/CxC/RepCxC.aspx +++ b/CxC/RepCxC.aspx @@ -353,9 +353,7 @@ -
    - -
    +
    diff --git a/CxC/RepCxC.aspx.vb b/CxC/RepCxC.aspx.vb index 315de5e8a..118090e78 100644 --- a/CxC/RepCxC.aspx.vb +++ b/CxC/RepCxC.aspx.vb @@ -108,8 +108,7 @@ Partial Class RepCxC CargaCombos() CargaGvPersonalizarRangoColumnas() ProcesaRequest() - CargaDatos() - If UsuarioActual.CveEmpresa.Contiene(72, 80, 146, 119) Then ChkAnticipos.Visible = True + CargaDatos() ActivaEnviarEstadoCuenta() If UsuarioActual.CveRol = 1 Or UsuarioActual.TienePermisoProceso(243) Then LnkDescargarSegmentos.Visible = True End If @@ -234,15 +233,15 @@ Partial Class RepCxC CveCobranzaEstatus = DdlCobranzaEstatus.SelectedValue.ToEntero CveClienteClasificacion = DdlClienteClasificacion.SelectedValue.ToEntero - Dim CveCliente As Integer = If(DdlClientesWS.SelectedValue.ToEntero > 0, DdlClientesWS.SelectedValue.ToEntero, -1) - Dim AplicaAnticipos As Integer = If(ChkAnticipos.Checked, 1, 0) - - + Dim CveCliente As Integer = If(DdlClientesWS.SelectedValue.ToEntero > 0, DdlClientesWS.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, 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, - 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 DtDatos = ObjMovtos.DtResultados @@ -421,55 +420,53 @@ Partial Class RepCxC 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}", 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}", 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}", 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}", 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}", 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}", 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}", 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}", 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}", 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}", 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}", 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}", 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 @@ -693,7 +690,7 @@ Partial Class RepCxC 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($"TC{Cont}") = Dt($"TC{Cont - 1}") @@ -732,23 +729,23 @@ Partial Class RepCxC TCEspecifico = -1 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", "", $" Cliente: {DdlClientesWS.SelectedText}") - Dim Sucursal = If(DdlSubProyecto.SelectedValue = "-1", "", $" Sucursal: {DdlSubProyecto.SelectedItem.Text}") - Dim Grupo = $" Agrupado Por: {DdlGrupo.SelectedItem.Text}" 'If(DdlGrupo.SelectedValue = "5", "", $" Agrupado Por: {DdlGrupo.SelectedItem.Text}") - Dim TipoDocto = If(DdlTipoDocto.GetSelectedText = "Ingresos,Remisión,Anticipos,Egresos,Ingresos X Comp,Devolución" Or DdlTipoDocto.GetSelectedText = "", "", $" Documentos: {DdlTipoDocto.GetSelectedText}") - Dim Vendedor = If(DdlVendedor.SelectedValue = "-1", "", $" Vendedor: {DdlVendedor.SelectedItem.Text}") + Dim Cliente As String = If(DdlClientesWS.SelectedValue = "-1", "", $" Cliente: {DdlClientesWS.SelectedText}") + Dim Sucursal As String = If(DdlSubProyecto.SelectedValue = "-1", "", $" Sucursal: {DdlSubProyecto.SelectedItem.Text}") + Dim Grupo As String = $" Agrupado Por: {DdlGrupo.SelectedItem.Text}" 'If(DdlGrupo.SelectedValue = "5", "", $" Agrupado Por: {DdlGrupo.SelectedItem.Text}") + Dim TipoDocto As String = If(DdlTipoDocto.GetSelectedText = "Ingresos,Remisión,Anticipos,Egresos,Ingresos X Comp,Devolución" Or DdlTipoDocto.GetSelectedText = "", "", $" Documentos: {DdlTipoDocto.GetSelectedText}") + Dim Vendedor As String = If(DdlVendedor.SelectedValue = "-1", "", $" Vendedor: {DdlVendedor.SelectedItem.Text}") Dim FechaIn As String = If(txtFechaI.Text = "", "", $" Fecha Inicio Docto: {txtFechaI.Text}") Dim FechaFn As String = If(txtFechaF.Text = "", "", $" Fecha Fin Docto: {txtFechaF.Text}") Dim FVI As String = If(txtFechaVI.Text = "", "", $" Fecha Venc. Inic.: {txtFechaVI.Text}") Dim FVF As String = If(txtFechaVF.Text = "", "", $" Fecha Venc. Final: {txtFechaVF.Text}") - Dim Registro = If(DdlUsuario.SelectedValue = "-1", "", $" Registró: {DdlUsuario.SelectedItem.Text}") - Dim Responsable = If(DdlResponsable.SelectedValue = "-1", "", $" Responsable: {DdlResponsable.SelectedItem.Text}") - Dim EstatusCob = If(DdlCobranzaEstatus.SelectedValue = "-1", "", $" Estatus Cobranza: {DdlCobranzaEstatus.SelectedItem.Text}") + Dim Registro As String = If(DdlUsuario.SelectedValue = "-1", "", $" Registró: {DdlUsuario.SelectedItem.Text}") + Dim Responsable As String = If(DdlResponsable.SelectedValue = "-1", "", $" Responsable: {DdlResponsable.SelectedItem.Text}") + Dim EstatusCob As String = If(DdlCobranzaEstatus.SelectedValue = "-1", "", $" Estatus Cobranza: {DdlCobranzaEstatus.SelectedItem.Text}") Dim CorteA As String = If(txtCorteA.Text = "31/12/2019", "", $" Corte A: {txtCorteA.Text}") - Dim EstatusCli = If(DdlEstatusCliente.SelectedValue = "-1", "", $" Clientes: {DdlEstatusCliente.SelectedItem.Text}") - Dim ClasificacionCli = If(DdlClienteClasificacion.SelectedValue = "-1", "", $" Clasificación Cliente: {DdlClienteClasificacion.SelectedItem.Text}") + Dim EstatusCli As String = If(DdlEstatusCliente.SelectedValue = "-1", "", $" Clientes: {DdlEstatusCliente.SelectedItem.Text}") + Dim ClasificacionCli As String = If(DdlClienteClasificacion.SelectedValue = "-1", "", $" Clasificación Cliente: {DdlClienteClasificacion.SelectedItem.Text}") Dim TituloReporte As String = "REPORTE DE CUENTAS POR COBRAR DEL CLIENTE" 'If UsuarioActual.CveEmpresa = 72 Then diff --git a/CxC/RepCxCDetalle.aspx b/CxC/RepCxCDetalle.aspx index 77a7c820c..6708f6071 100644 --- a/CxC/RepCxCDetalle.aspx +++ b/CxC/RepCxCDetalle.aspx @@ -288,11 +288,8 @@
    - -
    - Estatus Cliente: - + Estatus Cliente:
    @@ -301,8 +298,6 @@
    - -
    diff --git a/CxC/RepCxCDetalle.aspx.vb b/CxC/RepCxCDetalle.aspx.vb index 74750c04f..a89e8f4dc 100644 --- a/CxC/RepCxCDetalle.aspx.vb +++ b/CxC/RepCxCDetalle.aspx.vb @@ -472,7 +472,7 @@ Partial Class RepCxCDetalle RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM), FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=DdlCobranzaEstatusFiltro.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 GvDatos.DataSource = ObjMovtos.DSResultados.Tables(0) From 5349698f1ac7ca61d96889789083b01e0c4b8884 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 21 Dec 2023 13:35:28 -0700 Subject: [PATCH 08/64] =?UTF-8?q?--=20mejora=20del=20tema=20de=20registro?= =?UTF-8?q?=20de=20remisi=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ashx/E119.ashx | 249 +++++++++++++++++++++++++------------------------ 1 file changed, 127 insertions(+), 122 deletions(-) diff --git a/Ashx/E119.ashx b/Ashx/E119.ashx index d3a68c8c6..0be1294cf 100644 --- a/Ashx/E119.ashx +++ b/Ashx/E119.ashx @@ -86,14 +86,16 @@ Public Class E119 : Implements IHttpHandler Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest Dim retorno As String = "" + Dim MsgLog As New StringBuilder + MsgLog.AppendLine("Inicia Petición.") Try Dim Metodo As String = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString()) - + MsgLog.AppendLine(Metodo) If Metodo = "BASF_POG40" Then context.Response.ContentType = "application/json" Dim Auth As AuthMessage = ValidarSolicitud(context) - If Auth.IsSucces Then + If Auth.IsSuccess Then retorno = ConsultaDatos(context) Else context.Response.StatusCode = Auth.StatusCode @@ -106,7 +108,7 @@ Public Class E119 : Implements IHttpHandler context.Response.ContentType = "application/json" Dim Auth As AuthMessage = ValidarSolicitud(context) - If Auth.IsSucces Then + If Auth.IsSuccess Then retorno = ConsultaProductos(context) Else context.Response.StatusCode = Auth.StatusCode @@ -118,7 +120,7 @@ Public Class E119 : Implements IHttpHandler context.Response.ContentType = "application/json" Dim Auth As AuthMessage = ValidarSolicitud(context) - If Auth.IsSucces Then + If Auth.IsSuccess Then retorno = ConsultaClasificaciones(context) Else context.Response.StatusCode = Auth.StatusCode @@ -130,7 +132,7 @@ Public Class E119 : Implements IHttpHandler context.Response.ContentType = "application/json" Dim Auth As AuthMessage = ValidarSolicitud(context) - If Auth.IsSucces Then + If Auth.IsSuccess Then retorno = RegistraRemision(context) Else context.Response.StatusCode = Auth.StatusCode @@ -142,14 +144,17 @@ Public Class E119 : Implements IHttpHandler Catch ex As Exception context.Response.ContentType = "text/html" + MsgLog.AppendLine("Error de procesamiento:" & ex.Message) Dim respuesta As New AuthMessage respuesta.ErrorMessage = New ResponseMsgError() With {.message = "La solicitud no se pudo procesar."} - respuesta.IsSucces = False + respuesta.IsSuccess = False respuesta.StatusCode = 200 retorno = JsonConvert.SerializeObject(respuesta.ErrorMessage) context.Response.Write(retorno) + End Try + MsgLog.ToString.GuardaLogAD("LogE119") End Sub Private Function ValidarSolicitud(ByVal context As HttpContext) As AuthMessage @@ -168,7 +173,7 @@ Public Class E119 : Implements IHttpHandler Else respuesta.ErrorMessage = New ResponseMsgError() With {.message = "el usuario y/o contraseña son requeridos"} - respuesta.IsSucces = False + respuesta.IsSuccess = False respuesta.StatusCode = 200 Return respuesta @@ -176,13 +181,13 @@ Public Class E119 : Implements IHttpHandler If unauthorized Then respuesta.ErrorMessage = New ResponseMsgError() With {.message = "el usuario y/o contraseña no son validos"} - respuesta.IsSucces = False + respuesta.IsSuccess = False respuesta.StatusCode = 200 Return respuesta Else respuesta.ErrorMessage = Nothing - respuesta.IsSucces = True + respuesta.IsSuccess = True respuesta.StatusCode = 200 Return respuesta @@ -337,112 +342,114 @@ Public Class E119 : Implements IHttpHandler Dim Respuesta As New ResponseMsg Dim RespuestaError As New ResponseMsgError Dim MsgLog As New StringBuilder + Try - MsgLog.Append("1.0 Registra") - If context.Request.InputStream IsNot Nothing Then - Using reader As New StreamReader(context.Request.InputStream) - Dim json As String = reader.ReadToEnd - - If Not String.IsNullOrEmpty(json) Then - JsonRequest = JObject.Parse(json) - If JsonRequest Is Nothing Then - 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 + MsgLog.AppendLine("1.0 Registra") + If context.Request.InputStream IsNot Nothing Then + Using reader As New StreamReader(context.Request.InputStream) + 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 + JsonRequest = JObject.Parse(json) + If JsonRequest Is Nothing Then + TieneError = True End If Else - MsgLog.Append("1.5.9 sin datos cliente") TieneError = True - Resp.Mensajes.Add("no existen datos del cliente") 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") MsgLog.AppendFormat("1.6.0 objeto creado {0}", If(ObjFactura IsNot Nothing, "si", "no")) If JsonRequest("line_items") IsNot Nothing Then Dim ListaPS As JArray = JArray.Parse(JsonRequest("line_items").ToString()) 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 Cantidad = JsonPS("quantity").ToString.ToDecimal() PU = JsonPS("price").ToString.ToDecimal() CvePS = ClsPaginas.GlobalDTPSSimplificado(CveEmpresa, Codigo:=JsonPS("sku").ToString()).FiltroPrimeroValor("CvePS").ToEntero() 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 If CvePS <= 0 Then TieneError = True @@ -459,11 +466,11 @@ Public Class E119 : Implements IHttpHandler End If 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()) 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 objSucursal As New JObject( New JProperty("Cve", Resp.CveVenta), @@ -473,7 +480,7 @@ Public Class E119 : Implements IHttpHandler Respuesta.status = "success" Respuesta.data = data Else - MsgLog.Append("1.8 error al agregar la remision") + MsgLog.AppendLine("1.8 error al agregar la remision") TieneError = True End If @@ -493,32 +500,30 @@ Public Class E119 : Implements IHttpHandler RespuestaError.message = sb.ToString() End If - Catch ex As Exception - TieneError = True - End Try + If TieneError Then + ObjClientes.RollBack() + 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 - - ObjClientes.RollBack() - 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() - - MsgLog.Append("99.0 ocurrió un error en el proceso") - Else - MsgLog.Append("4.0 proceso terminado") - ObjClientes.Commit() - ObjClientes.Dispose() - ObjInventario.Dispose() + 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 + If ObjFactura IsNot Nothing Then ObjFactura.Dispose() End If - If ObjFactura IsNot Nothing Then ObjFactura.Dispose() End If - End If + Catch ex As Exception + TieneError = True + End Try MsgLog.ToString.GuardaLogAD("LogE119") If TieneError Then @@ -548,7 +553,7 @@ Public Class E119 : Implements IHttpHandler End Class Private Class AuthMessage - Public Property IsSucces As Boolean + Public Property IsSuccess As Boolean Public Property ErrorMessage As ResponseMsgError Public Property StatusCode As Integer End Class From 9741bab34ebd98393a27a508c78e76b727279b3c Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 21 Dec 2023 13:35:44 -0700 Subject: [PATCH 09/64] -- cambio a pac4 --- App_Code/ClsBancos.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 964e509e8..d877b25ec 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -1146,7 +1146,7 @@ Public Class ClsBancos Ventas.Timbre = Timbre Ventas.Cliente = Cliente - Dim CvePACEspecial As Integer = 4 'por default estará tomando con el PAC:4 + 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 Ventas.TipoDocto = "Pag" From 01fae89ea41ca27e64f2983bafad87e2a9e96e63 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 21 Dec 2023 13:35:53 -0700 Subject: [PATCH 10/64] - --- App_Code/ClsMovimientos.vb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index 937f5cfc6..45e272faa 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -234,7 +234,7 @@ Public Class ClsMovimientos Gpo As Integer, 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 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 Dim Retorno As Boolean = False @@ -268,7 +268,6 @@ Public Class ClsMovimientos .Add("@CveCobranzaEstatus", SqlDbType.Int).Value = CveCobranzaEstatus .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente - .Add("@AplicaAnticiposPagados", SqlDbType.Int).Value = AplicaAnticiposPagados .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda .Add("@TieneLineaAdicional", SqlDbType.Int).Value = TieneLineaAdicional .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", 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 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 Dim Retorno As Boolean = False @@ -362,7 +361,6 @@ Public Class ClsMovimientos .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda .Add("@EstatusCliente", SqlDbType.Int).Value = EstatusCliente - .Add("@AplicaAnticiposPagados", SqlDbType.Int).Value = AplicaAnticiposPagados .Add("@TieneLineaAdicional", SqlDbType.Int).Value = TieneLineaAdicional .Add("@CveContrato", SqlDbType.Int).Value = CveContrato End With From 7300e070ba5d58fd4760fb83b5e992d1908ce4d9 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 21 Dec 2023 13:36:48 -0700 Subject: [PATCH 11/64] -- cambio a pac 4 --- Nomina/Nomina.aspx.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 1906d0fdb..2eaa10e40 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -1445,7 +1445,7 @@ public partial class Nomina_Nomina2 : ClsPaginas LogicNominas lognom = new LogicNominas(); 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) { @@ -1718,7 +1718,7 @@ public partial class Nomina_Nomina2 : ClsPaginas //CURP = drow["CURP"].ToString(); } 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)//
    {4}
    {1} { Alert(string.Format("El empleado no se pudo timbrar, el sat nos devolvio el siguiente mensaje:
    {1}", Msg, msgCorregidoSat(Msg, CvePersonal, RFC, CURP)), TipoMensaje.MsgAdvertencia); } From e5dfa4d7dadb16efa8dd8c541e5cb66f06e7de18 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 21 Dec 2023 13:37:04 -0700 Subject: [PATCH 12/64] - ocultar no surte almacen --- Planeacion/CatSubProyectos.aspx | 2 +- Planeacion/CatSubProyectos.aspx.vb | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Planeacion/CatSubProyectos.aspx b/Planeacion/CatSubProyectos.aspx index 23ac1393b..677baa2bc 100644 --- a/Planeacion/CatSubProyectos.aspx +++ b/Planeacion/CatSubProyectos.aspx @@ -213,7 +213,7 @@
    -
    +
    diff --git a/Planeacion/CatSubProyectos.aspx.vb b/Planeacion/CatSubProyectos.aspx.vb index 9470d1c12..ad3b00a41 100644 --- a/Planeacion/CatSubProyectos.aspx.vb +++ b/Planeacion/CatSubProyectos.aspx.vb @@ -68,8 +68,12 @@ Partial Class CatSubProyectos If UsuarioActual.Empresa.Funcionalidad(381).Trim() <> "" Then DivDeshabilitaAutorizaciones.Visible = True + End If + If UsuarioActual.CveEmpresa = 119 Then + divNoVerificaAlmacen.Visible = True End If + CargaProyecto() CargaSegmentosNegocio() @@ -244,7 +248,7 @@ Partial Class CatSubProyectos Dim index As Integer = Convert.ToInt32(e.CommandArgument) 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 CveSubProyecto As Integer = GvDatos.DataKeys(index).Value.ToString.ToEntero Dim ErrorSubProyecto As Boolean = False @@ -535,7 +539,7 @@ Partial Class CatSubProyectos Dim DTExcel As New Data.DataTable Dim conn As Odbc.OdbcConnection = Nothing - Dim ErrorExcel = False + Dim ErrorExcel As Boolean = False Try conn = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" & FilePath & ";") From 567a2c926316cab60dcf2a5d5feafaeb86a4b660 Mon Sep 17 00:00:00 2001 From: AbrahamCastilloV Date: Thu, 21 Dec 2023 17:44:32 -0700 Subject: [PATCH 13/64] =?UTF-8?q?--Se=20volvi=C3=B3=20a=20poner=20todo=20l?= =?UTF-8?q?o=20que=20elimin=C3=A9.=20Se=20hizo=20el=20select=20para=20los?= =?UTF-8?q?=20destinos=20espec=C3=ADficos=20por=20ruta,=20se=20agregaron?= =?UTF-8?q?=20boletos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsDestinos.vb | 16 ++- App_Code/ClsPaginas.vb | 3 +- App_Code/ClsTransportes.vb | 171 +++++++++++++++++------------- Transportes/Boletos.aspx | 57 +++++----- Transportes/Boletos.aspx.vb | 53 +++++---- Transportes/ListadoViajes.aspx | 8 +- Transportes/ListadoViajes.aspx.vb | 24 ++--- 7 files changed, 180 insertions(+), 152 deletions(-) diff --git a/App_Code/ClsDestinos.vb b/App_Code/ClsDestinos.vb index b08400c79..ffca8e5a6 100644 --- a/App_Code/ClsDestinos.vb +++ b/App_Code/ClsDestinos.vb @@ -130,19 +130,15 @@ Public Class ClsDestinos GC.SuppressFinalize(Me) End Sub #End Region - Public Function GetDestinos(CveDestino As Integer, CveUsuario As Integer, CveEmpresa As Integer, Destino As String, Estatus As Boolean, EsNacional As Boolean, FechaIng As DateTime) As Boolean + Public Function GetDestinos(Optional CveRuta As Integer = 0) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Trans_DestinosGet") - With SqlAdapter.SelectCommand.Parameters - .Add("@CveDestino", SqlDbType.Int).Value = CveDestino - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario - .Add("@Destino", SqlDbType.VarChar).Value = Destino - .Add("@Estatus", SqlDbType.Bit).Value = Estatus - .Add("@EsNacional", SqlDbType.Bit).Value = EsNacional - .Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng + If CveRuta <> 0 Then + With SqlAdapter.SelectCommand.Parameters + .Add("@CveRuta", SqlDbType.Int).Value = CveRuta + End With + End If - End With Try SqlAdapter.Fill(Data) Retorno = True diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 8f1a42729..e4fa603fe 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -9468,10 +9468,9 @@ Public Class ClsPaginas #End Region #Region "Transportes" - PaginaDict.Add("/Transportes/ContratoTransporte.aspx".ToUpper(), 598) PaginaDict.Add("/Transportes/ListadoContratos.aspx".ToUpper(), 598) - PaginaDict.Add("/Transportes/CrearViaje.aspx".ToUpper(), 598) PaginaDict.Add("/Transportes/ListadoViajes.aspx".ToUpper(), 598) + PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 598) #End Region 'Antes de aquí. diff --git a/App_Code/ClsTransportes.vb b/App_Code/ClsTransportes.vb index 2c8dd6b15..2d3fb644d 100644 --- a/App_Code/ClsTransportes.vb +++ b/App_Code/ClsTransportes.vb @@ -1,5 +1,4 @@ - -Imports System.Data +Imports System.Data Imports System.Data.SqlClient Imports Extensiones @@ -136,7 +135,7 @@ Public Class ClsTransportes End Sub #End Region -#Region "Métodos" +#Region "Viajes" Public Function AddViajes(CveRuta As Integer, CveAF As Integer, CvePersonal As Integer, CveEmpresa As Integer, Fecha As DateTime, CvePartida As Integer, CveDestino As Integer, Optional IsMasivo As Boolean = False, Optional CveMasivo As Integer = -1) As Integer Dim Retorno As Integer = -1 @@ -170,90 +169,59 @@ Public Class ClsTransportes Dim Retorno As Boolean = False DataAdapter("PA_Trans_ViajesGet") - If CveViaje > 0 Then - With SqlAdapter.SelectCommand.Parameters - .Add("@CveViajeSeleccionado", SqlDbType.Int).Value = CveViaje - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - End With - End If - Try - SqlAdapter.Fill(Data) - If CveViaje > 0 AndAlso Data IsNot Nothing AndAlso Data.Rows.Count > 0 Then - CveRuta = Data.Rows(0)("CveRuta").ToString.ToEntero - CveAF = Data.Rows(0)("CveAF").ToString.ToEntero - CvePersonal = Data.Rows(0)("CvePersonal").ToString.ToEntero - CveEmpresa = Data.Rows(0)("CveEmpresa").ToString.ToEntero - CvePartida = Data.Rows(0)("CvePartida").ToString.ToEntero - CveDestino = Data.Rows(0)("CveDestino").ToString.ToEntero - CveMasivo = Data.Rows(0)("CveMasivo").ToString.ToEntero - Fecha = Data.Rows(0)("Fecha").ToString.ToDate - End If - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al obtener el catálogo de viajes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try - - Return Retorno - End Function - - Public Function GetDestinosTarifas(CveDestinoOrigen As Integer, CveDestinoFinal As Integer) As Boolean - Dim Retorno As Boolean = False - - DataAdapter("PA_Trans_ViajesGet") - If CveViaje > 0 Then - With SqlAdapter.SelectCommand.Parameters - .Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen - .Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal - End With - End If - Try - SqlAdapter.Fill(Data) - If CveViaje > 0 AndAlso Data IsNot Nothing AndAlso Data.Rows.Count > 0 Then - CveRuta = Data.Rows(0)("CveRuta").ToString.ToEntero - CveAF = Data.Rows(0)("CveAF").ToString.ToEntero - CvePersonal = Data.Rows(0)("CvePersonal").ToString.ToEntero - CveEmpresa = Data.Rows(0)("CveEmpresa").ToString.ToEntero - CvePartida = Data.Rows(0)("CvePartida").ToString.ToEntero - CveDestino = Data.Rows(0)("CveDestino").ToString.ToEntero - CveMasivo = Data.Rows(0)("CveMasivo").ToString.ToEntero - Fecha = Data.Rows(0)("Fecha").ToString.ToDate - End If - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al obtener el catálogo de viajes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try - - Return Retorno - End Function - - Public Function AddViajePasajero(CveRuta As Integer, CveAF As Integer, CvePersonal As Integer, CveEmpresa As Integer, Fecha As DateTime, CvePartida As Integer, CveDestino As Integer, Optional IsMasivo As Boolean = False, Optional CveMasivo As Integer = -1) As Integer - Dim Retorno As Integer = -1 - - DataAdapter("PA_Trans_ViajesAdd") With SqlAdapter.SelectCommand.Parameters - .Add("@CveViaje", SqlDbType.Int).Direction = ParameterDirection.Output - .Add("@CveRuta", SqlDbType.Int).Value = CveRuta - .Add("@CveAF", SqlDbType.Int).Value = CveAF - .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + .Add("@CveViaje", SqlDbType.Int).Value = CveViaje .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - .Add("@Fecha", SqlDbType.DateTime).Value = Fecha - .Add("@CvePartida", SqlDbType.Int).Value = CvePartida - .Add("@CveDestino", SqlDbType.Int).Value = CveDestino - .Add("@IsMasivo", SqlDbType.Bit).Value = IsMasivo - .Add("@CveMasivo", SqlDbType.Int).Value = CveMasivo End With - Try SqlAdapter.Fill(Data) - Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveViaje").Value.ToString) - + If CveViaje > 0 AndAlso Data IsNot Nothing AndAlso Data.Rows.Count > 0 Then + CveRuta = Data.Rows(0)("CveRuta").ToString.ToEntero + CveAF = Data.Rows(0)("CveAF").ToString.ToEntero + CvePersonal = Data.Rows(0)("CvePersonal").ToString.ToEntero + CveEmpresa = Data.Rows(0)("CveEmpresa").ToString.ToEntero + CvePartida = Data.Rows(0)("CvePartida").ToString.ToEntero + CveDestino = Data.Rows(0)("CveDestino").ToString.ToEntero + CveMasivo = Data.Rows(0)("CveMasivo").ToString.ToEntero + Fecha = Data.Rows(0)("Fecha").ToString.ToDate + Ruta = Data.Rows(0)("Ruta").ToString + End If + Retorno = True Catch ex As Exception - OnError("Ocurrió un error al guardar el nuevo viaje.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + OnError("Ocurrió un error al obtener el catálogo de viajes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno End Function + 'Public Function AddViajePasajero(CveRuta As Integer, CveAF As Integer, CvePersonal As Integer, CveEmpresa As Integer, Fecha As DateTime, CvePartida As Integer, CveDestino As Integer, Optional IsMasivo As Boolean = False, Optional CveMasivo As Integer = -1) As Integer + ' Dim Retorno As Integer = -1 + + ' DataAdapter("PA_Trans_ViajesAdd") + + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CveViaje", SqlDbType.Int).Direction = ParameterDirection.Output + ' .Add("@CveRuta", SqlDbType.Int).Value = CveRuta + ' .Add("@CveAF", SqlDbType.Int).Value = CveAF + ' .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + ' .Add("@Fecha", SqlDbType.DateTime).Value = Fecha + ' .Add("@CvePartida", SqlDbType.Int).Value = CvePartida + ' .Add("@CveDestino", SqlDbType.Int).Value = CveDestino + ' .Add("@IsMasivo", SqlDbType.Bit).Value = IsMasivo + ' .Add("@CveMasivo", SqlDbType.Int).Value = CveMasivo + ' End With + + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveViaje").Value.ToString) + + ' Catch ex As Exception + ' OnError("Ocurrió un error al guardar el nuevo viaje.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + + ' Return Retorno + 'End Function Public Function RemoveViaje(Optional CveViaje As Integer = -1, Optional CveMasivo As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -301,4 +269,55 @@ Public Class ClsTransportes Return Retorno End Function #End Region + +#Region "Boletos" + Public Function AddViajePasajero(CveViaje As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal, Asiento As Integer, Nombre As String, Visa As String, Celular As String, Sexo As Boolean, Observacion As String, CveUsuario As Integer) As Integer + Dim Retorno As Integer = -1 + + DataAdapter("PA_Trans_ViajesPasajerosAdd") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveViajePasajero", SqlDbType.Int).Direction = ParameterDirection.Output + .Add("@CveViaje", SqlDbType.Int).Value = CveViaje + .Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen + .Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal + .Add("@Importe", SqlDbType.SmallMoney).Value = Importe + .Add("@Asiento", SqlDbType.TinyInt).Value = Asiento + .Add("@Nombre", SqlDbType.VarChar).Value = Nombre + .Add("@Visa", SqlDbType.VarChar).Value = Visa + .Add("@Celular", SqlDbType.VarChar).Value = Celular + .Add("@Sexo", SqlDbType.Bit).Value = Sexo + .Add("@Observacion", SqlDbType.VarChar).Value = Observacion + .Add("@Estatus", SqlDbType.Bit).Value = 1 + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + End With + Try + SqlAdapter.Fill(Data) + Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveViajePasajero").Value.ToString) + Catch ex As Exception + OnError("Ocurrió un error al guardar el nuevo boleto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function +#End Region + +#Region "Tarifas" + Public Function GetDestinosTarifas(CveDestinoOrigen As Integer, CveDestinoFinal As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Trans_DestinosTarifasGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen + .Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener la tarifa de los destinos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function +#End Region + End Class diff --git a/Transportes/Boletos.aspx b/Transportes/Boletos.aspx index a15c547b1..26908782f 100644 --- a/Transportes/Boletos.aspx +++ b/Transportes/Boletos.aspx @@ -42,8 +42,13 @@ margin: 5px; cursor: pointer; color: white; + text-align: center; } + .nodisponible:hover { + color: #fff; + } + .chofer { align-items: center; text-align: center; @@ -163,26 +168,6 @@ -
    -
    - - - - - - -
    -
    -
    - - +
    +
    + + + + + + +
    +
    + + + @@ -217,7 +222,7 @@
    -
    +
    @@ -241,7 +246,7 @@      - diff --git a/Transportes/Boletos.aspx.vb b/Transportes/Boletos.aspx.vb index 249efca19..869255596 100644 --- a/Transportes/Boletos.aspx.vb +++ b/Transportes/Boletos.aspx.vb @@ -2,12 +2,12 @@ Partial Class Boletos Inherits ClsPaginas - Private Property asientoSeleccionado As String + Private Property AsientoSeleccionado As String Get - Return ViewState("asientoSeleccionado").ToString() + Return ViewState("AsientoSeleccionado").ToString() End Get Set(value As String) - ViewState("asientoSeleccionado") = value + ViewState("AsientoSeleccionado") = value End Set End Property Private Property Importe As Decimal @@ -21,12 +21,20 @@ Partial Class Boletos Private Property CveViaje As Integer Get - Return ViewState("CveViaje").ToString().toentero + Return ViewState("CveViaje").ToString().ToEntero End Get Set(value As Integer) ViewState("CveViaje") = value End Set End Property + Private Property CveRuta As Integer + Get + Return ViewState("CveRuta").ToString().ToEntero + End Get + Set(value As Integer) + ViewState("CveRuta") = value + End Set + End Property Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load @@ -34,11 +42,13 @@ Partial Class Boletos If Request.QueryString("CveViaje") Is Nothing Then Response.Redirect("/Transportes/ListadoViajes.aspx") End If + AsientoSeleccionado = "" + CveRuta = 0 CveViaje = Request.QueryString("CveViaje").ToEntero DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True - InicializaCombos() CargaDatos() + InicializaCombos() End If End Sub @@ -47,8 +57,9 @@ Partial Class Boletos 'Datos Viaje Dim ObjViaje As New ClsTransportes Dim retorno As Boolean = ObjViaje.GetViajes(CveViaje.ToEntero, UsuarioActual.CveEmpresa) + ViewState("CveRuta") = ObjViaje.CveRuta If retorno Then - 'TxtRuta.Text = ObjViaje.Ruta.ToString + TxtRuta.Text = ObjViaje.Ruta TxtFecha.Text = ObjViaje.Fecha.ToString End If @@ -57,7 +68,7 @@ Partial Class Boletos Protected Sub InicializaCombos() 'Lista Destinos''carga específicos Dim ObjDestinos As New ClsDestinos() - If ObjDestinos.GetDestinos(-1, -1, -1, "", True, True, DateTime.Now) Then + If ObjDestinos.GetDestinos(CveRuta:=CveRuta) Then If ObjDestinos.DtResultados.Rows.Count > 0 Then @@ -76,18 +87,20 @@ Partial Class Boletos If DdlDestino.SelectedValue <> "" And DdlPartida.SelectedValue <> "" Then Dim ObjDestinos As New ClsTransportes() - If ObjDestinos.GetDestinosTarifas(DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero) Then - Dim tImporte As Decimal = ObjDestinos.DtResultados.FiltroPrimeroValor("Importe").ToDecimal - If tImporte > 0 Then - TxtCosto.Text = $"El precio de su boleto es ${tImporte}" + Dim retorno As Boolean = ObjDestinos.GetDestinosTarifas(DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero) + Dim ImporteR As Decimal = ObjDestinos.DtResultados.FiltroPrimeroValor("Importe").ToDecimal + If retorno Then + If ImporteR > 0 Then + Dim redondeado As String = CStr(Math.Round(ImporteR, 2)) + ViewState("Importe") = redondeado + TxtCosto.Text = $"El precio de su boleto es ${Importe}" BtnGuardar.Visible = True upPanel.Visible = True - Importe = tImporte Else TxtCosto.Text = "" BtnGuardar.Visible = False upPanel.Visible = False - Importe = 0 + ViewState("Importe") = 0 End If End If End If @@ -97,25 +110,21 @@ Partial Class Boletos Dim linkButton As LinkButton = DirectCast(sender, LinkButton) Dim buttonID As String = linkButton.ID linkButton.CssClass += " activo" - asientoSeleccionado = buttonID + ViewState("AsientoSeleccionado") = buttonID End Sub Protected Sub AddBoleto(sender As Object, e As EventArgs) - If asientoSeleccionado = "" Then - Alert("Se requiere seleccionar su asiento") + If AsientoSeleccionado = "" Then + Alert("Se requiere seleccionar su asiento", TipoMensaje.MsgAdvertencia) Exit Sub End If - 'Page.Response.Write("") - 'Page.Response.Write("") - Dim ObjTransporte As New ClsTransportes() ObjTransporte.IniciaTransacSQL() Try - asientoSeleccionado = asientoSeleccionado.Replace("A", "") - Dim retorno As Integer = ObjTransporte.AddViajePasajero(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, 0.0, asientoSeleccionado.ToEntero, - TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario) + AsientoSeleccionado = AsientoSeleccionado.Replace("A", "") + Dim retorno As Integer = ObjTransporte.AddViajePasajero(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, AsientoSeleccionado.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario) If retorno > 1 Then ObjTransporte.Commit() diff --git a/Transportes/ListadoViajes.aspx b/Transportes/ListadoViajes.aspx index c22a2f64a..9377bb548 100644 --- a/Transportes/ListadoViajes.aspx +++ b/Transportes/ListadoViajes.aspx @@ -24,11 +24,10 @@
  • - Agregar viaje + Agregar viaje
  • - Contratos
  • @@ -104,6 +103,9 @@ CssClass="btn btn-circle btn-sm red" OnClick="RemoveViaje" Text="" data-toggle="confirmation" data-popout="true" data-original-title='<%# If(Eval("CveMasivo").ToString <> "", "Eliminación masiva", "Confirmar") %>' data-btn-ok-label="si" /> + diff --git a/Transportes/ListadoViajes.aspx.vb b/Transportes/ListadoViajes.aspx.vb index dae28a9b7..4207e0c93 100644 --- a/Transportes/ListadoViajes.aspx.vb +++ b/Transportes/ListadoViajes.aspx.vb @@ -41,10 +41,9 @@ Partial Class ListadoViajes 'Lista Destinos' Dim ObjDestinos As New ClsDestinos() - If ObjDestinos.GetDestinos(-1, -1, -1, "", True, True, DateTime.Now) Then + If ObjDestinos.GetDestinos() Then If ObjDestinos.DtResultados.Rows.Count > 0 Then - DdlPartida.DataSource = ObjDestinos.DtResultados DdlPartida.DataBind() DdlPartida.Items.Insert(0, New ListItem("Seleccione Partida", "")) @@ -72,7 +71,7 @@ Partial Class ListadoViajes Private Sub CargaDatos() Dim ObjTransportes As New ClsTransportes - If ObjTransportes.GetViajes() Then + If ObjTransportes.GetViajes(-1, UsuarioActual.CveEmpresa) Then GvViajes.DataSource = ObjTransportes.DtResultados ObjTransportes.Dispose() GvViajes.DataBind() @@ -97,10 +96,8 @@ Partial Class ListadoViajes End Sub Protected Sub AddViaje(sender As Object, e As EventArgs) - Dim ObjTransportes As New ClsTransportes - ObjTransportes.IniciaTransacSQL() If IsMasivo.Checked = True Then @@ -109,7 +106,7 @@ Partial Class ListadoViajes Exit Sub End If - Dim CveMasivo = DateTimeOffset.Now.ToUnixTimeSeconds().ToEntero + Dim CveMasivo As Integer = DateTimeOffset.Now.ToUnixTimeSeconds().ToEntero Dim fechaInicial As DateTime = DateTime.Parse(TxtFechaInicial.Text) Dim frecuencia As Integer = Integer.Parse(TxtFrecuencia.Text) @@ -141,7 +138,6 @@ Partial Class ListadoViajes ObjTransportes.Dispose() CargaDatos() Alert("El viaje masivo se registró correctamente.", TipoMensaje.MsgInformacion) - Else Try If BtnGuardar.Text = "Guardar" Then @@ -157,18 +153,14 @@ Partial Class ListadoViajes TxtFechaViaje.Text = "" DdlPartida.Text = "" DdlDestino.SelectedValue = "" - End If - Else Dim id As Integer = Convert.ToInt32(Request.QueryString("CveViaje")) If ObjTransportes.UpdateViajes(id, DdlRutas.Text.ToEntero, DdlTransporte.Text.ToEntero, DdlChofer.Text.ToEntero, UsuarioActual.CveEmpresa, TxtFechaViaje.Text.ToDate, DdlPartida.Text.ToEntero, DdlDestino.Text.ToEntero) = True Then Alert("El viaje se modificó correctamente.", TipoMensaje.MsgInformacion) ObjTransportes.Commit() - End If - End If Catch ex As Exception ObjTransportes.RollBack() @@ -203,7 +195,7 @@ Partial Class ListadoViajes Protected Sub RemoveViaje(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim CveMasivo = GvRow.DataKey("CveMasivo") + Dim CveMasivo As String = GvRow.DataKey("CveMasivo") Dim ObjTransportes As New ClsTransportes @@ -233,6 +225,12 @@ Partial Class ListadoViajes Protected Sub ToggleMasivo(sender As Object, e As EventArgs) DivFechaMasivo.Visible = IsMasivo.Checked RegistraScript(String.Format("$('#{0}').modal('show');", "ModalAgregar")) - End Sub + + Protected Sub GoViaje(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + Dim CveViaje As String = GvRow.DataKey("CveViaje") + Response.Redirect(String.Format("~/Transportes/Boletos.aspx?CveViaje={0}", CveViaje)) + End Sub + End Class From bf02aaf09da3a1b1a192b7c2684a062640088d35 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 21 Dec 2023 18:42:45 -0700 Subject: [PATCH 14/64] - distinct proyecto -- option explicit --- Sistemas/UsuarioDetalle.aspx.vb | 56 ++++++++++++++++----------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/Sistemas/UsuarioDetalle.aspx.vb b/Sistemas/UsuarioDetalle.aspx.vb index dd7cfaddb..e00a7dc2f 100644 --- a/Sistemas/UsuarioDetalle.aspx.vb +++ b/Sistemas/UsuarioDetalle.aspx.vb @@ -621,7 +621,7 @@ Partial Class Sistemas_UsuarioDetalle If CveUsuario < 0 Then Exit Sub 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("CveAlmacenAsignado") = dr(0)("CveAlmacen") ViewState("CveVendedorAsignado") = dr(0)("CveVendedor") @@ -650,7 +650,7 @@ Partial Class Sistemas_UsuarioDetalle DdlRol.Items.Clear() If UsuarioActual.CveRol <> 1 Then - Dim CveEmpresaselected = DdlEmpresa.SelectedValue.ToEntero + Dim CveEmpresaselected As Integer = DdlEmpresa.SelectedValue.ToEntero If CveEmpresaselected > 0 Then If UsuarioControlado Then DdlRol.DataSource = DTRolesControlado.FiltraParametros($"CveRol NOT IN (1) AND CveEmpresa = {CveEmpresaselected}") @@ -683,7 +683,7 @@ Partial Class Sistemas_UsuarioDetalle End Sub Public Sub CargarEmpresa() 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 DtEmpresasUsuario = ClsUsuarios.DtResultados DtEmpresasUsuario.Columns.Add("Accion", GetType(Integer)) @@ -830,7 +830,7 @@ Partial Class Sistemas_UsuarioDetalle 'Cargo la ultima empresa consultada en asignaciones Dim DtValida As DataTable = DtAsignacionesMultiEmpresa.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresaAnterior)) 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)("CvePersonal") = DdlPersonal.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)) 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)("CvePersonal") = DdlPersonal.SelectedValue.ToEntero dr(0)("CveVendedor") = DdlVendedor.SelectedValue.ToEntero @@ -1556,7 +1556,7 @@ Partial Class Sistemas_UsuarioDetalle If UsuarioControlado Then DdlProyecto.DataSource = GetProyectosSinGV(DtSubProyectosControlado.FiltraParametros($"CveEmpresa = {DdlEmpresaAsignaciones.SelectedValue}")) 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 DdlProyecto.DataBind() @@ -1686,18 +1686,18 @@ Partial Class Sistemas_UsuarioDetalle Dim DtValida As DataTable = DtSubProyectos.FiltraParametros(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue)) If DtValida.Rows.Count > 0 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).AcceptChanges() 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).AcceptChanges() Else Alert("El SubProyecto ya se encuentra agregado.", TipoMensaje.MsgAdvertencia) End If Else - Dim dr = DtSubProyectos.NewRow + Dim dr As DataRow = DtSubProyectos.NewRow dr("CveProyecto") = If(DdlEmpresaAsignaciones.SelectedValue.ToEntero = 66, "-1", DdlProyecto.SelectedValue) dr("Proyecto") = If(DdlEmpresaAsignaciones.SelectedValue.ToEntero = 66, "-1", DdlProyecto.SelectedItem.Text) @@ -2665,7 +2665,7 @@ Partial Class Sistemas_UsuarioDetalle End If 'VALIDA LOS ESTATUS QUE TIENE EL USUARIO 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 Habilitado As Boolean = (DtValida IsNot Nothing AndAlso DtValida.Rows.Count = 1) chkEstatus.Enabled = Habilitado @@ -2805,7 +2805,7 @@ Partial Class Sistemas_UsuarioDetalle 'VALIDA LOS ESTATUS QUE TIENE EL USUARIO 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 Habilitado As Boolean = (DtValida IsNot Nothing AndAlso DtValida.Rows.Count = 1) chkEstatus.Enabled = Habilitado @@ -2956,7 +2956,7 @@ Partial Class Sistemas_UsuarioDetalle Dim CveSubProyecto As Integer = Row.DataKey("CveSubProyecto").ToEntero Dim CveProyecto As Integer = Row.DataKey("CveProyecto").ToEntero 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) If CveEstatus > 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() End Sub Protected Sub ChkPermitirEmpresa_CheckedChanged(sender As Object, e As EventArgs) - Dim check = CType(sender, CheckBox) - Dim pCveEmpresa = CType(check.NamingContainer, GridViewRow).FCHiddenField("HdnCveEmpresa").Value - Dim pEmpresa = CType(check.NamingContainer, GridViewRow).FCHiddenField("HdnEmpresa").Value + Dim check As CheckBox = CType(sender, CheckBox) + Dim pCveEmpresa As String = CType(check.NamingContainer, GridViewRow).FCHiddenField("HdnCveEmpresa").Value + Dim pEmpresa As String = CType(check.NamingContainer, GridViewRow).FCHiddenField("HdnEmpresa").Value If check.Checked 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("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 Row("AplicaRestriccion") = 1 @@ -3798,7 +3798,7 @@ Partial Class Sistemas_UsuarioDetalle Dim ObjUsuarios As New ClsSisUsuarios 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("UsuariosModulos").ToString.ToEntero > 0 Then DivClonarModulos.Visible = True @@ -3831,7 +3831,7 @@ Partial Class Sistemas_UsuarioDetalle End Sub Private Function ClonarUsuario(CveUsuarioClonado As Integer, ObjUsuarios As ClsSisUsuarios) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False 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 @@ -3930,11 +3930,11 @@ Partial Class Sistemas_UsuarioDetalle End Sub Protected Sub ChkPermitirEmpresaAsignar_CheckedChanged(sender As Object, e As EventArgs) - Dim check = CType(sender, CheckBox) - Dim pCveEmpresa = CType(check.NamingContainer, GridViewRow).FCHiddenField("HdnCveEmpresa").Value - Dim pEmpresa = CType(check.NamingContainer, GridViewRow).FCHiddenField("HdnEmpresa").Value + Dim check As CheckBox = CType(sender, CheckBox) + Dim pCveEmpresa As String = CType(check.NamingContainer, GridViewRow).FCHiddenField("HdnCveEmpresa").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 Dr(0)("TienePermiso") = 2 Else @@ -3992,7 +3992,7 @@ Partial Class Sistemas_UsuarioDetalle If DdlRolAsignar.SelectedValue = "-2" Then DTRolesAsignar.Rows.Clear() 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 dr("CveRol") = Item.Value dr("Rol") = Item.Text @@ -4004,18 +4004,18 @@ Partial Class Sistemas_UsuarioDetalle Else If DtValida.Rows.Count > 0 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).AcceptChanges() 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).AcceptChanges() Else Alert("El Roles ya se encuentra agregado.", TipoMensaje.MsgAdvertencia) End If Else - Dim dr = DTRolesAsignar.NewRow + Dim dr As DataRow = DTRolesAsignar.NewRow dr("CveRol") = DdlRolAsignar.SelectedValue 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 - 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 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 - 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 Dr(0)("Accion") = 3 From e38bd1adbdb61e748953288fab091cda20f13f43 Mon Sep 17 00:00:00 2001 From: AbrahamCastilloV Date: Thu, 21 Dec 2023 19:11:03 -0700 Subject: [PATCH 15/64] =?UTF-8?q?--creaci=C3=B3n=20de=20listado=20de=20bol?= =?UTF-8?q?etos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsTransportes.vb | 26 +++++++++- Transportes/Boletos.aspx | 94 ++++++++++++++++++++++++++----------- Transportes/Boletos.aspx.vb | 19 ++++++-- 3 files changed, 107 insertions(+), 32 deletions(-) diff --git a/App_Code/ClsTransportes.vb b/App_Code/ClsTransportes.vb index 2d3fb644d..57e0f982c 100644 --- a/App_Code/ClsTransportes.vb +++ b/App_Code/ClsTransportes.vb @@ -271,7 +271,7 @@ Public Class ClsTransportes #End Region #Region "Boletos" - Public Function AddViajePasajero(CveViaje As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal, Asiento As Integer, Nombre As String, Visa As String, Celular As String, Sexo As Boolean, Observacion As String, CveUsuario As Integer) As Integer + Public Function AddViajePasajeros(CveViaje As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal, Asiento As Integer, Nombre As String, Visa As String, Celular As String, Sexo As Boolean, Observacion As String, CveUsuario As Integer) As Integer Dim Retorno As Integer = -1 DataAdapter("PA_Trans_ViajesPasajerosAdd") @@ -297,6 +297,30 @@ Public Class ClsTransportes OnError("Ocurrió un error al guardar el nuevo boleto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try + Return Retorno + End Function + Public Function GetViajesPasajeros(CveViaje As Integer, Optional CveViajePasajero As Integer = 0) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("[PA_Trans_ViajesPasajerosGet]") + If CveViajePasajero <> 0 Then + With SqlAdapter.SelectCommand.Parameters + .Add("@CveViaje", SqlDbType.Int).Value = CveViaje + .Add("@CveViajePasajero", SqlDbType.Int).Value = CveViajePasajero + End With + Else + With SqlAdapter.SelectCommand.Parameters + .Add("@CveViaje", SqlDbType.Int).Value = CveViaje + End With + End If + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el catálogo de viajes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno End Function #End Region diff --git a/Transportes/Boletos.aspx b/Transportes/Boletos.aspx index 26908782f..047276b85 100644 --- a/Transportes/Boletos.aspx +++ b/Transportes/Boletos.aspx @@ -15,21 +15,21 @@ display: inline-block; width: 45px; height: 45px; - border: 2px solid #26C281; + border: 2px solid #45b6af; border-radius: 10px !important; margin: .1px; cursor: pointer; - color: #26C281; + color: #45b6af; text-align: center; } .disponible:hover { - background-color: #26C281; + background-color: #45b6af; color: #fff; } .disponible.activo { - background-color: #26C281; + background-color: #45b6af; color: #fff; } @@ -60,12 +60,6 @@ cursor: pointer; color: black; } - - .tarifa { - font-weight: bold; - font-size: 1.6rem; - color: #26C281 - } @@ -84,7 +78,7 @@ -
    +
    @@ -208,10 +202,14 @@
    - - + +
    +
    + +
    + @@ -219,6 +217,60 @@
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    @@ -481,18 +533,6 @@
    - <%-- --%> diff --git a/Transportes/Boletos.aspx.vb b/Transportes/Boletos.aspx.vb index 869255596..e178ace90 100644 --- a/Transportes/Boletos.aspx.vb +++ b/Transportes/Boletos.aspx.vb @@ -2,6 +2,7 @@ Partial Class Boletos Inherits ClsPaginas +#Region "Propiedades" Private Property AsientoSeleccionado As String Get Return ViewState("AsientoSeleccionado").ToString() @@ -35,7 +36,7 @@ Partial Class Boletos ViewState("CveRuta") = value End Set End Property - +#End Region Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then @@ -56,12 +57,19 @@ Partial Class Boletos Private Sub CargaDatos() 'Datos Viaje Dim ObjViaje As New ClsTransportes - Dim retorno As Boolean = ObjViaje.GetViajes(CveViaje.ToEntero, UsuarioActual.CveEmpresa) + Dim retornoViaje As Boolean = ObjViaje.GetViajes(CveViaje.ToEntero, UsuarioActual.CveEmpresa) ViewState("CveRuta") = ObjViaje.CveRuta - If retorno Then + If retornoViaje Then TxtRuta.Text = ObjViaje.Ruta TxtFecha.Text = ObjViaje.Fecha.ToString End If + 'Boletos Vendidos + Dim retornoBoletos As Boolean = ObjViaje.GetViajesPasajeros(CveViaje) + If retornoBoletos Then + GvBoletos.DataSource = ObjViaje.DtResultados + ObjViaje.Dispose() + GvBoletos.DataBind() + End If End Sub @@ -106,12 +114,14 @@ Partial Class Boletos End If End Sub + Protected Sub OnLinkButtonClick(sender As Object, e As EventArgs) Dim linkButton As LinkButton = DirectCast(sender, LinkButton) Dim buttonID As String = linkButton.ID linkButton.CssClass += " activo" ViewState("AsientoSeleccionado") = buttonID End Sub + Protected Sub AddBoleto(sender As Object, e As EventArgs) If AsientoSeleccionado = "" Then @@ -124,7 +134,7 @@ Partial Class Boletos Try AsientoSeleccionado = AsientoSeleccionado.Replace("A", "") - Dim retorno As Integer = ObjTransporte.AddViajePasajero(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, AsientoSeleccionado.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario) + Dim retorno As Integer = ObjTransporte.AddViajePasajeros(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, AsientoSeleccionado.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario) If retorno > 1 Then ObjTransporte.Commit() @@ -137,4 +147,5 @@ Partial Class Boletos End Try End Sub + End Class From b431ee5400b1c71714009f3fe6921e53c528a03d Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 21 Dec 2023 19:26:47 -0700 Subject: [PATCH 16/64] Entradas salidas ajustes --- Inventarios/EntradasSalidas.aspx | 161 ++++++++------- Inventarios/EntradasSalidas.aspx.vb | 291 +++++++++++++++++++++------- OS/OrdenesServicios.aspx.vb | 48 +++-- 3 files changed, 339 insertions(+), 161 deletions(-) diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx index 399ce3807..dc94b6426 100644 --- a/Inventarios/EntradasSalidas.aspx +++ b/Inventarios/EntradasSalidas.aspx @@ -664,7 +664,8 @@
  • @@ -1929,58 +1974,42 @@ } $('#<%= GvM.ClientID%>').ADScroll({ 'height': Alto }); - <%-- if ($("#<%= DdlProductows.ClientID%>")) { - if (!($('#<%= HFProducto.ClientID %>').val() === '')) { - AddItem($('#<%= HFTProducto.ClientID%>').val(), $('#<%= HFProducto.ClientID %>').val()); - } - } - if ($("#<%= DdlProductows.ClientID%>").data('creado') === '1') { } else { - $("#<%= DdlProductows.ClientID%>").data('creado', '1') - $("#<%= DdlProductows.ClientID%>").select2({ - ajax: { - url: "/Ashx/SIGWeb.ashx", - dataType: 'json', - delay: 250, - data: function (params) { - return { - Name: params.term, // search term - Metodo: 'getps' - }; - }, - processResults: function (data, params) { - // parse the results into the format expected by Select2 - // since we are using custom formatting functions we do not need to - // alter the remote JSON data, except to indicate that infinite - // scrolling can be used - params.page = params.page || 1; - - return { - results: data, - pagination: { - more: (params.page * 30) < data.total_count - } - }; - }, - cache: true - }, - escapeMarkup: function (markup) { return markup; }, // let our custom formatter work - minimumInputLength: 3 - }); - } - if ($("#<%= DdlProductows.ClientID%>")) { - if (!($('#<%= HFProducto.ClientID %>').val() === '')) { - AddItem($('#<%= HFTProducto.ClientID%>').val(), $('#<%= HFProducto.ClientID %>').val()); - } - $("#<%= DdlProductows.ClientID%>").on("select2:select", function (e) { console.log(e); $('#<%= HFProducto.ClientID %>').val(e.params.data.id); $('#<%= HFTProducto.ClientID%>').val(e.params.data.text); $('#<%= myhidenbutton.ClientID %>').click(); }); - } - - if ($("#<%= DdlProducto.ClientID%>")) { - $("#<%= DdlProducto.ClientID%>").on("select2:select", function (e) { console.log(e); $('#<%= HFProducto.ClientID %>').val(e.params.data.id); $('#<%= HFTProducto.ClientID%>').val(e.params.data.text); }); - - }--%> + }); + + function ValidaDecimal6digitsM0(val, args) { + if (args.Value.match(/^[1-9]\d*(\.\d{1,6})?$/)) + args.IsValid = true; + else + args.IsValid = false; + } + + function calcularTotal() { + var cantidad = parseFloat($('#txtCantidad').val().replace(/,/g, '')); + var precio = parseFloat($('#txtPrecio').val().replace(/,/g, '')); + + if (!isNaN(cantidad) && !isNaN(precio)) { + var resultado = cantidad * precio; + var formatoResultado = formatoMoneda(resultado); + $('#TdTotal').text(formatoResultado); + } else { + $('#TdTotal').text(''); + } + } + + function formatoMoneda(valor) { + if (valor % 1 !== 0) { // Si el valor tiene decimales + return valor.toLocaleString('es-MX', { + minimumFractionDigits: 2, + maximumFractionDigits: 2 + }); + } else { + return valor.toLocaleString('es-MX'); // Sin decimales + } + } + diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index b4f6e27c7..4c2492a0c 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -275,6 +275,23 @@ Partial Class Inventarios_EntradasSalidas ViewState("CveMovimientoDetalleEdit") = value End Set End Property + + + Public Property IndexActualTabla() As Integer + Get + + If ViewState("IndexActualTabla") Is Nothing Then + ViewState("IndexActualTabla") = -1 + End If + + Return ViewState("IndexActualTabla").ToString.ToEntero + End Get + Set(value As Integer) + ViewState("IndexActualTabla") = value + End Set + End Property + + Public Property CveAFEdit() As Integer Get Return ViewState("CveAFEdit").ToString.ToEntero @@ -1287,10 +1304,23 @@ Partial Class Inventarios_EntradasSalidas End Sub Private Sub LimpiarAgregar() - 'DdlClasificacion.SelectedValue = "-1" txtCantidad.Text = "" TxtnLote.Text = "" - TxtObservacionesdetalle.Text = "" + LblCodigo.Text = "" + TxtnSerie.Text = "" + TxtnFechaCaducidad.Text = "" + HdnCodigoAF.Value = "-1" + HdnCveActivoFijo.Value = "-1" + txtPrecio.Text = "" + + divSerie.Visible = False + divLote.Visible = False + divSeccionAlmacen.Visible = False + divCaducidad.Visible = False + + + UpAgregar.Update() + End Sub Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click @@ -1425,12 +1455,23 @@ Partial Class Inventarios_EntradasSalidas ' AgregarPS() 'End Sub Protected Sub LkAgregarDetalle_Click(sender As Object, e As EventArgs) Handles LkAgregarDetalle.Click - If CveMovimientoDetalleEdit > 0 Then - ActualizarPS() + + If CveMovimiento > 0 Then + If CveMovimientoDetalleEdit > 0 Then + ActualizarPS() + Else + AgregarPS() + End If Else - AgregarPS() + If IndexActualTabla >= 0 Then + ActualizarPS() + Else + AgregarPS() + End If End If + + End Sub Protected Sub BtnSerieAddNew_Click(sender As Object, e As EventArgs) AgregarPS() @@ -1464,9 +1505,10 @@ Partial Class Inventarios_EntradasSalidas TxtnFechaCaducidad.Text = "" HdnCodigoAF.Value = "-1" HdnCveActivoFijo.Value = "-1" + txtPrecio.Text = "" DdlModalCultivosCuadro.SelectedValueExist(-1) - RegistraScript("CodigoAF = "";") + RegistraScript("CodigoAF = '';") If Not UsuarioActual.Empresa.Funcionalidad(105).ToString = "1" Then DdlProducto2.SelectedValue = "-1" @@ -1475,11 +1517,16 @@ Partial Class Inventarios_EntradasSalidas DdlProducto2.SelectedText = "" End If - txtCantidad.Focus() + If ChkContinuarRegistrando.Checked Then + txtCantidad.Focus() + Else + RegistraScript("$('#ModalAgregar').modal('hide');") + End If + End Sub - Protected Sub AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Decimal, PU As Decimal, Serie As String, CodigoAF As String, Codigo As String, CveAF As String, Observaciones As String, Lote As String, FechaCaducidad As Date, CveSeccionAlmacen As Integer, SeccionAlmacen As String, Optional CargarGV As Boolean = True, Optional CveCultivoCuadroDetalle As Integer = -1) + Protected Sub AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Decimal, PU As Decimal, Serie As String, CodigoAF As String, Codigo As String, CveAF As String, Observaciones As String, Lote As String, FechaCaducidad As Date, CveSeccionAlmacen As Integer, SeccionAlmacen As String, Optional CargarGV As Boolean = True, Optional CveCultivoCuadroDetalle As Integer = -1, Optional IndexEspecidico As Integer = -1) If DdlAlmacen.SelectedValue.ToEntero <= 0 Then Alert("Seleccione un almacen", TipoMensaje.MsgAdvertencia) : RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") : DdlProducto2.SelectedText = "" : Exit Sub @@ -1539,55 +1586,112 @@ Partial Class Inventarios_EntradasSalidas End If End If - If Valido Then + If IndexEspecidico >= 0 Then + Dim CveClasificacion As Integer 'Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("", "PS") If RowPS IsNot Nothing Then CveClasificacion = RowPS("CveClasificacion").ToString.ToEntero - 'VALIDA QUE LA SERIE NO SEA IGUAL AL CODIGO O CODIGOBARRAS - If Serie <> "" And (Serie.ToUpper = RowPS("Codigo").ToString.ToUpper Or Serie.ToUpper = RowPS("CodigoBarras").ToString.ToUpper) Then - Alert($"La serie indicada {Serie} coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) - Exit Sub + If Valido Then + + DtMovimientos.Rows(IndexEspecidico)("Cantidad") = Cantidad + DtMovimientos.Rows(IndexEspecidico)("CveUM") = CveUM + DtMovimientos.Rows(IndexEspecidico)("UnidadMedida") = UM + DtMovimientos.Rows(IndexEspecidico)("CvePS") = CvePS + + If Codigo = "-1" Then + DtMovimientos.Rows(IndexEspecidico)("CodigoPS") = PS + Else + DtMovimientos.Rows(IndexEspecidico)("CodigoPS") = String.Format("{0} - {1}", Codigo, PS) + End If + + + DtMovimientos.Rows(IndexEspecidico)("PS") = PS + DtMovimientos.Rows(IndexEspecidico)("PU") = PU + DtMovimientos.Rows(IndexEspecidico)("PUExtranjero") = PU + DtMovimientos.Rows(IndexEspecidico)("Total") = Cantidad * PU + DtMovimientos.Rows(IndexEspecidico)("CveClasificacion") = CveClasificacion + DtMovimientos.Rows(IndexEspecidico)("Estatus") = "" + DtMovimientos.Rows(IndexEspecidico)("CveSeccionAlmacen") = CveSeccionAlmacen + DtMovimientos.Rows(IndexEspecidico)("SeccionAlmacen") = SeccionAlmacen + DtMovimientos.Rows(IndexEspecidico)("CodigoAF") = CodigoAF + DtMovimientos.Rows(IndexEspecidico)("Codigo") = Codigo + DtMovimientos.Rows(IndexEspecidico)("CveAF") = CveAF + DtMovimientos.Rows(IndexEspecidico)("Serie") = If(Serie <> "", Serie, "") + DtMovimientos.Rows(IndexEspecidico)("Lote") = If(Lote <> "", Lote, "") + DtMovimientos.Rows(IndexEspecidico)("FechaCaducidad") = FechaCaducidad + DtMovimientos.Rows(IndexEspecidico)("Observaciones") = Observaciones + DtMovimientos.Rows(IndexEspecidico)("AplicaCaducidad") = RowPS("AplicaCaducidad").ToString + DtMovimientos.Rows(IndexEspecidico)("CveCultivoCuadroDetalle") = CveCultivoCuadroDetalle + + DtMovimientos.AcceptChanges() + + If CargarGV Then + CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' ")) + RegistraScript("playsonidito('beep-07.wav')") + End If End If - If String.IsNullOrEmpty(PS.Trim()) Then - PS = RowPS("PS").ToString() + Else + If Valido Then + Dim CveClasificacion As Integer + 'Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("", "PS") + If RowPS IsNot Nothing Then CveClasificacion = RowPS("CveClasificacion").ToString.ToEntero + + 'VALIDA QUE LA SERIE NO SEA IGUAL AL CODIGO O CODIGOBARRAS + If Serie <> "" And (Serie.ToUpper = RowPS("Codigo").ToString.ToUpper Or Serie.ToUpper = RowPS("CodigoBarras").ToString.ToUpper) Then + Alert($"La serie indicada {Serie} coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + If String.IsNullOrEmpty(PS.Trim()) Then + PS = RowPS("PS").ToString() + End If + + Dim registro As DataRow = DtMovimientos.NewRow + registro.Item("Cantidad") = Cantidad + registro.Item("CveUM") = CveUM + registro.Item("UnidadMedida") = UM + registro.Item("CvePS") = CvePS + + If Codigo = "-1" Then + registro.Item("CodigoPS") = PS + Else + registro.Item("CodigoPS") = String.Format("{0} - {1}", Codigo, PS) + End If + + + registro.Item("PS") = PS + registro.Item("PU") = PU + 'registro.Item("PUExtranjero") = PU + registro.Item("Total") = Cantidad * PU + registro.Item("CveClasificacion") = CveClasificacion + registro.Item("Estatus") = "" + registro.Item("CveSeccionAlmacen") = CveSeccionAlmacen + registro.Item("SeccionAlmacen") = SeccionAlmacen + + registro.Item("CodigoAF") = CodigoAF + registro.Item("Codigo") = Codigo + registro.Item("CveAF") = CveAF + registro.Item("Serie") = If(Serie <> "", Serie, "") + registro.Item("Lote") = If(Lote <> "", Lote, "") + registro.Item("FechaCaducidad") = FechaCaducidad + registro.Item("Observaciones") = Observaciones + registro.Item("AplicaCaducidad") = RowPS("AplicaCaducidad").ToString + registro.Item("CveCultivoCuadroDetalle") = CveCultivoCuadroDetalle + + DtMovimientos.Rows.Add(registro) + + If CargarGV Then + CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' ")) + RegistraScript("playsonidito('beep-07.wav')") + End If + End If - - Dim registro As DataRow = DtMovimientos.NewRow - registro.Item("Cantidad") = Cantidad - registro.Item("CveUM") = CveUM - registro.Item("UnidadMedida") = UM - registro.Item("CvePS") = CvePS - registro.Item("CodigoPS") = String.Format("{0} - {1}", Codigo, PS) - registro.Item("PS") = PS - registro.Item("PU") = PU - 'registro.Item("PUExtranjero") = PU - registro.Item("Total") = Cantidad * PU - registro.Item("CveClasificacion") = CveClasificacion - registro.Item("Estatus") = "" - registro.Item("CveSeccionAlmacen") = CveSeccionAlmacen - registro.Item("SeccionAlmacen") = SeccionAlmacen - - registro.Item("CodigoAF") = CodigoAF - registro.Item("Codigo") = Codigo - registro.Item("CveAF") = CveAF - registro.Item("Serie") = If(Serie <> "", Serie, "") - registro.Item("Lote") = If(Lote <> "", Lote, "") - registro.Item("FechaCaducidad") = FechaCaducidad - registro.Item("Observaciones") = Observaciones - registro.Item("AplicaCaducidad") = RowPS("AplicaCaducidad").ToString - registro.Item("CveCultivoCuadroDetalle") = CveCultivoCuadroDetalle - - DtMovimientos.Rows.Add(registro) - - If CargarGV Then - CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' ")) - RegistraScript("playsonidito('beep-07.wav')") - End If - End If + + End Sub Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click @@ -2432,7 +2536,7 @@ Partial Class Inventarios_EntradasSalidas Private Sub VisualizaPU(Opcion As Boolean) 'tdPU.Visible = Opcion 'tdTxtPU.Visible = Opcion - txtPrecio.Visible = Opcion + divPrecio.Visible = Opcion GvM.Columns(4).Visible = Opcion TdTotal.Visible = Opcion @@ -2499,12 +2603,7 @@ Partial Class Inventarios_EntradasSalidas End If If CBool(dr("AplicaSeccion")) Then divSeccionAlmacen.Visible = True - 'DdlSeccionAlmacen.Items.Clear() - 'DdlSeccionAlmacen.ClearSelection() - 'DdlSeccionAlmacen.DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero) - 'DdlSeccionAlmacen.DataBind() CargaSeccionesAlmacen(DdlSeccionAlmacen, DdlAlmacen.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) - End If If CBool(dr("AplicaCaducidad")) Then divCaducidad.Visible = True @@ -2683,11 +2782,21 @@ Partial Class Inventarios_EntradasSalidas End If End Sub Protected Sub GvM_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvM.RowEditing - Dim i As Integer = e.NewEditIndex - GvM.EditIndex = i - Dim Gv As GridView = DirectCast(sender, GridView) - Dim GvRow As GridViewRow = Gv.Rows(i) + + End Sub + + + Protected Sub imgE_Click(sender As Object, e As EventArgs) + + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + + 'Dim i As Integer = e.NewEditIndex + 'GvM.EditIndex = + + IndexActualTabla = GvRow.RowIndex + + If CveMovimiento > 0 Then CveMovimientoDetalleEdit = GvRow.DataKey("CveMovimientoDetalle").ToEntero txtCantidad.Enabled = False @@ -2717,14 +2826,20 @@ Partial Class Inventarios_EntradasSalidas LkAgregarDetalle.Text = "Actualizar" Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero divPrecio.Visible = (Origen = 1) - txtPrecio.Visible = (Origen = 1) + 'txtPrecio.Visible = (Origen = 1) If UsuarioActual.CveRol = 1 Then divPrecio.Visible = True - txtPrecio.Visible = True + 'txtPrecio.Visible = True End If + + + ChkContinuarRegistrando.Checked = False + ChkContinuarRegistrando.Visible = False + UpAgregar.Update() RegistraScript("$('#ModalAgregar').modal()") - CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' ")) + + ' CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' ")) End Sub Protected Sub EditPS(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) @@ -2749,8 +2864,12 @@ Partial Class Inventarios_EntradasSalidas Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero divPrecio.Visible = Origen = 1 - txtPrecio.Visible = Origen = 1 + 'txtPrecio.Visible = Origen = 1 LkAgregarDetalle.Text = "Actualizar" + + ChkContinuarRegistrando.Checked = False + ChkContinuarRegistrando.Visible = False + UpAgregar.Update() RegistraScript("$('#ModalAgregar').modal()") CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' ")) @@ -5210,26 +5329,42 @@ Partial Class Inventarios_EntradasSalidas Private Sub ActualizarPS() - Dim ObjInventario As New ClsInventarios - If Not ObjInventario.UpdateMovimientoDetalle(txtCantidad.Text.ToDecimal, DdlUnidad.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero, txtPrecio.Text.ToDecimal, CveAFEdit, - CveMovimientoDetalleEdit, DdlSeccionAlmacen.SelectedValue.ToEntero, TxtnSerie.Text, TxtObservacionesdetalle.Text, - CveUsuarioModifico:=UsuarioActual.CveUsuario, CveCultivoCuadroDetalle:=DdlModalCultivosCuadro.SelectedValue.ToEntero) Then - Alert("Error al Actualizar los movimientos") - Else - GvM.EditIndex = -1 - 'cargar también los movimentos detalle - If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then - DtMovimientos = ObjInventario.DtResultados - CargaGVM(DtMovimientos) + If CveMovimientoDetalleEdit > 0 Then + + Dim ObjInventario As New ClsInventarios + If Not ObjInventario.UpdateMovimientoDetalle(txtCantidad.Text.ToDecimal, DdlUnidad.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero, txtPrecio.Text.ToDecimal, CveAFEdit, + CveMovimientoDetalleEdit, DdlSeccionAlmacen.SelectedValue.ToEntero, TxtnSerie.Text, TxtObservacionesdetalle.Text, + CveUsuarioModifico:=UsuarioActual.CveUsuario, CveCultivoCuadroDetalle:=DdlModalCultivosCuadro.SelectedValue.ToEntero) Then + Alert("Error al Actualizar los movimientos") + Else + GvM.EditIndex = -1 + 'cargar también los movimentos detalle + If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then + DtMovimientos = ObjInventario.DtResultados + CargaGVM(DtMovimientos) + End If + Alert("Movimiento actualizado correctamente") + RegistraScript("$('#ModalAgregar').modal('hide')") End If + + ObjInventario.Dispose() + + Else + AddNew(DdlProducto2.SelectedValue.ToEntero, DdlProducto2.SelectedText, DdlUnidad.SelectedValue.ToEntero, DdlUnidad.SelectedItem.Text, txtCantidad.Text.ToDecimal, + txtPrecio.Text.ToDecimal, TxtnSerie.Text.Replace(" ", String.Empty), LblCodigo.Text, HdnCodigoAF.Value, HdnCveActivoFijo.Value, TxtObservacionesdetalle.Text, + TxtnLote.Text.Trim, TxtnFechaCaducidad.Text.ToDate, DdlSeccionAlmacen.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedItem.Text, CveCultivoCuadroDetalle:=DdlModalCultivosCuadro.SelectedValue.ToEntero, IndexEspecidico:=IndexActualTabla) + LimpiarAgregar() Alert("Movimiento actualizado correctamente") RegistraScript("$('#ModalAgregar').modal('hide')") End If - ObjInventario.Dispose() End Sub + Private Sub limpiarModalDetalle() + + IndexActualTabla = -1 + CveMovimientoDetalleEdit = -1 txtCantidad.Enabled = True 'DdlClasificacion.Enabled = True DdlProducto2.Enabled = True @@ -5256,7 +5391,11 @@ Partial Class Inventarios_EntradasSalidas End If Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero divPrecio.Visible = Origen = 1 - txtPrecio.Visible = Origen = 1 + 'txtPrecio.Visible = Origen = 1 + + ChkContinuarRegistrando.Checked = True + ChkContinuarRegistrando.Visible = True + UpAgregar.Update() End Sub @@ -5875,4 +6014,6 @@ Partial Class Inventarios_EntradasSalidas + + End Class diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index 1c1c2b60f..d08586d18 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -1316,16 +1316,19 @@ Partial Class OS_OrdenesServicios Next - For Each RowM As DataRow In TmpDTMaterialesDetalle.FiltraParametros(String.Format("CveConsecutivoDetalle = {0}", Consecutivo)).Rows - Dim CveClasificacion As Integer = RowM("CveClasificacion").ToString.ToEntero - Dim CvePSMaterial As Integer = RowM("CvePS").ToString.ToEntero - Dim CveUnidadMedidaM As Integer = RowM("CveUM").ToString.ToEntero - Dim CantidadMaterial As Integer = RowM("Cantidad").ToString.ToEntero + If UsuarioActual.Empresa.Funcionalidad(578) = "" Then + For Each RowM As DataRow In TmpDTMaterialesDetalle.FiltraParametros(String.Format("CveConsecutivoDetalle = {0}", Consecutivo)).Rows + Dim CveClasificacion As Integer = RowM("CveClasificacion").ToString.ToEntero + Dim CvePSMaterial As Integer = RowM("CvePS").ToString.ToEntero + Dim CveUnidadMedidaM As Integer = RowM("CveUM").ToString.ToEntero + Dim CantidadMaterial As Integer = RowM("Cantidad").ToString.ToEntero + + If Not ObjOrdenServicio.AddUpdateDetalleMateriales(-1, CveOsDetalle, CantidadMaterial, CveUnidadMedidaM, CveClasificacion, CvePSMaterial, True) Then + Errores = True + End If + Next + End If - If Not ObjOrdenServicio.AddUpdateDetalleMateriales(-1, CveOsDetalle, CantidadMaterial, CveUnidadMedidaM, CveClasificacion, CvePSMaterial, True) Then - Errores = True - End If - Next Else Errores = True @@ -1453,20 +1456,25 @@ Partial Class OS_OrdenesServicios Next End If - If TmpDTMaterialesDetalle.FiltraParametros(String.Format("CveOSDetalle = {0}", CveOSDetalle)).Rows.Count > 0 Then - For Each RowM As DataRow In TmpDTMaterialesDetalle.FiltraParametros(String.Format("CveOSDetalle = {0}", CveOSDetalle)).Rows - Dim CveMaterial As Integer = RowM("CveMaterial").ToString.ToEntero + If UsuarioActual.Empresa.Funcionalidad(578) = "" Then + If TmpDTMaterialesDetalle.FiltraParametros(String.Format("CveOSDetalle = {0}", CveOSDetalle)).Rows.Count > 0 Then + For Each RowM As DataRow In TmpDTMaterialesDetalle.FiltraParametros(String.Format("CveOSDetalle = {0}", CveOSDetalle)).Rows + Dim CveMaterial As Integer = RowM("CveMaterial").ToString.ToEntero - Dim CveClasificacion As Integer = RowM("CveClasificacion").ToString.ToEntero - Dim CvePSMaterial As Integer = RowM("CvePS").ToString.ToEntero - Dim CveUnidadMedidaM As Integer = RowM("CveUM").ToString.ToEntero - Dim CantidadMaterial As Integer = RowM("Cantidad").ToString.ToEntero + Dim CveClasificacion As Integer = RowM("CveClasificacion").ToString.ToEntero + Dim CvePSMaterial As Integer = RowM("CvePS").ToString.ToEntero + Dim CveUnidadMedidaM As Integer = RowM("CveUM").ToString.ToEntero + Dim CantidadMaterial As Integer = RowM("Cantidad").ToString.ToEntero - If Not ObjOrdenServicio.AddUpdateDetalleMateriales(CveMaterial, CveOSDetalle, CantidadMaterial, CveUnidadMedidaM, CveClasificacion, CvePSMaterial, SeFacturara) Then - Errores = True - End If - Next + If Not ObjOrdenServicio.AddUpdateDetalleMateriales(CveMaterial, CveOSDetalle, CantidadMaterial, CveUnidadMedidaM, CveClasificacion, CvePSMaterial, SeFacturara) Then + Errores = True + End If + Next + End If End If + + + End If Next From 8f17ff30b8a1565cab5303335361f26163ff6c29 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 21 Dec 2023 19:31:25 -0700 Subject: [PATCH 17/64] - coloreo de asientos ya vendidos --- Transportes/Boletos.aspx | 3 +-- Transportes/Boletos.aspx.vb | 30 +++++++++++++++++++++--------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/Transportes/Boletos.aspx b/Transportes/Boletos.aspx index 047276b85..85959c08e 100644 --- a/Transportes/Boletos.aspx +++ b/Transportes/Boletos.aspx @@ -289,8 +289,7 @@ + runat="server" ID="A1" Text="
    1
    " /> Date: Thu, 21 Dec 2023 19:31:52 -0700 Subject: [PATCH 18/64] =?UTF-8?q?--=20obtenci=C3=B3n=20de=20materiales?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OS/OrdenesServicios.aspx.vb | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index 1c1c2b60f..f40618b95 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -4,16 +4,7 @@ Option Strict On Imports Extensiones Imports System.IO Imports System.Data -Imports Microsoft.Reporting.WebForms -Imports ADSNetLibrary.SIGAPI.Models.Sistema -Imports Telerik.Charting.Styles Imports Telerik.Web.UI -Imports DocumentFormat.OpenXml.Drawing.Diagrams -Imports Profact.TimbraCFDI.Complementos.InstitucionesEducativas - - -'Imports msExcel = Microsoft.Office.Interop.Excel -'Imports VBIDE Partial Class OS_OrdenesServicios Inherits ClsPaginas @@ -846,7 +837,7 @@ Partial Class OS_OrdenesServicios Private Sub CargaMaterialesDetalle(CveOsDetalle As Integer, Consecutivo As Integer, CveConsecutivoDetalle As Integer) Dim ObjMateriales As New ClsOS - If ObjMateriales.GetDetalleMateriales(CveOsDetalle, CveOS) Then + If ObjMateriales.GetDetalleMateriales(CveOsDetalle, CveOS, -1) Then For Each RowE As DataRow In ObjMateriales.DtResultados.Rows Dim Row As DataRow = Nothing @@ -874,8 +865,8 @@ Partial Class OS_OrdenesServicios End Sub Private Sub CargaMateriales() Dim objOS As New ClsOS - - If objOS.GetDetalleMateriales(-1, CveOS, True) Then + Dim Opcion As Integer = If(DdlTipoVenta.SelectedValue.Contiene("2", "3"), 2, 1) + If objOS.GetDetalleMateriales(-1, CveOS, Opcion, True) Then GvMateriales.DataSource = objOS.DtResultados End If objOS.Dispose() From 450b9efc4497c112314742854e6a8475e73381e2 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 21 Dec 2023 19:49:26 -0700 Subject: [PATCH 19/64] Ventras cambios Sms en modal --- Ventas/Ventas.aspx | 28 +++++++++++++--------------- Ventas/Ventas.aspx.vb | 12 +++++++++++- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 4880672b7..d4b0fd8d3 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -8471,13 +8471,9 @@
    Productos utilizados en el procedimiento - + - - - - @@ -8486,22 +8482,24 @@ + + + + + + + - <%-- - - --%> - - - - - - + + + + diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index e1eff45d0..c28b8c96d 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -36101,7 +36101,7 @@ Partial Class Ventas Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString - Dim PU As Decimal = GvRow.FCTextBox("TxtPrecio").Text.ToDecimal + Dim PU As Decimal = GvRow.DataKey("Precio").ToDecimal Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero @@ -36128,6 +36128,14 @@ Partial Class Ventas End Sub + Protected Sub GvProductosProcedimiento_RowDataBound(sender As Object, e As GridViewRowEventArgs) + If e.Row.RowType = DataControlRowType.DataRow Then + If e.Row.DataKey("Precio").ToDecimal = 0 Then + e.Row.FCTextBox("TxtCantidad").Enabled = False + End If + End If + End Sub + Protected Sub ChkRequiereTecnicoModal_CheckedChanged(sender As Object, e As EventArgs) DvModalRequiereOSFecha.Visible = ChkRequiereTecnicoModal.Checked @@ -36259,5 +36267,7 @@ Partial Class Ventas CargarSaldoAuxiliar(CveCliente) End Sub + + End Class From d1815c2eb166d61f49e3252877a4a4a60293f57c Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 21 Dec 2023 19:53:30 -0700 Subject: [PATCH 20/64] Reporte de Ordenes de Servicio Medicas ajustes fecha dd/MM/yyyy hh:mm --- OS/RepOSMedicas.aspx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OS/RepOSMedicas.aspx b/OS/RepOSMedicas.aspx index 515216683..a1c88c61a 100644 --- a/OS/RepOSMedicas.aspx +++ b/OS/RepOSMedicas.aspx @@ -168,8 +168,8 @@ <%--0--%> <%----%> - <%--1--%> - + <%--1--%> + <%--2--%> <%--3--%> From 9a117112fa47d4e1f5ddb65c69ff7d8f5b9914ae Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 22 Dec 2023 01:40:38 -0700 Subject: [PATCH 21/64] --SMS. impresion de codigo de producto alterno en ventas.aspx --- App_Code/ClsPaginas.vb | 5 +++++ App_Code/Modelos.vb | 1 + Compras/PopUpVerFactura.aspx.vb | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index e4fa603fe..f733f1889 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5727,6 +5727,11 @@ Public Class ClsPaginas params.Add(New ReportParameter("ClientePais", If(Vta.Cliente.Pais.Length > 0, Vta.Cliente.Pais, ""))) params.Add(New ReportParameter("ClienteContacto", Vta.AtencionA)) End If + + If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then + params.Add(New ReportParameter("UsaProductoAlterno", If(Vta.Cliente.UsaProductoAlterno, "1", "0"))) + End If + 'PARAMETROS SEGUN TIPO DOCUMENTO Select Case Vta.TipoDocto Case "Ing" diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index d922e528d..0543bb1c9 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -7954,6 +7954,7 @@ Namespace Modelos Public Property CorreoCotizacion As String Public Property ImprimeNombreSucursal As Integer Public Property CobranzaCorreo As String + Public Property UsaProductoAlterno As Boolean = False End Class diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index c996c2303..35e084999 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -2980,7 +2980,7 @@ Partial Class PopUpVerFactura Vta.Cliente.MailCotizacion = dtVentas(0)("SucClienteCorreo").ToString Vta.Cliente.CodigoRegimenFiscal = dtVentas(0)("CodigoRegimenFiscal").ToString Vta.Cliente.RegimenFiscal = dtVentas(0)("RegimenFiscal").ToString - + Vta.Cliente.UsaProductoAlterno = CBool(dtVentas(0)("UsaProductoAlterno")) Vta.RefDocto = dtVentas(0)("Ref").ToString Vta.CveVenta = dtVentas(0)("CveVenta").ToString.ToEntero From 5a88a98336db1abf0b0b3415e1ba76d91ab7049e Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 22 Dec 2023 08:39:46 -0700 Subject: [PATCH 22/64] -- parametro adicional para materiales --- App_Code/ClsOS.vb | 5 +++-- Ventas/Ventas.aspx.vb | 19 +++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/App_Code/ClsOS.vb b/App_Code/ClsOS.vb index b983ac43d..a1ac30b08 100644 --- a/App_Code/ClsOS.vb +++ b/App_Code/ClsOS.vb @@ -852,14 +852,15 @@ Public Class ClsOS Return Retorno End Function - Public Function GetDetalleMateriales(CveOSDetalle As Integer, CveOS As Integer, Optional FiltraTipoAlamacen As Boolean = False) As Boolean + Public Function GetDetalleMateriales(CveOSDetalle As Integer, CveOS As Integer, Opcion As Integer, Optional FiltraTipoAlmacen As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OS_OrdenesServicioDetallesMaterialesGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveOSDetalle", SqlDbType.Int).Value = CveOSDetalle .Add("@CveOS", SqlDbType.Int).Value = CveOS - .Add("@FiltraTipoAlamacen", SqlDbType.Bit).Value = FiltraTipoAlamacen + .Add("@FiltraTipoAlmacen", SqlDbType.Bit).Value = FiltraTipoAlmacen + .Add("@Opcion", SqlDbType.Int).Value = Opcion End With Try diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index e1eff45d0..97c901b18 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -4483,7 +4483,7 @@ Partial Class Ventas End If For Each Row As DataRow In DtDetalle.Rows - If OS.GetDetalleMateriales(Row("CveOSDetalle").ToString().ToEntero(), CveOS) Then + If OS.GetDetalleMateriales(Row("CveOSDetalle").ToString().ToEntero(), CveOS, -1) Then If OS.DtResultados.FiltraParametros("SeFacturara = 1").Rows.Count > 0 Then Alert("Hay materiales en la Orden de Servicio, ¿Desea facturar los materiales?", TipoMensaje.MsgConfirmacion, "BtnMateriales()") End If @@ -8075,6 +8075,7 @@ Partial Class Ventas e.Row.FCTextBox("TxtPrecio").Enabled = False End If + 'PERMISO EDITAR REM If e.Row.DBCampo("TipoDocto") = "Rem" And ModalidadEdicion Then 'LO PERMITIDO MODIFICAR @@ -21640,7 +21641,7 @@ Partial Class Ventas DtDetalle = TmpDT.Copy For Each Row As DataRow In DtDetalle.Rows - If OS.GetDetalleMateriales(Row("CveOSDetalle").ToString().ToEntero(), CveOS) Then + If OS.GetDetalleMateriales(Row("CveOSDetalle").ToString().ToEntero(), CveOS, -1) Then Dim Cons As Integer = TmpDT.Rows.Count + 1 For Each dr As DataRow In OS.DtResultados.FiltraParametros("SeFacturara = 1 ").Rows @@ -36068,21 +36069,23 @@ Partial Class Ventas DdlMedico.SelectedValueExist(DdlMedicoModal.SelectedValue) DdlProcedimiento.SelectedValueExist(DdlProcedimientoModal.SelectedValue) - 'si es A - Vista o ,Fuera De Linea requiere tecnico - If RBLTipoVenta.SelectedValue.ToEntero.Contiene(1, 2) Then + 'si es pago directo es factura + If RBLTipoVenta.SelectedValue.Contiene("2") Then + DdlTipoComprobante.SelectedValueExist("Ing") + TdRequiereTecnico1.Visible = True + TdRequiereTecnico2.Visible = True + Else TdFechaOS1.Visible = True TdFechaOS2.Visible = True ChkRequiereTecnico.Checked = True ChkRequiereTecnico.Enabled = False DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Ped")) DdlTipoComprobante.SelectedValueExist("Ped") - Else - DdlTipoComprobante.SelectedValueExist("Ing") + End If DdlTipoComprobante.Enabled = False - TdRequiereTecnico1.Visible = True - TdRequiereTecnico2.Visible = True + CargaCliente(CveCliente) From 90c9dfea626d2de3e8f45ce057e361b3cc938388 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 22 Dec 2023 11:25:06 -0700 Subject: [PATCH 23/64] OS Modal DVModalSolicitarDevolucion txt serie, lote, fecha caducidad a Lbl, ocultar columnas serie lote fecha de caducidad si no tienen datos, datos GvSolicitarDevolucion solo mostrar movimiento de Ped --- OS/OrdenesServicios.aspx | 10 +++---- OS/OrdenesServicios.aspx.vb | 54 ++++++++++++++++++++----------------- 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/OS/OrdenesServicios.aspx b/OS/OrdenesServicios.aspx index 1bb42a407..dde2b56c3 100644 --- a/OS/OrdenesServicios.aspx +++ b/OS/OrdenesServicios.aspx @@ -1304,22 +1304,22 @@ Lote - + Serie - + Fecha Cad. - -
    + + <%--
    @@ -1330,7 +1330,7 @@ -
    +
    --%>
    diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index b1fe50d71..08b091a33 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -838,11 +838,14 @@ Partial Class OS_OrdenesServicios Dim ObjMateriales As New ClsOS If ObjMateriales.GetDetalleMateriales(CveOsDetalle, CveOS, -1) Then + For Each RowE As DataRow In ObjMateriales.DtResultados.Rows Dim Row As DataRow = Nothing Row = TmpDTMaterialesDetalle.NewRow() + + Row("CveConsecutivo") = Consecutivo Row("CveConsecutivoDetalle") = CveConsecutivoDetalle Row("CveOSDetalle") = CveOsDetalle @@ -3041,12 +3044,6 @@ Partial Class OS_OrdenesServicios End Sub - - - - - - Protected Sub LnkAccionesDevolucion_Click(sender As Object, e As EventArgs) LnkModalSolicitarDevolucion.Visible = True @@ -3054,15 +3051,22 @@ Partial Class OS_OrdenesServicios GvSolicitarDevolucion.DataSource = Nothing DTSolicitudDev = New DataTable + GvSolicitarDevolucion.Columns(3).Visible = False 'Lote + GvSolicitarDevolucion.Columns(4).Visible = False 'Serie + GvSolicitarDevolucion.Columns(5).Visible = False 'Fecha Caducidad + Dim ObjOS As New ClsOS - - If ObjOS.GetOrdenesServicioDevolucionMaterial(CveOS, CveVenta, UsuarioActual.CveEmpresa) Then DTSolicitudDev = ObjOS.DtResultados GvSolicitarDevolucion.DataSource = DTSolicitudDev End If + GvSolicitarDevolucion.Columns(3).Visible = DTSolicitudDev.MAX("Lote").ToString.Trim().Length > 0 + GvSolicitarDevolucion.Columns(4).Visible = DTSolicitudDev.MAX("Serie").ToString.Trim().Length > 0 + GvSolicitarDevolucion.Columns(5).Visible = DTSolicitudDev.MAX("FechaCaducidad").ToString.Trim().Length > 0 + + ObjOS.Dispose() GvSolicitarDevolucion.DataBind() @@ -3086,24 +3090,24 @@ Partial Class OS_OrdenesServicios e.Row.FCTextBox("TxtDev").Attributes.Add("onblur", String.Format("ValidarCantidad(this, {0})", e.Row.DataKey("Cantidad"))) 'AplicaSerie, AplicaLote, AplicaCaducidad - If Boolean.Parse(e.Row.DataKey("AplicaSerie")) Then - e.Row.FCTextBox("TxtSerie").Visible = True - End If + 'If Boolean.Parse(e.Row.DataKey("AplicaSerie")) Then + ' e.Row.FCTextBox("TxtSerie").Visible = True + 'End If - If Boolean.Parse(e.Row.DataKey("AplicaLote")) Then - e.Row.FCTextBox("TxtLote").Visible = True - End If + 'If Boolean.Parse(e.Row.DataKey("AplicaLote")) Then + ' e.Row.FCTextBox("TxtLote").Visible = True + 'End If - If Boolean.Parse(e.Row.DataKey("AplicaCaducidad")) Then + 'If Boolean.Parse(e.Row.DataKey("AplicaCaducidad")) Then - e.Row.FCHtmlGenericControl("DVFechaCaducidad").Visible = True - 'e.Row.FCTextBox("TxtFechaCaducidad").Visible = True - 'e.Row.FCMaskedEditExtender("METxtFechaCaducidad").Visible = True - 'e.Row.FCCalendarExtender("CCTxtFechaCaducidad").Visible = True - 'e.Row.FCCompareValidator("CVTxtFechaCaducidad").Visible = True - 'e.Row.FCValidatorCalloutExtender("VCTxtFechaCaducidad").Visible = True + ' e.Row.FCHtmlGenericControl("DVFechaCaducidad").Visible = True + ' 'e.Row.FCTextBox("TxtFechaCaducidad").Visible = True + ' 'e.Row.FCMaskedEditExtender("METxtFechaCaducidad").Visible = True + ' 'e.Row.FCCalendarExtender("CCTxtFechaCaducidad").Visible = True + ' 'e.Row.FCCompareValidator("CVTxtFechaCaducidad").Visible = True + ' 'e.Row.FCValidatorCalloutExtender("VCTxtFechaCaducidad").Visible = True - End If + 'End If @@ -3220,9 +3224,9 @@ Partial Class OS_OrdenesServicios Dim CveVentaDetalle As Integer = GvRow.DataKey("CveVentaDetalle").ToEntero Dim CveMovimientoDetalle As Integer = GvRow.DataKey("CveMovimientoDetalle").ToEntero - Dim Lote As String = GvRow.FCTextBox("TxtLote").Text.Trim - Dim Serie As String = GvRow.FCTextBox("TxtSerie").Text.Trim - Dim FechaCaducidad As DateTime = GvRow.FCTextBox("TxtFechaCaducidad").Text.ToDate + Dim Lote As String = GvRow.DataKey("Lote") + Dim Serie As String = GvRow.DataKey("Serie") + Dim FechaCaducidad As DateTime = GvRow.DataKey("FechaCaducidad").ToDate From 0ad891fe07aec68761b50487a567a1aaceb714cb Mon Sep 17 00:00:00 2001 From: AbrahamCastilloV Date: Fri, 22 Dec 2023 13:09:43 -0700 Subject: [PATCH 24/64] =?UTF-8?q?--Se=20seleccionaron=20boletos=20ya=20ven?= =?UTF-8?q?didos,=20se=20les=20cambio=20la=20clase=20a=20.nodisponible,=20?= =?UTF-8?q?se=20deshabilitaron=20los=20click=20y=20se=20puso=20el=20nombre?= =?UTF-8?q?=20del=20cliente=20en=20hover.=20=20Se=20agreg=C3=B3=20un=20nue?= =?UTF-8?q?vo=20bot=C3=B3n=20de=20acci=C3=B3n=20a=20la=20lista=20de=20viaj?= =?UTF-8?q?es=20para=20poder=20ver=20los=20boletos=20por=20viaje.=20Se=20c?= =?UTF-8?q?re=C3=B3=20el=20nuevo=20url=20para=20la=20lista=20de=20boletos?= =?UTF-8?q?=20vendidos=20por=20viaje=20en=20ClsPaginas,=20y=20en=20la=20nu?= =?UTF-8?q?eva=20url=20se=20creo=20la=20lista=20de=20boletos=20con=20las?= =?UTF-8?q?=20acciones=20para=20editar,=20cambiar=20estatus=20de=20boleto?= =?UTF-8?q?=20e=20imprimirlo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsPaginas.vb | 1 + Transportes/Boletos.aspx | 57 +--------------- Transportes/Boletos.aspx.vb | 12 ++-- Transportes/ListadoBoletos.aspx | 101 +++++++++++++++++++++++++++++ Transportes/ListadoBoletos.aspx.vb | 43 ++++++++++++ Transportes/ListadoViajes.aspx | 8 ++- Transportes/ListadoViajes.aspx.vb | 6 +- 7 files changed, 163 insertions(+), 65 deletions(-) create mode 100644 Transportes/ListadoBoletos.aspx create mode 100644 Transportes/ListadoBoletos.aspx.vb diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index e4fa603fe..60bf8c37c 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -9471,6 +9471,7 @@ Public Class ClsPaginas PaginaDict.Add("/Transportes/ListadoContratos.aspx".ToUpper(), 598) PaginaDict.Add("/Transportes/ListadoViajes.aspx".ToUpper(), 598) PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 598) + PaginaDict.Add("/Transportes/ListadoBoletos.aspx".ToUpper(), 598) #End Region 'Antes de aquí. diff --git a/Transportes/Boletos.aspx b/Transportes/Boletos.aspx index 85959c08e..dd12a91c2 100644 --- a/Transportes/Boletos.aspx +++ b/Transportes/Boletos.aspx @@ -37,7 +37,7 @@ display: inline-block; width: 45px; height: 45px; - background-color: #E7505A; + background-color: #F3565D; border-radius: 10px !important; margin: 5px; cursor: pointer; @@ -217,60 +217,7 @@
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    +
    diff --git a/Transportes/Boletos.aspx.vb b/Transportes/Boletos.aspx.vb index 43a671f0d..3b878b195 100644 --- a/Transportes/Boletos.aspx.vb +++ b/Transportes/Boletos.aspx.vb @@ -1,5 +1,5 @@ -Imports Extensiones -Imports System.Data +Imports System.Data +Imports Extensiones Partial Class Boletos Inherits ClsPaginas @@ -66,22 +66,20 @@ Partial Class Boletos 'Boletos Vendidos Dim dt As DataTable If ObjViaje.GetViajesPasajeros(CveViaje) Then - GvBoletos.DataSource = ObjViaje.DtResultados dt = ObjViaje.DtResultados Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder) For Each dr As DataRow In dt.Rows Dim lnk As LinkButton = CType(cph.FindControl($"A{dr("Asiento")}"), LinkButton) If lnk IsNot Nothing Then - lnk.Enabled = False ' se vendieron - lnk.BackColor = Drawing.Color.Red - 'falta ponerlelos colores rojos, colorear con + lnk.Enabled = False + lnk.CssClass = "nodisponible" + lnk.ToolTip = dr("Nombre").ToString End If Next End If End If ObjViaje.Dispose() - GvBoletos.DataBind() End Sub diff --git a/Transportes/ListadoBoletos.aspx b/Transportes/ListadoBoletos.aspx new file mode 100644 index 000000000..d71269d60 --- /dev/null +++ b/Transportes/ListadoBoletos.aspx @@ -0,0 +1,101 @@ +<%@ Page Language="VB" AutoEventWireup="false" MasterPageFile="~/Site.master" CodeFile="ListadoBoletos.aspx.vb" + Inherits="ListadoBoletos" EnableEventValidation="true" %> + + + Listado de Boletos + + + + + + + + + +
  • + Contratos +
  • +
  • + Viajes +
  • +
    +
    +
    + + + +
    + " + style="display: inline-block; margin-right: -20px; width: 150px;" /> + " + style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + diff --git a/Transportes/ListadoBoletos.aspx.vb b/Transportes/ListadoBoletos.aspx.vb new file mode 100644 index 000000000..0addc5160 --- /dev/null +++ b/Transportes/ListadoBoletos.aspx.vb @@ -0,0 +1,43 @@ +Option Explicit On +Option Strict On +Imports ADSNetLibrary.SIGAPI.Helpers +Imports Extensiones.ModExtensiones + +Partial Class ListadoBoletos + Inherits ClsPaginas + Private Property CveViaje As Integer + Get + Return ViewState("CveViaje").ToString().ToEntero + End Get + Set(value As Integer) + ViewState("CveViaje") = value + End Set + End Property + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not IsPostBack Then + If Request.QueryString("CveViaje") Is Nothing Then + Response.Redirect("/Transportes/ListadoViajes.aspx") + End If + CveViaje = Request.QueryString("CveViaje").ToEntero + + InicializaCombos() + CargaDatos() + End If + End Sub + + Private Sub InicializaCombos() + + End Sub + + Private Sub CargaDatos() + Dim ObjTransportes As New ClsTransportes + + If ObjTransportes.GetViajesPasajeros(CveViaje) Then + + GvBoletos.DataSource = ObjTransportes.DtResultados + ObjTransportes.Dispose() + GvBoletos.DataBind() + End If + End Sub + +End Class \ No newline at end of file diff --git a/Transportes/ListadoViajes.aspx b/Transportes/ListadoViajes.aspx index 9377bb548..67bcd60c0 100644 --- a/Transportes/ListadoViajes.aspx +++ b/Transportes/ListadoViajes.aspx @@ -103,9 +103,13 @@ CssClass="btn btn-circle btn-sm red" OnClick="RemoveViaje" Text="" data-toggle="confirmation" data-popout="true" data-original-title='<%# If(Eval("CveMasivo").ToString <> "", "Eliminación masiva", "Confirmar") %>' data-btn-ok-label="si" /> + + CssClass="btn btn-circle btn-sm blue" Text="" + OnClick="GoViaje" /> + diff --git a/Transportes/ListadoViajes.aspx.vb b/Transportes/ListadoViajes.aspx.vb index 4207e0c93..83208732e 100644 --- a/Transportes/ListadoViajes.aspx.vb +++ b/Transportes/ListadoViajes.aspx.vb @@ -232,5 +232,9 @@ Partial Class ListadoViajes Dim CveViaje As String = GvRow.DataKey("CveViaje") Response.Redirect(String.Format("~/Transportes/Boletos.aspx?CveViaje={0}", CveViaje)) End Sub - + Protected Sub GoBoletos(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + Dim CveViaje As String = GvRow.DataKey("CveViaje") + Response.Redirect(String.Format("~/Transportes/ListadoBoletos.aspx?CveViaje={0}", CveViaje)) + End Sub End Class From 21e90c5c653de0c01a651187db5f6cd419856f33 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 22 Dec 2023 13:22:47 -0700 Subject: [PATCH 25/64] -- cmbios de material utilizado --- OS/OrdenesServicios.aspx | 49 ++++----- OS/OrdenesServicios.aspx.vb | 192 +++++++++++++----------------------- 2 files changed, 85 insertions(+), 156 deletions(-) diff --git a/OS/OrdenesServicios.aspx b/OS/OrdenesServicios.aspx index 1bb42a407..d02d472b7 100644 --- a/OS/OrdenesServicios.aspx +++ b/OS/OrdenesServicios.aspx @@ -14,7 +14,7 @@ Imprimir Orden
  • - Devolución Material + Material Utilizado
  • @@ -1262,24 +1262,24 @@ <%--MODAL FINALIZAR ORDEN INICIO --%> -