--FIX verificacion de forma de pago
This commit is contained in:
@@ -2745,7 +2745,7 @@ Partial Class Ventas
|
||||
HdnCveCliente.Value = "-1"
|
||||
|
||||
'SI TIENE UN CLIENTE POR DEFECTO DEBE CARGARLO AL INICIAR
|
||||
If UsuarioActual.Empresa.Funcionalidad(714).ToEntero() > 0 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(714).ToEntero() > 0 AndAlso (Request("CveVenta") IsNot Nothing AndAlso Request("CveVenta").ToString().ToEntero() <= 0) Then
|
||||
ViewState("CveCliente") = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
||||
HdnCveCliente.Value = UsuarioActual.Empresa.Funcionalidad(714)
|
||||
RBLPago.SelectedValue = "2"
|
||||
@@ -6892,7 +6892,7 @@ Partial Class Ventas
|
||||
LnkAgregarCliente.Visible = False
|
||||
|
||||
'SI EL CLIENTE ES DIFERENTE DEL PREDETERMINADO Y PERMITE CREDITO, REGRESAR EL METODO DE PAGO A CREDITO
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(714).ToEntero() > 0 AndAlso CveCliente <> UsuarioActual.Empresa.Funcionalidad(714).ToEntero() AndAlso RBLPago.SelectedValue = "2" AndAlso Me.PermiteCredito AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then
|
||||
If (CveVenta <= 0 AndAlso Not EsCreaApartirDe) AndAlso UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(714).ToEntero() > 0 AndAlso CveCliente <> UsuarioActual.Empresa.Funcionalidad(714).ToEntero() AndAlso RBLPago.SelectedValue = "2" AndAlso Me.PermiteCredito AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then
|
||||
RBLPago.SelectedValue = "1"
|
||||
End If
|
||||
|
||||
@@ -7385,18 +7385,7 @@ Partial Class Ventas
|
||||
If (CveVenta <= 0 AndAlso CveCotizacion <= 0) Or EsCreaApartirDe Or NuevaFactura = 1 OrElse ModalidadEdicion Then
|
||||
'CveMetodoPagoCliente = ObjCliente.CveMetodoPago
|
||||
If UsuarioActual.Empresa.Funcionalidad(589) = "1" Then
|
||||
'SI EL METODO DE PAGO ES PUE, SELECCIONA CONTADO
|
||||
If Me.CveMetodoPago33Cliente = 1 Then
|
||||
RBLPago.SelectedValue = "2"
|
||||
ElseIf Me.CveMetodoPago33Cliente = 3 Then
|
||||
RBLPago.SelectedValue = "1"
|
||||
'SI ESTA BLOQUEADO EL CREDITO, DEJAR CONTADO
|
||||
If Not RBLPago.Items(0).Enabled Then
|
||||
RBLPago.SelectedValue = "2"
|
||||
End If
|
||||
End If
|
||||
RBLPago_SelectedIndexChanged(RBLPago, Nothing)
|
||||
UPCondicionesPago.Update()
|
||||
VerificaFormaPago()
|
||||
Else
|
||||
DdlMetodoPago33.SelectedValueExist(Me.CveMetodoPago33Cliente)
|
||||
CambiaMetodoPago33()
|
||||
@@ -7471,6 +7460,29 @@ Partial Class Ventas
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Private Sub VerificaFormaPago()
|
||||
If UsuarioActual.Empresa.Funcionalidad(589) = "1" Then
|
||||
'SI EL METODO DEL CLIENTE ES PUE, PERMITE CREDITO Y LO TIENE HABILITADO, EL METODO SE CAMBIARA A PPD
|
||||
If Me.CveMetodoPago33Cliente = 1 AndAlso Me.PermiteCredito AndAlso RBLPago.Items(0).Enabled AndAlso TieneBloqueoPorCreditoVencimiento = 0 Then
|
||||
Me.CveMetodoPago33Cliente = 3
|
||||
End If
|
||||
|
||||
'SI EL METODO DE PAGO ES PUE, SELECCIONA CONTADO
|
||||
If Me.CveMetodoPago33Cliente = 1 Then
|
||||
RBLPago.SelectedValue = "2"
|
||||
ElseIf Me.CveMetodoPago33Cliente = 3 Then
|
||||
RBLPago.SelectedValue = "1"
|
||||
'SI ESTA BLOQUEADO EL CREDITO, DEJAR CONTADO
|
||||
If Not RBLPago.Items(0).Enabled Then
|
||||
RBLPago.SelectedValue = "2"
|
||||
End If
|
||||
End If
|
||||
|
||||
RBLPago_SelectedIndexChanged(RBLPago, Nothing)
|
||||
UPCondicionesPago.Update()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub HabilitarRemisionesPublicoGeneral()
|
||||
If UsuarioActual.Empresa.Funcionalidad(381).Trim() <> "" Then
|
||||
'SI ESTA BLOQUEADO POR AUTORIZACION, HABILITAR LA OPCION DE REMISION PARA PUBLICO EN GENERAL
|
||||
@@ -7769,20 +7781,10 @@ Partial Class Ventas
|
||||
If Not EsFilial AndAlso (((DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta <= 0) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveVenta > 0)) AndAlso RBLPago.SelectedValue = "1" AndAlso PermiteCredito) Then
|
||||
'FUNCIONALIDAD 702 - NO VERIFICAR LIMITE DE CRÉDITO Y CANDADOS DE VENTA
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(702) = "1" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(589) = "1" Then
|
||||
'SI EL METODO DE PAGO ES PUE, SELECCIONA CONTADO
|
||||
If Me.CveMetodoPago33Cliente = 1 Then
|
||||
RBLPago.SelectedValue = "2"
|
||||
ElseIf Me.CveMetodoPago33Cliente = 3 Then
|
||||
RBLPago.SelectedValue = "1"
|
||||
End If
|
||||
RBLPago_SelectedIndexChanged(RBLPago, Nothing)
|
||||
UPCondicionesPago.Update()
|
||||
Else
|
||||
RBLPago.SelectedValue = "1"
|
||||
RBLPago_SelectedIndexChanged(RBLPago, Nothing)
|
||||
UPCondicionesPago.Update()
|
||||
End If
|
||||
|
||||
RBLPago.SelectedValue = "1"
|
||||
RBLPago_SelectedIndexChanged(RBLPago, Nothing)
|
||||
UPCondicionesPago.Update()
|
||||
|
||||
Dim CreditoDispo As Decimal = GetSaldoCreditoDisponible(CveCliente, DdlSucursalCliente.SelectedValue.ToEntero())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user