--Validacion anticipos

This commit is contained in:
2025-04-09 22:50:50 -07:00
parent 53939b70fd
commit c38b78d316

View File

@@ -3604,7 +3604,7 @@ Namespace Modelos
Exit Select
End If
If ObjFactura.TipoDocto.Contiene("Ing", "Egs", "Ant") AndAlso ValorMultiplicador = -1 Then
If ObjFactura.TipoDocto.Contiene("Ing", "Egs") AndAlso ValorMultiplicador = -1 Then
For Each row2 As DataRow In ObjFactura.DtAnticipos.Rows
If row2("CveConceptoContable").ToString().ToEntero = 11 Then
importeMovimiento = row2("Importe").ToString().ToDecimal * ValorMultiplicador '- ((row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal / row2.DataKey("TotalAnticipo").ToDecimal) * row2.DataKey("IVAAnticipo").ToDecimal)
@@ -5732,8 +5732,15 @@ Namespace Modelos
Return Retorno
End If
If ObjFactura.TipoDocto = "Ant" AndAlso ObjFactura.SaldoAmortizado > 0 Then
Retorno.Mensaje = "La factura no se puede cancelar debido a que el anticipo ha sido amortizado."
'If ObjFactura.TipoDocto = "Ant" AndAlso ObjFactura.SaldoAmortizado > 0 Then
' Retorno.Mensaje = "La factura no se puede cancelar debido a que el anticipo ha sido amortizado."
' Retorno.TipoMensaje = TipoMensaje.MsgAdvertencia
' Return Retorno
'End If
If ObjFactura.TipoDocto = "Ant" AndAlso ObjFactura.SaldoAnticipo.RoundSQL(2) <> ObjFactura.SubTotal.RoundSQL(2) Then
Retorno.Mensaje = "La factura no se puede cancelar debido a que el anticipo ha sido aplicado."
Retorno.TipoMensaje = TipoMensaje.MsgAdvertencia
Return Retorno