This commit is contained in:
2024-02-28 20:14:27 -07:00
parent 66181a66c8
commit f99941f756
2 changed files with 29 additions and 21 deletions

View File

@@ -93,7 +93,7 @@ Partial Class Ventas_PVCobranza
If ObjPVenta.DtResultados.Rows.Count > 0 Then
CveCorte = ObjPVenta.CveCorte
Dim FechaICorte As Date = ObjPVenta.FechaInicial.Date '.AddDays(-5)
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < NowADS().Date Then
If FechaICorte < NowADS().Date Then
DebeCerrarCorte = True
LblMotivoBloqueo.Text = $"Existe un corte del día <b>{FechaICorte.ToString("dd/MM/yyyy")}</b>. Favor de cerrarlo para iniciar un nuevo corte."
Else
@@ -244,7 +244,7 @@ Partial Class Ventas_PVCobranza
TxtImporteContado.Text = GvRow.DataKey("Saldo").FormatoNumero
HdnTotal.Value = GvRow.DataKey("Saldo")
TxtImporteEfectivo.Focus()
LtlNombre.Text = GvRow.DataKey("DescripcionVenta")
LtlNombre.Text = GvRow.DataKey("AtencionA")
LtlSaldo.Text = GvRow.DataKey("Saldo").ToDecimal.FormatoNumero
Catch ex As Exception
TieneError = True
@@ -340,6 +340,10 @@ Partial Class Ventas_PVCobranza
PagoEfectivo = TxtImporteCheque.Text.ToDecimal
End If
If Not ObjVentas2.UpdateVentaCorte(CveVenta, UsuarioActual.CveEmpresa, CveCorte) Then
MsgError = "Error al aplicar el corte"
End If
Else
MsgError = "Error al registrar prepólizas"
End If
@@ -503,7 +507,7 @@ Partial Class Ventas_PVCobranza
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, "", UsuarioActual.CveEmpresa)
CveCorte = ObjPVenta.CveCorte
LblTurno.Text = NowADS().ToShortDateString
UpTurno.Visible = True
@@ -561,4 +565,15 @@ Partial Class Ventas_PVCobranza
End If
End Sub
Protected Sub LnkLiberar_Click(sender As Object, e As EventArgs)
Dim ObjVentas As New ClsVentas
If ObjVentas.UpdateAsignaVentaCobranza(HdnCveVenta.Value.ToEntero, -1, -1, -1, "", Now) Then
PnlContado.Visible = False
HdnCveVenta.Value = ""
CargaDatos()
End If
ObjVentas.Dispose()
End Sub
End Class