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 @@ - +