PopIECompras validacion exedente
This commit is contained in:
@@ -685,10 +685,10 @@ Partial Class Bancos_PopIECompras
|
||||
DdlTipoTransaccion.Enabled = True
|
||||
TxtObservaciones.Enabled = True
|
||||
BtnGuardar.Visible = True
|
||||
RVImporte.Enabled = True
|
||||
'RVImporte.Enabled = True
|
||||
|
||||
RVImporte.Enabled = True
|
||||
RVImporte.MaximumValue = dr("Saldo").ToString.ToDecimal.ToString.FormatoNumero
|
||||
'RVImporte.Enabled = True
|
||||
'RVImporte.MaximumValue = dr("Saldo").ToString.ToDecimal.ToString.FormatoNumero
|
||||
TxtImporte.Text = dr("Saldo").ToString.ToDecimal.FormatoNumero
|
||||
|
||||
SaldoVenta = dr("Saldo").ToString.ToDecimal
|
||||
@@ -1185,9 +1185,9 @@ Partial Class Bancos_PopIECompras
|
||||
GvDeudores.Columns(5).Visible = True
|
||||
GvDeudores.Columns(6).Visible = True
|
||||
|
||||
RVImporte.Enabled = False
|
||||
RVImporte.MaximumValue = "0.00"
|
||||
|
||||
'RVImporte.Enabled = False
|
||||
' RVImporte.MaximumValue = "0.00"
|
||||
|
||||
CVImporteDolares.Enabled = True
|
||||
Else
|
||||
DivTipoCambio.Visible = False
|
||||
@@ -1205,8 +1205,8 @@ Partial Class Bancos_PopIECompras
|
||||
GvDeudores.Columns(5).Visible = False
|
||||
GvDeudores.Columns(6).Visible = False
|
||||
|
||||
RVImporte.Enabled = True
|
||||
RVImporte.MaximumValue = LtlSaldo.Text.ToDecimal.ToString
|
||||
'RVImporte.Enabled = True
|
||||
'RVImporte.MaximumValue = LtlSaldo.Text.ToDecimal.ToString
|
||||
|
||||
CVImporteDolares.Enabled = False
|
||||
CVImportePesos.Enabled = False
|
||||
@@ -1244,8 +1244,8 @@ Partial Class Bancos_PopIECompras
|
||||
GvDeudores.Columns(5).Visible = True
|
||||
GvDeudores.Columns(6).Visible = True
|
||||
|
||||
RVImporte.Enabled = False
|
||||
RVImporte.MaximumValue = "0.00"
|
||||
'RVImporte.Enabled = False
|
||||
'RVImporte.MaximumValue = "0.00"
|
||||
|
||||
CVImportePesos.Enabled = True
|
||||
Else
|
||||
@@ -1262,10 +1262,10 @@ Partial Class Bancos_PopIECompras
|
||||
GvIngresos.Columns(6).Visible = False
|
||||
|
||||
GvDeudores.Columns(5).Visible = False
|
||||
GvDeudores.Columns(6).Visible = False
|
||||
|
||||
RVImporte.Enabled = True
|
||||
RVImporte.MaximumValue = LtlSaldo.Text.ToDecimal.ToString
|
||||
GvDeudores.Columns(6).Visible = False
|
||||
|
||||
' RVImporte.Enabled = True
|
||||
'RVImporte.MaximumValue = LtlSaldo.Text.ToDecimal.ToString
|
||||
|
||||
CVImporteDolares.Enabled = False
|
||||
CVImportePesos.Enabled = False
|
||||
@@ -3439,4 +3439,35 @@ Partial Class Bancos_PopIECompras
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub CVTxtImporte_ServerValidate(source As Object, args As ServerValidateEventArgs)
|
||||
|
||||
Dim Saldo As Decimal = LtlSaldo.Text.Replace("USD", "").Replace(",", "").ToDecimal
|
||||
Dim ImportePagado As Decimal = TxtImporte.Text.ToDecimal
|
||||
|
||||
If ChkPagarPesos.Checked Then
|
||||
|
||||
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
|
||||
Dim PagoEnDollares As Decimal = (ImportePagado / TC).RoundSQL()
|
||||
|
||||
If PagoEnDollares <= Saldo Then
|
||||
args.IsValid = True
|
||||
Else
|
||||
args.IsValid = False
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
If ImportePagado <= Saldo Then
|
||||
args.IsValid = True
|
||||
Else
|
||||
args.IsValid = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user