From b6026756042958700ff8df2ac61f1e1f960dc7d8 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 5 Oct 2021 22:32:24 -0700 Subject: [PATCH] parametro empresa --- App_Code/ClsContratos.vb | 13 +++++++------ Compras/PopUpVerFactura.aspx.vb | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) 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