-- reporte de corte. reclasif de clase
This commit is contained in:
@@ -225,63 +225,34 @@ Public Class ClsPuntoVenta
|
||||
OnError("Ocurrió un error al obtener los Cortes del Punto de Venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Desglose del reporte de cortes, resumen e IVA
|
||||
''' </summary>
|
||||
''' <param name="CveCorte"></param>
|
||||
''' <param name="CveSubProyecto"></param>
|
||||
''' <param name="CveEmpresa"></param>
|
||||
''' <param name="Opcion"></param>
|
||||
''' <returns></returns>
|
||||
Public Function GetVta_ReporteCortesDetalle(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Opcion As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_ReporteCortesDetalleGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCorte", SqlDbType.Int).Value = CveCorte
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
End With
|
||||
|
||||
Try
|
||||
Dataset = New DataSet()
|
||||
SqlAdapter.Fill(Dataset)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los detalle de cortes", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
'Public Function GetCortesPorCuenta(CveCuenta As Integer, CveEmpresa As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
|
||||
' DataAdapter("PA_Vta_CuentaCorteGet")
|
||||
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
' .Add("@CveCorte", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
' End With
|
||||
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' CveCorte = Integer.Parse(SqlAdapter.SelectCommand.Parameters("@CveCorte").Value.ToString)
|
||||
' Retorno = True
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al obtener los cuenta de corte", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
' End Try
|
||||
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
|
||||
|
||||
|
||||
'Public Function GetCortesPorCuenta(CveCuenta As Integer, CveEmpresa As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
|
||||
' DataAdapter("PA_Vta_CuentaCorteGet")
|
||||
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
' .Add("@CveCorte", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
' End With
|
||||
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' CveCorte = Integer.Parse(SqlAdapter.SelectCommand.Parameters("@CveCorte").Value.ToString)
|
||||
' Retorno = True
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al obtener los cuenta de corte", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
' End Try
|
||||
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
|
||||
Public Function GetVta_MetodosPago(CveCorte As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_MetodosPagoGet")
|
||||
|
||||
@@ -3473,10 +3473,18 @@ Public Class ClsVentas
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetCortesDetalleVentas(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Opcion As Integer) As Boolean
|
||||
''' <summary>
|
||||
''' Desglose del reporte de cortes, resumen e IVA
|
||||
''' </summary>
|
||||
''' <param name="CveCorte"></param>
|
||||
''' <param name="CveSubProyecto"></param>
|
||||
''' <param name="CveEmpresa"></param>
|
||||
''' <param name="Opcion"></param>
|
||||
''' <returns></returns>
|
||||
Public Function GetVta_ReporteCortesDetalle(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Opcion As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_CortesDetalleVentasGet")
|
||||
DataAdapter("PA_Vta_ReporteCortesDetalleGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCorte", SqlDbType.Int).Value = CveCorte
|
||||
@@ -3486,8 +3494,8 @@ Public Class ClsVentas
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
Dataset = New DataSet()
|
||||
SqlAdapter.Fill(Dataset)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los detalle de cortes", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
@@ -3496,51 +3504,74 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
'Public Function GetCortesDetalleVentas(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Opcion As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
|
||||
Public Function AddVtaCortesDetalles(CveCorte As Integer, CveMetodoPago As Integer, Importe As Double) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_CortesDetallesAdd")
|
||||
' DataAdapter("PA_Vta_CortesDetalleVentasGet")
|
||||
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CveCorte", SqlDbType.Int).Value = CveCorte
|
||||
' .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
' .Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
' End With
|
||||
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
|
||||
' Retorno = True
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al obtener los detalle de cortes", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
' End Try
|
||||
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
'Public Function AddVtaCortesDetalles(CveCorte As Integer, CveMetodoPago As Integer, Importe As Double) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
' DataAdapter("PA_Vta_CortesDetallesAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCorte", SqlDbType.Int).Value = CveCorte
|
||||
.Add("@CveMetodoPago", SqlDbType.Int).Value = CveMetodoPago
|
||||
.Add("@Importe", SqlDbType.Money).Value = Importe
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As SqlException
|
||||
OnError("Ocurrió un error al guardar el Detalle del Corte de Turno.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
' If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CveCorte", SqlDbType.Int).Value = CveCorte
|
||||
' .Add("@CveMetodoPago", SqlDbType.Int).Value = CveMetodoPago
|
||||
' .Add("@Importe", SqlDbType.Money).Value = Importe
|
||||
' End With
|
||||
|
||||
Public Function GetCortesDetalleVentasResumen(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' Retorno = True
|
||||
' Catch ex As SqlException
|
||||
' OnError("Ocurrió un error al guardar el Detalle del Corte de Turno.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
' End Try
|
||||
|
||||
DataAdapter("PA_Vta_CortesDetalleVentasResumenGet")
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCorte", SqlDbType.Int).Value = CveCorte
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
'Public Function GetCortesDetalleVentasResumen(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
' DataAdapter("PA_Vta_CortesDetalleVentasResumenGet")
|
||||
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los detalle de cortes", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CveCorte", SqlDbType.Int).Value = CveCorte
|
||||
' .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
' End With
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
|
||||
' Retorno = True
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al obtener los detalle de cortes", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
' End Try
|
||||
|
||||
' Return Retorno
|
||||
'End Function
|
||||
Public Function GetVta_MovimientosCajasReporte(CveCorte As Integer, TipoMovimiento As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_MovimientosCajasRepGet")
|
||||
@@ -3561,27 +3592,27 @@ Public Class ClsVentas
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetCortesDetalleVentasResumenIVA(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
'Public Function GetCortesDetalleVentasResumenIVA(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_CortesDetalleVentasResumenIVAGet")
|
||||
' DataAdapter("PA_Vta_CortesDetalleVentasResumenIVAGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCorte", SqlDbType.Int).Value = CveCorte
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CveCorte", SqlDbType.Int).Value = CveCorte
|
||||
' .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
' End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los detalle de cortes", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
' Retorno = True
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al obtener los detalle de cortes", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
' End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
Public Function GetCortesDetalleDepositosCaja(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -213,9 +213,9 @@ Partial Class Bancos_RepCortes
|
||||
' End If
|
||||
'End If
|
||||
|
||||
Dim ObjPuntoVenta As New ClsPuntoVenta
|
||||
If ObjPuntoVenta.GetVta_ReporteCortesDetalle(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then
|
||||
Dim DsDatos = ObjPuntoVenta.DataSetResultados.Copy()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVta_ReporteCortesDetalle(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then
|
||||
Dim DsDatos = ObjVentas.DataSetResultados.Copy()
|
||||
If DsDatos IsNot Nothing Then
|
||||
'DESGLOSE
|
||||
DtCortesVentas = DsDatos.Tables(0)
|
||||
@@ -235,12 +235,11 @@ Partial Class Bancos_RepCortes
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjPuntoVenta.GetVta_MovimientosCajasReporte(CveCorte, -1) Then
|
||||
GvIngresosRetiros.DataSource = ObjPuntoVenta.DtResultados.Copy()
|
||||
If ObjVentas.GetVta_MovimientosCajasReporte(CveCorte, -1) Then
|
||||
GvIngresosRetiros.DataSource = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
ObjPuntoVenta.Dispose()
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If Not UsuarioActual.CveEmpresa.Contiene(140, 141) AndAlso ObjVentas.GetCortesDetalleDepositosCaja(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvDep.DataSource = ObjVentas.DtResultados
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
Reference in New Issue
Block a user