diff --git a/App_Code/CalendarEvent.vb b/App_Code/CalendarEvent.vb index f048b5d51..35dfa7999 100644 --- a/App_Code/CalendarEvent.vb +++ b/App_Code/CalendarEvent.vb @@ -54,6 +54,10 @@ Public Class CalendarEvent Public Property MovimientoFolio As String Public Property CveIE As Integer Public Property FolioIE As String + Public Property Pesos As Double + Public Property Dolares As Double + Public Property Anticipo As Double + End Class diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb index 5b23c01a6..4b8b847ba 100644 --- a/App_Code/ClsContratos.vb +++ b/App_Code/ClsContratos.vb @@ -406,7 +406,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 = "") 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) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosUpdate") @@ -428,17 +428,16 @@ Public Class ClsContratos .Add("@PorAnticipo", SqlDbType.Float).Value = PorAnticipo .Add("@PorAmortizacionAnticipo", SqlDbType.Float).Value = PorAmortizacionAnticipo .Add("@PorGarantia", SqlDbType.Float).Value = PorGarantia - '.Add("@EstatusContrato", SqlDbType.Bit).Value = EstatusContrato .Add("@Archivo", SqlDbType.VarChar).Value = Archivo .Add("@Geom", SqlDbType.VarChar).Value = Geom .Add("@CveContratoPadre", SqlDbType.Int).Value = CveContratoPadre .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - .Add("@EsPresupuestal", SqlDbType.Int).Value = EsPresupuestal + .Add("@EsPresupuestal", SqlDbType.Int).Value = EsPresupuestal + .Add("@CveContratoTipo", SqlDbType.SmallInt).Value = CveContratoTipo .Add("@ImporteMin", SqlDbType.Money).Value = Minimo .Add("@ImporteMax", SqlDbType.Money).Value = Maximo .Add("@Importe", SqlDbType.Money).Value = Importe - .Add("@CveContratoTipo", SqlDbType.SmallInt).Value = CveContratoTipo .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda .Add("@TipoCambio", SqlDbType.Money).Value = TipoCambio .Add("@ModalidadDetalle", SqlDbType.TinyInt).Value = ModalidadDetalle @@ -462,7 +461,8 @@ Public Class ClsContratos .Add("@DiaMesFacturacion", SqlDbType.TinyInt).Value = DiaMesFacturacion .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo .Add("@ObservacionesGenerales", SqlDbType.VarChar).Value = ObservacionesGenerales - + .Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF + .Add("@CveChofer", SqlDbType.Int).Value = CveChofer End With Try diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx index 87bd53ebf..8d250faba 100644 --- a/Ashx/CargaEventos.ashx +++ b/Ashx/CargaEventos.ashx @@ -464,7 +464,13 @@ 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)) 'Agregar una hora, fecha final como default cevent.allDay = False - cevent.CveEventoEstatus = dr("NumeroContrato").ToString.ToEntero + 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 If Not cevent.recurrenciatipo > 0 Then @@ -520,7 +526,11 @@ 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.allDay = False - cevent.CveEventoEstatus = dr("NumeroContrato").ToString.ToEntero + cevent.CveCliente = dr("CveCliente").ToString.ToEntero + cevent.NombreAcercamiento = dr("Ubicacion").ToString + cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero + cevent.CvePersonal = dr("CveChofer").ToString.ToEntero + '11/05/2018 - Evento Gasto Recurrente cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero @@ -543,6 +553,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState cevent.description = 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)) + cevent.NombreAcercamiento = dr("Ubicacion").ToString + cevent.allDay = False 'cevent.CveEventoEstatus = dr("NumeroContrato").ToString.ToEntero 'cevent.CveEventoEstatus = dr("CveEventoEstatus").ToString.ToEntero diff --git a/Transportes/Boletos.aspx.vb b/Transportes/Boletos.aspx.vb index 2efc8785f..330e2cc09 100644 --- a/Transportes/Boletos.aspx.vb +++ b/Transportes/Boletos.aspx.vb @@ -41,7 +41,7 @@ Partial Class Boletos Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then If Request.QueryString("CveViaje") Is Nothing Then - Response.Redirect("/Transportes/ListadoViajes.aspx") + Response.Redirect("/Transportes/RepViajes.aspx") End If AsientoSeleccionado = "" CveRuta = 0 diff --git a/Transportes/RepContratos.aspx b/Transportes/RepContratos.aspx index 36e04ceb3..de1309473 100644 --- a/Transportes/RepContratos.aspx +++ b/Transportes/RepContratos.aspx @@ -63,7 +63,7 @@ + data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax,CveChofer "> @@ -145,7 +145,7 @@
- +
diff --git a/Transportes/RepContratos.aspx.vb b/Transportes/RepContratos.aspx.vb index dabbbff2e..f4add9831 100644 --- a/Transportes/RepContratos.aspx.vb +++ b/Transportes/RepContratos.aspx.vb @@ -16,6 +16,7 @@ Partial Class ListadoContratos End Property Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then + ViewState("CveContrato") = 0 InicializaCombos() CargaDatos() End If @@ -94,22 +95,21 @@ Partial Class ListadoContratos 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:=DdlTipoAF.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero) - End If - - If CveContratoHijo > 0 Then - ObjContratos.Commit() - Alert("Agregado Correctamente.") + 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 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) - End If + 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) - If retorno Then - ObjContratos.Commit() - Alert("Actualizado Correctamente.") + If retorno Then + ObjContratos.Commit() + Alert("Actualizado Correctamente.") + End If End If TxtDescripcion.Text = "" @@ -118,7 +118,8 @@ Partial Class ListadoContratos TxtObservaciones.Text = "" TxtUbicacion.Text = "" DdlClientes.SelectedText = "" - DdlAF.SelectedValue = "" + DdlTransporte.SelectedValue = "" + DdlChofer.SelectedValue = "" TxtDolares.Text = "" TxtPesos.Text = "" TxtAnticipo.Text = "" @@ -129,13 +130,13 @@ Partial Class ListadoContratos Finally ObjContratos.Dispose() CargaDatos() - End Try + 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")) End Sub diff --git a/Transportes/RepContratosCalendario.aspx b/Transportes/RepContratosCalendario.aspx index f774cdb60..d441eabd3 100644 --- a/Transportes/RepContratosCalendario.aspx +++ b/Transportes/RepContratosCalendario.aspx @@ -20,270 +20,279 @@ - - <%--Calendario Tab--%> - + <%--Calendario Tab--%> + - - -
-
-
-
-
-

Tipo de Vista

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

Tipo de Vista

+ + + + +
-
-
-
+
+
+
- - + + <%--Contratos Tab--%> - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - Fecha
- Salida -
- - - -
+ + + Fecha
+ Salida +
+ + + +
- - - Fecha
- Regreso -
- - - -
+ + + Fecha
+ Regreso +
+ + + +
-
-
-
-
- -
+ + + +
+