VYA Viajes
This commit is contained in:
@@ -9478,6 +9478,10 @@ Partial Class Compras_Compras
|
||||
|
||||
Private Function validaFechaNumeroReembolso() As Boolean
|
||||
|
||||
If UsuarioActual.CveEmpresa <> 119 Then
|
||||
Return True
|
||||
End If
|
||||
|
||||
Dim respuesta As Boolean = True
|
||||
Dim CvePersonalVal As Integer = -1
|
||||
Dim CveCajaChicaVal As Integer = -1
|
||||
@@ -9521,9 +9525,9 @@ Partial Class Compras_Compras
|
||||
respuesta = False 'La fecha de la compra esta por fuera de lo permitido mes actual o mes anterior
|
||||
|
||||
If FechaCompra.Month > MesReembolsoInt Then
|
||||
Alert($"La fecha de la compra que se quiere registrar esta adelantada al mes de la comprobación (Fecha comprobación {FechaReembolso.ToString("dd/MM/yyyy")}).", TipoMensaje.MsgAdvertencia)
|
||||
Alert($"La fecha de la compra que se quiere registrar esta adelantada al mes de la comprobación (Reembolso {TxtRembolsoNumero.Text} ,Fecha comprobación {FechaReembolso.ToString("dd/MM/yyyy")}).", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Alert($"La fecha de la compra que se quiere registrar es anterior al mes permitido por la comprobación (Fecha comprobación {FechaReembolso.ToString("dd/MM/yyyy")}).", TipoMensaje.MsgAdvertencia)
|
||||
Alert($"La fecha de la compra que se quiere registrar es anterior al mes permitido por la comprobación (Reembolso {TxtRembolsoNumero.Text}, Fecha comprobación {FechaReembolso.ToString("dd/MM/yyyy")}).", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -1551,6 +1551,16 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'Boleto
|
||||
If UrlParametros("OP").ToString = "BOLETO" Then
|
||||
'CveViajePasajero
|
||||
Dim CVEVIAJEPASAJERO As Integer = UrlParametros("CVEVIAJEPASAJERO").ToString.ToEntero
|
||||
If CVEVIAJEPASAJERO > 0 Then
|
||||
ImprimeBoletoViale(CVEVIAJEPASAJERO)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function Parametros(Cadena As String) As Hashtable
|
||||
@@ -6502,6 +6512,48 @@ Partial Class PopUpVerFactura
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "IMPRESION BOLETOS "
|
||||
|
||||
Public Sub ImprimeBoletoViale(CveViajePasajero As Integer)
|
||||
|
||||
If Not CveViajePasajero > 0 Then Exit Sub
|
||||
|
||||
Dim ObjTransportes As New ClsTransportes
|
||||
Dim DtViajePAsajero As New DataTable
|
||||
If ObjTransportes.GetViajesPasajeros(-1, CveViajePasajero) Then
|
||||
DtViajePAsajero = ObjTransportes.DtResultados
|
||||
End If
|
||||
ObjTransportes.Dispose()
|
||||
|
||||
If DtViajePAsajero Is Nothing Or (DtViajePAsajero IsNot Nothing AndAlso DtViajePAsajero.Rows.Count = 0) Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
Dim Fecha As Date = DtViajePAsajero.Rows(0)("FechaIng").ToString.ToDate
|
||||
Dim Importe As Decimal = DtViajePAsajero.Rows(0)("Importe").ToString.ToDecimal
|
||||
|
||||
Dim params As New List(Of ReportParameter) From {
|
||||
New ReportParameter("Ruta", DtViajePAsajero.Rows(0)("SubProyecto").ToString),
|
||||
New ReportParameter("Origen", DtViajePAsajero.Rows(0)("Partida").ToString),
|
||||
New ReportParameter("Destino", DtViajePAsajero.Rows(0)("Destino").ToString),
|
||||
New ReportParameter("FechaSalida", Fecha.ToShortDateString()),
|
||||
New ReportParameter("HoraSalida", Fecha.ToString("HH:mm")),
|
||||
New ReportParameter("Nombre", DtViajePAsajero.Rows(0)("Nombre").ToString),
|
||||
New ReportParameter("Visa", DtViajePAsajero.Rows(0)("Visa").ToString),
|
||||
New ReportParameter("Celular", DtViajePAsajero.Rows(0)("Celular").ToString),
|
||||
New ReportParameter("Importe", Math.Round(Importe, 2).ToString),
|
||||
New ReportParameter("TipoBoleto", "Tipo Boleto"),
|
||||
New ReportParameter("Agencia", "Agencia"),
|
||||
New ReportParameter("TelefonoAgencia", "TelefonoAgencia"),
|
||||
New ReportParameter("Asiento", DtViajePAsajero.Rows(0)("Asiento").ToString)
|
||||
}
|
||||
|
||||
ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos\Boleto.mrt", New DataTable, params, NombreArchivo:="Boleto")
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Private Function GeneraCodigoQR(CodigoBarras As String, Alto As Integer, Largo As Integer, Margen As Integer, Formato As String, Optional PureBacode As Boolean = False) As Byte()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user