--generacion de PA desde cotizacion
This commit is contained in:
@@ -8119,6 +8119,8 @@ Partial Class Ventas
|
|||||||
If CreditoDispo < 0 Then
|
If CreditoDispo < 0 Then
|
||||||
BtnsFacturar.Visible = False
|
BtnsFacturar.Visible = False
|
||||||
BtnGenerarRemision.Visible = False
|
BtnGenerarRemision.Visible = False
|
||||||
|
|
||||||
|
TieneBloqueoPorCreditoVencimiento = 1
|
||||||
Alert("El límite de crédito se ha excedido", TipoMensaje.MsgAdvertencia)
|
Alert("El límite de crédito se ha excedido", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -8133,12 +8135,10 @@ Partial Class Ventas
|
|||||||
BtnGenerarRemision.Visible = False
|
BtnGenerarRemision.Visible = False
|
||||||
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ClienteEsDistribuidor AndAlso Opcion.Contiene(2, 3) Then
|
|
||||||
TieneBloqueoPorCreditoVencimiento = 1
|
TieneBloqueoPorCreditoVencimiento = 1
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
Case "2" 'Autorizacion desde una solicitud del catalogo de autorizaciones
|
Case "2" 'Autorizacion desde una solicitud del catalogo de autorizaciones
|
||||||
|
|
||||||
Dim Vta As New ClsVentas
|
Dim Vta As New ClsVentas
|
||||||
@@ -8439,6 +8439,12 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'SI ES COTIZACION, PERMITIR CREAR UN DOCUMENTO NUEVO TIPO "PA"
|
||||||
|
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(595) = "1" AndAlso TieneBloqueoPorCreditoVencimiento = 1 Then
|
||||||
|
BtnGeneraAutorizacion.Visible = True
|
||||||
|
UpFacturar.Update()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -22102,6 +22108,20 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'SI ES FACTURACION DE COTIZACION Y REQUIERE AUTORIZACION, SOLO DEBE PERMITIR ESTA
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(595) = "1" AndAlso Request("CveCotizacion") IsNot Nothing AndAlso Request("CveCotizacion").ToString().ToEntero() > 0 AndAlso TieneBloqueoPorAutorizacion = 1 Then
|
||||||
|
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing"))
|
||||||
|
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Egs"))
|
||||||
|
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Cot"))
|
||||||
|
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Dev"))
|
||||||
|
|
||||||
|
DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización")
|
||||||
|
DdlTipoComprobante.SelectedValue = "PA"
|
||||||
|
|
||||||
|
BtnCrearApartirDe.Visible = False
|
||||||
|
UpFacturar.Update()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
'[IPP]: FALTA CONFIGURAR Y DAR PERMISO A TODOS LOS QUE TENGAN ACCESO A VENTAS
|
'[IPP]: FALTA CONFIGURAR Y DAR PERMISO A TODOS LOS QUE TENGAN ACCESO A VENTAS
|
||||||
''Puede remisionar
|
''Puede remisionar
|
||||||
@@ -35984,7 +36004,7 @@ Partial Class Ventas
|
|||||||
#Region "GENERAR AUTORIZACIÓN"
|
#Region "GENERAR AUTORIZACIÓN"
|
||||||
|
|
||||||
Protected Sub BtnGeneraAutorizacion_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnGeneraAutorizacion_Click(sender As Object, e As EventArgs)
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Ped") Then
|
If DdlTipoComprobante.SelectedValue.Contiene("Ped", "Cot") Then
|
||||||
EmitirDocumentoNuevo("PA")
|
EmitirDocumentoNuevo("PA")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
Reference in New Issue
Block a user