agregado procesos y bd clases

This commit is contained in:
2026-04-28 11:52:16 +02:00
parent 59a774c397
commit cd2e8b8530
251 changed files with 56881 additions and 49 deletions

View File

@@ -0,0 +1,145 @@
Imports bdGestionAsegasa.gestionasegasaEntities
Imports tsl5.Extensiones
Imports tsl5.Extensiones.StringExtensions
Partial Public Class vf_recibosextendidos_lc
Private Shared TiposPago As List(Of enumeraciones)
Public ReadOnly Property LiquidoCia As Double
Get
Return Math.Round(Me.TotalRecibo.Value - Me.TotalComision.Value, 2, MidpointRounding.AwayFromZero)
End Get
End Property
Public ReadOnly Property Situacion_Web As String
Get
Return ObtieneSituacionWeb(Me.idSituacion, Me.idTipoPago)
End Get
End Property
Public ReadOnly Property CiaNumeroPoliza As String
Get
Return Me.Compania & "/" & Me.NumeroPoliza
End Get
End Property
Public ReadOnly Property TipoPago As String
Get
If Me.idTipoPago.HasValue Then
If TiposPago Is Nothing Then
Dim bdtmp = bdGestionAsegasa.gestionasegasaEntities.NuevoContextoCN
TiposPago = bdtmp.enumeraciones.Where(Function(x) x.gruposenumeraciones.Grupo = "TIPP").ToList
End If
Dim tp = TiposPago.FirstOrDefault(Function(x) x.idEnumeracion = Me.idTipoPago)
If tp Is Nothing Then
Return "* DESCONOCIDO *"
Else
Return tp.Descripcion
End If
Else
Return "* NO ASIGNADO *"
End If
End Get
End Property
Public ReadOnly Property IBANCorrecto As Boolean
Get
Return tsl5.Bancos.Genericas.IBANCorrecto(Me.IBAN.NothingAVacio)
End Get
End Property
Public ReadOnly Property idSubAgente_Especial As Integer?
Get
If Me.idSubagente.HasValue AndAlso Me.CodigoAgente = "000047002186" Then
Dim bd As gestionasegasaEntities = Me.ObtieneContexto
Dim Codigo = Me.CodigoSubAgente.Substring(0, 2) & "00"
Dim subage = bd.subagentes.FirstOrDefault(Function(x) x.idAgente = Me.idAgente And x.Codigo = Codigo)
If subage IsNot Nothing Then
Return subage.idSubagente
Else
Return idSubagente
End If
Else
Return idSubagente
End If
End Get
End Property
Public ReadOnly Property NumeroPolizaSuplementoLargo As String
Get
If Me.NumeroSuplemento = 0 Then
Return Me.NumeroPoliza
Else
Return Me.NumeroPoliza & " (" & Me.NumeroSuplemento.ToString & ")"
End If
End Get
End Property
Public ReadOnly Property NumeroPolizaSuplemento As String
Get
If Me.NumeroSuplemento = 0 Then
Return Me.NumeroPoliza
Else
Return Me.NumeroPoliza & "#" & Me.NumeroSuplemento.ToString
End If
End Get
End Property
Public ReadOnly Property FechaInicioLiquidacionCia As Date?
Get
If Utilidades.idTippBA.HasValue = False Then
Dim bd = DirectCast(Me.ObtieneContexto, gestionasegasaEntities)
Utilidades.idTippBA = bd.enumeraciones.First(Function(x) x.Codigo = "TIPP.PE").idEnumeracion
Utilidades.idtrEx = bd.enumeraciones.First(Function(x) x.Codigo = "TRC.EX").idEnumeracion
Utilidades.idtrCx = bd.enumeraciones.First(Function(x) x.Codigo = "TRC.CX").idEnumeracion
End If
Select Case Me.idTipo
Case Utilidades.idtrEx, Utilidades.idtrCx
Return Today
Case Else
If Me.idTipoPago = Utilidades.idTippBA Then
Return Today
Else
Dim fechacalculo As Date? = Nothing
If Me.idRemesa.HasValue Then
fechacalculo = Me.FechaRemesa.Value.AddDays(Me.PlazoRetornoComision.Value)
Else
If Me.FechaRecepcionCia.HasValue Then
fechacalculo = Me.FechaRecepcionCia.Value.AddDays(Me.PlazoRetornoComision.Value)
End If
End If
If fechacalculo.HasValue Then
If fechacalculo > Today Then
Return fechacalculo
Else
Return Today
End If
Else
Return Nothing
End If
End If
End Select
End Get
End Property
Public ReadOnly Property MotivoBajaCia As String
Get
If Me.idCausaBaja.HasValue Then
Dim bd As bdGestionAsegasa.gestionasegasaEntities = Me.ObtieneContexto
Return bd.enumeraciones.First(Function(x) x.idEnumeracion = Me.idCausaBaja).ValorAlfabetico2
Else
Return ""
End If
End Get
End Property
Public ReadOnly Property CodigoDevolucionBanco As String
Get
If Me.idCausaDevolucion.HasValue Then
Dim bd As bdGestionAsegasa.gestionasegasaEntities = Me.ObtieneContexto
Return bd.enumeraciones.First(Function(x) x.idEnumeracion = Me.idCausaDevolucion).Codigo.Split(".")(1)
Else
Return ""
End If
End Get
End Property
End Class