SMS - 2024.02.09 Ventas pago Directo agregar agregar cliente, rep cirugias agregar filtros hospitales y especialidades
This commit is contained in:
@@ -497,7 +497,7 @@ Public Class ClsOS
|
||||
|
||||
|
||||
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,
|
||||
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1) As Boolean
|
||||
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveEspecialidad As Integer = -1, Optional CveClienteSucursal As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OS_OrdenesServiciosMedicasRepGet")
|
||||
@@ -514,6 +514,8 @@ Public Class ClsOS
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@CveEspecialidad", SqlDbType.Int).Value = CveEspecialidad
|
||||
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -871,7 +871,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
Dim CvePS = IfNull(context.Request("cveps"), "0").ToString.ToEntero
|
||||
Dim objInv As New ClsInventarios
|
||||
If objInv.GetExistenciasProducto(CvePS, -1, CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm")) Then
|
||||
If objInv.GetExistenciasProducto(CvePS, -1, CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), BuscarEnTabla:=True) Then
|
||||
|
||||
' limpio los almacenes donde no tiene ningun producto existencia
|
||||
For i As Integer = objInv.DtResultados.Columns.Count - 1 To 1 Step -1
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
<label class="col-md-1 ">Estatus:</label>
|
||||
<div class="col-md-1" >
|
||||
<asp:DropDownList ID="DdlEstatusOS" runat="server" AppendDataBoundItems="true" Width="110px"
|
||||
<asp:DropDownList ID="DdlEstatusOS" runat="server" AppendDataBoundItems="true" Width="100%"
|
||||
DataTextField="EstatusOrdenServicio" DataValueField="CveEstatusOrdenServicio" Class="input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
@@ -109,11 +109,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Técnico:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlTecnico" ClientIDMode="Static" CssClass="form-control input-sm select2me" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" Width="110px" ></asp:DropDownList>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Técnico:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlTecnico" ClientIDMode="Static" CssClass="form-control input-sm select2me" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" Width="110px"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
|
||||
<div runat="server" id="DivProyecto" class="col-md-1">
|
||||
@@ -121,38 +121,44 @@
|
||||
</div>
|
||||
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
|
||||
<div runat="server" id="DivSubProyecto" class="col-md-1">
|
||||
<asp:DropDownList ID="DdlSubProyecto" data-text="Todos" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass=" input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlSubProyecto" data-text="Todos" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass=" input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
<label class="col-md-1 ">Médico:</label>
|
||||
<label class="col-md-1 ">Médico:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlMedico" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico" Width="100%">
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
<label class="col-md-1 ">Especialidad:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEspecialidad" CssClass="form-control input-sm select2me" runat="server" DataTextField="Especialidad" Width="100%" DataValueField="CveMedicoEspecialidad"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">Procedimiento:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlProcedimiento" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento" Width="100%">
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Hospital:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlMedico" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico" Width="100%" >
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:DropDownList ID="DdlClienteSucursal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveClienteSucursal" CausesValidation="true" Width="100%" >
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">Procedimiento:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlProcedimiento" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento" Width="100%" >
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -80,6 +80,48 @@ Partial Class OS_RepOSMedicas
|
||||
DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlProcedimiento.DataBind()
|
||||
|
||||
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.GetMedicosEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
|
||||
DdlEspecialidad.DataSource = ObjVentas.DtResultados
|
||||
Else
|
||||
DdlEspecialidad.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
DdlEspecialidad.DataBind()
|
||||
DdlEspecialidad.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
|
||||
|
||||
Dim objcliente As New ClsClientes
|
||||
|
||||
If objcliente.GetClienteSucursales(-1, UsuarioActual.CveEmpresa) Then
|
||||
DdlClienteSucursal.DataSource = objcliente.DtResultados
|
||||
Else
|
||||
DdlClienteSucursal.DataSource = Nothing
|
||||
End If
|
||||
|
||||
objcliente.Dispose()
|
||||
|
||||
DdlClienteSucursal.DataBind()
|
||||
DdlClienteSucursal.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
|
||||
'Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
'If EsWS Then
|
||||
' DdlCliente.setEsWebService(True)
|
||||
|
||||
'Else
|
||||
' DdlCliente.setEsWebService(False)
|
||||
' DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
' DdlCliente.DataBind()
|
||||
' DdlCliente.ddl.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -101,7 +143,8 @@ Partial Class OS_RepOSMedicas
|
||||
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
|
||||
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveEspecialidad:=DdlEspecialidad.SelectedValue.ToEntero,
|
||||
CveClienteSucursal:=DdlClienteSucursal.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjOS.DtResultados
|
||||
If ObjOS.DtResultados IsNot Nothing AndAlso ObjOS.DtResultados.Rows.Count > 0 Then
|
||||
LnkPersonalizar.Visible = True
|
||||
|
||||
@@ -8430,7 +8430,7 @@
|
||||
|
||||
|
||||
<%--Cliente Sucursales --%>
|
||||
<div runat="server" visible="False" id="DvModalTipoVentaPasoCliente">
|
||||
<div runat="server" visible="False" id="DvModalTipoVentaClientesucursal">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12 form-md-line-input input-iconright ">
|
||||
<asp:DropDownList ID="DdlClienteSucursal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="Clave" CausesValidation="true"
|
||||
@@ -8445,6 +8445,19 @@
|
||||
</div>
|
||||
|
||||
|
||||
<%--Cliente Solo se usa para en PAgo Directo --%>
|
||||
<div runat="server" visible="False" id="DvModalTipoVentaCliente" >
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12 form-md-line-input input-iconright" style="margin-top:-7px!important" >
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlClienteSucursal">Cliente:</asp:Label>
|
||||
<ADS:Dropdownlost CssClassDdl="form-control select2me" ID="DdlClientesModal" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"
|
||||
style="margin-top:-5px!important" IncluyeTodos="false" >
|
||||
</ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -539,6 +539,20 @@ Partial Class Ventas
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Property CveClienteOS As Integer
|
||||
Get
|
||||
If ViewState("CveClienteOS") Is Nothing Then
|
||||
ViewState("CveClienteOS") = -1
|
||||
End If
|
||||
Return ViewState("CveClienteOS").ToString().ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveClienteOS") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveClienteSucursal As Integer
|
||||
Get
|
||||
If ViewState("CveClienteSucursal") Is Nothing Then
|
||||
@@ -36256,6 +36270,17 @@ Partial Class Ventas
|
||||
DdlClienteSucursal.DataBind()
|
||||
DdlClienteSucursal.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
If EsWS Then
|
||||
DdlClientesModal.setEsWebService(True)
|
||||
|
||||
Else
|
||||
DdlClientesModal.setEsWebService(False)
|
||||
DdlClientesModal.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClientesModal.DataBind()
|
||||
DdlClientesModal.ddl.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkRequiereTecnico_CheckedChanged(sender As Object, e As EventArgs)
|
||||
@@ -36272,7 +36297,7 @@ Partial Class Ventas
|
||||
If RBLTipoVenta.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
DvModalTipoVentaPasoTipo.Visible = False
|
||||
DvModalTipoVentaPasoCliente.Visible = True
|
||||
DvModalTipoVentaClientesucursal.Visible = True
|
||||
DvModalTipoVentaPasoRequiereOS.Visible = True
|
||||
DvModalTipoVentaPasoMedicoProcedimiento.Visible = True
|
||||
|
||||
@@ -36298,6 +36323,7 @@ Partial Class Ventas
|
||||
ChkRequiereTecnicoModal.Checked = True
|
||||
ChkRequiereTecnicoModal.Enabled = False
|
||||
DvModalRequiereOSFecha.Visible = True
|
||||
DvModalTipoVentaCliente.Visible = True
|
||||
Case "3" 'A-Vista
|
||||
ChkRequiereTecnicoModal.Checked = False
|
||||
DvModalTipoVentaPasoRequiereOS.Visible = False
|
||||
@@ -36387,7 +36413,8 @@ Partial Class Ventas
|
||||
LnkDvModalTipoVentaAceptar.Visible = False
|
||||
|
||||
DvModalTipoVentaPasoTipo.Visible = True
|
||||
DvModalTipoVentaPasoCliente.Visible = False
|
||||
DvModalTipoVentaClientesucursal.Visible = False
|
||||
DvModalTipoVentaCliente.Visible = False
|
||||
DvModalTipoVentaPasoRequiereOS.Visible = False
|
||||
DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
|
||||
|
||||
@@ -36420,15 +36447,35 @@ Partial Class Ventas
|
||||
|
||||
Protected Sub LnkDvModalTipoVentaAceptar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If RBLTipoVenta.SelectedValue.ToEntero = 2 Then
|
||||
|
||||
If DdlClientesModal.SelectedValue.ToEntero > 0 Then
|
||||
ViewState("CveCliente") = DdlClientesModal.SelectedValue.ToEntero
|
||||
Else
|
||||
Alert("Debe de seleccionar un cliente.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
If DdlClienteSucursalCliente() > 0 Then
|
||||
ViewState("CveCliente") = DdlClienteSucursalCliente()
|
||||
If DdlClienteSucursalCliente() > 0 Then
|
||||
CveClienteOS = DdlClienteSucursalCliente()
|
||||
Else
|
||||
Alert("Debe de seleccionar un hospital.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("Debe de seleccionar un cliente.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
If DdlClienteSucursalCliente() > 0 Then
|
||||
ViewState("CveCliente") = DdlClienteSucursalCliente()
|
||||
CveClienteOS = CveCliente
|
||||
Else
|
||||
Alert("Debe de seleccionar un cliente.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If ChkRequiereTecnicoModal.Checked Then
|
||||
If Not IsDate(TxtFechaModal.Text.Replace(",", "")) Then
|
||||
Alert("El campo fecha no es valido.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -36640,7 +36687,7 @@ Partial Class Ventas
|
||||
|
||||
Dim EstatusOrdenServicio As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 1").ToEntero
|
||||
|
||||
If ObjOrdenServicio.AddOrdenesServicios(CveCliente, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.Nombre, TxtFechaOS.Text.Replace(",", "").ToDateTime, $"Venta: {LblSerie.Text}-{TxtFolio.Text}", UsuarioActual.CveUsuario, EstatusOrdenServicio,
|
||||
If ObjOrdenServicio.AddOrdenesServicios(CveClienteOS, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.Nombre, TxtFechaOS.Text.Replace(",", "").ToDateTime, $"Venta: {LblSerie.Text}-{TxtFolio.Text}", UsuarioActual.CveUsuario, EstatusOrdenServicio,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVentaOS, -1, -1, CveOSTipo, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero,
|
||||
Direccion:="", Telefono:="", CveModeloAuto:=-1, Año:="", CveMedico:=DdlMedico.SelectedValue.ToEntero,
|
||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, FechaCita:=TxtFechaOS.Text.Replace(",", "").ToDateTime,
|
||||
|
||||
Reference in New Issue
Block a user