diff --git a/App_Code/ClsOS.vb b/App_Code/ClsOS.vb
index 171d0f8bf..d6c120adb 100644
--- a/App_Code/ClsOS.vb
+++ b/App_Code/ClsOS.vb
@@ -493,6 +493,37 @@ Public Class ClsOS
Return Retorno
End Function
+
+
+ Public Function GetRepOrdenesServicioMedicasRep(FechaI As Date, FechaF As Date, CveCliente As Integer, CveVendedor As Integer, CveEstatusOrdenServicio As Integer, CveUsuarioAtendio As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_OS_OrdenesServiciosMedicasRepGet")
+
+ With SqlAdapter.SelectCommand.Parameters
+
+ .Add("@FechaI", SqlDbType.Date).Value = FechaI
+ .Add("@FechaF", SqlDbType.Date).Value = FechaF
+ .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
+ .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
+ .Add("@CveEstatusOrdenServicio", SqlDbType.Int).Value = CveEstatusOrdenServicio
+ .Add("@CveUsuarioAtendio", SqlDbType.Int).Value = CveUsuarioAtendio 'Este es el técnico
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener el Reporte de Ordenes de Servicio Medicas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
+
Public Function GetOrdenesServicios(CveOS As Integer, CveCliente As Integer, Folio As Integer, CveUsuarioRecibio As Integer, CveEstatusOrdenServicio As Integer,
CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional TopSelect As Integer = 10000, Optional CveOSDetalle As Integer = -1) As Boolean
Dim Retorno As Boolean = False
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 71e703a33..916d5d40b 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -9053,6 +9053,7 @@ Public Class ClsPaginas
PaginaDict.Add("/OS/PopUpMateriales.aspx".ToUpper(), 135)
PaginaDict.Add("/OS/Asignaciones.aspx".ToUpper(), 125)
PaginaDict.Add("/OS/RepServicioDomicilio.aspx".ToUpper(), 1330)
+ PaginaDict.Add("/OS/RepOSMedicas.aspx".ToUpper(), 1345)
#End Region
#Region "OC"
PaginaDict.Add("/OC/OC.aspx".ToUpper(), 155)
@@ -9373,7 +9374,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Ventas/CatMedicos.aspx".ToUpper(), 1343)
PaginaDict.Add("/Ventas/CatProcedimientos.aspx".ToUpper(), 1344)
PaginaDict.Add("/Ventas/CatProcedimientoDetalle.aspx".ToUpper(), 1344)
- PaginaDict.Add("/Ventas/VentasMedicas.aspx".ToUpper(), 1345)
+
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index 89fa9d3c9..714a2fabf 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -5998,7 +5998,7 @@ Public Class ClsVentas
Public Function AddMedico(Medico As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, DiasAtencion As String, Horario As String, Lugar As String, Estatus As Boolean, CveUsuario As Integer,
- CveEmpresa As Integer, Telefono As String, Mail As String, Especialidad As String) As Boolean
+ CveEmpresa As Integer, Telefono As String, Mail As String, Especialidad As String, Celular As String, Consultorio As String) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_MedicosAdd")
@@ -6017,6 +6017,8 @@ Public Class ClsVentas
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
.Add("@Mail", SqlDbType.VarChar).Value = Mail
.Add("@Especialidad", SqlDbType.VarChar).Value = Especialidad
+ .Add("@Celular", SqlDbType.VarChar).Value = Celular
+ .Add("@Consultorio", SqlDbType.VarChar).Value = Consultorio
End With
@@ -6031,7 +6033,7 @@ Public Class ClsVentas
End Function
Public Function UpdateMedico(CveMedico As Integer, Medico As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, DiasAtencion As String, Horario As String, Lugar As String, Estatus As Boolean, CveUsuario As Integer,
- CveEmpresa As Integer, Telefono As String, Mail As String, Especialidad As String) As Boolean
+ CveEmpresa As Integer, Telefono As String, Mail As String, Especialidad As String, Celular As String, Consultorio As String) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_MedicosUpdate")
@@ -6050,6 +6052,9 @@ Public Class ClsVentas
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
.Add("@Mail", SqlDbType.VarChar).Value = Mail
.Add("@Especialidad", SqlDbType.VarChar).Value = Especialidad
+ .Add("@Celular", SqlDbType.VarChar).Value = Celular
+ .Add("@Consultorio", SqlDbType.VarChar).Value = Consultorio
+
End With
Try
SqlAdapter.Fill(Data)
diff --git a/OS/RepOSMedicas.aspx b/OS/RepOSMedicas.aspx
new file mode 100644
index 000000000..88fc35cd8
--- /dev/null
+++ b/OS/RepOSMedicas.aspx
@@ -0,0 +1,245 @@
+<%@ Page Title="Reporte de Ordenes de Servicio Medicas" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepOSMedicas.aspx.vb" Inherits="OS_RepOSMedicas" %>
+
+
+
+
+
+
+
+
+
+
+
+
+ <%--
+
+
+
+
+ --%>
+
+
+
+ Reporte de Ordenes de Servicio Medicas
+
+
+
+
+
+
+ Excel
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fecha Inicio:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fecha Fin:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Proyecto:
+
+
+
+ SubProyecto:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%-- CveOS,FechaCita,Folio,Nombre,Medico,Procedimiento,Vendedor,RequiereOS,RequiereOSStr,CveUsuarioAtendio,Usuario,CveEstatusOrdenServicio,EstatusOrdenServicio,EstatusRepartidor,FolioPedido--%>
+
+ <%--0--%>
+
+ <%----%>
+ <%--1--%>
+
+ <%--2--%>
+
+ <%--3--%>
+
+ <%--4--%>
+
+ <%--5--%>
+
+ <%--6--%>
+
+ <%--7--%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OS/RepOSMedicas.aspx.vb b/OS/RepOSMedicas.aspx.vb
new file mode 100644
index 000000000..eca84031c
--- /dev/null
+++ b/OS/RepOSMedicas.aspx.vb
@@ -0,0 +1,182 @@
+Option Explicit On
+Option Strict On
+
+Imports System.Data
+Imports System.Web.Compilation
+Imports Extensiones
+Imports Microsoft.Reporting.WebForms
+Imports System.Xml.Serialization
+Imports System.IO
+Imports System.Xml
+
+Partial Class OS_RepOSMedicas
+ Inherits ClsPaginas
+
+
+
+ Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
+ If Not IsPostBack Then
+ If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
+
+ CargaCombos()
+
+ End If
+
+ End Sub
+
+
+#Region " CARGA COMBOS "
+
+
+
+
+ Private Sub CargaCombos()
+
+ CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
+
+
+ 'CargaEstatus
+ DdlEstatusOS.DataSource = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa)
+ DdlEstatusOS.DataBind()
+ DdlEstatusOS.Items.Insert(0, New ListItem("Todos", "-1"))
+
+
+ Dim DTTecnicos = New DataTable
+
+ Dim ObjUsuarios As New ClsSisUsuarios
+
+ If ObjUsuarios.GetPermisosPorUsuarioProcesos(-1, -1, -1, -1, 351, UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) Then
+ If UsuarioActual.CveRol = 1 Then
+ DTTecnicos = ObjUsuarios.DtResultados.FiltraParametros(" CveProcesoUsuarioAcceso > 0")
+ Else
+ DTTecnicos = ObjUsuarios.DtResultados.FiltraParametros(" CveProcesoUsuarioAcceso > 0 and CveUsuario <> 100")
+ End If
+
+ End If
+ ObjUsuarios.Dispose()
+
+ DdlTecnico.DataSource = DTTecnicos 'GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True'")
+ DdlTecnico.DataBind()
+ DdlTecnico.Items.Insert(0, New ListItem("Todos", "-1"))
+ DdlTecnico.Items.Insert(1, New ListItem("Sin Asignar", "-2"))
+
+ 'CargaClientes
+ Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
+ If EsWS Then
+ DdlClientes.setEsWebService(True)
+ Else
+ DdlClientes.setEsWebService(False)
+ DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
+ DdlClientes.DataBind()
+ DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
+ End If
+
+ 'Vendedor
+ DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros("VendedorTipo in (1,4)") 'vendedores y vendedores de piso
+ DdlVendedor.DataBind()
+ DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
+ DdlVendedor.Items.Insert(1, New ListItem("Sin Vendedor", "-2"))
+
+ If UsuarioActual.CveVendedor > 0 Then
+ DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor)
+ DdlVendedor.Enabled = False
+ End If
+
+ txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
+ txtFechaF.Text = NowADS().ToShortDateString
+
+ End Sub
+
+
+#End Region
+
+#Region " CARGA DATOS "
+ Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
+
+ CargaDatos()
+
+ End Sub
+
+ Private Sub CargaDatos()
+
+ Dim ObjOS As New ClsOS
+ 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)
+
+ If ObjOS.GetRepOrdenesServicioMedicasRep(FechaI, FechaF, Cvecliente, DdlVendedor.SelectedValue.ToEntero, DdlEstatusOS.SelectedValue.ToEntero, DdlTecnico.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
+ GvDatos.DataSource = ObjOS.DtResultados
+ Else
+ GvDatos.DataSource = Nothing
+ End If
+
+ ObjOS.Dispose()
+
+ GvDatos.DataBind()
+
+
+ LnkExportar.Visible = If(GvDatos.Rows.Count > 0, True, False)
+ UpAcciones.Update()
+
+
+ UPDatos.Update()
+
+ End Sub
+
+
+#End Region
+
+
+
+ Private Sub CargaClientes()
+ DdlClientes.ddl.Items.Clear()
+ DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) '.FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero} OR {DdlClienteClasificacion.SelectedValue.ToEntero} = -1")
+ DdlClientes.DataBind()
+ DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
+ End Sub
+
+ Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged
+ CargarSubProyecto(DdlSubProyecto, DdlProyecto.SelectedValue)
+ End Sub
+
+
+
+
+#Region " GV DATOS - ROW DATABOUND "
+ Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
+ If e.Row.RowType = DataControlRowType.DataRow Then
+
+ End If
+ End Sub
+#End Region
+
+ Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
+
+ Dim SubProyecto As String = ""
+
+ If DdlSubProyecto.SelectedValue.ToEntero > 0 Then
+ SubProyecto = DdlSubProyecto.SelectedItem.Text
+ End If
+
+ Dim SbFiltros As New StringBuilder()
+ SbFiltros.AppendFormat($"Fecha Inicio: {txtFechaI.Text} Fecha Fin: {txtFechaF.Text}|")
+ SbFiltros.AppendFormat("SubProyecto: {0}|", SubProyecto)
+
+
+ GvDatos.ExportToExcelGembox("OrdenesServicio", UsuarioActual, "Ordenes de Servicio Medicas", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
+
+
+ End Sub
+
+ Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
+ End Sub
+
+
+
+
+
+
+
+
+
+End Class
diff --git a/Ventas/CatMedicos.aspx b/Ventas/CatMedicos.aspx
index c33053cd8..0f9b38178 100644
--- a/Ventas/CatMedicos.aspx
+++ b/Ventas/CatMedicos.aspx
@@ -35,8 +35,8 @@