From f99941f756fa70b77789b96376fde034ef911b0a Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 28 Feb 2024 20:14:27 -0700 Subject: [PATCH] - mejora --- Ventas/PVCobranza.aspx | 29 +++++++++++------------------ Ventas/PVCobranza.aspx.vb | 21 ++++++++++++++++++--- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/Ventas/PVCobranza.aspx b/Ventas/PVCobranza.aspx index 820691846..bc89fc143 100644 --- a/Ventas/PVCobranza.aspx +++ b/Ventas/PVCobranza.aspx @@ -292,9 +292,9 @@ + DataKeyNames="CveVenta,TipoDocto,Saldo,AtencionA"> - + @@ -310,14 +310,15 @@
- Nombre: - -           +
+
Nombre:
+
         
+ - - - - +
+
+
+
@@ -514,15 +515,7 @@ - - - - - - - - - +     diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index b07564e1a..2da8d426b 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -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 {FechaICorte.ToString("dd/MM/yyyy")}. 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