From 39ae963b48a7c71bba1a522949b09ba63991555d Mon Sep 17 00:00:00 2001 From: rakcsle Date: Sat, 6 Jan 2024 11:47:47 -0700 Subject: [PATCH] SMS - 2023.01.05 Ventas Modal Ddl Clientes Sucursales --- App_Code/ClsClientes.vb | 18 ++ App_Code/ClsPaginas.vb | 2 +- App_Code/ClsVentas.vb | 4 +- Compras/PopUpVerFactura.aspx.vb | 1 + OS/RepOSMedicas.aspx | 8 +- Ventas/Ventas.aspx | 30 ++-- Ventas/Ventas.aspx.vb | 297 +++++++++++++++++++------------- 7 files changed, 220 insertions(+), 140 deletions(-) diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 60f56f1b0..dbc607331 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -954,6 +954,24 @@ Public Class ClsClientes End Try Return Retorno End Function + Public Function GetClienteSucursales(CveCliente As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Vta_ClienteSucursalesGet") + SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente + SqlAdapter.SelectCommand.Parameters.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el las Sucursales del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + Public Function GetSucursales(CveCliente As Integer, Optional CveClienteSucursal As Integer = -1) As Boolean Dim Retorno As Boolean = False diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 44a04bf0a..b2b9a8172 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5885,7 +5885,7 @@ Public Class ClsPaginas params.Add(New ReportParameter("Documentacion", Vta.Cliente.Documentacion)) params.Add(New ReportParameter("Medico", Vta.Medico)) params.Add(New ReportParameter("Procedimiento", Vta.Procedimiento)) - params.Add(New ReportParameter("FechaCirugia", Vta.Alfa1.ToDateTime.ToString("dd/MM/yyyy hh:mm"))) + params.Add(New ReportParameter("FechaCirugia", Vta.FechaEjecucion.ToString("dd/MM/yyyy hh:mm"))) End If RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 645ca383a..08e1b50ed 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -406,7 +406,7 @@ Public Class ClsVentas End Function Public Function AddVenta(TipoDocto As String, FolioFact As Integer, CveCliente As Integer, CveClienteSucursal As Integer, SubTotal As Double, Descuento As Double, Amortizacion As Double, IVA As Double, RetIVA As Double, RetISR As Double, Total As Double, - CveMoneda As Integer, TipoCambio As Double, CveMetodoPago As Integer, CondicionesPago As Integer, FormaPago As Integer, FechaVencimiento As DateTime, Fecha As DateTime, MotivoDescuento As String, Observaciones As String, FechaEjecucion As Date, + CveMoneda As Integer, TipoCambio As Double, CveMetodoPago As Integer, CondicionesPago As Integer, FormaPago As Integer, FechaVencimiento As DateTime, Fecha As DateTime, MotivoDescuento As String, Observaciones As String, FechaEjecucion As DateTime, CveVendedor As Integer, Alfa1 As String, Alfa2 As String, Alfa3 As String, Num1 As Double, Num2 As Double, Num3 As Double, Fech1 As Date, Fech2 As Date, Fech3 As Date, CveCorte As Integer, NumeroPersonas As Integer, CvePrePoliza As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional Propina As Double = -1, Optional CveVentaTerminal As Integer = -1, Optional AtencionA As String = "-1", Optional CveContrato As Integer = -1, @@ -448,7 +448,7 @@ Public Class ClsVentas .Add("@Fecha", SqlDbType.DateTime).Value = Fecha .Add("@MotivoDescuento", SqlDbType.VarChar).Value = MotivoDescuento .Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones - .Add("@FechaEjecucion", SqlDbType.Date).Value = FechaEjecucion + .Add("@FechaEjecucion", SqlDbType.DateTime).Value = FechaEjecucion .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor .Add("@Alfa1", SqlDbType.VarChar).Value = Alfa1 .Add("@Alfa2", SqlDbType.VarChar).Value = Alfa2 diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 3740153c9..868b5c508 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -3087,6 +3087,7 @@ Partial Class PopUpVerFactura Vta.Medico = dtVentas(0)("Medico").ToString Vta.Procedimiento = dtVentas(0)("Procedimiento").ToString Vta.Alfa1 = dtVentas(0)("Alfa1").ToString + Vta.FechaEjecucion = dtVentas(0)("FechaEjecucion").ToString.ToDateTime Vta.RefDocto = dtVentas(0)("Ref").ToString Vta.CveVenta = dtVentas(0)("CveVenta").ToString.ToEntero diff --git a/OS/RepOSMedicas.aspx b/OS/RepOSMedicas.aspx index 4b9799620..9e6ae0e94 100644 --- a/OS/RepOSMedicas.aspx +++ b/OS/RepOSMedicas.aspx @@ -171,7 +171,7 @@ <%--1--%> <%--2--%> - + <%--3--%> <%--4--%> @@ -196,10 +196,4 @@ - - - - - - diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 303337546..dc0a3826e 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -8415,19 +8415,35 @@ - <%--Cliente--%> + <%--Cliente Sucursales --%>
+
+
+ + + + + Hospital: +
+
+
+ + + <%--Cliente--%> + <%--
Hospital:
-
+ --%> <%--Sucursales--%> -
+ <%--
@@ -8437,8 +8453,7 @@ Sucursal:
- -
+
--%> <%--Medico Procedimiento--%> @@ -8511,11 +8526,6 @@ - - - - -