diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 6a592dbcc..11302558c 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -2065,7 +2065,7 @@ Public Class ClsInventarios Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1, Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1, Optional ExcluyeTransitorios As Integer = -1, Optional TopSelect As Integer = 10000, - Optional IncluyeProximaLlegada As Boolean = False) As Boolean + Optional IncluyeProximaLlegada As Boolean = False, Optional BuscarEnTabla As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_ExistenciasGet") @@ -2090,7 +2090,7 @@ Public Class ClsInventarios .Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes .Add("@IncluyeProximaLlegada", SqlDbType.Int).Value = IncluyeProximaLlegada .Add("@TopSelect", SqlDbType.Int).Value = TopSelect - + .Add("@BuscarEnTabla", SqlDbType.Bit).Value = BuscarEnTabla .Add("@Existencia", SqlDbType.Money).Direction = ParameterDirection.Output End With Try @@ -3404,13 +3404,14 @@ Public Class ClsInventarios ' Return Retorno 'End Function - Public Function ActualizarEsDevolucionVenta(CveVenta As Integer, Valor As Integer) As Boolean + Public Function ActualizarEsDevolucionVenta(CveVenta As Integer, Valor As Integer, Optional AplicaDevolucionCompleta As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("Vta_UpdateDevolucionVenta") With SqlAdapter.SelectCommand.Parameters .Add("@CveVenta", SqlDbType.Int).Value = CveVenta .Add("@Valor", SqlDbType.Int).Value = Valor + .Add("@AplicaDevolucionCompleta", SqlDbType.Bit).Value = AplicaDevolucionCompleta End With Try diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index ff9a10c2a..d4f433f47 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -10717,6 +10717,7 @@ Public Class ClsPaginas PaginaDict.Add("/Transportes/RepViajes.aspx".ToUpper(), 599) PaginaDict.Add("/Transportes/RepBoletos.aspx".ToUpper(), 600) PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 601) + PaginaDict.Add("/Transportes/RepContratosCalendario.aspx".ToUpper(), 603) #End Region 'Antes de aquí. diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index b9da573fd..a390a7455 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -6117,6 +6117,16 @@ Namespace Modelos End If End If + + 'EMPRESA HOSPITALARIA - SI ES PEDIDO LA DEVOLUCION SE DEBE HACER DESPUES DE CANCELAR EL PEDIDO + If Not ErrorCancelar AndAlso UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso ObjFactura.TipoDocto = "Ped" Then + If Not RealizarDevolucionAlmacen AndAlso TieneAlmacen Then + If Not ObjInventario.ActualizarEsDevolucionVenta(ObjFactura.CveVenta, 1, AplicaDevolucionCompleta:=True) Then + ErrorCancelar = True + MensajeError = "No se pudo actualizar el estatus de almacen del pedido" + End If + End If + End If End If 'CANCELA CONTRATOS diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx index e46aabf4d..0378716e1 100644 --- a/Ashx/CargaEventos.ashx +++ b/Ashx/CargaEventos.ashx @@ -45,6 +45,32 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState End If + Exit Select + Case "contrato_transportes" + + If context.Request("U").ToEntero > 0 Then + + CveUsuario = context.Request("U").ToEntero + CveEmpresa = context.Request("E").ToEntero + + Dim CveSubProyecto As Integer = If(context.Request("CveSubProyecto") IsNot Nothing, context.Request("CveSubProyecto").ToEntero, -1) + Dim CveUsuarioPara As Integer = If(context.Request("CveUsuarioPara") IsNot Nothing, context.Request("CveUsuarioPara").ToEntero, -1) + + + FI = context.Request("start").ToDate + FF = context.Request("end").ToDate + + If Not GetContratos(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) + + context.Response.Write(sJSON) + End If + + End If + + Exit Select Case Else Exit Select @@ -69,13 +95,6 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState End If End If - - - - - - - End Sub Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable @@ -137,11 +156,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState End If - - - Dim EsCoordinador As Boolean = False - Dim usuarioActual_ As Usuario = UsuarioActual(context) If context IsNot Nothing AndAlso CveOS = -2 Then If usuarioActual_.TienePermisoProceso(348) Then @@ -265,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("FechaFin").ToString.ToDateTime > tFecha Or dr("FechaInicio").ToString.ToDateTime > tFecha Then + If dr("FechaFinal").ToString.ToDateTime > tFecha Or dr("FechaInicio").ToString.ToDateTime > tFecha Then events.Add(cevent) End If Else @@ -418,6 +433,172 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState Return ErrorEventos End Function + Private Function GetContratos(Optional context As HttpContext = Nothing) As Boolean + Dim ObjContratos As New ClsContratos + + events = New List(Of CalendarEvent) + + Dim DT_SubProyectos As New DataTable + 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"} + + DT_SubProyectos.Columns.Add("CveSubProyecto", GetType(Integer)) + DT_SubProyectos.Columns.Add("backgroundColor") + DT_EstatusOS.Columns.Add("", GetType(Integer)) + + If ObjContratos.GetContratos(-1, usuarioActual_.CveEmpresa, TipoContrato:=2) Then + + If ObjContratos.DtResultados.Rows.Count > 0 Then + + Try + For Each dr As DataRow In ObjContratos.DtResultados.Rows + Dim cevent As CalendarEvent = New CalendarEvent() + + + cevent.id = dr("CveContrato").ToString.ToEntero + cevent.title = dr("DescripcionContrato").ToString + cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime) + cevent.end = String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime) + cevent.allDay = False + cevent.CveEventoEstatus = dr("NumeroContrato").ToString.ToEntero + + If Not cevent.recurrenciatipo > 0 Then + + '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("FechaInicial").ToString.ToDateTime > tFecha Then + events.Add(cevent) + End If + Else + + 'EMPIEZA METODO PARA AGREGAR CUANDO SI ES RECURRENTE + + Dim FinRecurrencia As Integer = cevent.recurrenciafin.ToEntero + Dim FI As DateTime, FF As DateTime, FT As DateTime + Dim DiasSemana As String() = cevent.diassemana.Split(","c) + FI = cevent.start.ToDateTime + FF = cevent.end.ToDateTime + + 'OBTENEMOS LA FECHA TERMINO (FT) DE LA RECURRENCIA + Select Case FinRecurrencia + Case -1 + FT = DateAdd(DateInterval.Year, 2, dr("FechaInicial").ToString.ToDateTime) + Case Is > 0 + FinRecurrencia -= 1 + Select Case cevent.recurrenciatipo + Case 1 + FT = DateAdd(DateInterval.Hour, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime) + Case 2 + FT = DateAdd(DateInterval.Day, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime) + Case 3 + FT = DateAdd(DateInterval.WeekOfYear, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime) + FT = DateAdd(DateInterval.Day, (7 - Weekday(FT)).ToString.ToDouble, FT) + Case 4 + FT = DateAdd(DateInterval.Month, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime) + Case 5 + FT = DateAdd(DateInterval.Year, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime) + End Select + End Select + + 'SI ES TIPO SEMANAL Y DIASSEMANA TIENE VALORES CHECKEA ESTOS VALORES + Do + If DiasSemana.Length > 0 AndAlso DiasSemana(0) <> "" Then + For Each drDias As String In DiasSemana + Dim FIT As Date = FI, FFT As Date = FF + + FIT = DateAdd(DateInterval.Day, (drDias.ToEntero - Weekday(FI)).ToString.ToDouble, FI) + FFT = DateAdd(DateInterval.Day, (drDias.ToEntero - Weekday(FF)).ToString.ToDouble, FF) + + cevent = New CalendarEvent() + cevent.id = dr("CveContrato").ToString.ToEntero + cevent.description = dr("DescripcionContrato").ToString + cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime) + cevent.end = String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime) + cevent.allDay = False + cevent.CveEventoEstatus = dr("NumeroContrato").ToString.ToEntero + + + + '11/05/2018 - Evento Gasto Recurrente + cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero + If cevent.CveTipoEvento = 10 Then + cevent.Importe = dr("Importe").ToString.ToDouble + End If + + If cevent.CveEventoEstatus.ToString.ToEntero = 3 Then + cevent.backgroundColor = "#1BBC9B" + End If + + 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL Y/0 SI LA FECHA INICIAL DE LA RECURRENCIA ES MENOR A LA FECHA QUE SE CREO EL EVENTO NO LO AGREGA + If FIT > DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) And FIT >= dr("FechaInicial").ToString.ToDateTime Then + events.Add(cevent) + End If + Next + Else + cevent = New CalendarEvent() + cevent.id = dr("CveContrato").ToString.ToEntero + cevent.description = dr("DescripcionContrato").ToString + cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime) + cevent.end = String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime) + 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 + If FI > DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) Then + events.Add(cevent) + End If + End If + + Select Case cevent.recurrenciatipo + Case 1 + FI = DateAdd(DateInterval.Hour, cevent.frecuencia, FI) + FF = DateAdd(DateInterval.Hour, cevent.frecuencia, FF) + Case 2 + FI = DateAdd(DateInterval.Day, cevent.frecuencia, FI) + FF = DateAdd(DateInterval.Day, cevent.frecuencia, FF) + Case 3 + FI = DateAdd(DateInterval.WeekOfYear, cevent.frecuencia, FI) + FF = DateAdd(DateInterval.WeekOfYear, cevent.frecuencia, FF) + Case 4 + FI = DateAdd(DateInterval.Month, cevent.frecuencia, FI) + FF = DateAdd(DateInterval.Month, cevent.frecuencia, FF) + Case 5 + FI = DateAdd(DateInterval.Year, cevent.frecuencia, FI) + FF = DateAdd(DateInterval.Year, cevent.frecuencia, FF) + End Select + + Loop Until FI > FT + End If + Next + Catch ex As Exception + GuardaLog(ex.ToString()) + End Try + End If + + End If + ObjContratos.Dispose() + Return ErrorEventos + End Function + ReadOnly Property UsuarioActual(ByVal context As HttpContext) As Usuario Get UsuarioActual = DirectCast(If(context IsNot Nothing, context.Session("UsuarioSIG"), Nothing), Usuario) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 01ef2962d..c29799b52 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -9,6 +9,7 @@ Imports Extensiones Imports iText.Barcodes.Dmcode Imports Microsoft.Reporting.WebForms Imports Modelos +Imports Stimulsoft.Base.Context Partial Class PopUpVerFactura @@ -3372,10 +3373,42 @@ Partial Class PopUpVerFactura If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then + CveCliente = DtMovimientos.FiltroPrimeroValor("CveCliente").ToEntero DTCliente = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}") + + Dim CveVentaConsulta As Integer = DtMovimientos.FiltroPrimeroValor("CveVenta").ToEntero + params.Add(New ReportParameter("Documentacion", DTCliente.FiltroPrimeroValor("Documentacion"))) + Dim ObjVentas As New ClsVentas() + If ObjVentas.GetVenta(CveVentaConsulta, UsuarioActual.CveEmpresa, False) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then + Dim dtVentas As DataTable = ObjVentas.DtResultados + + params.Add(New ReportParameter("ClienteCodigo", dtVentas.Rows(0)("ClienteCodigo").ToString)) + params.Add(New ReportParameter("ClienteNombre", dtVentas.Rows(0)("ClienteNombre").ToString)) + params.Add(New ReportParameter("ClienteSucursal", dtVentas.Rows(0)("SucursalCliente").ToString)) + params.Add(New ReportParameter("ClienteRFC", dtVentas.Rows(0)("ClienteRFC").ToString)) + + params.Add(New ReportParameter("ClienteCalle", dtVentas.Rows(0)("ClienteDireccion").ToString)) + params.Add(New ReportParameter("ClienteNoExt", dtVentas.Rows(0)("ClienteNoExt").ToString)) + params.Add(New ReportParameter("ClienteColonia", dtVentas.Rows(0)("ColoniaCliente").ToString)) + params.Add(New ReportParameter("ClienteCiudad", dtVentas.Rows(0)("ClienteCiudad").ToString)) + params.Add(New ReportParameter("ClienteEstado", dtVentas.Rows(0)("ClienteEstado").ToString)) + + params.Add(New ReportParameter("ClienteMunicipio", dtVentas.Rows(0)("SucClienteCiudad").ToString)) + params.Add(New ReportParameter("ClienteCP", dtVentas.Rows(0)("CPCliente").ToString)) + + + + + End If + ObjVentas.Dispose() + + + + + If CveCliente = 819998 Then RutaFormato = "{0}Formatos\TrasladoAngeles.rdlc" End If diff --git a/Empresas/186/Formatos/Entradas.rdlc b/Empresas/186/Formatos/Entradas.rdlc index 1f0b6b6be..77b95e765 100644 --- a/Empresas/186/Formatos/Entradas.rdlc +++ b/Empresas/186/Formatos/Entradas.rdlc @@ -793,7 +793,7 @@ CIUDAD DE MEXICO - Telefono +52 551 563 3271 support@smsmedicalsolutions.com + Teléfono: +52 551 563 3271 Correo: support@smsmedicalsolutions.com + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + + + + + =Parameters!Documentacion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + - 0.88788in + 1.35487in - + true true - =Parameters!Observaciones.Value + Cliente: - - - - - - - =Parameters!Documentacion.Value + =Parameters!ClienteCodigo.Value + + + - + + + + =Parameters!ClienteNombre.Value + + + + . +Sucursal: . + + + + =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 + + + + . + - 0cm 0.13678cm 0cm 20.28859cm @@ -2312,7 +2479,6 @@ CIUDAD DE MEXICO - 0cm 0.13678cm 0cm 25.72414cm @@ -2532,6 +2698,72 @@ CIUDAD DE MEXICO true ReportParameter1 + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 237f1b558..f0d83d50d 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -117,6 +117,19 @@ Partial Class Inventarios_EntregaAlmacen End Set End Property + Private Property CveTipoVenta As Integer + Get + If ViewState("CveTipoVenta") Is Nothing Then + ViewState("CveTipoVenta") = -1 + End If + Return CType(ViewState("CveTipoVenta"), Integer) + End Get + Set(value As Integer) + ViewState("CveTipoVenta") = value + End Set + End Property + + Private Property TipoEstatus As Integer Get @@ -320,15 +333,15 @@ Partial Class Inventarios_EntregaAlmacen End Property - Private Property PedidoBloqueCantidad As Boolean + Private Property BloqueCantidad As Boolean Get - If ViewState("PedidoBloqueCantidad") Is Nothing Then - ViewState("PedidoBloqueCantidad") = False + If ViewState("BloqueCantidad") Is Nothing Then + ViewState("BloqueCantidad") = False End If - Return Boolean.Parse(ViewState("PedidoBloqueCantidad").ToString) + Return Boolean.Parse(ViewState("BloqueCantidad").ToString) End Get Set(value As Boolean) - ViewState("PedidoBloqueCantidad") = value + ViewState("BloqueCantidad") = value End Set End Property @@ -675,6 +688,7 @@ Partial Class Inventarios_EntregaAlmacen LbObservacionesAlmacen.Text = drE("ObservacionesAlmacen").ToString() CveVentaSurtir = CveVenta CveOSSurtir = CveOS + CveTipoVenta = drE("CveTipoVenta").ToString().ToEntero CveAlmacenTraspasoDestino = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem" And TipoDocto <> "Ped", "CveAlmacenTraspasoOrigen", "CveAlmacenTraspasoDestino")).ToString().ToEntero() CveAlmacenTraspasoOrigen = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem" And TipoDocto <> "Ped", "CveAlmacenTraspasoDestino", "CveAlmacenTraspasoOrigen")).ToString().ToEntero() CveContrato = drE("CveContrato").ToString().ToEntero() @@ -842,14 +856,19 @@ Partial Class Inventarios_EntregaAlmacen End If ObjInventario.Dispose() - UpGenerales.Update() - If CveAlmacen <= 0 Then CargaGvDatos() + UpGenerales.Update() + + If (EsDevolucionVenta = 1 AndAlso CveOSSurtir > 0 AndAlso TipoMovimiento = 2 AndAlso TipoDocto = "Ped") Or (UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 AndAlso CveTipoVenta <> 3) Then + BloqueCantidad = True + Else + BloqueCantidad = False + End If - - - If EsDevolucionVenta = 1 AndAlso CveOSSurtir > 0 AndAlso TipoMovimiento = 2 AndAlso TipoDocto = "Ped" Then - PedidoBloqueCantidad = True - End If + If CveAlmacen <= 0 Then CargaGvDatos() + + + + @@ -1106,7 +1125,7 @@ Partial Class Inventarios_EntregaAlmacen CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False 'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro - If (e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha) OrElse UsuarioActual.TienePermisoProceso(364) Then + If (e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha) OrElse UsuarioActual.TienePermisoProceso(364) OrElse UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then e.Row.FCTextBox("TxtCaducidad").ReadOnly = False CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True e.Row.FCTextBox("TxtCaducidad").Enabled = True @@ -1120,7 +1139,7 @@ Partial Class Inventarios_EntregaAlmacen If CBool(e.Row.DBCampo("AplicaLote")) Then e.Row.FCTextBox("TxtLote").Visible = True 'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro - If e.Row.FCTextBox("TxtLote").Text = "" OrElse UsuarioActual.TienePermisoProceso(364) Then + If e.Row.FCTextBox("TxtLote").Text = "" OrElse UsuarioActual.TienePermisoProceso(364) OrElse UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then e.Row.FCTextBox("TxtLote").ReadOnly = False e.Row.FCTextBox("TxtLote").Enabled = True Else @@ -1165,7 +1184,7 @@ Partial Class Inventarios_EntregaAlmacen e.Row.FCCheckBox("cbInv").Enabled = False End If - If PedidoBloqueCantidad Then + If BloqueCantidad Then e.Row.FCTextBox("TbCantidadF").Enabled = False End If @@ -1839,8 +1858,21 @@ Partial Class Inventarios_EntregaAlmacen End If ObjVentaInv.Dispose() - If TipoEstatus = 5 Or EsDevolucionVenta.Contiene(2, 3) Then - Alert("No se puede surtir esta venta, verifique que no esté cancelada o ya registrado su movimiento en almacen", TipoMensaje.MsgAdvertencia) + Dim VerificaCancelada As Boolean = True + + If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso TipoDocto = "Ped" Then + VerificaCancelada = False + End If + + If VerificaCancelada Then + If TipoEstatus = 5 Then + Alert("No se puede surtir esta venta, verifique que no esté cancelada", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + End If + + If EsDevolucionVenta.Contiene(2, 3) Then + Alert("No se puede surtir esta venta, verifique que no esté registrado su movimiento en almacen", TipoMensaje.MsgAdvertencia) Exit Sub End If @@ -2739,10 +2771,12 @@ Partial Class Inventarios_EntregaAlmacen End If 'se registra - If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", CveMovimiento, CveMovimientoEntrada, ImporteAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False) <= 0 Then - ErrorMovInv = True - End If - + If Not ErrorMovInv Then + If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", CveMovimiento, CveMovimientoEntrada, ImporteAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False) <= 0 Then + ErrorMovInv = True + End If + End If + Else 'REGISTRO LA PREPOLIZA DE COSTO VS ALMACEN - SALIDA ALMACEN ErrorMovInv = Not GenerarPrePoliza(ObjInventario, ObjVentas, ObjConta, CveMovimiento, TextoError) End If diff --git a/Inventarios/PopUpExistenciasAlmacen.aspx.vb b/Inventarios/PopUpExistenciasAlmacen.aspx.vb index 6cf82a8a9..181f6b4de 100644 --- a/Inventarios/PopUpExistenciasAlmacen.aspx.vb +++ b/Inventarios/PopUpExistenciasAlmacen.aspx.vb @@ -131,10 +131,15 @@ Partial Class Inventarios_Default RestringirAlmacenes = 1 'restringue los almacenes:Consignación,Productos Financieros Asignados,,roductos Financieros,Consumo Interno,Activo Fijo,Merma,Consignación de Contrato,Devolucion proveedor, End If + Dim BuscarEnTabla As Boolean = False + If UsuarioActual.Empresa.Funcionalidad(715) = "1" Then + BuscarEnTabla = True + End If + Dim ObjInventarios As New ClsInventarios() If ObjInventarios.GetExistenciasProducto(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero, - ExcluyeTransitorios:=1, RestringirAlmacenes:=RestringirAlmacenes, TopSelect:=100) Then + ExcluyeTransitorios:=1, RestringirAlmacenes:=RestringirAlmacenes, TopSelect:=100, BuscarEnTabla:=BuscarEnTabla) Then CargaPS(CvePS) If ObjInventarios.DtResultados.Rows.Count > 0 Then diff --git a/OS/Asignaciones.aspx b/OS/Asignaciones.aspx index 8fd3c724f..add8f193f 100644 --- a/OS/Asignaciones.aspx +++ b/OS/Asignaciones.aspx @@ -190,7 +190,8 @@
+ data-sort="true" + CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None"> diff --git a/OS/Asignaciones.aspx.vb b/OS/Asignaciones.aspx.vb index 7ee3d5ced..bbee6bbff 100644 --- a/OS/Asignaciones.aspx.vb +++ b/OS/Asignaciones.aspx.vb @@ -498,10 +498,13 @@ Partial Class OS_Asignaciones Dim TMSelector = DirectCast(e.Row.FindControl("TimeSelector"), TimeSelector) TMSelector.Date = FechaCita + e.Row.Cells(7).Attributes.Add("data-order", e.Row.DBCampo("FechaCitaOS").ToDate.Ticks.ToString) + e.Row.Cells(8).Attributes.Add("data-order", e.Row.DBCampo("FechaCitaOS").ToDate.ToString("HHmm")) End If + End If UpOS.Update() diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index ffb9530fe..ad9919f31 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -2913,8 +2913,46 @@ Partial Class OS_OrdenesServicios DdlUsuarioAtendio.DataBind() DdlUsuarioAtendio.Items.Insert(0, New ListItem("Sin Asignar", "-1")) - + CargaTecnicoDdlUsuarioAtendio() End Sub + + + + Private Sub CargaTecnicoDdlUsuarioAtendio() + Dim ObjOS As New ClsOS + Dim DtOSSubProyectos As New DataTable + Dim TecnicosSubProyectos As New DataTable + Dim TecnicosResultado As New DataTable + + If ObjOS.GetOrdenesServiciosNoAsignadas(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, "-1", "-1") Then + DtOSSubProyectos = ObjOS.DtResultados.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) + End If + + If DtOSSubProyectos IsNot Nothing Then + + If ObjOS.GetSubProyectosEstatusInicial(-1, 3, UsuarioActual.CveEmpresa) Then + TecnicosSubProyectos = ObjOS.DtResultados + End If + + For Each SubProyecto As DataRow In DtOSSubProyectos.Rows + Dim TecnicosSubProyectoAux As DataTable = TecnicosSubProyectos.FiltraParametros(String.Format("SubProyecto = '{0}'", SubProyecto.Item("SubProyecto"))) + If TecnicosSubProyectoAux.Rows.Count > 0 Then + Dim EstatusDeTipoProcesoMenor As Integer = TecnicosSubProyectoAux.Rows(0).Item("CveEstatusOrdenServicio").ToString.ToEntero + Dim dtAuxiliar As New DataTable + dtAuxiliar = TecnicosSubProyectos.FiltraParametros(String.Format("SubProyecto = '{0}' AND CveEstatusOrdenServicio = {1}", SubProyecto.Item("SubProyecto"), EstatusDeTipoProcesoMenor), "", {"CveUsuario", "Nombre"}) + TecnicosResultado.Merge(dtAuxiliar) + End If + Next + End If + + + ObjOS.Dispose() + + DdlUsuarioAtendio.DataSource = TecnicosResultado + DdlUsuarioAtendio.DataBind() + DdlUsuarioAtendio.Items.Insert(0, New ListItem("Sin Asignar", "-1")) + End Sub + Private Sub LnkTecnico_Click(sender As Object, e As EventArgs) Handles LnkTecnico.Click RegistraScript(String.Format("$('#{0}').modal('show');", "DivCambiarTecnico")) End Sub diff --git a/OS/RepOSMedicas.aspx b/OS/RepOSMedicas.aspx index 0c60a2b8c..1efdc1a22 100644 --- a/OS/RepOSMedicas.aspx +++ b/OS/RepOSMedicas.aspx @@ -155,6 +155,13 @@ +
+
+ " style="display: inline-block; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
+
+ @@ -34,21 +34,12 @@ - - -
  • - Agregar Contrato -
  • - <%--
  • - Contratos -
  • -
  • - Viajes -
  • --%> -
    -
    +
  • + Agregar Contrato +
  • +
  • + Generar Excel +
  • @@ -61,71 +52,73 @@
    + + + + - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + Fecha
    + Salida +
    + + + +
    - - - Fecha
    - Salida -
    - - - -
    + + + Fecha
    + Regreso +
    + + + +
    - - - Fecha
    - Regreso -
    - - - -
    + + + + - - - - - - - -
    -
    - - + + +
    +
    +
    +
    +