Correcion en punto de venta
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user