diff --git a/Acumuladores/RepRecolecciones.aspx b/Acumuladores/RepRecolecciones.aspx new file mode 100644 index 000000000..b32a3beae --- /dev/null +++ b/Acumuladores/RepRecolecciones.aspx @@ -0,0 +1,277 @@ +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepRecolecciones.aspx.vb" Inherits="Acumuladores_RepRecolecciones" %> + + + + + + + + Recolecciones + + + + + + +
  • + +
  • + +
    +
    +
    + + + + + + + +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + +
    + + + + + + +
    + + +
    +
    + + + + +
    + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    +
    + +
    + + + + + + + +   + + + <%----%> + + +   + + + + +   + + + + +   + + + + +
    +   +
    +
    +
    + + +   + + + + +   + + + + +
    +   +
    +
    +
    + + + + + + + + + +
    + +
    + +
    +
    +
    + +
    + + + + +
    +
    + +
    + + + + diff --git a/Acumuladores/RepRecolecciones.aspx.vb b/Acumuladores/RepRecolecciones.aspx.vb new file mode 100644 index 000000000..8c50eb36d --- /dev/null +++ b/Acumuladores/RepRecolecciones.aspx.vb @@ -0,0 +1,212 @@ +Imports System.Data +Imports CrystalDecisions.Shared.Json +Imports Extensiones + + +Partial Class Acumuladores_RepRecolecciones + Inherits ClsPaginas + + +#Region "Propiedades" + Private Property CveEntregaAlmacen As Integer + Get + If Not ViewState("CveEntregaAlmacen") Is Nothing Then + Return ViewState("CveEntregaAlmacen").ToString.ToEntero + Else + Return -1 + End If + End Get + Set(value As Integer) + ViewState("CveEntregaAlmacen") = value + End Set + End Property + + Private Property DTRecoleccion As DataTable + Get + If ViewState("DTRecoleccion") Is Nothing Then + ViewState("DTRecoleccion") = InitDTRecoleccion() + End If + Return CType(ViewState("DTRecoleccion"), DataTable) + End Get + Set(ByVal value As DataTable) + ViewState("DTRecoleccion") = CType(value, DataTable) + End Set + End Property + Private Property Actualizar As Boolean + Get + If Not ViewState("Actualizar") Is Nothing Then + Return DirectCast(ViewState("Actualizar"), Boolean) + Else + Return False + End If + End Get + Set(value As Boolean) + ViewState("Actualizar") = value + End Set + End Property + +#End Region + + + Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load + + If Not Page.IsPostBack Then + InicializaCombos() + CargaDatos() + End If + + End Sub + + Private Sub InicializaCombos() + CargaPS() + TxtFechaI.Text = NowADS().AddDays(-1).ToShortDateString + TxtFechaF.Text = NowADS().AddDays(3).ToShortDateString + CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto) + End Sub + + Private Sub CargaDatos() + + Dim ObjGeneral As New ClsGenerales + + If (ObjGeneral.GetInvEntregaAlmacenRuta(-1, Now.AddMonths(-1), Now.AddMonths(1), UsuarioActual.CveEmpresa, 2, -1)) Then + GvR.DataSource = ObjGeneral.DtResultados + End If + + ObjGeneral.Dispose() + + UPGv.DataBind() + UpGral.Update() + + + End Sub + + Protected Sub gvR_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) + If e.Row.RowType = DataControlRowType.DataRow Then + Dim LnkEditar As LinkButton = e.Row.FCLinkButton("LnkGvDatosRecoleccionEditar") + + If e.Row.DataKey("Estatus") = "0" OrElse e.Row.DataKey("Estatus") = "" Then + LnkEditar.Visible = True + End If + + ' If e.Row.DataKey("Estatus") = "1" Then + e.Row.FCHyperLink("HplR").Visible = True + e.Row.FCHyperLink("HplR").NavigateUrl = "/Inventarios/EntradasSalidas.aspx?CveEntregaAlmacen=" & e.Row.DBCampo("CveEntregaAlmacen") + 'End If + + If e.Row.DataKey("CveTimbre") <> "" Then + e.Row.FCCheckBox("Chk").Visible = False + End If + End If + End Sub + + Protected Sub LnkGvDatosRecoleccionEditar_Click(ByVal sender As Object, ByVal e As EventArgs) + Dim LnkEliminar As LinkButton = CType(sender, LinkButton) + Dim GvRow As GridViewRow = CType(LnkEliminar.NamingContainer, GridViewRow) + CveEntregaAlmacen = GvRow.DataKey("CveEntregaAlmacen").ToEntero() + Dim CveDireccionOrigen As Integer = GvRow.DataKey("CveDireccionOrigen").ToEntero() + + + CargaDatosRecoleccionDetallePS() + LtlModalRecoleccionTitulo.Text = "Definición de tamaños" + BtnModalRecoleccionGuardar.Text = "Guardar" + UpModalRecoleccion.Update() + RegistraScript("$('#DivModalRecoleccion').modal('show');") + End Sub + + Protected Sub DdlProducto_ValueChanged(ByVal sender As Object, ByVal e As EventArgs) + ElProductoChange() + End Sub + + + Private Sub ElProductoChange() + DdlModalRecoleccionUnidad.Items.Clear() + DdlModalRecoleccionUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero(), -1, UsuarioActual.CveEmpresa) + DdlModalRecoleccionUnidad.DataBind() + UpModalRecoleccion.Update() + End Sub + + Private Sub CargaDatosRecoleccionDetallePS() + + Dim ObjGenerales As New ClsGenerales() + Dim Str As New StringBuilder + Str.Append("Productos Definidos
    ") + If ObjGenerales.GetEntregaAlmacenRutaDetalle(CveEntregaAlmacen) Then + For Each dr As DataRow In ObjGenerales.DtResultados.Rows + Str.AppendFormat(" {0} - {1}
    ", dr("Cantidad"), dr("CodigoPS")) + Next + LblProductosCargados.Text = Str.ToString + End If + + ObjGenerales.Dispose() + + GvModalPSRecoleccion.DataSource = DTRecoleccion + GvModalPSRecoleccion.DataBind() + UpModalRecoleccion.Update() + End Sub + Private Function InitDTRecoleccion() As DataTable + Dim DT As DataTable = New DataTable() + DT.Columns.Add("CveEntregaAlmacenDetalle", System.Type.[GetType]("System.Int32")) + DT.Columns.Add("CveEntregaAlmacen", System.Type.[GetType]("System.Int32")) + DT.Columns.Add("CvePS", System.Type.[GetType]("System.Int32")) + DT.Columns.Add("Cantidad", System.Type.[GetType]("System.Double")) + DT.Columns.Add("CveUnidadMedida", System.Type.[GetType]("System.Int32")) + DT.Columns.Add("CveUsuario", System.Type.[GetType]("System.Int32")) + DT.Columns.Add("FechaIng", System.Type.[GetType]("System.DateTime")) + DT.Columns.Add("CodigoPS", System.Type.[GetType]("System.String")) + DT.Columns.Add("Abreviatura", System.Type.[GetType]("System.String")) + Return DT + End Function + + Private Sub CargaPS() + Dim ObjAcum As New ClsAcumuladores + Dim lista As New List(Of String) + Dim Filtro As String = "" + + For Each drow As DataRow In GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).Rows + + If drow("CvePSCargo").ToString.ToEntero > 0 Then + lista.Add(drow("CvePSCargo").ToString) + End If + Next + + If lista.Count > 0 Then + + Filtro = "CvePS in(" & String.Join(",", lista) & ")" + + DdlProducto2.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros(Filtro) + DdlProducto2.DataBind() + DdlProducto2.Items.Insert(0, New ListItem("Seleccione", "-1")) + End If + + ObjAcum.Dispose() + End Sub + + Protected Sub LnkModalAgregarPS_Click(ByVal sender As Object, ByVal e As EventArgs) + + Dim dRow As DataRow = DTRecoleccion.NewRow() + dRow("CveEntregaAlmacenDetalle") = -1 + dRow("CveEntregaAlmacen") = CveEntregaAlmacen + dRow("CvePS") = DdlProducto2.SelectedValue.ToEntero() + dRow("Cantidad") = TxtModalRecoleccionCantidad.Text.ToEntero() + dRow("CveUnidadMedida") = DdlModalRecoleccionUnidad.SelectedValue.ToEntero() + dRow("CveUsuario") = UsuarioActual.CveUsuario + dRow("FechaIng") = NowADS() + dRow("CodigoPS") = DdlProducto2.SelectedItem.Text + dRow("Abreviatura") = DdlModalRecoleccionUnidad.SelectedItem.Text + DTRecoleccion.Rows.Add(dRow) + + + LimpiarControlesPS() + CargaDatosRecoleccionDetallePS() + End Sub + + Private Sub LimpiarControlesPS() + TxtModalRecoleccionCantidad.Text = "" + DdlModalRecoleccionUnidad.Items.Clear() + 'DdlProducto2.txtText.Value = "" + 'DdlProducto2.txtValue.Value = "" + UpModalRecoleccion.Update() + End Sub + + +End Class diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb index 4b8b847ba..5b6c87d55 100644 --- a/App_Code/ClsContratos.vb +++ b/App_Code/ClsContratos.vb @@ -4,6 +4,7 @@ Option Explicit On Imports System.Data Imports System.Data.SqlClient Imports Extensiones +Imports Profact.TimbraCFDI40 Public Class ClsContratos Implements IDisposable @@ -158,7 +159,7 @@ Public Class ClsContratos Public Property PorGarantia As Double Public Property CveContratosEstatus As Integer Public Property Estatus As Integer - 'Public Property EstatusContrato As Integer + Public Property EstatusContrato As Integer Public Property Archivo As String Public Property Geom As String Public Property FechaIng As DateTime @@ -270,7 +271,7 @@ Public Class ClsContratos Me.PorAnticipo = Data.Rows(0)("PorAnticipo").ToString.ToDouble Me.PorAmortizacionAnticipo = Data.Rows(0)("PorAmortizacionAnticipo").ToString.ToDouble Me.PorGarantia = Data.Rows(0)("PorGarantia").ToString.ToDouble - 'Me.EstatusContrato = Data.Rows(0)("EstatusContrato").ToString.ToEntero + Me.EstatusContrato = Data.Rows(0)("EstatusContrato").ToString.ToEntero Me.Archivo = Data.Rows(0)("Archivo").ToString Me.Geom = Data.Rows(0)("Geom").ToString Me.FechaIng = Data.Rows(0)("FechaIng").ToString.ToDate @@ -406,7 +407,7 @@ Public Class ClsContratos 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) As Boolean + 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 Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosUpdate") @@ -463,6 +464,8 @@ Public Class ClsContratos .Add("@ObservacionesGenerales", SqlDbType.VarChar).Value = ObservacionesGenerales .Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF .Add("@CveChofer", SqlDbType.Int).Value = CveChofer + .Add("@EstatusContrato", SqlDbType.Int).Value = EstatusContrato + .Add("@CveAF", SqlDbType.Int).Value = CveAF End With Try @@ -556,7 +559,7 @@ Public Class ClsContratos Public Function GetContratosEstatus(CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False - DataAdapter("PA_Con_ContratosEstatusGET") + DataAdapter("PA_Con_ContratosEstatusGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa @@ -571,6 +574,95 @@ Public Class ClsContratos Return Retorno End Function + Public Function AddContratoEstatus(ContratoEstatus As String, TipoEstatus As Integer, BackgroundColor As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Con_ContratosEstatusAdd") + + With SqlAdapter.SelectCommand.Parameters + .Add("@ContratoEstatus", SqlDbType.VarChar).Value = ContratoEstatus + .Add("@TipoEstatus", SqlDbType.Int).Value = TipoEstatus + .Add("@BackgroundColor", SqlDbType.VarChar).Value = BackgroundColor + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al agregar al Catálogo de Contratos Estatus.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + Public Function UpdateContratoEstatus(CveContratoEstatus As Integer, ContratoEstatus As String, TipoEstatus As Integer, Estatus As Boolean, BackgroundColor As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Con_ContratosEstatusUpdate") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveContratoEstatus", SqlDbType.Int).Value = CveContratoEstatus + .Add("@ContratoEstatus", SqlDbType.VarChar).Value = ContratoEstatus + .Add("@TipoEstatus", SqlDbType.Int).Value = TipoEstatus + .Add("@Estatus", SqlDbType.Int).Value = Estatus + .Add("@BackgroundColor", SqlDbType.VarChar).Value = BackgroundColor + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al agregar al Catálogo de Contratos Estatus.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + Public Function RemoveContratoEstatus(CveContratoEstatus As Integer, CveEmpresa As Integer) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Con_ContratosEstatusRemove") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveContratoEstatus", SqlDbType.Int).Value = CveContratoEstatus + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al eliminar el contrato Estatus.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + + End Function + + + Public Function UpdateContratoAF(CveContrato As Integer, CveAF As Integer, CveChofer As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Con_ContratoAFUpdate") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveContrato", SqlDbType.Int).Value = CveContrato + .Add("@CveAF", SqlDbType.Int).Value = CveAF + .Add("@CveChofer", SqlDbType.Int).Value = CveChofer + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + If ex.Message.Contains("Número: 2601;") Then + Alert("Ya existe un contrato con el mismo número de contrato registrado: " & NumeroContrato & ".", TipoMensaje.MsgAdvertencia) + Else + OnError("Ocurrió un error al actualizar el Contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End If + + End Try + + Return Retorno + End Function + #End Region diff --git a/App_Code/ClsOS.vb b/App_Code/ClsOS.vb index 1bd14b0b8..3e736c02e 100644 --- a/App_Code/ClsOS.vb +++ b/App_Code/ClsOS.vb @@ -794,7 +794,7 @@ Public Class ClsOS End Function - Public Function UpdateOrdenesServiciosFinaliza(CveOS As Integer, CveOSDetalle As Integer, CvePS As Integer, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean + Public Function UpdateOrdenesServiciosFinaliza(CveOS As Integer, CveOSDetalle As Integer, CvePS As Integer, CveEmpresa As Integer, Optional Opcion As Integer = 1, Optional Observaciones As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OS_OrdenesServiciosFinalizaUpdate") @@ -805,6 +805,7 @@ Public Class ClsOS .Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@Opcion", SqlDbType.Int).Value = Opcion + .Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones End With diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index c90d114eb..dbba3a3cd 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -1639,6 +1639,33 @@ Public Class ClsPaginas Application("GlobalDTCaracteristicasOpciones") = value End Set End Property + + +#Region "C R M " + Public Shared Property GlobalDTCRMTipoProceso(CveEmpresa As Integer) As DataTable + Get + Dim AppNombre As String = $"GlobalDTCRMTipoProceso-{CveEmpresa}" + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim cRMService As New ADSNetLibrary.SIGAPI.Services.CRM.CRMService(ConfigurationManager.ConnectionStrings("Conexion").ConnectionString) + Dim tipoProceso As New ADSNetLibrary.SIGAPI.Models.CRM.Request.RequestTipoProceso(CveEmpresa) + ' Dim ObjTipoProceso As List(Of ADSNetLibrary.SIGAPI.Models.ResponseModel(Of ADSNetLibrary.SIGAPI.Models.CRM.Request.ResponseTipoProceso)) = cRMService.GetTipoProcesoCRM(tipoProceso) + Dim ObjTipoProceso As ADSNetLibrary.SIGAPI.Models.ResponseModel(Of List(Of ADSNetLibrary.SIGAPI.Models.CRM.Response.ResponseTipoProceso)) + ObjTipoProceso = cRMService.GetTipoProcesoCRM(tipoProceso) + + If ObjTipoProceso.Result.Count > 0 Then + HttpContext.Current.Application(AppNombre) = ObjTipoProceso.Result.QueryToDataTable(True) + End If + + End If + GlobalDTCRMTipoProceso = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) + End Get + Set(value As DataTable) + Dim AppNombre As String = $"GlobalDTCRMTipoProceso-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value + End Set + End Property +#End Region 'Property GlobalDTTipoCuentasEquipos(CveEmpresa As Integer) As DataTable ' Get ' If CveEmpresa <> -1 Then @@ -2365,6 +2392,28 @@ Public Class ClsPaginas Application("GlobalDTContratosSecciones") = value End Set End Property + + Public Shared Property GlobalDTContratosEstatus(CveEmpresa As Integer) As DataTable + Get + Dim AppNombre As String = $"GlobalDTContratosEstatus-{CveEmpresa}" + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Using ObjContratos As New ClsContratos + If ObjContratos.GetContratosEstatus(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjContratos.DtResultados + End Using + End If + 'Dim StrSQL As New StringBuilder + 'StrSQL.Append(" 1 = 1 ") + 'If CveContrato >= 0 Then StrSQL.AppendFormat(" AND CveContrato = {0} ", CveContrato) + 'If CveSubProyecto >= 0 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0} ", CveSubProyecto) + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), "", "", DataViewRowState.CurrentRows) + GlobalDTContratosEstatus = Dv.ToTable + Dv.Dispose() + End Get + Set(value As DataTable) + Dim AppNombre As String = $"GlobalDTContratosEstatus-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value + End Set + End Property Public Shared Property GlobalDTContratos(CveEmpresa As Integer, Optional CveContrato As Integer = -1, Optional CveSubProyecto As Integer = -1) As DataTable Get Dim AppNombre As String = $"GlobalDTContratos-{CveEmpresa}" @@ -6001,8 +6050,8 @@ Public Class ClsPaginas namespaces.AddNamespace("cartaporte20", "http://www.sat.gob.mx/CartaPorte20") namespaces.AddNamespace("cartaporte30", "http://www.sat.gob.mx/CartaPorte30") - Dim Nodos30 = XMLDoc.SelectSingleNode("//cartaporte30:CartaPorte", namespaces) - Dim Nodos20 = XMLDoc.SelectSingleNode("//cartaporte20:CartaPorte", namespaces) + Dim Nodos30 As XmlNode = XMLDoc.SelectSingleNode("//cartaporte30:CartaPorte", namespaces) + Dim Nodos20 As XmlNode = XMLDoc.SelectSingleNode("//cartaporte20:CartaPorte", namespaces) If Nodos30 IsNot Nothing Then VersionCCP = "3.0" @@ -7253,12 +7302,12 @@ Public Class ClsPaginas End If If NombreArchivo = "FacturaUSA" Then - Dim DtBaseTotales = Vta.DtDeduccion.Clone() + Dim DtBaseTotales As DataTable = Vta.DtDeduccion.Clone() If Vta.DtDeduccion IsNot Nothing Then - Dim RowTotal_USA = DtBaseTotales.NewRow() - Dim RowPAYMENTS_USA = DtBaseTotales.NewRow() - Dim RowBALANCE_USA = DtBaseTotales.NewRow() + Dim RowTotal_USA As DataRow = DtBaseTotales.NewRow() + Dim RowPAYMENTS_USA As DataRow = DtBaseTotales.NewRow() + Dim RowBALANCE_USA As DataRow = DtBaseTotales.NewRow() Dim TOTAL_USA As Decimal = 0 Dim PAYMENTS_USA As Decimal = 0 @@ -10100,6 +10149,7 @@ Public Class ClsPaginas PaginaDict.Add("/Contratos/CatRefrendos.aspx".ToUpper(), 644) PaginaDict.Add("/Contratos/RepContratosFianzas.aspx".ToUpper(), 646) PaginaDict.Add("/Contratos/RepPedidosDevolucionesXContrato.aspx".ToUpper(), 705) + PaginaDict.Add("/Contratos/CatContratosEstatus.aspx".ToUpper(), 173) #End Region #Region "CrM" PaginaDict.Add("/CRM/CatTipoProceso.aspx".ToUpper(), 1301) @@ -10756,15 +10806,17 @@ Public Class ClsPaginas PaginaDict.Add("/Acumuladores/EntradasUsadosResumenRep.aspx".ToUpper(), 1032) PaginaDict.Add("/Acumuladores/RepPolizasVirtuales.aspx".ToUpper(), 1322) PaginaDict.Add("/Acumuladores/RepAcumuladoresVigencia.aspx".ToUpper(), 174) + PaginaDict.Add("/Acumuladores/RepRecolecciones.aspx".ToUpper(), 563) #End Region #Region "Transportes" PaginaDict.Add("/Transportes/RepContratos.aspx".ToUpper(), 598) PaginaDict.Add("/Transportes/RepViajes.aspx".ToUpper(), 599) - PaginaDict.Add("/Transportes/RepBoletos.aspx".ToUpper(), 600) - PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 601) + PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 600) + PaginaDict.Add("/Transportes/RepBoletos.aspx".ToUpper(), 601) PaginaDict.Add("/Transportes/RepContratosCalendario.aspx".ToUpper(), 603) + PaginaDict.Add("/Transportes/CatRutas.aspx".ToUpper(), 604) #End Region 'Antes de aquí. diff --git a/App_Code/ClsSisUsuarios.vb b/App_Code/ClsSisUsuarios.vb index 464fb1d6b..1c779adf5 100644 --- a/App_Code/ClsSisUsuarios.vb +++ b/App_Code/ClsSisUsuarios.vb @@ -246,6 +246,9 @@ Public Class ClsSisUsuarios Dim autoip As String = Data.Rows(0)("AutorizadoxIP").ToString().ToUpper() Retorno.AutorizadoxIP = (autoip = "1" OrElse autoip = "TRUE") + ' Esto es parta el punto de venta + Retorno.CveSucursal = Data.Rows(0)("CveSubProyecto").ToString().ToEntero + ''Toma la primer letra de cada nombre 'Dim sbr As New StringBuilder 'For Each St As String In Retorno.Nombre.Split(" "c) diff --git a/App_Code/ClsTransportes.vb b/App_Code/ClsTransportes.vb index 979375c2e..612d9f694 100644 --- a/App_Code/ClsTransportes.vb +++ b/App_Code/ClsTransportes.vb @@ -333,6 +333,68 @@ Public Class ClsTransportes Return Retorno End Function + + Public Function AddDestino(Destino As String, Estatus As String, EsNacional As String, CveUsuario As Integer, CveEmpresa As Integer) As Integer + Dim Retorno As Integer = -1 + + DataAdapter("PA_Trans_DestinosAdd") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveDestino", SqlDbType.Int).Direction = ParameterDirection.Output + .Add("@Destino", SqlDbType.VarChar).Value = Destino + .Add("@EsNacional", SqlDbType.VarChar).Value = Convert.ToBoolean(EsNacional) + .Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus) + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveDestino").Value.ToString) + Catch ex As Exception + OnError("Ocurrió un error al agregar el destino.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + Public Function UpdateDestino(CveDestino As Integer, Destino As String, Estatus As String, EsNacional As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Trans_DestinosUpdate") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveDestino", SqlDbType.Int).Value = CveDestino + .Add("@Destino", SqlDbType.VarChar).Value = Destino + .Add("@EsNacional", SqlDbType.VarChar).Value = Convert.ToBoolean(EsNacional) + .Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus) + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar el destino.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + Public Function RemoveDestino(CveDestino As Integer) As Boolean + Dim Retorno As Boolean = False + + + DataAdapter("PA_Trans_DestinosRemove") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveDestino", SqlDbType.Int).Value = CveDestino + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al eliminar el destino.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function #End Region #Region "Rutas" @@ -351,15 +413,73 @@ Public Class ClsTransportes Try SqlAdapter.Fill(Data) Retorno = True + Catch ex As Exception OnError("Ocurrió un error al obtener las rutas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try + Return Retorno + End Function + Public Function AddRuta(Ruta As String, Estatus As String, CveUsuario As Integer, CveEmpresa As Integer) As Integer + Dim Retorno As Integer = -1 + + DataAdapter("PA_Trans_RutasAdd") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveRuta", SqlDbType.Int).Direction = ParameterDirection.Output + .Add("@Ruta", SqlDbType.VarChar).Value = Ruta + .Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus) + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveRuta").Value.ToString) + Catch ex As Exception + OnError("Ocurrió un error al agregar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + Public Function UpdateRuta(CveRuta As Integer, Ruta As String, Estatus As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Trans_RutasUpdate") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveRuta", SqlDbType.Int).Value = CveRuta + .Add("@Ruta", SqlDbType.VarChar).Value = Ruta + .Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus) + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + Public Function RemoveRuta(CveRuta As Integer) As Boolean + Dim Retorno As Boolean = False + + + DataAdapter("PA_Trans_RutasRemove") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveRuta", SqlDbType.Int).Value = CveRuta + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al eliminar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno End Function #End Region -#Region "Tarifas" +#Region "Importes" Public Function GetDestinosTarifas(CveDestinoOrigen As Integer, CveDestinoFinal As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Trans_DestinosTarifasGet") @@ -376,6 +496,63 @@ Public Class ClsTransportes Return Retorno End Function + + Public Function AddDestinosTarifas(CveRuta As String, CveDestinoOrigen As String, CveDestinoFinal As String, Importe As String) As Integer + Dim Retorno As Integer = -1 + + DataAdapter("PA_Trans_DestinosTarifasAdd") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveDestinoTarifa", SqlDbType.Int).Direction = ParameterDirection.Output + .Add("@CveRuta", SqlDbType.Int).Value = CveRuta.ToEntero + .Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen.ToEntero + .Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal.ToEntero + .Add("@Importe", SqlDbType.SmallMoney).Value = Importe.ToDecimal + End With + Try + SqlAdapter.Fill(Data) + Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveDestinoTarifa").Value.ToString) + Catch ex As Exception + OnError("Ocurrió un error al agregar el importe.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + Public Function UpdateDestinosTarifas(CveDestinoTarifa As Integer, CveRuta As String, CveDestinoOrigen As String, CveDestinoFinal As String, Importe As String) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Trans_DestinosTarifasUpdate") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveDestinoTarifa", SqlDbType.Int).Value = CveDestinoTarifa + .Add("@CveRuta", SqlDbType.Int).Value = CveRuta.ToEntero + .Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen.ToEntero + .Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal.ToEntero + .Add("@Importe", SqlDbType.SmallMoney).Value = Importe.ToDecimal + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar el importe.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + Public Function RemoveDestinosTarifas(CveDestinoTarifa As Integer) As Boolean + Dim Retorno As Boolean = False + + + DataAdapter("PA_Trans_DestinosTarifasRemove") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveDestinoTarifa", SqlDbType.Int).Value = CveDestinoTarifa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al eliminar el importe.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function #End Region End Class diff --git a/App_Code/wsSIG.vb b/App_Code/wsSIG.vb index 1991e6c6b..c94a13c60 100644 --- a/App_Code/wsSIG.vb +++ b/App_Code/wsSIG.vb @@ -115,7 +115,12 @@ Public Class wsSIG Retorno.CveEmpresa = ttDato.CveEmpresa 'Retorno.Empresa = ttDato.NombreEmpresa Retorno.CveVendedor = ttDato.CveVendedor - Retorno.CveSucursal = CveSubProyecto + + If CveSubProyecto > 0 Then + Retorno.CveSucursal = CveSubProyecto + Else + Retorno.CveSucursal = ttDato.CveSucursal + End If 'Retorno.Contraseña = ttDato.Contraseña 'Retorno.IMEI = IMEI diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx index 8d250faba..344297e94 100644 --- a/Ashx/CargaEventos.ashx +++ b/Ashx/CargaEventos.ashx @@ -85,7 +85,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState FI = context.Request("start").ToDate FF = context.Request("end").ToDate - If Not GetEventos(CveUsuario, CveEmpresa, FI, FF) Then + If Not GetEventos(CveUsuario, CveEmpresa, FI, FF, context:=context) Then 'Convierte el objeto de Eventos en JSON 'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events) @@ -280,7 +280,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState 'AGREGAMOS CUANDO NO ES RECURRENTE Dim tFecha As DateTime = DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA - If dr("FechaFinal").ToString.ToDateTime > tFecha Or dr("FechaInicio").ToString.ToDateTime > tFecha Then + If dr("FechaFin").ToString.ToDateTime > tFecha Or dr("FechaInicio").ToString.ToDateTime > tFecha Then events.Add(cevent) End If Else @@ -442,7 +442,6 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState Dim DT_EstatusOS As New DataTable Dim usuarioActual_ As Usuario = UsuarioActual(context) Dim ErrorEventos As Boolean = False - Dim Colores() As String = {"#006699", "#0099cc", "#0066cc", "#0033cc", "#0000ff", "#3333ff", "#3333ff", "#6600ff", "#9933ff", "#cc00ff", "#cc00cc", "#cc0099", "#cc3399", "#cc6699", "#cc0066", "#009933", "#00cc00", "#00cc66", "#009999", "#669900", "#99cc00", "#cccc00", "#cc9900", "#ff9900", "#006666", "#669999"} Dim tipoVista As String = context.Request("tipoVista") DT_SubProyectos.Columns.Add("CveSubProyecto", GetType(Integer)) DT_SubProyectos.Columns.Add("backgroundColor") @@ -458,19 +457,31 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState For Each dr As DataRow In ObjContratos.DtResultados.Rows Dim cevent As CalendarEvent = New CalendarEvent() + Dim estatus As Integer = dr("EstatusContrato").ToString.ToEntero cevent.id = dr("CveContrato").ToString.ToEntero cevent.title = dr("DescripcionContrato").ToString cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime) - cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)) 'Agregar una hora, fecha final como default + cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)) cevent.allDay = False cevent.NombreAcercamiento = dr("Ubicacion").ToString cevent.CveCliente = dr("CveCliente").ToString.ToEntero - cevent.CveActivoFijo = dr("CveTipoAF").ToString.ToEntero cevent.CvePersonal = dr("CveChofer").ToString.ToEntero cevent.Dolares = dr("Importe").ToString.ToDecimal cevent.Pesos = dr("ImporteMax").ToString.ToDecimal cevent.Anticipo = dr("ImporteMin").ToString.ToDecimal + cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero + + Select Case estatus + Case 1 + cevent.backgroundColor = "#00A56A" + Case 2 + cevent.backgroundColor = "#2B4FD6" + Case 3 + cevent.backgroundColor = "#EE602E" + End Select + + If Not cevent.recurrenciatipo > 0 Then @@ -554,24 +565,9 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime) cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)) cevent.NombreAcercamiento = dr("Ubicacion").ToString - + cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero cevent.allDay = False - 'cevent.CveEventoEstatus = dr("NumeroContrato").ToString.ToEntero - 'cevent.CveEventoEstatus = dr("CveEventoEstatus").ToString.ToEntero - 'cevent.cveagendatipo = dr("CveAgendaTipo").ToString - 'cevent.prioridad = dr("CvePrioridad").ToString.ToEntero - 'cevent.backgroundColor = dr("BackGroundColor").ToString - 'cevent.recurrenciatipo = dr("RecurrenciaTipo").ToString.ToEntero - 'cevent.frecuencia = dr("Frecuencia").ToString.ToEntero - 'cevent.diassemana = dr("DiasSemana").ToString - 'cevent.dia = dr("Dia").ToString.ToEntero - 'cevent.mes = dr("Mes").ToString.ToEntero - 'cevent.recurrenciafin = dr("RecurrenciaFin").ToString - 'cevent.CveProspecto = dr("CveProspecto").ToString.ToEntero - 'cevent.Prospecto = dr("Prospecto").ToString - - '11/05/2018 - Evento Gasto Recurrente 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index d996f5db0..978a336d6 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -30,7 +30,7 @@ Imprimir Desglose
  • - Agregar PS + Agregar PS
  • Agregar Otros Gastos diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index ce1cbb413..e92869286 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1176,6 +1176,7 @@ Partial Class Compras_Compras ModalidadUMAlias = -1 CvePrePoliza = -1 TabActivosFijos.Enabled = UsuarioActual.Empresa.UsaAF + 'HplNuevoPS.Visible = Not UsuarioActual.TienePermisoProceso(122) TieneOC = False CveMoneda = -1 diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index c29799b52..1745f277d 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1254,9 +1254,10 @@ Partial Class PopUpVerFactura Dim CveAlmacenTransitorioRecepcion As Integer = If(UrlParametros("CVEALMACENTRANSITORIORECEPCION") Is Nothing, -1, (UrlParametros("CVEALMACENTRANSITORIORECEPCION").ToString.ToEntero)) Dim FolioBusquedaTrasitorio As Integer = If(UrlParametros("FOLIOBUSQUEDATRASITORIO") Is Nothing, -1, (UrlParametros("FOLIOBUSQUEDATRASITORIO").ToString.ToEntero)) + Dim Consola As String = If(UrlParametros("CVEMOVIMIENTO") IsNot Nothing, UrlParametros("CVEMOVIMIENTO").ToString.Trim, "") CargaMovimientosAlmacen(UrlParametros("CVEMOVIMIENTO").ToString.ToEntero, Resumen:=False, EsTransitorio:=EsTransitorio, CveAlmacenRecepcion:=CveAlmacenRecepcion, CveAlmacenTransitorioRecepcion:=CveAlmacenTransitorioRecepcion, - FolioBusquedaTrasitorio:=FolioBusquedaTrasitorio) + FolioBusquedaTrasitorio:=FolioBusquedaTrasitorio, Consola:=Consola) End If End If @@ -2420,7 +2421,7 @@ Partial Class PopUpVerFactura #Region " - OP = 'Alm' - REPORTE ENTRADAS ALMACEN " Private Sub CargaMovimientosAlmacen(CveMovimiento As Integer, Optional Resumen As Boolean = False, - Optional EsTransitorio As Boolean = False, Optional CveAlmacenRecepcion As Integer = -1, Optional CveAlmacenTransitorioRecepcion As Integer = -1, Optional FolioBusquedaTrasitorio As Integer = -1) + Optional EsTransitorio As Boolean = False, Optional CveAlmacenRecepcion As Integer = -1, Optional CveAlmacenTransitorioRecepcion As Integer = -1, Optional FolioBusquedaTrasitorio As Integer = -1, Optional Consola As String = "") Dim ObjInventarios As New ClsInventarios ObjInventarios.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa) @@ -2656,7 +2657,7 @@ Partial Class PopUpVerFactura PuestoEnrego, RazonSocial, ResponsableCarga, ResponsableRecibio, NombreCliente, CantidadProductos:=CantidadProductos, CantidadUsados:=CantidadUsados, CveTipoAlmacen:=CveTipoAlmacen, NombreEntrego:=NombreEntrego, CveConceptoMovRelacionado:=CveConceptoMovtoRelacionado, FolioRelacionado:=FolioRelacionado, UsuarioRegistro:=UsuarioCapturo, - Ruta:=Ruta, Supervisor:=Supervisor) + Ruta:=Ruta, Supervisor:=Supervisor, Consola:=Consola) End Sub Private Sub PUanacExtr(CveMoneda As Integer) 'preciounitario a moneda nacional o extranjera @@ -2675,7 +2676,7 @@ Partial Class PopUpVerFactura EstadoDestino As String, PaisDestino As String, CPDestino As String, FechaMovimiento As Date, NombreCapturo As String, PuestoRecibio As String, PuestoEntrego As String, RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0, Optional CveTipoAlmacen As Integer = -1, Optional NombreEntrego As String = "", Optional CveConceptoMovRelacionado As Integer = -1, Optional FolioRelacionado As String = "", Optional UsuarioRegistro As String = "", - Optional Ruta As String = Nothing, Optional Supervisor As String = Nothing) + Optional Ruta As String = Nothing, Optional Supervisor As String = Nothing, Optional Consola As String = "-1") Select Case CveConcepto @@ -3347,6 +3348,8 @@ Partial Class PopUpVerFactura RutaFormato = "{0}Formatos\TrasladoUsado.rdlc" End If + + params.Add(New ReportParameter("CveConcepto", "8")) 'FolioTraspaso.ToString 'params.Add(New ReportParameter("TipoTraslado", "AVISO")) 'FolioTraspaso.ToString params.Add(New ReportParameter("SubProyecto", String.Format("Traslado de: {0} A {1}", Almacen, AlmacenDestino))) 'DdlAlmacenDestino.SelectedItem.ToString @@ -3377,6 +3380,19 @@ Partial Class PopUpVerFactura CveCliente = DtMovimientos.FiltroPrimeroValor("CveCliente").ToEntero DTCliente = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}") + If CveCliente = 819998 Then + RutaFormato = "{0}Formatos\TrasladoAngeles.rdlc" + + If Consola <> "-1" And Consola.Trim.Length > 0 Then + RutaFormato = "{0}Formatos\Consola.rdlc" + params.Add(New ReportParameter("Consola", Consola)) + End If + + End If + + + + Dim CveVentaConsulta As Integer = DtMovimientos.FiltroPrimeroValor("CveVenta").ToEntero params.Add(New ReportParameter("Documentacion", DTCliente.FiltroPrimeroValor("Documentacion"))) @@ -3409,9 +3425,6 @@ Partial Class PopUpVerFactura - If CveCliente = 819998 Then - RutaFormato = "{0}Formatos\TrasladoAngeles.rdlc" - End If End If If CveContrato > 0 Then diff --git a/Contabilidad/RegPoliza.aspx.vb b/Contabilidad/RegPoliza.aspx.vb index d7d9dd9a5..9ade722b9 100644 --- a/Contabilidad/RegPoliza.aspx.vb +++ b/Contabilidad/RegPoliza.aspx.vb @@ -152,6 +152,10 @@ Partial Class RegPoliza Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.LoadComplete If Not IsPostBack Then + If UsuarioActual.Empresa.TipoContabilizacion = 1 OrElse UsuarioActual.Empresa.TipoContabilidad = 1 Then + Response.Redirect("/Contabilidad2/RegPrePolizaS.aspx") + End If + ViewState("Orden0") = "" ViewState("Orden1") = "" CvePrePoliza = -1 @@ -1612,7 +1616,7 @@ Partial Class RegPoliza Private Sub SiguienteFolio() Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim NumPoliza = ObjConta.GetNumeroPoliza(DdlTipoPoliza.SelectedValue.ToEntero, TxtFechaPoliza.Text.ToDate.ToString("yyyy-MM-dd")) + Dim NumPoliza As Integer = ObjConta.GetNumeroPoliza(DdlTipoPoliza.SelectedValue.ToEntero, TxtFechaPoliza.Text.ToDate.ToString("yyyy-MM-dd")) If NumPoliza > 0 Then TxtNumeroPoliza.Text = NumPoliza.ToString @@ -1709,7 +1713,7 @@ Partial Class RegPoliza Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String) Dim dt As New DataTable 'Dim Conexion As Odbc.OdbcConnection = Nothing - Dim ErrorArchivo = False + Dim ErrorArchivo As Boolean = False Dim n As Integer = 0 Try Select Case Tipo @@ -1771,7 +1775,7 @@ Partial Class RegPoliza Dim Referencia As String = Row("Referencia").ToString Dim Cuenta As String = Row("Código Cuenta").ToString + " - " + Row("Nombre Cuenta").ToString - Dim Cuenta2 = AgregaComilla(Cuenta) 'Agregar otra comilla simple adicional cuando contenga una + Dim Cuenta2 As String = AgregaComilla(Cuenta) 'Agregar otra comilla simple adicional cuando contenga una Dim CveCuenta As String = "" If DTCuentas.FiltroPrimero("CtaCodigo = '" & Cuenta2 & "'") IsNot Nothing Then @@ -1779,7 +1783,7 @@ Partial Class RegPoliza End If Dim SegNeg As String = Row("SegNeg").ToString - Dim SegNeg2 = AgregaComilla(SegNeg) 'Agregar otra comilla simple adicional cuando contenga una + Dim SegNeg2 As String = AgregaComilla(SegNeg) 'Agregar otra comilla simple adicional cuando contenga una Dim IdSegNeg As String = "" If DTSegmentosNegocio.FiltroPrimero("Nombre = '" & SegNeg2 & "'") IsNot Nothing Then @@ -1842,9 +1846,9 @@ Partial Class RegPoliza Private Function AgregaComilla(str As String) As String If str.Contains("'") Then - Dim arr = Split(str, "'") + Dim arr As String() = Split(str, "'") str = "" - For i = 0 To arr.Length() - 1 + For i As Integer = 0 To arr.Length() - 1 If i = arr.Length - 1 Then str += arr(i) Else diff --git a/Contratos/CatContratosEstatus.aspx b/Contratos/CatContratosEstatus.aspx new file mode 100644 index 000000000..02290d75a --- /dev/null +++ b/Contratos/CatContratosEstatus.aspx @@ -0,0 +1,245 @@ +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatContratosEstatus.aspx.vb" Inherits=" Contratos_CatContratosEstatus" %> + + + + + + + + + + + Catálogo de Estado de Orden de Servicio + + + + +
  • + +
  • + + + + + + +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + <%--POPUP AGREGAR--%> + + + +
    + + + + + + + + + + + + + + bootstrap-colorpicker.min.css + + + + + diff --git a/Contratos/CatContratosEstatus.aspx.vb b/Contratos/CatContratosEstatus.aspx.vb new file mode 100644 index 000000000..93344f055 --- /dev/null +++ b/Contratos/CatContratosEstatus.aspx.vb @@ -0,0 +1,145 @@ +Imports System.Data +Imports Extensiones + +Partial Class Contratos_CatContratosEstatus + Inherits ClsPaginas + +#Region " PROPIEDADES" + + + Private Property CveContratoEstatus As Integer + Get + Return ViewState("CveContratoEstatus").ToString.ToEntero + End Get + Set(value As Integer) + ViewState("CveContratoEstatus") = value + End Set + End Property + Private Property Modalidad As String + Get + Return ViewState("Modalidad").ToString + End Get + Set(value As String) + ViewState("Modalidad") = value + End Set + End Property +#End Region + + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not Page.IsPostBack Then + CargaDatos() + CveContratoEstatus = -1 + End If + RegistraScript(" $('#TxtBackgroundColor').simpleColorPicker();") + End Sub + + Public Sub CargaDatos() + + Using objEstatus As New ClsContratos + If objEstatus.GetContratosEstatus(UsuarioActual.CveEmpresa) Then + GvDatos.DataSource = objEstatus.DtResultados + End If + End Using + GvDatos.DataBind() + OrdenaDatos() + End Sub + + Private Sub BtnAgregarEstatus_Click(sender As Object, e As EventArgs) Handles BtnAgregarEstatus.Click + + TxtEstatusOS.Text = "" + TxtBackgroundColor.Text = "" + BtnAgregarEstatusCon.Text = "Agregar" + divChkEstatus.Visible = False + UpBodyEstatus.Update() + UpFooter.Update() + RegistraScript("$('#divAddEstatus').modal();LimpiaModal()") + Modalidad = "I" + End Sub + Protected Sub BtnAgregarEstatusCon_Click(sender As Object, e As EventArgs) Handles BtnAgregarEstatusCon.Click + Dim ObjEstatus As New ClsContratos + Dim TieneError As Boolean = False + + If Modalidad = "I" Then + If ObjEstatus.AddContratoEstatus(TxtEstatusOS.Text.Trim, DdlTipoEstatus.SelectedValue.ToEntero, TxtBackgroundColor.Text.Replace("#", ""), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + Alert("Estatus agregado") + GlobalDTContratosEstatus(UsuarioActual.CveEmpresa) = Nothing + End If + Else + If CveContratoEstatus <> -1 Then + If Not ObjEstatus.UpdateContratoEstatus(CveContratoEstatus, TxtEstatusOS.Text.Trim, DdlTipoEstatus.SelectedValue.ToEntero, ChkEstatus.Checked, TxtBackgroundColor.Text.Replace("#", ""), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + TieneError = True + End If + End If + If Not TieneError Then + GvDatos.EditIndex = -1 + Alert("Estatus actualizado") + GlobalDTContratosEstatus(UsuarioActual.CveEmpresa) = Nothing + Else + Alert("Ocurrio un error al actualizar los datos", TipoMensaje.MsgAdvertencia) + End If + End If + + + ObjEstatus.Dispose() + CargaDatos() + RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddEstatus")) + UpDatos.Update() + + 'Response.Redirect(HttpContext.Current.Request.Url.ToString(), True) + End Sub + Public Sub Edit_Click(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + DdlTipoEstatus.SelectedValueExist(GvRow.DataKey("TipoEstatus")) + TxtEstatusOS.Text = GvRow.DataKey("ContratoEstatus") + ChkEstatus.Checked = If(GvRow.DataKey("Estatus").ToString = "True", True, False) + CveContratoEstatus = GvRow.DataKey("CveContratoEstatus").ToEntero + TxtBackgroundColor.Text = "#" & GvRow.DataKey("BackgroundColor") + BtnAgregarEstatusCon.Text = "Actualizar" + divChkEstatus.Visible = True + UpBodyEstatus.Update() + UpAddEstatus.Update() + Modalidad = "A" + RegistraScript(String.Format("$('#{0}').modal();", "divAddEstatus")) + End Sub + +#Region "G V D A T O S" + Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound + 'If e.Row.RowType = DataControlRowType.DataRow Then + ' Dim URL As String = String.Format("javascript:LimpiaModal();SetValue('HdnModalidad', 'U');SetValue('HdnID', '{0}');ShowDivRegistro();return false;", e.Row.DBCampo("CveContratoEstatus").ToEntero, e.Row.DBCampo("ContratoEstatus")) + ' 'GeneroLigas + ' Dim Liga As String = String.Format("", URL) + ' e.Row.VerticalAlign = VerticalAlign.Middle + ' e.Row.FCLinkButton("ImgE").OnClientClick = URL + 'End If + End Sub + Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting + Dim ObjEstatus As New ClsContratos + Dim CveContratoEstatus As Integer = GvDatos.Rows(e.RowIndex).DataKey("CveContratoEstatus").ToEntero + + If ObjEstatus.RemoveContratoEstatus(CveContratoEstatus, UsuarioActual.CveEmpresa) Then + GvDatos.EditIndex = -1 + GlobalDTContratosEstatus(UsuarioActual.CveEmpresa) = Nothing + Alert("El Estatus de contrato se eliminó correctamente.", TipoMensaje.MsgInformacion) + End If + + ObjEstatus.Dispose() + CargaDatos() + UpDatos.Update() + + End Sub + + +#End Region + +#Region "O R D E N A M I E N T O" + Private Sub OrdenaDatos() + If (GvDatos.Rows.Count > 0) Then + GvDatos.UseAccessibleHeader = True + GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader + RegistraScript("OrdenarGV();") + End If + End Sub +#End Region + +End Class diff --git a/Empresas/186/Formatos/Consola.rdlc b/Empresas/186/Formatos/Consola.rdlc new file mode 100644 index 000000000..39b8cb463 --- /dev/null +++ b/Empresas/186/Formatos/Consola.rdlc @@ -0,0 +1,3073 @@ + + + 0 + + + + System.Data.DataSet + /* Local Connection */ + + 457ddefa-843b-4fae-8b02-70764606cb28 + + + + + + DsInventarios + /* Local Query */ + + + + Codigo + System.String + + + NumeroParte + System.String + + + PS + System.String + + + UnidadMedida + System.String + + + PU + System.Decimal + + + Cantidad + System.Decimal + + + Total + System.Decimal + + + Descuento + System.Decimal + + + CodigoAF + System.String + + + Almacen + System.String + + + SerieLote + System.String + + + Observaciones + System.String + + + Lote + System.String + + + FechaCaducidad + System.Date + + + PUVenta + System.Decimal + + + IVAVenta + System.Decimal + + + SubTotalVenta + System.Decimal + + + Marca + System.String + + + CodigoAlterno + System.String + + + PSAlterno + System.String + + + + DsInventarios + C:\inetpub\wwwVentas\App_Code\DsInventarios.xsd + DtMovimientos + + + + + + + + + + + + + + + 2.42399cm + + + 12.657cm + + + 5.2437cm + + + 5.43555cm + + + + + 0.43377cm + + + + + true + + + + + Cantidad + + + + + + + Textbox1 + + + + Black + + 1pt + + + Black + + 1pt + + #9cc3e5 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Descripción del Equipo + + + + + + + Textbox3 + + + + Black + + 1pt + + + Black + + 1pt + + #9cc3e5 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Serie + + + + + + + Textbox5 + + + + + + + + + #9cc3e5 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Modelo + + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + #9cc3e5 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + + + true + true + + + + + + + + + + + + Textbox19 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + FechaCaducidad + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox23 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox84 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + 0.49417cm + + + + + true + true + + + + + 1 + + + + + + + Textbox44 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + CONSOLA DE RADIO FRECUENCIA BONSS ORTHOPEDIC + + + + + + + Textbox45 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox46 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Parameters!Consola.Value + + + + + + + Textbox85 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + 0.44125cm + + + + + true + true + + + + + + + + + + + + Textbox51 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox52 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox53 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox86 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + 0.6cm + + + + + true + true + + + + + 1 + + + + + + + Textbox87 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + PEDALES PARA RADIO FRECUENCIA BONSS + + + + + + + Textbox88 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox89 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox90 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + + Textbox91 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox92 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox93 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox94 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + 0.52062cm + + + + + true + true + + + + + 2 + + + + + + + Textbox95 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + CABLE DE ALIMENTACION CON ADAPTADOR + + + + + + + Textbox96 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox97 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox98 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + 0.44125cm + + + + + true + true + + + + + + + + + + + + Textbox99 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox100 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox101 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox102 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + 0.6cm + + + + + true + true + + + + + 1 + + + + + + + Textbox103 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + MALETA TRANSPORTADORA MARCA BONSS + + + + + + + Textbox104 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox105 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox106 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + + Textbox107 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox108 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox109 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox110 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + + Textbox111 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + EQUIOP A PRESTAMO PARA CIRUGÍA + + + + + + + Textbox112 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox113 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox114 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DsInventarios + 0.14111cm + 0.10068cm + 5.79878cm + 25.76024cm + + + + + + 2.45176in + + + + + + true + true + + + + + SMS SMART MEDICAL SOLUTIONS + + + + + + + Textbox2 + 0.07163cm + 8.55215cm + 0.38833cm + 8.54466cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + SSM1908213A0 +NEBRASKA 157, Col. NAPOLES +BENITO JUAREZ + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Microsoft.VisualBasic.Interaction.iif(Parameters!CveConcepto.Value = 8, "REMISIÓN", "ENTRADA DE TRASLADO") + + + + + + + Textbox2 + 0.07163cm + 18.69141cm + 0.38833cm + 6.81397cm + 3 + + true + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REMISION + + + + + + + Textbox12 + 1.89684cm + 21.17549cm + 0.44478cm + 4.32987cm + 4 + + + #9cc3e5 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Folio.Value + + + + + + + Textbox12 + 2.34162cm + 21.17549cm + 0.44478cm + 4.32987cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha + + + + + + + Textbox12 + 0.91315cm + 21.1755cm + 0.44478cm + 4.32987cm + 6 + + + #9cc3e5 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + + Textbox12 + 1.35793cm + 21.17549cm + 0.44478cm + 4.32987cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Parameters!CveConcepto.Value = 8, "Carga Privada", " ") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cliente: + + + + =Parameters!ClienteCodigo.Value + + + + - + + + + =Parameters!ClienteNombre.Value + + + + . + + + + + =IIF(LEN(Parameters!ClienteSucursal.Value)> 0,"Sucursal: ","") + + + + =IIF(LEN(Parameters!ClienteSucursal.Value)>0, Parameters!ClienteSucursal.Value & " ","") + + + + RFC: + + + + =Parameters!ClienteRFC.Value + + + + +Calle: + + + + =Parameters!ClienteCalle.Value + + + + + + + + =Parameters!ClienteNoExt.Value + + + + . Colonia: + + + + =Parameters!ClienteColonia.Value + + + + Ciudad: + + + + =Parameters!ClienteCiudad.Value + + + + . +Estado: + + + + =Parameters!ClienteEstado.Value + + + + . +Municipio y/o Delegación: + + + + =Parameters!ClienteMunicipio.Value + + + + . CP: + + + + =Parameters!ClienteCP.Value + + + + . + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 3.8269cm + true + true + + + true + true + + + + + =Parameters!ResponsableCarga.Value + + + + + + + Textbox21 + 1.37766cm + 5.68986cm + 0.50243cm + 5.79375cm + + true + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ResponsableRecibio.Value + + + + + + + Textbox21 + 1.37766cm + 14.40467cm + 0.50243cm + 5.78664cm + 1 + + true + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + + + + Nombre y Firma + + + + + + + Textbox21 + 1.66375cm + 5.69781cm + 1.2cm + 5.78664cm + 2 + + true + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + + + + Nombre y Firma + + + + + + + Textbox21 + 1.6632cm + 14.41177cm + 1.2cm + 5.78664cm + 3 + + true + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Envió + + + + + + + Textbox22 + 0.07331cm + 5.69781cm + 0.6cm + 5.78664cm + 4 + + true + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Accion.Value + + + + + + + Textbox22 + 0.07331cm + 14.41177cm + 0.6cm + 5.78664cm + 5 + + true + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!NombreAccion.Value = "","",Parameters!NombreAccion.Value) + + + + Textbox21 + 0.45106cm + 10.04017cm + 0.63528cm + 5.78664cm + 6 + + true + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + + + + Nombre y Firma + + + + + + + Textbox21 + 1.6632cm + 10.04727cm + 1.2cm + 5.78664cm + 7 + + true + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Accion.Value + + + + + + + Textbox22 + 0.07331cm + 10.04727cm + 0.6cm + 5.78664cm + 8 + + true + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 0.13678cm + 0cm + 20.28859cm + 11 + + + + + + 0.13678cm + 0cm + 25.72414cm + 12 + + + + + + 3.26597cm + 0.10068cm + 0cm + 25.76024cm + 13 + + true + + + + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox10 + 3.40709cm + 23.00537cm + 0.41981cm + 2.55292cm + 14 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 21.59cm + 27.94cm + 1cm + 1cm + 0.5cm + 0.5cm + 0.13cm + - =Fields!Codigo.Value + =Fields!NumeroParte.Value @@ -776,6 +780,7 @@ =IIf(rownumber(nothing) = 1, "2pt", "0pt") + true diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx index 7cd33263d..f7ff4f447 100644 --- a/Inventarios/EntradasSalidas.aspx +++ b/Inventarios/EntradasSalidas.aspx @@ -62,6 +62,9 @@
  • PDF Resumen
  • +
  • + PDF Consola +
  • Descargar XML SAT
  • @@ -673,7 +676,7 @@ + DataKeyNames="No,CveMovimientoDetalle,Cantidad,CvePS,CveUM,PU,Observaciones,CodigoPS,UnidadMedida,CveAF,Serie,Lote,FechaCaducidad,CveSeccionAlmacen,Codigo" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" > diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 2db31e03e..23e2e03a7 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -507,10 +507,55 @@ Partial Class Inventarios_EntradasSalidas 'ImgFecha.Visible = True End If + + If CveMovimiento > 0 And CveConcepto.Contiene(8) And UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then + ValidaUsaConsola() + End If + End If End Sub + Property Consola As String + Get + If ViewState("Consola") Is Nothing Then + ViewState("Consola") = "" + End If + Return ViewState("Consola").ToString + End Get + Set(value As String) + ViewState("Consola") = value + End Set + End Property + + Private Function ValidaUsaConsola() As Boolean + Consola = "" + Dim Respuesta As Boolean = False + + For Each gvRow As GridViewRow In GvM.Rows + If gvRow.DataKey("Codigo").Contiene("404Q2", "404Q3", "405Q2", "405Q3", "306Q1", "306Q2") Then + Consola = "ARS600" + Respuesta = True + HplImprimirConsola.Visible = True + Exit For + End If + If gvRow.DataKey("Codigo").Contiene("106Q1A", "106Q2A", "106Q3", "106Q3WT", "106Q4", "106Q4A", "106Q5A", "106Q6A", "106Q7A") Then + Consola = "ARS800" + Respuesta = True + HplImprimirConsola.Visible = True + Exit For + End If + Next + + If Respuesta Then + HplImprimirConsola.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Alm&CveMovimiento={0}&Consola={1}", CveMovimiento, Consola))) + End If + + Return Respuesta + + + End Function + #Region " PERMISOS PAGINAS " Private Function PermiteGuardar() As Boolean Return If(UsuarioActual.TienePermisoProceso(181) Or EsConsumoInterno, True, False) @@ -909,9 +954,12 @@ Partial Class Inventarios_EntradasSalidas HplImprimirResumen.Visible = True HplImprimirResumen.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Almr&CveMovimiento={0}", CveMovimiento))) + CveCompra = Mov.CveCompra CveConcepto = Mov.CveConcepto + + If drM("CveEstatusTimbrado").ToString.ToEntero > 0 Then HplDescargaXml.Visible = True HplDescargaXml.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "XML", drM("TimbreSerieFolio"), drM("TimbreTipoDocto")))) @@ -1195,7 +1243,7 @@ Partial Class Inventarios_EntradasSalidas DdlAlmacen.Items.Clear() DdlAlmacen.DataBind() Dim dttA As DataTable = Nothing - dttA = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (1,22,27)") + dttA = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (4)") '("CveTipoAlmacen IN (1,22,27)") DdlAlmacen.DataSource = dttA DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1")) diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index f0d83d50d..a0e274ecf 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -4,6 +4,7 @@ Option Explicit On Imports System.Data Imports System.Data.SqlClient Imports System.IO +Imports System.Web.Management Imports Extensiones Imports Microsoft.Reporting.WebForms @@ -1847,10 +1848,13 @@ Partial Class Inventarios_EntregaAlmacen Private Sub GuardaVenta() - - '' INICIA: VALIDACIONES - - 'Valida el estatus de la Venta, si es = 5 O DevolucionVenta = 2, NO SE SURTE! + ValidaUsaConsola() + + + + '' INICIA: VALIDACIONES + + 'Valida el estatus de la Venta, si es = 5 O DevolucionVenta = 2, NO SE SURTE! Dim ObjVentaInv As New ClsInventarios If ObjVentaInv.GetEstatusVentaPorSurtir(CveVentaSurtir) Then TipoEstatus = ObjVentaInv.TipoEstatus @@ -3112,6 +3116,9 @@ Partial Class Inventarios_EntregaAlmacen Msg.AppendFormat("Movimiento {2}:
    {1}", CveMovimiento, Folio, If(TipoMovimiento = 1, "Salida", "Entrada")) Msg.AppendFormat("
    Imprimir Movimiento ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento))) + If Consola.Trim.Length > 0 Then + Msg.AppendFormat("
    Consola ", Encripta(String.Format("OP=Alm&CveMovimiento={0}&Consola={1}", CveMovimiento, Consola))) + End If If CveMovimientoEntrada > 0 Then Msg.AppendFormat("

    Movimiento Entrada (Traspaso): {1}", CveMovimientoEntrada, FolioEntrada) @@ -3160,8 +3167,10 @@ Partial Class Inventarios_EntregaAlmacen 'SI NO ES GARANTIA MANDA A RECIBIR AL USADO If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso TipoDocto.Contiene("Rem", "Ped") AndAlso CveMovimientoGarantia <= 0 Then Msg.AppendFormat("

    Recibir Usado: Ir a Recepción de Usados", CveVentaSurtir) - End If - + End If + + + Alert(Msg.ToString(), TipoMensaje.MsgInformacion) Limpia() @@ -4408,6 +4417,47 @@ Partial Class Inventarios_EntregaAlmacen Return Cancelar + End Function + + Property Consola As String + Get + If ViewState("Consola") Is Nothing Then + ViewState("Consola") = "" + End If + Return ViewState("Consola").ToString + End Get + Set(value As String) + ViewState("Consola") = value + End Set + End Property + + Private Function ValidaUsaConsola() As Boolean + Consola = "" + Dim Respuesta As Boolean = False + + For Each gvRow As GridViewRow In GvDatos.Rows + + If gvRow.FCCheckBox("cbInv").Checked AndAlso gvRow.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then + + If gvRow.DataKey("Codigo").Contiene("404Q2", "404Q3", "405Q2", "405Q3", "306Q1", "306Q2") Then + Consola = "ARS600" + Respuesta = True + Exit For + End If + + If gvRow.DataKey("Codigo").Contiene("106Q1A", "106Q2A", "106Q3", "106Q3WT", "106Q4", "106Q4A", "106Q5A", "106Q6A", "106Q7A") Then + Consola = "ARS800" + Respuesta = True + Exit For + End If + + End If + + Next + + Return Respuesta + + End Function End Class diff --git a/Inventarios/RepNotasSinAlmacen.aspx.vb b/Inventarios/RepNotasSinAlmacen.aspx.vb index 65770e8de..55a9eb262 100644 --- a/Inventarios/RepNotasSinAlmacen.aspx.vb +++ b/Inventarios/RepNotasSinAlmacen.aspx.vb @@ -65,13 +65,16 @@ Partial Class RepNotasSinAlmacen #End Region Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load - If Not IsPostBack Then - + If Not IsPostBack Then + CargaCombos() 'CargaDatos() CargaPermisos() End If - End Sub + End Sub + + + Private Sub CargaPermisos() Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201) Dim TienePermisoDesmarcar As Boolean = UsuarioActual.TienePermisoProceso(278) @@ -88,6 +91,9 @@ Partial Class RepNotasSinAlmacen GvVentas.Columns(8).Visible = True TxtFechaF.Text = NowADS.AddDays(3).ToShortDateString + GvVentas.Columns(4).Visible = False + GvCompras.Columns(4).Visible = False + GvVentas.Columns(0).ItemStyle.Width = Unit.Pixel(120) 'CType(GvVentas.Columns(2), Literal).DataFormatString = "{0:dd/MM/yyyy HH:mm}" 'CType(GvVentas.Columns(2), Literal).ItemStyle.Width = Unit.Pixel(120) diff --git a/OS/Asignaciones.aspx b/OS/Asignaciones.aspx index add8f193f..de229e14f 100644 --- a/OS/Asignaciones.aspx +++ b/OS/Asignaciones.aspx @@ -200,10 +200,15 @@ + + + + + > diff --git a/OS/Asignaciones.aspx.vb b/OS/Asignaciones.aspx.vb index bbee6bbff..19d9044ad 100644 --- a/OS/Asignaciones.aspx.vb +++ b/OS/Asignaciones.aspx.vb @@ -40,16 +40,13 @@ Partial Class OS_Asignaciones #End Region Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then + GvNA_ConfiguraColumnas() CargaEstatusOS() 'CargaUsuarios() CargaClientes() CargaSubProyecto() - If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then - GvNA.Columns(2).HeaderText = "Hospital" - GvNA.Columns(7).HeaderText = "Fecha Cirugía" - GvNA.Columns(8).HeaderText = "Hora Cirugía" - End If + If UsuarioActual.TienePermisoProceso(171) Then CargaOrdenesServiciosAsignadasXPersona() @@ -75,6 +72,9 @@ Partial Class OS_Asignaciones End If ObjEstatusPermisos.Dispose() + + + End If RegistraScript(" @@ -90,6 +90,26 @@ Partial Class OS_Asignaciones ") End Sub + Private Sub GvNA_ConfiguraColumnas() + + If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then + GvNA.Columns(3).Visible = False + GvNA.Columns(4).Visible = False + GvNA.Columns(5).Visible = False + GvNA.Columns(6).Visible = False + + GvNA.Columns(7).Visible = True + GvNA.Columns(8).Visible = True + + + GvNA.Columns(2).HeaderText = "Hospital" + GvNA.Columns(9).HeaderText = "Fecha Cirugía" + GvNA.Columns(10).HeaderText = "Hora Cirugía" + End If + + + End Sub + #Region "C A R G A S " Private Sub CargaSubProyecto() DdlSubProyecto.Items.Clear() @@ -184,7 +204,7 @@ Partial Class OS_Asignaciones Dim TecnicosResultado As New DataTable If ObjOS.GetSubProyectosEstatusInicial(-1, 3, UsuarioActual.CveEmpresa) Then - TecnicosSubProyectos = ObjOS.DtResultados + TecnicosSubProyectos = ObjOS.DtResultados.FiltraParametros(" Estatus = 'True' ") End If If DtOSSubProyectos IsNot Nothing Then diff --git a/OS/OrdenesServicios.aspx b/OS/OrdenesServicios.aspx index 3a694320d..bbe58e696 100644 --- a/OS/OrdenesServicios.aspx +++ b/OS/OrdenesServicios.aspx @@ -1308,13 +1308,19 @@
    - - +
    - + +
    +
    +
    + + +
    +
    +

    diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index 6bfe489ec..31d94fb18 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -3298,11 +3298,7 @@ Partial Class OS_OrdenesServicios ProcesoOK = False End If End If - If ProcesoOK Then - If Not ObjOS.UpdateOrdenesServiciosFinaliza(CveOS, -1, -1, UsuarioActual.CveEmpresa) Then - ProcesoOK = False - End If - End If + If ProcesoOK Then Dim Contabilizable As Boolean = False Dim Concepto As String = "Material utilizado" @@ -3328,11 +3324,16 @@ Partial Class OS_OrdenesServicios ProcesoOK = False End If End If - - - - End If + + + If ProcesoOK Then + If Not ObjOS.UpdateOrdenesServiciosFinaliza(CveOS, -1, -1, UsuarioActual.CveEmpresa, Observaciones:=TxtObservacionModal.Text.Trim) Then + ProcesoOK = False + End If + End If + + End If diff --git a/OS/RepOSMedicas.aspx b/OS/RepOSMedicas.aspx index 8da020fa3..621e7e27c 100644 --- a/OS/RepOSMedicas.aspx +++ b/OS/RepOSMedicas.aspx @@ -21,6 +21,10 @@
  • Excel
  • +
  • + + Personalizar Columnas +
  • @@ -174,21 +178,26 @@ <%--3--%> - <%--4--%> - + <%--5--%> - + <%--6--%> - + <%--7--%> - + <%--8--%> - + <%--9--%> + + <%--10--%> + <%--11--%> + <%--12--%> + <%--13--%> + @@ -196,6 +205,45 @@ + + + + + + diff --git a/OS/RepOSMedicas.aspx.vb b/OS/RepOSMedicas.aspx.vb index a68acdb0b..a231dbf39 100644 --- a/OS/RepOSMedicas.aspx.vb +++ b/OS/RepOSMedicas.aspx.vb @@ -98,10 +98,14 @@ Partial Class OS_RepOSMedicas Dim FechaI As Date = If(txtFechaI.Text.Trim = "", MinFecha, txtFechaI.Text.ToDate) Dim FechaF As Date = If(txtFechaF.Text.Trim = "", MaxFecha, txtFechaF.Text.ToDate) Dim Cvecliente As Integer = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1) + LnkPersonalizar.Visible = False If ObjOS.GetRepOrdenesServicioMedicasRep(FechaI, FechaF, Cvecliente, DdlVendedor.SelectedValue.ToEntero, DdlEstatusOS.SelectedValue.ToEntero, DdlTecnico.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero) Then GvDatos.DataSource = ObjOS.DtResultados + If ObjOS.DtResultados IsNot Nothing AndAlso ObjOS.DtResultados.Rows.Count > 0 Then + LnkPersonalizar.Visible = True + End If Else GvDatos.DataSource = Nothing End If @@ -163,4 +167,27 @@ Partial Class OS_RepOSMedicas Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control) End Sub + Protected Sub LnkPersonalizar_Click(sender As Object, e As EventArgs) + + ' ChkGuardarPersonalizacion.Checked = False + RegistraScript("$('#DivPersonalizar').modal('show')") + + End Sub + + Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click + + + Personaliza() + + + End Sub + + Private Sub Personaliza() + + GvDatos.Columns(13).Visible = ChkObservaciones.Checked + + CargaDatos() + + End Sub + End Class diff --git a/Transportes/Boletos.aspx b/Transportes/Boletos.aspx index 254e8184c..011e520a4 100644 --- a/Transportes/Boletos.aspx +++ b/Transportes/Boletos.aspx @@ -33,11 +33,6 @@ color: #fff; } - { - background-color: #45b6af; - color: #fff; - } - .nodisponible { display: inline-block; width: 45px; @@ -74,8 +69,9 @@ - + + <%-- Datos de cliente y su viaje --%>
    @@ -158,6 +154,7 @@
    +
    @@ -174,6 +171,7 @@
    +
    @@ -181,8 +179,8 @@
    -
    +
    Destino:
    -
    -

    @@ -209,14 +205,10 @@ ValidationGroup="GrpGuardar">
    -
    -
    - -
    +
    - - + <%-- Asientos --%>
    @@ -468,10 +460,8 @@
    -
    -
    - + diff --git a/Transportes/Boletos.aspx.vb b/Transportes/Boletos.aspx.vb index 330e2cc09..11ca1db6b 100644 --- a/Transportes/Boletos.aspx.vb +++ b/Transportes/Boletos.aspx.vb @@ -119,11 +119,11 @@ Partial Class Boletos ViewState("Importe") = ImporteR TxtCosto.Text = $"El precio de su boleto es ${ImporteR.FormatoNumero}" BtnGuardar.Visible = True - upPanel.Visible = True + UpPanel.Visible = True Else TxtCosto.Text = "" BtnGuardar.Visible = False - upPanel.Visible = False + UpPanel.Visible = False ViewState("Importe") = 0 End If End If @@ -156,9 +156,7 @@ Partial Class Boletos Try AsientoSeleccionado = AsientoSeleccionado.Replace("A", "") - Dim retorno As Integer = ObjTransporte.AddViajesPasajeros(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, AsientoSeleccionado.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - - If retorno > 1 Then + If ObjTransporte.AddViajesPasajeros(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, AsientoSeleccionado.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario, UsuarioActual.CveVendedor) > 1 Then Alert("Boleto generado correctamente") ObjTransporte.Commit() DdlPartida.SelectedValue = "" @@ -168,13 +166,14 @@ Partial Class Boletos TxtCelular.Text = "" TxtObservaciones.Text = "" AsientoSeleccionado = "" - upPanel.Update() End If Catch ex As Exception ObjTransporte.RollBack() Alert($"No se pudo generar el boleto {ex}", TipoMensaje.MsgError) Finally ObjTransporte.Dispose() + CargaDatos() + UpPanel.Update() End Try End Sub diff --git a/Transportes/CatRutas.aspx b/Transportes/CatRutas.aspx new file mode 100644 index 000000000..fadda2efd --- /dev/null +++ b/Transportes/CatRutas.aspx @@ -0,0 +1,404 @@ +<%@ Page Language="VB" Title="Transportes V&A - Rutas" AutoEventWireup="false" + MasterPageFile="~/Site.master" CodeFile="CatRutas.aspx.vb" + Inherits="CatRutas" EnableEventValidation="true" %> + + + Rutas y Destinos + + + + + + + + + + + <%--Calendario Tab--%> + + <%--Rutas Tab--%> + + +
    +
    + +
    +
    + " + style="display: inline-block; margin-right: -10px; width: 150px;" /> + " + style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + <%--Destinos Tab--%> + + +
    +
    + +
    +
    +
    + " + style="display: inline-block; margin-right: -10px; width: 150px;" /> + " + style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + <%--Importes Tab--%> + + +
    +
    + +
    +
    +
    + " + style="display: inline-block; margin-right: -10px; width: 150px;" /> + " + style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + + +
    + + diff --git a/Transportes/CatRutas.aspx.vb b/Transportes/CatRutas.aspx.vb new file mode 100644 index 000000000..3745008d9 --- /dev/null +++ b/Transportes/CatRutas.aspx.vb @@ -0,0 +1,291 @@ +Option Explicit On +Option Strict On +Imports ADSNetLibrary.SIGAPI.Helpers +Imports Extensiones +Imports Extensiones.ModExtensiones + +Partial Class CatRutas + Inherits ClsPaginas + + Private Property Cve As Integer + Get + Return ViewState("Cve").ToString().ToEntero + End Get + Set(value As Integer) + ViewState("Cve") = value + End Set + End Property + Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load + If Not IsPostBack Then + ViewState("Cve") = 0 + InicializarCombos() + CargaDatos() + End If + + End Sub + Private Sub CargaDatos() + 'Lista Rutas' + Dim ObjRutas As New ClsTransportes() + If ObjRutas.GetRutas(-1, -1, -1, "", True, DateTime.Now) Then + + If ObjRutas.DtResultados.Rows.Count > 0 Then + GvRutas.DataSource = ObjRutas.DtResultados + GvRutas.DataBind() + End If + End If + 'Lista Destinos' + If ObjRutas.GetDestinos() Then + + If ObjRutas.DtResultados.Rows.Count > 0 Then + GvDestinos.DataSource = ObjRutas.DtResultados + GvDestinos.DataBind() + End If + End If + 'Lista Importes' + If ObjRutas.GetDestinosTarifas(-1, -1) Then + If ObjRutas.DtResultados.Rows.Count > 0 Then + GvImportes.DataSource = ObjRutas.DtResultados + GvImportes.DataBind() + End If + End If + + UpPanel.Update() + + End Sub + + Private Sub InicializarCombos() + Dim ObjDestinos As New ClsTransportes() + + If ObjDestinos.GetDestinos() Then + + If ObjDestinos.DtResultados.Rows.Count > 0 Then + + DdlOrigen.DataSource = ObjDestinos.DtResultados + DdlOrigen.DataBind() + DdlOrigen.Items.Insert(0, New ListItem("Seleccione Partida", "")) + + DdlFinal.DataSource = ObjDestinos.DtResultados + DdlFinal.DataBind() + DdlFinal.Items.Insert(0, New ListItem("Seleccione Destino", "")) + End If + End If + ObjDestinos.Dispose() + + + Dim ObjRutas As New ClsTransportes() + If ObjRutas.GetRutas(-1, -1, -1, "", True, DateTime.Now) Then + + If ObjRutas.DtResultados.Rows.Count > 0 Then + DdlRutas.DataSource = ObjRutas.DtResultados + DdlRutas.DataBind() + DdlRutas.Items.Insert(0, New ListItem("Seleccione Ruta", "")) + End If + End If + End Sub + + Protected Sub MostrarModal(sender As Object, e As EventArgs) + TxtRuta.Text = "" + DdlRutaEstatus.SelectedValue = "" + TxtDestino.Text = "" + DdlEsNacional.SelectedValue = "" + DdlDestinoEstatus.SelectedValue = "" + DdlOrigen.SelectedValue = "" + DdlFinal.SelectedValue = "" + TxtImporte.Text = "" + BtnAddRuta.Visible = False + BtnAddDestino.Visible = False + BtnAddImporte.Visible = False + PnRuta.Visible = False + PnDestino.Visible = False + PnImporte.Visible = False + Dim id As String = DirectCast(sender, LinkButton).ID + + If id.Contains("Editar") Then + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + + Select Case id + Case "BtnEditarRuta" + ModalLabel.Text = "Editar Ruta" + PnRuta.Visible = True + TxtRuta.Text = GvRow.DataKey("Ruta") + DdlRutaEstatus.SelectedValue = GvRow.DataKey("Estatus") + BtnAddRuta.Visible = True + BtnAddRuta.Text = "Editar" + ViewState("Cve") = GvRow.DataKey("CveRuta").ToEntero + + + Case "BtnEditarDestino" + ModalLabel.Text = "Editar Destino" + TxtDestino.Text = GvRow.DataKey("Destino") + DdlEsNacional.SelectedValue = GvRow.DataKey("EsNacional") + DdlDestinoEstatus.SelectedValue = GvRow.DataKey("Estatus") + PnDestino.Visible = True + BtnAddDestino.Visible = True + BtnAddDestino.Text = "Editar" + ViewState("Cve") = GvRow.DataKey("CveDestino").ToEntero + + + Case "BtnEditarImporte" + ModalLabel.Text = "Editar Importe" + DdlRutas.SelectedValue = GvRow.DataKey("CveRuta") + DdlOrigen.SelectedValue = GvRow.DataKey("CveDestinoOrigen") + DdlFinal.SelectedValue = GvRow.DataKey("CveDestinoFinal") + TxtImporte.Text = GvRow.DataKey("Importe") + PnImporte.Visible = True + BtnAddImporte.Visible = True + BtnAddImporte.Text = "Editar" + ViewState("Cve") = GvRow.DataKey("CveDestinoTarifa").ToEntero + + + End Select + End If + + If id.Contains("Agregar") Then + Select Case id + Case "BtnAgregarRuta" + ModalLabel.Text = "Agregar Ruta" + PnRuta.Visible = True + BtnAddRuta.Visible = True + BtnAddRuta.Text = "Guardar" + Case "BtnAgregarDestino" + ModalLabel.Text = "Agregar Destino" + PnDestino.Visible = True + BtnAddDestino.Visible = True + BtnAddDestino.Text = "Guardar" + Case "BtnAgregarImporte" + ModalLabel.Text = "Agregar Importe" + PnImporte.Visible = True + BtnAddImporte.Visible = True + BtnAddImporte.Text = "Guardar" + + End Select + End If + UpModal.Update() + RegistraScript(String.Format("$('#{0}').modal('show');", "Modal")) + End Sub + + +#Region "Rutas" + Protected Sub AddRuta(sender As Object, e As EventArgs) + + Dim ObjRuta As New ClsTransportes + ObjRuta.IniciaTransacSQL() + Try + If BtnAddRuta.Text = "Guardar" Then + If ObjRuta.AddRuta(TxtRuta.Text, DdlRutaEstatus.SelectedValue, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 1 Then + ObjRuta.Commit() + Alert("Ruta Agregada Correctamente.") + End If + End If + + If BtnAddRuta.Text = "Editar" Then + If ObjRuta.UpdateRuta(Cve, TxtRuta.Text, DdlRutaEstatus.SelectedValue, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + ObjRuta.Commit() + Alert("Ruta Actualizada Correctamente.") + End If + End If + Catch ex As Exception + ObjRuta.RollBack() + Finally + CargaDatos() + ObjRuta.Dispose() + End Try + + + End Sub + Protected Sub RemoveRuta(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + Dim ObjRuta As New ClsTransportes + + If ObjRuta.RemoveRuta(GvRow.DataKey("CveRuta").ToEntero) Then + Alert("Ruta eliminada correctamente") + CargaDatos() + End If + + ObjRuta.Dispose() + End Sub +#End Region + +#Region "Destinos" + Protected Sub AddDestino(sender As Object, e As EventArgs) + + Dim ObjDestino As New ClsTransportes + ObjDestino.IniciaTransacSQL() + Try + If BtnAddDestino.Text = "Guardar" Then + If ObjDestino.AddDestino(TxtDestino.Text, DdlDestinoEstatus.SelectedValue, DdlEsNacional.SelectedValue, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 1 Then + ObjDestino.Commit() + Alert("Destino agregado correctamente.") + End If + End If + + If BtnAddDestino.Text = "Editar" Then + If ObjDestino.UpdateDestino(Cve, TxtDestino.Text, DdlDestinoEstatus.SelectedValue, DdlEsNacional.SelectedValue, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + ObjDestino.Commit() + Alert("Destino actualizado correctamente.") + End If + End If + Catch ex As Exception + ObjDestino.RollBack() + Finally + CargaDatos() + ObjDestino.Dispose() + End Try + + + End Sub + Protected Sub RemoveDestino(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + Dim ObjDestino As New ClsTransportes + + If ObjDestino.RemoveDestino(GvRow.DataKey("CveDestino").ToEntero) Then + Alert("Destino eliminado correctamente") + CargaDatos() + End If + + ObjDestino.Dispose() + End Sub +#End Region + +#Region "Importes" + Protected Sub AddImporte(sender As Object, e As EventArgs) + + Dim ObjImporte As New ClsTransportes + ObjImporte.IniciaTransacSQL() + Try + If BtnAddImporte.Text = "Guardar" Then + If ObjImporte.AddDestinosTarifas(DdlRutas.SelectedValue, DdlOrigen.SelectedValue, DdlFinal.SelectedValue, TxtImporte.Text) > 1 Then + ObjImporte.Commit() + Alert("Importe agregado correctamente.") + End If + End If + + If BtnAddImporte.Text = "Editar" Then + If ObjImporte.UpdateDestinosTarifas(Cve, DdlRutas.SelectedValue, DdlOrigen.SelectedValue, DdlFinal.SelectedValue, TxtImporte.Text) Then + ObjImporte.Commit() + Alert("Importe actualizado correctamente.") + End If + End If + Catch ex As Exception + ObjImporte.RollBack() + Finally + CargaDatos() + ObjImporte.Dispose() + End Try + + + End Sub + Protected Sub RemoveImporte(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + Dim ObjImporte As New ClsTransportes + + If ObjImporte.RemoveDestinosTarifas(GvRow.DataKey("CveDestinoTarifa").ToEntero) Then + Alert("Importe eliminada correctamente") + CargaDatos() + End If + + ObjImporte.Dispose() + End Sub +#End Region + +End Class diff --git a/Transportes/RepBoletos.aspx b/Transportes/RepBoletos.aspx index b0c7b381e..50967a32b 100644 --- a/Transportes/RepBoletos.aspx +++ b/Transportes/RepBoletos.aspx @@ -3,7 +3,7 @@ Inherits="ListadoBoletos" EnableEventValidation="true" %> - Listado de Boletos + Listado de Boletos - @@ -19,96 +19,90 @@ -
    - " - style="display: inline-block; margin-right: -10px; width: 150px;" /> - " - style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> - +
    +
    + +
    +
    +
    + " + style="display: inline-block; margin-right: -10px; width: 150px;" /> + " + class="btn btn-circle btn-sm label-info"> + +
    +
    - +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - + + + + + + + +
    +
    +
    diff --git a/Transportes/RepBoletos.aspx.vb b/Transportes/RepBoletos.aspx.vb index f85fe63e8..8ade27feb 100644 --- a/Transportes/RepBoletos.aspx.vb +++ b/Transportes/RepBoletos.aspx.vb @@ -6,7 +6,6 @@ Imports ADSNetLibrary.SIGAPI.Helpers Imports Extensiones.ModExtensiones Imports Microsoft.Reporting.WebForms - Partial Class ListadoBoletos Inherits ClsPaginas Private Property CveViaje As Integer @@ -32,8 +31,7 @@ Partial Class ListadoBoletos End If CveViaje = Request.QueryString("CveViaje").ToEntero Ruta = IfNull(Request("Ruta"), "").ToString - - Prueba.Text = Ruta + LblViaje.Text = Ruta InicializaCombos() CargaDatos() diff --git a/Transportes/RepContratos.aspx b/Transportes/RepContratos.aspx index de1309473..a5c307b84 100644 --- a/Transportes/RepContratos.aspx +++ b/Transportes/RepContratos.aspx @@ -3,7 +3,7 @@ CodeFile="RepContratos.aspx.vb" Inherits="ListadoContratos" %> - + Listado de Contratos @@ -30,76 +30,189 @@ .boton { background: red; } + + .consulta { + padding: 1rem 2rem; + background-color: #95A5A6; + display: flex; + justify-content: space-around; + align-items: center; + margin-bottom:1rem; + } + + .consulta_campo { + display: flex; + gap: 1rem; + align-items: center; + width:100%; + } + + .consulta_campo label { + color: white; + font-weight: bold; + } - - - + + +
  • - Agregar Contrato + Agregar Contrato
  • Generar Excel
  • -
    - - - +
    + + +
    - + + + +
    +
    + + +
    -
    - " - style="display: inline-block; margin-right: -10px; width: 150px;" /> - " - style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> - -
    - - - - - +
    + +
    + + + + + + + + + +
    +
    - +
    + +
    +
    +
    + + + + +
    + + + + + + + + + +
    +
    +
    + +
    + +
    +
    + + + + +
    + + + + + + + + + +
    +
    + + +
    +
    +
    + + + + + + + + + + Fecha
    + Salida +
    + + + +
    - + - - + + + + + + - - - - - - - - - Fecha
    - Salida -
    - - - -
    - + + Fecha
    @@ -110,207 +223,212 @@
    - - - - + + + + + - - -
    -
    + + + + + + + + +
    +
    + + -
    diff --git a/Transportes/RepContratos.aspx.vb b/Transportes/RepContratos.aspx.vb index f4add9831..9b7187055 100644 --- a/Transportes/RepContratos.aspx.vb +++ b/Transportes/RepContratos.aspx.vb @@ -1,5 +1,6 @@ Option Explicit On Option Strict On +Imports System.Data.SqlClient Imports Extensiones Imports Extensiones.ModExtensiones @@ -22,25 +23,15 @@ Partial Class ListadoContratos End If End Sub Private Sub InicializaCombos() - 'Lista Activos Fijos' - 'Dim ObjAF As New ClsAF() - 'If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, 1, "-1", -1, -1, -1) Then - ' If ObjAF.DtResultados.Rows.Count > 0 Then - ' DdlAF.DataSource = ObjAF.DtResultados - ' DdlAF.Items.Insert(0, New ListItem("Seleccione", "")) - ' End If - 'End If - 'ObjAF.Dispose() DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa) DdlTipoAF.DataBind() - + DdlTipoAF.Items.Insert(0, New ListItem("Seleccione", "")) 'Lista Chofer' DdlChofer.DataSource = GlobalDTRHPersonal(185) DdlChofer.DataBind() DdlChofer.Items.Insert(0, New ListItem("Seleccione", "")) - UpModal.Update() End Sub Private Sub CargaDatos() @@ -48,25 +39,35 @@ Partial Class ListadoContratos If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=2) Then GvContratos.DataSource = ObjContratos.DtResultados End If - ObjContratos.Dispose() GvContratos.DataBind() UpTitulos.Update() End Sub - Protected Sub MostrarModal(Optional Descripcion As String = "", Optional FechaSalida As String = "", Optional FechaRegreso As String = "", Optional Observaciones As String = "", Optional Ubicacion As String = "", Optional Transporte As String = "", Optional Cliente As String = "", Optional Dolares As String = "", Optional Pesos As String = "", Optional Anticipo As String = "", Optional Boton As String = "Guardar", Optional Chofer As String = "") + Protected Sub MostrarModal(Optional Descripcion As String = "", Optional FechaSalida As String = "", Optional FechaRegreso As String = "", Optional Observaciones As String = "", Optional Ubicacion As String = "", Optional Transporte As String = "", Optional CveCliente As Integer = 0, Optional Dolares As String = "", Optional Pesos As String = "", Optional Anticipo As String = "", Optional Boton As String = "Guardar", Optional Chofer As String = "") + 'DdlClientes.SelectedText = Cliente TxtDescripcion.Text = Descripcion + TxtUbicacion.Text = Ubicacion TxtFechaSalida.Text = FechaSalida TxtFechaRegreso.Text = FechaRegreso TxtObservaciones.Text = Observaciones TxtUbicacion.Text = Ubicacion - DdlAF.SelectedValue = Transporte - DdlClientes.SelectedText = Cliente + DdlTipoAF.SelectedValue = Transporte + DdlClientes.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, -1, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial") + DdlClientes.SelectedValue = CveCliente.ToString DdlChofer.SelectedValue = Chofer + TxtObservaciones.Text = Observaciones TxtDolares.Text = Dolares TxtPesos.Text = Pesos TxtAnticipo.Text = Anticipo BtnGuardar.Text = Boton + Dim EstatusContrato As String + If EstatusContrato <> "" Then + LbEstatus.Visible = True + DdlEstatusContrato.Visible = True + DdlEstatusContrato.SelectedValue = EstatusContrato + End If + 'DdlEstatusContrato.Text = EstatusContrato myModalLabel.InnerHtml = $"{Boton} Contrato" UpModal.Update() RegistraScript(String.Format("$('#{0}').modal('show');", "ModalAgregar")) @@ -83,62 +84,52 @@ Partial Class ListadoContratos Dim ObjContratos As New ClsContratos ObjContratos.IniciaTransacSQL() - Try - Dim CveEstatusInicial As Integer = 10 - Dim CveContratoHijo As Integer = -1 - Dim CveContratoTipo As Integer = 2 - Dim retorno As Boolean = False + Dim CveEstatusInicial As Integer = 10 + Dim CveContratoHijo As Integer = -1 + Dim CveContratoTipo As Integer = 2 + Dim retorno As Boolean = False - If ObjContratos.GetContratosEstatus(UsuarioActual.CveEmpresa) Then - CveEstatusInicial = ObjContratos.DtResultados.FiltroPrimeroValor("CveContratoEstatus", "TipoEstatus=1").ToEntero - End If - 'Agregar contrato - If BtnGuardar.Text = "Guardar" Then - 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, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero) - If CveContratoHijo > 0 Then - ObjContratos.Commit() - Alert("Agregado Correctamente.") - End If + CveEstatusInicial = GlobalDTContratosEstatus(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveContratoEstatus", "TipoEstatus=1").ToEntero + 'Agregar contrato + If BtnGuardar.Text = "Guardar" Then + 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, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=CveEstatusInicial, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero) + If CveContratoHijo > 0 Then + ObjContratos.Commit() + Alert("Agregado Correctamente.") End If + End If - 'Actualizar contrato - If BtnGuardar.Text = "Editar" Then - retorno = ObjContratos.UpdateContratos(CveContrato, "", TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero) + 'Actualizar contrato + If BtnGuardar.Text = "Editar" Then + retorno = ObjContratos.UpdateContratos(CveContrato, "", TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero) - If retorno Then - ObjContratos.Commit() - Alert("Actualizado Correctamente.") - End If - End If + ObjContratos.Commit() + Alert("Actualizado Correctamente.") + End If - TxtDescripcion.Text = "" - TxtFechaSalida.Text = "" - TxtFechaRegreso.Text = "" - TxtObservaciones.Text = "" - TxtUbicacion.Text = "" - DdlClientes.SelectedText = "" - DdlTransporte.SelectedValue = "" - DdlChofer.SelectedValue = "" - TxtDolares.Text = "" - TxtPesos.Text = "" - TxtAnticipo.Text = "" - BtnGuardar.Text = "Guardar" - Catch ex As Exception - Alert($"Ocurrió un error {ex}", TipoMensaje.MsgError) - ObjContratos.RollBack() - Finally - ObjContratos.Dispose() - CargaDatos() - End Try + TxtDescripcion.Text = "" + TxtFechaSalida.Text = "" + TxtFechaRegreso.Text = "" + TxtObservaciones.Text = "" + TxtUbicacion.Text = "" + DdlClientes.SelectedText = "" + DdlTipoAF.SelectedValue = "" + DdlChofer.SelectedValue = "" + TxtDolares.Text = "" + TxtPesos.Text = "" + TxtAnticipo.Text = "" + BtnGuardar.Text = "Guardar" + ObjContratos.Dispose() + CargaDatos() End Sub Protected Sub UpdateContrato(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) ViewState("CveContrato") = GvRow.DataKey("CveContrato") MostrarModal( - Descripcion:=GvRow.DataKey("DescripcionContrato"), FechaSalida:=GvRow.DataKey("FechaInicial").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), FechaRegreso:=GvRow.DataKey("FechaFinal").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), Observaciones:=GvRow.DataKey("DescripcionContrato"), Ubicacion:=GvRow.DataKey("Ubicacion"), Transporte:=GvRow.DataKey("CveTipoAF"), Cliente:=GvRow.DataKey("CveCliente"), Dolares:=GvRow.DataKey("Importe"), Pesos:=GvRow.DataKey("ImporteMax"), Anticipo:=GvRow.DataKey("ImporteMin"), Boton:="Editar", Chofer:=GvRow.DataKey("CveChofer")) + Descripcion:=GvRow.DataKey("DescripcionContrato"), FechaSalida:=GvRow.DataKey("FechaInicial").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), FechaRegreso:=GvRow.DataKey("FechaFinal").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), Observaciones:=GvRow.DataKey("DescripcionContrato"), Ubicacion:=GvRow.DataKey("Ubicacion"), Transporte:=GvRow.DataKey("CveTipoAF"), CveCliente:=GvRow.DataKey("CveCliente").ToEntero, Dolares:=GvRow.DataKey("Importe"), Pesos:=GvRow.DataKey("ImporteMax"), Anticipo:=GvRow.DataKey("ImporteMin"), Boton:="Editar", Chofer:=GvRow.DataKey("CveChofer")) End Sub Protected Sub RemoveContrato(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) @@ -155,4 +146,34 @@ Partial Class ListadoContratos GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString) End Sub + Protected Sub Consultar(sender As Object, e As EventArgs) + + If DdlClientesConsulta.SelectedValue = "" Then + Alert("Debe seleccionar al cliente", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + Dim cliente As Integer = DdlClientesConsulta.SelectedValue.ToEntero + Dim estatus As Integer = DdlEstatusConsulta.SelectedValue.ToEntero + Dim fechaInicial As DateTime = txtFechaI.Text.ToDate + Dim fechaFinal As DateTime = txtFechaF.Text.ToDate + + Dim query As String = "SELECT *, ISNULL(Cli.NombreComercial,'') AS NombreComercial FROM Con_Contratos C LEFT JOIN Clientes Cli with(nolock) ON Cli.CveCliente = C.CveCliente WHERE C.CveCliente = @Cliente AND EstatusContrato = @Estatus AND FechaInicial BETWEEN @FechaInicial AND @FechaFinal" + + Using connection As New SqlConnection(ConfigurationManager.ConnectionStrings("Conexion").ConnectionString) + Using command As New SqlCommand(query, connection) + command.Parameters.AddWithValue("@Cliente", cliente) + command.Parameters.AddWithValue("@Estatus", estatus) + command.Parameters.AddWithValue("@FechaInicial", fechaInicial) + command.Parameters.AddWithValue("@FechaFinal", fechaFinal) + + connection.Open() + Dim reader As SqlDataReader = command.ExecuteReader() + GvContratos.DataSource = reader + GvContratos.DataBind() + End Using + End Using + + UpTitulos.Update() + End Sub End Class diff --git a/Transportes/RepContratosCalendario.aspx b/Transportes/RepContratosCalendario.aspx index d441eabd3..29d50dac9 100644 --- a/Transportes/RepContratosCalendario.aspx +++ b/Transportes/RepContratosCalendario.aspx @@ -10,92 +10,248 @@ align-items: center; gap: 2rem; } + + .my-1 { + margin-block: 1rem; + } + + .consulta { + padding: 1rem 2rem; + background-color: #95A5A6; + display: flex; + justify-content: space-around; + align-items: center; + margin-bottom: 1rem; + } + + .consulta_campo { + display: flex; + gap: 1rem; + align-items: center; + width: 100%; + } + + .consulta_campo label { + color: white; + font-weight: bold; + } + + .miGrid { + color: white; + text-align: center; + } + + .miGrid thead { + color: black; + text-align: center; + }
    - Calendario de contratos + Calendario de Viajes - <%--Calendario Tab--%> - + <%--Calendario Tab--%> + -
    -
    -
    -
    -
    -

    Tipo de Vista

    -
    - - - - -
    - -
    +
    +
    +
    + + +
    +
    +
    + +
    + + + + + +
    +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +

     

    +
    +
    +
    -
    +
    - - - <%--Contratos Tab--%> - - - - + + + <%--Contratos Tab--%> + + + + +
    +
    + + +
    - +
    + +
    + + + + + + + + + +
    +
    + +
    + +
    +
    +
    + + + + +
    + + + + + + + + + +
    +
    +
    + +
    + +
    +
    + + + + +
    + + + + + + + + + +
    +
    + + +
    +
    +
    + + + + + + + - - + + + Fecha
    + Salida +
    + + + +
    + - +
    - - - - - - - - - - - + + + + + - - - - Fecha
    - Salida -
    + - + - Fecha
    @@ -106,181 +262,227 @@
    -
    -
    -
    -
    - + + + + + + + + + + + + + + + + + + + +