- nueva función de cortes activos
This commit is contained in:
@@ -228,8 +228,38 @@ Public Class ClsPuntoVenta
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetVtaCortesActivos(CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_CortesActivosGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
If Data.Rows.Count > 0 Then
|
||||
With Me
|
||||
.CveCorte = Data.Rows(0)("CveCorte").ToString.ToEntero
|
||||
.FechaInicial = Data.Rows(0)("FechaInicial").ToString.ToDateTime
|
||||
.FechaFinal = Data.Rows(0)("FechaFinal").ToString.ToDateTime
|
||||
.FechaIng = Data.Rows(0)("FechaIng").ToString.ToDateTime
|
||||
.ImporteInicial = Data.Rows(0)("ImporteInicial").ToString.ToDouble
|
||||
.ImporteFinal = Data.Rows(0)("ImporteFinal").ToString.ToDouble
|
||||
.Descripcion = Data.Rows(0)("Descripcion").ToString
|
||||
.Estatus = Data.Rows(0)("Estatus").ToString
|
||||
.Usuario = Data.Rows(0)("Usuario").ToString
|
||||
.UsuarioNombre = Data.Rows(0)("UsuarioNombre").ToString
|
||||
End With
|
||||
End If
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los Cortes del Punto de Venta.", 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
|
||||
|
||||
|
||||
@@ -3772,7 +3772,7 @@ Partial Class Ventas
|
||||
'Checar si hay un Turno Abierto
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
|
||||
If ObjPVenta.GetVta_Cortes("-1", "-1", UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, 0) Then
|
||||
If ObjPVenta.GetVtaCortesActivos(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
||||
CveCorte = ObjPVenta.CveCorte
|
||||
@@ -3810,7 +3810,7 @@ Partial Class Ventas
|
||||
Private Sub BtnIniciarTurno_Click(sender As Object, e As EventArgs) Handles BtnIniciarTurno.Click
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
|
||||
ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, TxtDescripcionCaja.Text, UsuarioActual.CveEmpresa)
|
||||
ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, TxtDescripcionCaja.Text, 1, UsuarioActual.CveEmpresa)
|
||||
CveCorte = ObjPVenta.CveCorte
|
||||
LblEstatusCaja.Text = NowADS().ToShortDateString
|
||||
TrEstatusCaja.Visible = True
|
||||
|
||||
Reference in New Issue
Block a user