--Correciones en validaciones de publico general
This commit is contained in:
@@ -2326,6 +2326,15 @@ Partial Class Ventas
|
||||
ViewState("HabilitaRemisionPublicoGeneral") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property TieneBloqueoPorAutorizacion As Integer
|
||||
Get
|
||||
Return IfNull(ViewState("TieneBloqueoPorAutorizacion"), "0", ViewState("TieneBloqueoPorAutorizacion")).ToString().ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TieneBloqueoPorAutorizacion") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
'#Region "AuxiliarConta"
|
||||
@@ -6977,6 +6986,11 @@ Partial Class Ventas
|
||||
HabilitaRemisionPublicoGeneral = 1
|
||||
End If
|
||||
|
||||
'SI TUVO HABILITADO EL BLOQUEO POR AUTORIZACION PERO DESPUES SE CAMBIO MANUAL A REMISION
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Rem") AndAlso TieneBloqueoPorAutorizacion = 1 Then
|
||||
HabilitaRemisionPublicoGeneral = 1
|
||||
End If
|
||||
|
||||
'SI TIENE LA HABILITACION DE REMISION ACTIVA Y LA SUCURSAL NO LO PERMITE
|
||||
If Not DeshabilitarAutorizacion AndAlso HabilitaRemisionPublicoGeneral = 1 Then
|
||||
HabilitaRemisionPublicoGeneral = 0
|
||||
@@ -6997,7 +7011,7 @@ Partial Class Ventas
|
||||
Private Function ValidaImportePublicoGeneral() As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Rem" AndAlso HabilitaRemisionPublicoGeneral = 1 Then
|
||||
If DdlTipoComprobante.SelectedValue = "Rem" AndAlso HabilitaRemisionPublicoGeneral = 1 AndAlso UsuarioActual.Empresa.Funcionalidad(381).Trim() = CveCliente.ToString() Then
|
||||
Dim Total As Decimal = TxtTotal.Text.ToDecimal()
|
||||
|
||||
If DdlMoneda.SelectedValue = "1" Then
|
||||
@@ -7209,6 +7223,8 @@ Partial Class Ventas
|
||||
Else
|
||||
DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización")
|
||||
DdlTipoComprobante.SelectedValue = "PA"
|
||||
|
||||
TieneBloqueoPorAutorizacion = 1
|
||||
End If
|
||||
|
||||
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
|
||||
@@ -7271,6 +7287,8 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) <> "1" Then
|
||||
DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización")
|
||||
DdlTipoComprobante.SelectedValue = "PA"
|
||||
|
||||
TieneBloqueoPorAutorizacion = 1
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -7398,6 +7416,8 @@ Partial Class Ventas
|
||||
UPCondicionesPago.Update()
|
||||
DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización")
|
||||
DdlTipoComprobante.SelectedValue = "PA"
|
||||
TieneBloqueoPorAutorizacion = 1
|
||||
|
||||
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
|
||||
'si llegó por la opción de cotización no debe de restringuir
|
||||
If IfNull(Request("Op"), "").ToString() = "Cot" OrElse (DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0) Then DdlTipoComprobante.SelectedValue = "Cot"
|
||||
@@ -7550,7 +7570,7 @@ Partial Class Ventas
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Pd2"))
|
||||
End If
|
||||
End If
|
||||
HabilitaRemisionPublicoGeneral = 0
|
||||
|
||||
HabilitarRemisionesPublicoGeneral()
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user