This commit is contained in:
2025-02-13 16:16:57 -07:00
6 changed files with 305 additions and 146 deletions

View File

@@ -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

View File

@@ -17639,7 +17639,6 @@ Partial Class Ventas
Dim Folio = GvRowAnticipo.DataKey("Folio")
Dim Tipo = GvRowAnticipo.DataKey("Tipo")
DtAnticipos.Rows.Add(CveVenta, Importe, CveConceptoContable, CveIE, FolioFiscal, Descuentos, TotalAnticipo, SubTotalAnticipo, CveMoneda, Fecha, TipoCambioPago, Folio, Tipo)
End If
@@ -17769,7 +17768,7 @@ Partial Class Ventas
Select Case gvr.DataKey("CveConceptoContable").ToString()
Case "3", "295"
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso DdlMoneda.SelectedValue.ToEntero() = 1 Then
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
Dim ImporteNC As Decimal = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal
Dim RespNC = GenerarNC(ImporteNC, DdlVendedor.SelectedValue.ToEntero(), Me.VentaActual, gvr, ObjVenta)