mirror of
https://github.com/KeymonSoft/Guna_Carta_Porte.git
synced 2026-04-21 21:29:16 +00:00
- Se agregaron la ruta y el almacen para la descarga de la carta porte
This commit is contained in:
@@ -36,6 +36,9 @@ Sub Class_Globals
|
||||
Dim usuario, almacen, rutapreventa As String = ""
|
||||
Private b_verCartaPorte As Button
|
||||
Private p_botones As Panel
|
||||
Private et_ruta As EditText
|
||||
Private l_ruta1 As Label
|
||||
Private l_almacen As Label
|
||||
End Sub
|
||||
|
||||
'You can add more parameters here.
|
||||
@@ -62,6 +65,10 @@ Sub B4XPage_Appear
|
||||
b_verCartaPorte.Enabled = True
|
||||
End If
|
||||
End If
|
||||
b_descargaCartaPorte.Enabled = False
|
||||
et_ruta.Text = "131"
|
||||
l_almacen.Text= Subs.traeAlmacen
|
||||
et_ruta.RequestFocus
|
||||
End Sub
|
||||
|
||||
Sub B4XPage_CloseRequest As ResumableSub
|
||||
@@ -123,8 +130,13 @@ Sub descargaCartaPorte
|
||||
cartaPorteLista = False
|
||||
'Generamos el nombre del PDF de la carta porte
|
||||
DateTime.DateFormat = "ddMMyyyy"
|
||||
|
||||
Private rutaX As String = et_ruta.text 'rutaPreventa
|
||||
Private almacenX As String = Subs.traeAlmacen
|
||||
'#################################
|
||||
Private almacenX As String = "2" 'almacen
|
||||
Private rutaX As String = "131" 'rutapreventa
|
||||
'#################################
|
||||
|
||||
Private cartaPortePDF As String = $"CPORTE${almacenX}_${rutaX}.pdf"$
|
||||
' cartaPortePDF = "CPORTE2_100_Prueba.pdf" 'Para pruebas
|
||||
' Log(cartaPortePDF)
|
||||
@@ -207,11 +219,11 @@ Sub descargaCartaPorteyProgreso (urlx As String) As ResumableSub
|
||||
Log("Carta porte lista")
|
||||
ToastMessageShow("Carta Porte descargada exitosamente!!", False)
|
||||
b_verCartaPorte.Enabled = True
|
||||
|
||||
|
||||
|
||||
|
||||
' AQUI VA EL CODIGO DE CARTA PORTE DSCARGADA
|
||||
|
||||
|
||||
|
||||
|
||||
Subs.panelOculto(p_downloadPDF)
|
||||
' p_progress1.Visible = False
|
||||
Else
|
||||
@@ -329,4 +341,12 @@ Private Sub b_verCartaPorte_Click
|
||||
Dim cfg As Configurator = PDFView1.fromUri(File.DirInternal,"/cartaPorte.pdf")
|
||||
cfg.SetEventname("PDFium")
|
||||
cfg.pageFitPolicy("BOTH").autoSpacing(True).enableSwipe(True).pageSnap(True).swipeHorizontal(False).addOnErrorListener.addOnLoadCompleteListener.addOnPageChangeListener.addOnPageErrorListener.load
|
||||
End Sub
|
||||
|
||||
Private Sub et_ruta_TextChanged (Old As String, New As String)
|
||||
If New <> "" Then
|
||||
b_descargaCartaPorte.Enabled = True
|
||||
Else
|
||||
b_descargaCartaPorte.Enabled = False
|
||||
End If
|
||||
End Sub
|
||||
Reference in New Issue
Block a user