--Validaciones cobro clientes
-- obligar siempre tener corte
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
Imports System.Data
|
||||
Imports ADSTimbrado
|
||||
Imports Extensiones
|
||||
Imports Org.BouncyCastle.Ocsp
|
||||
|
||||
Partial Class Ventas_ClientesAbonar
|
||||
Inherits ClsPaginas
|
||||
@@ -743,6 +742,36 @@ Partial Class Ventas_ClientesAbonar
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso RblTipoPago.SelectedValue = "3" Then
|
||||
Dim DtSaldo As DataTable = Nothing
|
||||
Dim ObjMovto As New ClsMovimientos
|
||||
If ObjMovto.GetIngresosSaldosDetalle(CveCliente, -1, UsuarioActual.CveEmpresa) Then
|
||||
DtSaldo = ObjMovto.DtResultados.FiltraParametros($"CveIE={DdlIngreso.SelectedValue.ToEntero()}")
|
||||
End If
|
||||
ObjMovto.Dispose()
|
||||
|
||||
If DtSaldo IsNot Nothing AndAlso DtSaldo.Rows.Count = 1 Then
|
||||
Dim ImporteRef As Decimal = DtSaldo.SUM("Saldo", $"CveIE={DdlIngreso.SelectedValue.ToEntero()}")
|
||||
Dim ImporteAbonar As Decimal = 0
|
||||
|
||||
For Each gvr As GridViewRow In GvCxC.Rows
|
||||
If gvr.FCCheckBox("Chk").Checked Then
|
||||
ImporteAbonar += gvr.FCTextBox("TxtAbonar").Text.ToDecimal()
|
||||
End If
|
||||
Next
|
||||
ImporteAbonar += TxtAnticipo.Text.ToDecimal()
|
||||
|
||||
If ImporteRef.RoundSQL(2) <> ImporteAbonar.RoundSQL(2) Then
|
||||
Alert("El importe abonado es diferente al saldo del ingreso", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Else
|
||||
Alert("No se pudieron validar los saldos", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Dim Cuenta As String = ""
|
||||
Dim CuentaDeposito As String = ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user