diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index 66b7cecbb..642eae08d 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -716,7 +716,7 @@ Partial Class Ventas_PVCobranza End If 'GENERAR NC PARA AMORTIZACION - If ListaAnticiposAplicados IsNot Nothing AndAlso ListaAnticiposAplicados.Where(Function(x) x.Tipo = "Ant").Any() AndAlso TxtNCDev.Text.ToDecimal() > 0 Then + If MsgError = "" AndAlso ListaAnticiposAplicados IsNot Nothing AndAlso ListaAnticiposAplicados.Where(Function(x) x.Tipo = "Ant").Any() AndAlso TxtNCDev.Text.ToDecimal() > 0 Then For Each gvr As GridViewRow In GVAnticipos.Rows If gvr.DataKey("Tipo") = "Ant" AndAlso gvr.FCCheckBox("Chk" & gvr.RowIndex) IsNot Nothing AndAlso gvr.FCCheckBox("Chk" & gvr.RowIndex).Checked Then @@ -737,8 +737,8 @@ Partial Class Ventas_PVCobranza Exit For Else PagoAplicado += RespNC.Factura.Total - SaldoPendienteVenta = SaldoPendienteVenta - PagoAplicado - SaldoPendientePagos = SaldoPendientePagos - PagoAplicado + SaldoPendienteVenta -= RespNC.Factura.Total + SaldoPendientePagos -= RespNC.Factura.Total For Each RowAnt As DataRow In RespNC.Factura.DtAnticiposAplicados.Rows If Not ActualizaAnticipos(RowAnt("CveIE").ToString().ToEntero(), RowAnt("CveVenta").ToString().ToEntero(), RowAnt("Tipo").ToString(), RowAnt("Folio").ToString(), ObjVentas2, ObjOIEventos) Then