Filtro Empesa actual
This commit is contained in:
@@ -7282,7 +7282,7 @@ Public Class ClsContPAQi
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
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
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
StrSQL.Clear()
|
StrSQL.Clear()
|
||||||
@@ -7295,6 +7295,7 @@ Public Class ClsContPAQi
|
|||||||
StrSQL.Append(" AND P.Periodo = @Periodo ")
|
StrSQL.Append(" AND P.Periodo = @Periodo ")
|
||||||
StrSQL.Append(" AND (@TipoPoliza = -1 OR P.TipoPol = @TipoPoliza) ")
|
StrSQL.Append(" AND (@TipoPoliza = -1 OR P.TipoPol = @TipoPoliza) ")
|
||||||
StrSQL.Append(" AND (@SegmentoNegocio = -1 OR M.IdSegNeg = @SegmentoNegocio) ")
|
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(" GROUP BY P.Id, P.Fecha, T.Nombre, P.Concepto, P.Cargos, P.Abonos, P.Folio, PP.CvePrepoliza ")
|
||||||
StrSQL.Append(" ORDER BY P.Folio ")
|
StrSQL.Append(" ORDER BY P.Folio ")
|
||||||
|
|
||||||
@@ -7306,6 +7307,8 @@ Public Class ClsContPAQi
|
|||||||
.Add("@Periodo", SqlDbType.Int).Value = Periodo
|
.Add("@Periodo", SqlDbType.Int).Value = Periodo
|
||||||
.Add("@TipoPoliza", SqlDbType.Int).Value = TipoPoliza
|
.Add("@TipoPoliza", SqlDbType.Int).Value = TipoPoliza
|
||||||
.Add("@SegmentoNegocio", SqlDbType.Int).Value = SegmentoNegocio
|
.Add("@SegmentoNegocio", SqlDbType.Int).Value = SegmentoNegocio
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = SegmentoNegocio
|
||||||
|
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ Partial Class Contabilidad_FiltraPolizas
|
|||||||
Dim Periodo As Integer = DdlPeriodo.SelectedValue.ToString().ToEntero()
|
Dim Periodo As Integer = DdlPeriodo.SelectedValue.ToString().ToEntero()
|
||||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
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
|
DtDatos = ObjConta.DtResultados
|
||||||
Gv.DataSource = ObjConta.DtResultados
|
Gv.DataSource = ObjConta.DtResultados
|
||||||
'If DdlTipoPoliza.SelectedValue.ToEntero > 0 Then
|
'If DdlTipoPoliza.SelectedValue.ToEntero > 0 Then
|
||||||
|
|||||||
Reference in New Issue
Block a user