diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb index 13064ce48..23bde4820 100644 --- a/App_Code/ClsContratos.vb +++ b/App_Code/ClsContratos.vb @@ -2261,18 +2261,19 @@ Public Class ClsContratos Return Retorno - End Function - + End Function + #End Region - + #Region "C O N T R A T O S G A S T O S" - - Public Function GetContratoGastos(CveContrato As Integer) As Boolean + + Public Function GetContratoGastos(CveContrato As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosGastosGet") With SqlAdapter.SelectCommand.Parameters - .Add("@CveContrato", SqlDbType.Int).Value = CveContrato + .Add("@CveContrato", SqlDbType.Int).Value = CveContrato + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 2ce35856c..e304c226a 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -698,7 +698,7 @@ Partial Class PopUpVerFactura End If End If Dim dt As DataTable = Nothing - If ObjContratos.GetContratoGastos(CveContrato) Then + If ObjContratos.GetContratoGastos(CveContrato, UsuarioActual.CveEmpresa) Then dt = ObjContratos.DtResultados.FiltraParametros($"CveContratoGasto = {CveContratoGasto}") SumaGasto = ObjContratos.DtResultados.SUM("Importe", "CveContratoGasto IS NULL") End If