From 28bdcdf3bd0b0705fbbe99b3f0ae8c899f30d2b8 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Sat, 10 Feb 2024 08:28:15 -0700 Subject: [PATCH 1/6] SMS 2024.02.08 EntregaAlmacen.aspx nueva columna con combo de los lote/caducidades del ps --- Inventarios/EntregaAlmacen.aspx | 302 +++++++++++++---------- Inventarios/EntregaAlmacen.aspx.vb | 106 ++++++-- Inventarios/PaquetesArmadoDesarmado.aspx | 2 +- 3 files changed, 257 insertions(+), 153 deletions(-) diff --git a/Inventarios/EntregaAlmacen.aspx b/Inventarios/EntregaAlmacen.aspx index 3130410a4..7a0cf1acd 100644 --- a/Inventarios/EntregaAlmacen.aspx +++ b/Inventarios/EntregaAlmacen.aspx @@ -3,7 +3,7 @@ - --%> + + Entrega Almacén (Surtir Mercancia) @@ -472,145 +481,174 @@ - - -
-
-
- - Salida de Inventario -
-
-
-
-
-
- -
-
-
+
+
- <%--AGREGAR POR CODIGO DE BARRAS--%> - - -
+ + -
-
- -
-
-
- - - - - - -
- - - - - - - -
+
+
+
+ + Salida de Inventario +
+
+
- - +
+ +
+
+
+ <%--AGREGAR POR CODIGO DE BARRAS--%> + + +
- <%--GV DATOS--%> - - - - - - - - - - - - - - - - - - - -<%-- --%> - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - +
+
+ +
+
+
+ + + + + + +
+ + + + + + + +
+
-
-
- - - - - - -
-
- -
-
- - - + + - <%--BOTON GUARDAR--%> - - -
- -
-
- -
-
-
+ + + <%--GV DATOS--%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%--8--%> + + + + + + + + <%--9--%> + + + + + + + + +
+ + + + + + + + + + +
+ +
+
+ + + + + + +
+
+ + + + +
+
+ +
+
+ + +
+ +
+ <%--BOTON GUARDAR--%> + + +
+ +
+
+ +
+
+
+
+
+ <%--AGREGA POR SERIE--%> @@ -702,8 +740,6 @@
- - From 81b1d1b74d165cd9e33c6d32aa9d6c5027946ae7 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Sat, 10 Feb 2024 16:20:01 -0700 Subject: [PATCH 2/6] SMS - 2024.02.09 Ventas pago Directo agregar agregar cliente, rep cirugias agregar filtros hospitales y especialidades --- App_Code/ClsOS.vb | 4 ++- Ashx/SIGWeb.ashx | 2 +- OS/RepOSMedicas.aspx | 64 ++++++++++++++++++++++------------------- OS/RepOSMedicas.aspx.vb | 45 ++++++++++++++++++++++++++++- Ventas/Ventas.aspx | 15 +++++++++- Ventas/Ventas.aspx.vb | 61 ++++++++++++++++++++++++++++++++++----- 6 files changed, 151 insertions(+), 40 deletions(-) diff --git a/App_Code/ClsOS.vb b/App_Code/ClsOS.vb index 3e736c02e..2e6ca0934 100644 --- a/App_Code/ClsOS.vb +++ b/App_Code/ClsOS.vb @@ -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 diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 82169dccc..9643390ac 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -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 diff --git a/OS/RepOSMedicas.aspx b/OS/RepOSMedicas.aspx index 621e7e27c..12630f200 100644 --- a/OS/RepOSMedicas.aspx +++ b/OS/RepOSMedicas.aspx @@ -98,7 +98,7 @@
-
@@ -109,11 +109,11 @@
diff --git a/OS/RepOSMedicas.aspx.vb b/OS/RepOSMedicas.aspx.vb index a231dbf39..830315c54 100644 --- a/OS/RepOSMedicas.aspx.vb +++ b/OS/RepOSMedicas.aspx.vb @@ -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 diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 592764f8e..2a4872d79 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -8430,7 +8430,7 @@ <%--Cliente Sucursales --%> -
+
+ <%--Cliente Solo se usa para en PAgo Directo --%> +
+
+
+ Cliente: + + +
+
+
+ + diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index df7f915bc..20e972ed0 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -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, From 89059ed860183cf046f277c0976d509ce9650bb0 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Sat, 10 Feb 2024 16:28:25 -0700 Subject: [PATCH 3/6] =?UTF-8?q?Correcci=C3=B3n=20=20parametro=20SIGWeb.ash?= =?UTF-8?q?x=20GetExistenciasProducto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ashx/SIGWeb.ashx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 9643390ac..82169dccc 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -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"), BuscarEnTabla:=True) Then + If objInv.GetExistenciasProducto(CvePS, -1, CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm")) Then ' limpio los almacenes donde no tiene ningun producto existencia For i As Integer = objInv.DtResultados.Columns.Count - 1 To 1 Step -1 From 077df83bfc852b332811ef5a07e4c27d725637f9 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Sat, 10 Feb 2024 20:05:19 -0700 Subject: [PATCH 4/6] --Descuento por % porcentaje aplicado en mostrador y Permiso para aplicarlo a determinado usuario. -- visualizar el % de ganancia --- App_Code/ClsProductosServicios.vb | 27 +++++ Ventas/Ventas.aspx | 180 +++++++++++++++++++++++++----- Ventas/Ventas.aspx.vb | 46 +++++++- 3 files changed, 221 insertions(+), 32 deletions(-) diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index cadf04a74..de78bfc95 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -875,6 +875,33 @@ Public Class ClsProductosServicios Return Retorno End Function + Public Function GetUltimoPrecioCompra(CveEmpresa As Integer, CvePS As Integer) As Double + + Dim Retorno As Double = -1 + + DataAdapter("PA_Inv_UltimoPrecioCompraGet") + + With SqlAdapter.SelectCommand.Parameters + + + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CvePS", SqlDbType.Int).Value = CvePS + .Add("@PU", SqlDbType.Money).Direction = ParameterDirection.Output + End With + + Try + SqlAdapter.Fill(Data) + Retorno = CDbl(SqlAdapter.SelectCommand.Parameters("@PU").Value) + + Catch Ex1 As SqlException + Me.OnError("Ocurrió un error al obtener el precio unitario.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + OnError("Ocurrió un error al obtener el precio unitario", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + #Region "P R O D U C T O S - E Q U I V A L E N C I A S " Public Function GetPSEquivalencias(CvePS As Integer, CveEmpresa As Integer) As Boolean diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 592764f8e..874cd27a8 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -612,13 +612,13 @@ Paciente: - + Episodio: - + @@ -1183,7 +1183,7 @@ <%----%> <%--0--%> @@ -1404,6 +1404,8 @@ <%--19--%> + @@ -4319,6 +4321,82 @@
+ + - + <%--Medico Procedimiento--%> @@ -8462,7 +8540,7 @@ Médico:
- +
Procedimiento:
- +
@@ -8517,9 +8595,9 @@ - + - + @@ -8544,14 +8622,14 @@ - + + <%--Cliente Solo se usa para en PAgo Directo --%> +
+
+
+ Cliente: + +
+
+
- <%--Medico Procedimiento--%>