From dbcc04b5eb376b4c0b19692b9c999ce87847bf8f Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 18 May 2020 13:20:12 -0700 Subject: [PATCH] Correcion en punto de venta --- Ventas/PV.aspx.vb | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index f9ff95c6a..98656a00a 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -1776,6 +1776,17 @@ Partial Class PV Moneda = 1 End If + 'ELIMINA LOS DETALLES + If Not OcurrioError Then + Dim DtEliminados As DataTable = TmpDT.FiltraParametros("EliminarDB = True AND CveVentaDetalle > 0", "", {"CveVentaDetalle"}) + + For Each Dr1 As DataRow In DtEliminados.Rows + If Not ObjVentas.RemoveVentasDetalle(CveVenta, Dr1("CveVentaDetalle").ToString.ToEntero) Then + OcurrioError = True + End If + Next + End If + 'Actualizo los parametros de la venta If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim, UsuarioActual.CveEmpresa, CveVenta, 0, 0, @@ -1834,18 +1845,6 @@ Partial Class PV Next End If - - 'ELIMINA LOS DETALLES - If Not OcurrioError Then - Dim DtEliminados As DataTable = TmpDT.FiltraParametros("EliminarDB = True AND CveVentaDetalle > 0", "", {"CveVentaDetalle"}) - - For Each Dr1 As DataRow In DtEliminados.Rows - If Not ObjVentas.RemoveVentasDetalle(CveVenta, Dr1("CveVentaDetalle").ToString.ToEntero) Then - OcurrioError = True - End If - Next - End If - 'RECARGA LOS DATOS ObjFactura.Dispose() ObjFactura = Nothing