diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index ba9ec7593..71e703a33 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -9372,6 +9372,7 @@ Public Class ClsPaginas PaginaDict.Add("/Ventas/RepIndicadoresPorProyecto.aspx".ToUpper(), 617) 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 e8c7de4e4..0b0e7d59d 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -1976,8 +1976,8 @@ Public Class ClsVentas Return Retorno End Function - Public Function AddPrecioLista(CveUsuario As Integer, CveEmpresa As Integer, PrecioLista As String, Porcentaje As Double) As Boolean - Dim Retorno As Boolean = False + Public Function AddPrecioLista(CveUsuario As Integer, CveEmpresa As Integer, PrecioLista As String, Porcentaje As Double) As Integer + Dim Retorno As Integer = -1 DataAdapter("PA_Vta_PrecioListaAdd") @@ -1986,19 +1986,20 @@ Public Class ClsVentas .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@PrecioLista", SqlDbType.VarChar).Value = PrecioLista .Add("@Porcentaje", SqlDbType.SmallMoney).Value = Porcentaje + .Add("@CvePrecioLista", SqlDbType.Int).Direction = ParameterDirection.Output End With Try SqlAdapter.Fill(Data) - Retorno = True + Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrecioLista").Value.ToString.ToEntero Catch Ex1 As SqlException If Ex1.Message.Contains("Número: 2627;") Then - Alert("Ya existe una Lista con el mismo Nombre: " & PrecioLista & ".", TipoMensaje.MsgAdvertencia) + Alert("Ya existe una lista con el mismo Nombre: " & PrecioLista & ".", TipoMensaje.MsgAdvertencia) Else - Me.OnError("Ocurrió un error al Guardar la Lista.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al guardar la lista.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End If Catch ex As Exception - OnError("Ocurrió un error al la Lista", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + OnError("Ocurrió un error al la lista", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno @@ -6100,22 +6101,25 @@ Public Class ClsVentas End Function - Public Function AddProcedimiento(Procedimiento As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Public Function AddProcedimiento(Procedimiento As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Integer - Dim Retorno As Boolean = False + Dim Retorno As Integer = -1 DataAdapter("PA_Vta_ProcedimientosAdd") With SqlAdapter.SelectCommand.Parameters .Add("@Procedimiento", SqlDbType.VarChar).Value = Procedimiento .Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveProcedimiento", SqlDbType.Int).Direction = ParameterDirection.Output End With Try SqlAdapter.Fill(Data) - Retorno = True + Retorno = SqlAdapter.SelectCommand.Parameters("@CveProcedimiento").Value.ToString.ToEntero + Catch ex As Exception OnError("Ocurrió un error al guardar el Procedimiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try + Return Retorno End Function @@ -6149,9 +6153,17 @@ Public Class ClsVentas .Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With + Try SqlAdapter.Fill(Data) + 'SqlAdapter.SelectCommand.ExecuteNonQuery() Retorno = True + Catch Ex1 As SqlException + If Ex1.Message.Contains("Número: 547;") Then + Alert("El procedimiento no se pudo eliminar porque está siendo usado por un registro.", TipoMensaje.MsgAdvertencia) + Else + OnError("Ocurrió un error al eliminar el Procedimiento.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End If Catch ex As Exception OnError("Ocurrió un error al eliminar el Procedimiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try @@ -6159,6 +6171,135 @@ Public Class ClsVentas End Function + + Public Function AddProcedimientoProducto(CveProcedimiento As Integer, CvePS As Integer, Autogenerado As Boolean, Estatus As Boolean, CveUsuario As Integer) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_ProcedimientosProductosAdd") + With SqlAdapter.SelectCommand.Parameters + + .Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento + .Add("@CvePS", SqlDbType.Int).Value = CvePS + .Add("@Autogenerado", SqlDbType.Bit).Value = Autogenerado + .Add("@Estatus", SqlDbType.Bit).Value = Estatus + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al guardar el producto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + + End Function + + + Public Function UpdateProcedimientoProducto(CveProcedimientoProducto As Integer, CvePS As Integer, Autogenerado As Boolean, Estatus As Boolean, CveUsuario As Integer) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_ProcedimientosProductosUpdate") + With SqlAdapter.SelectCommand.Parameters + + .Add("@CveProcedimientoProducto", SqlDbType.Int).Value = CveProcedimientoProducto + .Add("@CvePS", SqlDbType.Int).Value = CvePS + .Add("@Autogenerado", SqlDbType.Bit).Value = Autogenerado + .Add("@Estatus", SqlDbType.Bit).Value = Estatus + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar el producto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + + End Function + + + Public Function SincronizacionProcedimientoProducto(CveProcedimiento As Integer, CveVenta As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_ProcedimientosProductosSincronizacion") + With SqlAdapter.SelectCommand.Parameters + + .Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al sincronizar los Productos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + + End Function + + Public Function GetProcedimientoProducto(CveProcedimiento As Integer, Estatus As Integer, CveEmpresa As Integer) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_ProcedimientosProductosGet") + With SqlAdapter.SelectCommand.Parameters + + .Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento + .Add("@Estatus", SqlDbType.Int).Value = Estatus + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los Productos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + + End Function + + Public Function RemoveProcedimientoProducto(CveProcedimientoProducto As Integer, CveEmpresa As Integer) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_ProcedimientosProductosRemove") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveProcedimientoProducto", SqlDbType.Int).Value = CveProcedimientoProducto + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al eliminar los Productos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + + End Function + + + + + Public Function GetProcedimientoVentas(CveProcedimiento As Integer, CveEmpresa As Integer) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_ProcedimientosVentasGet") + With SqlAdapter.SelectCommand.Parameters + + .Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener las ventas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + + End Function + + #End Region diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx index a2f96e165..9fa7ffa8d 100644 --- a/Contabilidad/RegPrePolizaS.aspx +++ b/Contabilidad/RegPrePolizaS.aspx @@ -440,7 +440,7 @@
| Filtros para búsqueda | -|||||
| Producto/Servicio: | -
- |
-
- |
- |||
| Medida: | -
- |
-
-
-
- |
- |||
| Rin: | -
- |
- - - | -|||
| C. Barras: | -
- |
- - | -|||
| Sucursal: | -
- |
- - | |||
| Compuesto: | -
- |
- - | |||
|
- |
- - | - | |||
| Filtros para búsqueda | +|||||
| Producto/Servicio: | +
+ |
+
+ |
+ |||
| Medida: | +
+ |
+
+
+
+ |
+ |||
| Rin: | +
+ |
+ + | |||
| Lista de precio: | +
+ |
+ + | |||
| C. Barras: | +
+ |
+ + | |||
| Sucursal: | +
+ |
+ + | |||
| Compuesto: | +
+ |
+ + | |||
|
+ |
+ + | + | |||
|
+ |
+