Filtro Empesa actual

This commit is contained in:
HECTOR RODRIGUEZ
2021-04-29 20:55:56 -07:00
parent 5d22bb72fd
commit 7d73648efe
2 changed files with 5 additions and 2 deletions

View File

@@ -7282,7 +7282,7 @@ Public Class ClsContPAQi
Return Retorno
End Function
Public Function GetPolizas(Ejercicio As Integer, Periodo As Integer, TipoPoliza As Integer, SegmentoNegocio As Integer) As Boolean
Public Function GetPolizas(Ejercicio As Integer, Periodo As Integer, TipoPoliza As Integer, SegmentoNegocio As Integer, Optional CveEmpresa As Integer = -1) As Boolean
Dim Retorno As Boolean = False
StrSQL.Clear()
@@ -7295,6 +7295,7 @@ Public Class ClsContPAQi
StrSQL.Append(" AND P.Periodo = @Periodo ")
StrSQL.Append(" AND (@TipoPoliza = -1 OR P.TipoPol = @TipoPoliza) ")
StrSQL.Append(" AND (@SegmentoNegocio = -1 OR M.IdSegNeg = @SegmentoNegocio) ")
StrSQL.Append(" AND (PP.CveEmpresa = @CveEmpresa) ")
StrSQL.Append(" GROUP BY P.Id, P.Fecha, T.Nombre, P.Concepto, P.Cargos, P.Abonos, P.Folio, PP.CvePrepoliza ")
StrSQL.Append(" ORDER BY P.Folio ")
@@ -7306,6 +7307,8 @@ Public Class ClsContPAQi
.Add("@Periodo", SqlDbType.Int).Value = Periodo
.Add("@TipoPoliza", SqlDbType.Int).Value = TipoPoliza
.Add("@SegmentoNegocio", SqlDbType.Int).Value = SegmentoNegocio
.Add("@CveEmpresa", SqlDbType.Int).Value = SegmentoNegocio
End With
Try
SqlAdapter.Fill(Data)

View File

@@ -49,7 +49,7 @@ Partial Class Contabilidad_FiltraPolizas
Dim Periodo As Integer = DdlPeriodo.SelectedValue.ToString().ToEntero()
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
If ObjConta.GetPolizas(Ejercicio, Periodo, DdlTipoPoliza.SelectedValue.ToEntero(), DdlSegmentoNeg.SelectedValue.ToEntero()) Then
If ObjConta.GetPolizas(Ejercicio, Periodo, DdlTipoPoliza.SelectedValue.ToEntero(), DdlSegmentoNeg.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
DtDatos = ObjConta.DtResultados
Gv.DataSource = ObjConta.DtResultados
'If DdlTipoPoliza.SelectedValue.ToEntero > 0 Then