--FIX depositos e impresiones en cortes
This commit is contained in:
@@ -3597,13 +3597,15 @@ Public Class ClsVentas
|
||||
|
||||
' Return Retorno
|
||||
'End Function
|
||||
Public Function GetVta_MovimientosCajas(CveCorte As Integer, TipoMovimiento As Integer) As Boolean
|
||||
Public Function GetVta_MovimientosCajas(CveCorte As Integer, TipoMovimiento As Integer, Optional CveSubProyecto As Integer = -1, Optional FechaConsulta As Date = ModExtensiones.MaxFecha) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_MovimientosCajasGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCorte", SqlDbType.Int).Value = CveCorte
|
||||
.Add("@TipoMovimiento", SqlDbType.Int).Value = TipoMovimiento
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@FechaConsulta", SqlDbType.Date).Value = FechaConsulta
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -3616,13 +3618,15 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetVta_MovimientosCajasReporte(CveCorte As Integer, TipoMovimiento As Integer) As Boolean
|
||||
Public Function GetVta_MovimientosCajasReporte(CveCorte As Integer, TipoMovimiento As Integer, Optional CveSubProyecto As Integer = -1, Optional FechaConsulta As Date = ModExtensiones.MaxFecha) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_MovimientosCajasRepGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCorte", SqlDbType.Int).Value = CveCorte
|
||||
.Add("@TipoMovimiento", SqlDbType.Int).Value = TipoMovimiento
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@FechaConsulta", SqlDbType.Date).Value = FechaConsulta
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -3658,7 +3662,7 @@ Public Class ClsVentas
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
Public Function GetCortesDetalleDepositosCaja(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function GetCortesDetalleDepositosCaja(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional FechaConsulta As Date = ModExtensiones.MaxFecha) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_CortesDetalleDepositosCajaGet")
|
||||
@@ -3667,6 +3671,7 @@ Public Class ClsVentas
|
||||
.Add("@CveCorte", SqlDbType.Int).Value = CveCorte
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@FechaConsulta", SqlDbType.Date).Value = FechaConsulta
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -253,12 +253,12 @@ Partial Class Bancos_RepCortes
|
||||
End If
|
||||
|
||||
If CveCorte > 0 Then
|
||||
If ObjVentas.GetVta_MovimientosCajasReporte(CveCorte, -1) Then
|
||||
If ObjVentas.GetVta_MovimientosCajasReporte(CveCorte, -1, CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero(), FechaConsulta:=FechaConsulta) Then
|
||||
GvIngresosRetiros.DataSource = ObjVentas.DtResultados.Copy()
|
||||
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, FechaConsulta:=FechaConsulta) Then
|
||||
GvDep.DataSource = ObjVentas.DtResultados
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
DivDep.Visible = True
|
||||
|
||||
@@ -1586,19 +1586,7 @@ Partial Class PopUpVerFactura
|
||||
DtCortesVentasResumen = DsDatos.Tables(1)
|
||||
End If
|
||||
End If
|
||||
' If ObjVenta.GetCortesDetalleVentasResumen(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
' DtCortesVentasResumen = ObjVenta.DtResultados.Copy()
|
||||
'End If
|
||||
|
||||
'If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa, OpcionDetallado) Then
|
||||
' DtCortesVentas = ObjPuntoVenta.DtResultados.Copy()
|
||||
' If DtCortesVentas.Rows.Count > 0 Then
|
||||
' Dim RowInfo As DataRow = DtCortesVentas.FiltroPrimero("CveVenta > 0")
|
||||
|
||||
' Fecha = RowInfo("FechaInicial").ToString
|
||||
' Nombre = RowInfo("Nombre").ToString
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If DtCortesVentas.Rows.Count > 0 Then
|
||||
Dim RowInfo As DataRow = DtCortesVentas.FiltroPrimero("CveVenta > 0")
|
||||
@@ -1611,21 +1599,23 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa = 197 Then
|
||||
If ObjVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, FechaConsulta, FechaConsulta, CveSubProyecto, CveCorte:=CveCorte) Then
|
||||
If ConsultaPorSucursal Then
|
||||
If ConsultaPorSucursal Then
|
||||
If ObjVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, FechaConsulta, FechaConsulta, CveSubProyecto) Then
|
||||
DtReporteCorte = ObjVenta.DtResultados.FiltraParametros("FechaInicial IS NOT NULL")
|
||||
Fecha = FechaConsulta.ToString("dd/MM/yyyy")
|
||||
Else
|
||||
End If
|
||||
Else
|
||||
If ObjVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, MinFecha, MaxFecha, CveSubProyecto, CveCorte:=CveCorte) Then
|
||||
DtReporteCorte = ObjVenta.DtResultados.FiltraParametros("CveCorte > 0")
|
||||
Fecha = DtReporteCorte.FiltroPrimeroValor("FechaInicial", "")
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjVenta.GetVta_MovimientosCajas(CveCorte, -1) Then
|
||||
If ObjVenta.GetVta_MovimientosCajas(CveCorte, -1, CveSubProyecto:=CveSubProyecto, FechaConsulta:=FechaConsulta) Then
|
||||
DtIngresosRetiros = ObjVenta.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
If Not UsuarioActual.CveEmpresa.Contiene(140, 141) AndAlso ObjVenta.GetCortesDetalleDepositosCaja(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
If Not UsuarioActual.CveEmpresa.Contiene(140, 141) AndAlso ObjVenta.GetCortesDetalleDepositosCaja(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa, FechaConsulta:=FechaConsulta) Then
|
||||
DtDepositos = ObjVenta.DtResultados.Copy()
|
||||
End If
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user