Autorizaciones, SI EL LIMITE ES 0, PERMITE AUTORIZAR
This commit is contained in:
@@ -196,19 +196,22 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
|
||||
Protected Sub LnkAutorizar_Click(sender As Object, e As EventArgs)
|
||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
|
||||
Dim TipoAutorizacion = gvRow.DataKey("TipoAutorizacion").ToEntero()
|
||||
Dim CveAutorizacion = gvRow.DataKey("CveAutorizacion").ToEntero()
|
||||
Dim CveCliente = gvRow.DataKey("CveCliente").ToEntero()
|
||||
Dim TipoAutorizacion = gvRow.DataKey("TipoAutorizacion").ToEntero()
|
||||
Dim CveVendedor = gvRow.DataKey("CveVendedor").ToEntero()
|
||||
Dim CveEstatusAutorizacion As Integer = 1
|
||||
|
||||
Dim Importe = gvRow.DataKey("Importe").ToDecimal().RoundSQL(2)
|
||||
Dim CveCliente = gvRow.DataKey("CveCliente").ToEntero()
|
||||
Dim CveVendedor = gvRow.DataKey("CveVendedor").ToEntero()
|
||||
'AUTORIZACION DE IMPORTE,
|
||||
'el cliente limite de 500, y saldo de 501. autorización que puede autorizar no puede ser mayor a 49 ( limite * 1.% - Saldo)
|
||||
If TipoAutorizacion = 1 Then
|
||||
|
||||
Dim SaldoCliente = gvRow.DataKey("Saldo").ToDecimal()
|
||||
Dim LimiteCredito = gvRow.DataKey("LimiteCredito").ToDecimal()
|
||||
'SI EL LIMITE ES 0, PERMITE AUTORIZAR
|
||||
If LimiteCredito > 0 Then
|
||||
Dim Importe = gvRow.DataKey("Importe").ToDecimal().RoundSQL(2)
|
||||
'AUTORIZACION DE IMPORTE,
|
||||
'el cliente limite de 500, y saldo de 501. autorización que puede autorizar no puede ser mayor a 49 ( limite * 1.% - Saldo)
|
||||
If TipoAutorizacion = 1 Then
|
||||
|
||||
Dim SaldoCliente = gvRow.DataKey("Saldo").ToDecimal()
|
||||
Dim PorcentajeMaximoAutorizar As Decimal = 0.1
|
||||
|
||||
If UsuarioActual.PorcentajeMaximoAutorizacion > 0 Then
|
||||
|
||||
Reference in New Issue
Block a user