--Reporte de cortes por subproyecto y fecha

This commit is contained in:
2024-06-25 13:12:23 -07:00
parent 5b6e0eea44
commit 5cadafe1ca
2 changed files with 22 additions and 10 deletions

View File

@@ -3485,7 +3485,7 @@ Public Class ClsVentas
''' <param name="CveEmpresa"></param> ''' <param name="CveEmpresa"></param>
''' <param name="Opcion"></param> ''' <param name="Opcion"></param>
''' <returns></returns> ''' <returns></returns>
Public Function GetVta_ReporteCortesDetalle(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Opcion As Integer, Optional ConsultaIVA As Boolean = False) As Boolean Public Function GetVta_ReporteCortesDetalle(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Opcion As Integer, Optional ConsultaIVA As Boolean = False, Optional FechaConsulta As Date = ModExtensiones.MaxFecha) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_ReporteCortesDetalleGet") DataAdapter("PA_Vta_ReporteCortesDetalleGet")
@@ -3496,6 +3496,7 @@ Public Class ClsVentas
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Opcion", SqlDbType.Int).Value = Opcion .Add("@Opcion", SqlDbType.Int).Value = Opcion
.Add("@ConsultaIVA", SqlDbType.Bit).Value = ConsultaIVA .Add("@ConsultaIVA", SqlDbType.Bit).Value = ConsultaIVA
.Add("@FechaConsulta", SqlDbType.Date).Value = FechaConsulta
End With End With
Try Try

View File

@@ -106,7 +106,7 @@ Partial Class Bancos_RepCortes
#Region "G V - D A T O S " #Region "G V - D A T O S "
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CveCorte").ToString = "" Then If e.Row.DBCampo("FechaInicial").ToString = "" Then
e.Row.CssClass = "SubTotales2" e.Row.CssClass = "SubTotales2"
If DtCortes IsNot Nothing Then If DtCortes IsNot Nothing Then
e.Row.FCLiteral("LtlImporteInicial").Text = DtCortes.SUMD("ImporteInicial").FormatoNumero(2) e.Row.FCLiteral("LtlImporteInicial").Text = DtCortes.SUMD("ImporteInicial").FormatoNumero(2)
@@ -189,10 +189,12 @@ Partial Class Bancos_RepCortes
Protected Sub LbDescripcion_Click(sender As Object, e As EventArgs) Protected Sub LbDescripcion_Click(sender As Object, e As EventArgs)
Dim btn As LinkButton = DirectCast(sender, LinkButton) Dim btn As LinkButton = DirectCast(sender, LinkButton)
Dim gvr As GridViewRow = DirectCast(btn.NamingContainer, GridViewRow) Dim gvr As GridViewRow = DirectCast(btn.NamingContainer, GridViewRow)
CveCorte = gvr.DataKey("CveCorte").ToString.ToEntero
Dim Finalizado As Integer = gvr.DataKey("Finalizado").ToString.ToEntero CveCorte = gvr.DataKey("CveCorte").ToEntero()
Fecha = gvr.DataKey("FechaInicial").ToString
Nombre = gvr.DataKey("Nombre").ToString Dim Finalizado As Integer = gvr.DataKey("Finalizado").ToEntero()
Fecha = gvr.DataKey("FechaInicial")
Nombre = gvr.DataKey("Nombre")
'If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then 'If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then
' DtCortesVentas = ObjPuntoVenta.DtResultados.Copy() ' DtCortesVentas = ObjPuntoVenta.DtResultados.Copy()
@@ -212,9 +214,17 @@ Partial Class Bancos_RepCortes
' GvPorIVA.DataSource = ObjVentas.DtResultados ' GvPorIVA.DataSource = ObjVentas.DtResultados
' End If ' End If
'End If 'End If
Dim FechaConsulta = ModExtensiones.MaxFecha
Dim ConsultaPorSucursal As Boolean = UsuarioActual.Empresa.Funcionalidad(382) = "1"
If ConsultaPorSucursal Then
CveCorte = -1
FechaConsulta = gvr.DataKey("FechaInicial").ToDate()
End If
Dim ObjVentas As New ClsVentas Dim ObjVentas As New ClsVentas
If ObjVentas.GetVta_ReporteCortesDetalle(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Opcion:=2, ConsultaIVA:=UsuarioActual.CveEmpresa.Contiene(190, 192)) Then If ObjVentas.GetVta_ReporteCortesDetalle(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Opcion:=2, ConsultaIVA:=UsuarioActual.CveEmpresa.Contiene(190, 192), FechaConsulta:=FechaConsulta) Then
Dim DsDatos = ObjVentas.DataSetResultados.Copy() Dim DsDatos = ObjVentas.DataSetResultados.Copy()
If DsDatos IsNot Nothing Then If DsDatos IsNot Nothing Then
'DESGLOSE 'DESGLOSE
@@ -242,11 +252,12 @@ Partial Class Bancos_RepCortes
End If End If
End If End If
If ObjVentas.GetVta_MovimientosCajasReporte(CveCorte, -1) Then If CveCorte > 0 Then
GvIngresosRetiros.DataSource = ObjVentas.DtResultados.Copy() If ObjVentas.GetVta_MovimientosCajasReporte(CveCorte, -1) Then
GvIngresosRetiros.DataSource = ObjVentas.DtResultados.Copy()
End If
End If End If
If Not UsuarioActual.CveEmpresa.Contiene(140, 141) AndAlso ObjVentas.GetCortesDetalleDepositosCaja(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then If Not UsuarioActual.CveEmpresa.Contiene(140, 141) AndAlso ObjVentas.GetCortesDetalleDepositosCaja(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
GvDep.DataSource = ObjVentas.DtResultados GvDep.DataSource = ObjVentas.DtResultados
If ObjVentas.DtResultados.Rows.Count > 0 Then If ObjVentas.DtResultados.Rows.Count > 0 Then