From 389c32a7ae5a3d0fc9f89831a563cd80e7bca7da Mon Sep 17 00:00:00 2001 From: AbrahamCastilloV Date: Tue, 13 Feb 2024 03:56:57 -0700 Subject: [PATCH] =?UTF-8?q?-Se=20agregaron=20las=20propiedades=20de=20viaj?= =?UTF-8?q?es=20a=20contratos=20y=20se=20alteraron=20los=20m=C3=A9todos=20?= =?UTF-8?q?Add,=20Get=20y=20Update=20de=20Contratos.=20Se=20agrega=20el=20?= =?UTF-8?q?folio=20a=20RepContratos.=20Se=20le=20agrega=20la=20funcionalid?= =?UTF-8?q?ad=20para=20imprimir=20PDF=20y=20se=20aumentan=20el=20n=C3=BAme?= =?UTF-8?q?ro=20de=20campos=20para=20las=20consultas.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsContratos.vb | 80 +++-- Transportes/RepContratos.aspx | 158 ++++++--- Transportes/RepContratos.aspx.vb | 89 ++++- Transportes/RepContratosCalendario.aspx | 183 ++++++---- Transportes/RepContratosCalendario.aspx.vb | 146 ++++++-- Transportes/RepViajes.aspx | 383 +++++++++------------ Transportes/RepViajes.aspx.vb | 40 +-- 7 files changed, 641 insertions(+), 438 deletions(-) diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb index c56dffb17..bc3794d36 100644 --- a/App_Code/ClsContratos.vb +++ b/App_Code/ClsContratos.vb @@ -38,7 +38,6 @@ Public Class ClsContratos Public Property NumeroEstimacionNueva As Integer Public Property CveEstimacionNueva As Integer - Public Property CveChofer As Integer @@ -135,7 +134,6 @@ Public Class ClsContratos Public Property NumeroLicitacion As String Public Property Observaciones As String Public Property CveDireccionEnvio As Integer - Public Property CveProveedor As Integer Public Property RazonSocial As String Public Property CveCliente As Integer @@ -186,11 +184,16 @@ Public Class ClsContratos Public Property AplicaImpuestosLocales As Boolean Public Property CveEstimacionActual As Integer Public Property NumeroEstimacionActual As Integer - - - - - + 'Viajes + Public Property CveTipoAF As Integer + Public Property CveChofer As Integer + Public Property CveChofer2 As Integer + Public Property CveAF As Integer + Public Property CantidadPasajeros As Integer + Public Property CveRuta As Integer + Public Property CvePartida As Integer + Public Property CveDestino As Integer + Public Property CveMasivo As Integer #End Region #Region " C O N T R A T O S " @@ -227,8 +230,7 @@ Public Class ClsContratos End Try Return Retorno - End Function - + End Function Public Function GetContratos(CveContrato As Integer, CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional CveEstatus As Integer = -1, Optional TipoEstatus As Integer = -1, Optional TipoContrato As Integer = -1, Optional EstatusFianza As Integer = -1, Optional CveVendedor As Integer = -1) As Boolean @@ -299,30 +301,37 @@ Public Class ClsContratos Me.CveVendedor = Data.Rows(0)("CveVendedor").ToString.ToEntero Me.ImporteTotal = Data.Rows(0)("ImporteTotal").ToString.ToDecimal Me.Lugar = Data.Rows(0)("Lugar").ToString - Me.LimiteDeGasto = Data.Rows(0)("LimiteDeGasto").ToString.ToDouble - CveChofer = Data.Rows(0)("CveChofer").ToString.ToEntero - + Me.LimiteDeGasto = Data.Rows(0)("LimiteDeGasto").ToString.ToDouble Observaciones = Data.Rows(0)("Observaciones").ToString CveDireccionEnvio = Data.Rows(0)("CveDireccionEnvio").ToString.ToEntero AplicaImpuestosLocales = CBool(Data.Rows(0)("AplicaImpuestosLocales")) + 'Viajes + Me.CveTipoAF = Data.Rows(0)("CveTipoAF").ToString.ToEntero + Me.CveChofer = Data.Rows(0)("CveChofer").ToString.ToEntero + Me.CveChofer2 = Data.Rows(0)("CveChofer2").ToString.ToEntero + Me.CveAF = Data.Rows(0)("CveAF").ToString.ToEntero + Me.CantidadPasajeros = Data.Rows(0)("CantidadPasajeros").ToString.ToEntero + Me.CveRuta = Data.Rows(0)("CveRuta").ToString.ToEntero + Me.CvePartida = Data.Rows(0)("CvePartida").ToString.ToEntero + Me.CveDestino = Data.Rows(0)("CveDestino").ToString.ToEntero + Me.CveMasivo = Data.Rows(0)("CveMasivo").ToString.ToEntero - End If + End If Retorno = True Catch ex As Exception OnError("Ocurrió un error al obtener el Catálogo de Contratos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno - End Function - - Public Function AddContratos(NumeroContrato As String, DescripcionContrato As String, NumeroLicitacion As String, CveProveedor As Integer, CveCliente As Integer, CveProspecto As Integer, FechaInicial As DateTime, FechaFinal As DateTime, - Ubicacion As String, Responsable As String, CveSubProyecto As Integer, PorIVA As Double, PorAnticipo As Double, PorAmortizacionAnticipo As Double, PorGarantia As Double, Archivo As String, - Geom As String, CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsPresupuestal As Boolean, Minimo As Double, Maximo As Double, Importe As Double, CveMoneda As Integer, ModalidadDetalle As Integer, - Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1, - Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CvePeriodo As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1, - Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", - Optional FacturacionCicilica As Boolean = False, Optional FacturacionCiclicaAutomatico As Boolean = False, Optional DiaMesFacturacion As Integer = 1, Optional ObservacionesGenerales As String = "", - Optional CveTipoAF As Integer = -1, Optional CveChofer As Integer = -1, Optional CveAF As Integer = -1, Optional CantidadPasajeros As Integer = -1) As Integer + End Function + Public Function AddContratos(NumeroContrato As String, DescripcionContrato As String, NumeroLicitacion As String, CveProveedor As Integer, CveCliente As Integer, CveProspecto As Integer, FechaInicial As DateTime, FechaFinal As DateTime, + Ubicacion As String, Responsable As String, CveSubProyecto As Integer, PorIVA As Double, PorAnticipo As Double, PorAmortizacionAnticipo As Double, PorGarantia As Double, Archivo As String, + Geom As String, CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsPresupuestal As Boolean, Minimo As Double, Maximo As Double, Importe As Double, CveMoneda As Integer, ModalidadDetalle As Integer, + Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1, + Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CvePeriodo As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1, + Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", + Optional FacturacionCicilica As Boolean = False, Optional FacturacionCiclicaAutomatico As Boolean = False, Optional DiaMesFacturacion As Integer = 1, Optional ObservacionesGenerales As String = "", + Optional CveTipoAF As Integer = Nothing, Optional CveChofer As Integer = Nothing, Optional CveChofer2 As Integer = Nothing, Optional CveAF As Integer = Nothing, Optional CantidadPasajeros As Integer = Nothing, Optional CveRuta As Integer = Nothing, Optional CvePartida As Integer = Nothing, Optional CveDestino As Integer = Nothing, Optional CveMasivo As Integer = Nothing) As Integer Dim Retorno As Integer = -1 DataAdapter("PA_Con_ContratosAdd") @@ -378,11 +387,16 @@ Public Class ClsContratos .Add("@FacturacionCiclicaAutomatico", SqlDbType.Bit).Value = FacturacionCiclicaAutomatico .Add("@DiaMesFacturacion", SqlDbType.TinyInt).Value = DiaMesFacturacion .Add("@ObservacionesGenerales", SqlDbType.VarChar).Value = ObservacionesGenerales - .Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF - .Add("@CveChofer", SqlDbType.Int).Value = CveChofer + 'Viajes + .Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF + .Add("@CveChofer", SqlDbType.Int).Value = CveChofer + .Add("@CveChofer2", SqlDbType.Int).Value = CveChofer2 .Add("@CveAF", SqlDbType.Int).Value = CveAF .Add("@CantidadPasajeros", SqlDbType.Int).Value = CantidadPasajeros - + .Add("@CveRuta", SqlDbType.Int).Value = CveRuta + .Add("@CvePartida", SqlDbType.Int).Value = CvePartida + .Add("@CveDestino", SqlDbType.Int).Value = CveDestino + .Add("@CveMasivo", SqlDbType.Int).Value = CveMasivo End With Try @@ -400,14 +414,13 @@ Public Class ClsContratos Return Retorno End Function - Public Function UpdateContratos(CveContrato As Integer, NumeroContrato As String, DescripcionContrato As String, NumeroLicitacion As String, CveProveedor As Integer, CveCliente As Integer, CveProspecto As Integer, FechaInicial As DateTime, FechaFinal As DateTime, Ubicacion As String, Responsable As String, CveSubProyecto As Integer, PorIVA As Double, PorAnticipo As Double, PorAmortizacionAnticipo As Double, PorGarantia As Double, Archivo As String, Geom As String, CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsPresupuestal As Boolean, Minimo As Double, Maximo As Double, Importe As Double, CveMoneda As Integer, ModalidadDetalle As Integer, Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1.0, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1, Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1, Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional FacturacionCicilica As Boolean = False, Optional FacturacionCiclicaAutomatico As Boolean = False, - Optional DiaMesFacturacion As Integer = 1, Optional CvePeriodo As Integer = -1, Optional ObservacionesGenerales As String = "", Optional CveTipoAF As Integer = -1, Optional CveChofer As Integer = -1, Optional EstatusContrato As Integer = -1, Optional CveAF As Integer = -1) As Boolean + Optional DiaMesFacturacion As Integer = 1, Optional CvePeriodo As Integer = -1, Optional ObservacionesGenerales As String = "", Optional CveTipoAF As Integer = Nothing, Optional CveChofer As Integer = Nothing, Optional CveChofer2 As Integer = Nothing, Optional CveAF As Integer = Nothing, Optional CantidadPasajeros As Integer = Nothing, Optional CveRuta As Integer = Nothing, Optional CvePartida As Integer = Nothing, Optional CveDestino As Integer = Nothing, Optional CveMasivo As Integer = Nothing) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosUpdate") @@ -462,12 +475,17 @@ Public Class ClsContratos .Add("@DiaMesFacturacion", SqlDbType.TinyInt).Value = DiaMesFacturacion .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo .Add("@ObservacionesGenerales", SqlDbType.VarChar).Value = ObservacionesGenerales - .Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF + 'Viajes + .Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF .Add("@CveChofer", SqlDbType.Int).Value = CveChofer - .Add("@EstatusContrato", SqlDbType.Int).Value = EstatusContrato + .Add("@CveChofer2", SqlDbType.Int).Value = CveChofer2 .Add("@CveAF", SqlDbType.Int).Value = CveAF + .Add("@CantidadPasajeros", SqlDbType.Int).Value = CantidadPasajeros + .Add("@CveRuta", SqlDbType.Int).Value = CveRuta + .Add("@CvePartida", SqlDbType.Int).Value = CvePartida + .Add("@CveDestino", SqlDbType.Int).Value = CveDestino + .Add("@CveMasivo", SqlDbType.Int).Value = CveMasivo End With - Try SqlAdapter.Fill(Data) Retorno = True diff --git a/Transportes/RepContratos.aspx b/Transportes/RepContratos.aspx index 9f4d4df89..146ab1b88 100644 --- a/Transportes/RepContratos.aspx +++ b/Transportes/RepContratos.aspx @@ -14,85 +14,131 @@ } .consulta { - padding: 1rem 2rem; background-color: #95A5A6; - display: flex; - justify-content: space-around; - align-items: center; + padding: 1rem 1rem; margin-bottom: 1rem; } + .consulta_linea { + display: flex; + justify-content: space-between; + align-items: center; + margin-block: .5rem; + gap: 1rem; + } + .consulta_campo { display: flex; gap: 1rem; align-items: center; - width: 100%; } .consulta_campo label { color: white; } + + .expandir { + width: 2.5rem; + font-size: 2.5rem; + font-weight: 900; + color: white; + } - -
  • Agregar Contrato
  • - Generar Excel + Generar PDF +
  • +
  • + Generar Excel
  • -
    - - - -
    <%-- Filtros --%>
    -
    - +
    +
    + + +
    - +
    + + +
    -
    +
    + + +
    -
    - - - - -
    - -
    - - -
    - -
    - -
    - - +
    + +
    + + +
    +
    +
    + +
    - + +
    + +
    + + +
    +
    + +
    + +
    + + +
    +
    + +
    + +
    + + +
    +
    +
    <%-- Listado de Contratos --%> @@ -101,9 +147,9 @@ CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None" data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax,CveChofer, Observaciones, CveContratosEstatus, CveAF"> - + - + @@ -170,7 +216,11 @@