mirror of
https://github.com/KeymonSoft/Profina-Reparto_V2.git
synced 2026-04-17 21:06:10 +00:00
VERSION 5.09.28
- Se agrego codigo para importar BD desde whatsapp
This commit is contained in:
@@ -4,20 +4,27 @@ ModulesStructureVersion=1
|
||||
Type=Class
|
||||
Version=9.85
|
||||
@EndOfDesignText@
|
||||
'#Region Shared Files
|
||||
''#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
|
||||
' 'Ctrl + click to sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
|
||||
' '###########################################################################################################
|
||||
' '###################### PULL #############################################################
|
||||
' 'Ctrl + click ide://run?file=%WINDIR%\System32\cmd.exe&Args=/c&Args=git&Args=pull
|
||||
' '###########################################################################################################
|
||||
' '###################### PUSH #############################################################
|
||||
' 'Ctrl + click ide://run?file=%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe&Args=github&Args=..\..\
|
||||
' '###########################################################################################################
|
||||
' '###################### PUSH TORTOISE GIT #########################################################
|
||||
' 'Ctrl + click ide://run?file=%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe&Args=TortoiseGitProc&Args=/command:commit&Args=/path:"./../../"&Args=/closeonend:2
|
||||
' '###########################################################################################################
|
||||
'#End Region
|
||||
#Region Shared Files
|
||||
'#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
|
||||
'Ctrl + click to sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
|
||||
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
|
||||
'###########################################################################################################
|
||||
'###################### PULL #############################################################
|
||||
'Ctrl + click ide://run?file=%WINDIR%\System32\cmd.exe&Args=/c&Args=git&Args=pull
|
||||
'###########################################################################################################
|
||||
'###################### PULL FORZADO #############################################################
|
||||
'Ctrl + click Respaldar y Pull: ide://run?file=%WINDIR%\System32\cmd.exe&Args=/c&Args=start&Args=powershell.exe&Args=-ExecutionPolicy&Args=Bypass&Args=-File&Args=..\..\_sync_project.ps1
|
||||
'###########################################################################################################
|
||||
'###################### PUSH #############################################################
|
||||
'Ctrl + click ide://run?file=%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe&Args=github&Args=..\..\
|
||||
'###########################################################################################################
|
||||
'###################### PUSH TORTOISE GIT #########################################################
|
||||
'Ctrl + click ide://run?file=%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe&Args=TortoiseGitProc&Args=/command:commit&Args=/path:"./../../"&Args=/closeonend:2
|
||||
'###########################################################################################################
|
||||
'###################### PUSH TORTOISE GIT CON TAG ##################################################
|
||||
'Ctrl + clic para Git: ide://run?file=%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe&Args=-ExecutionPolicy&Args=Bypass&Args=-File&Args=..\_git_tag.ps1&Args=%22%PROJECT%%22&Args=%22%PROJECT_NAME%%22
|
||||
'###########################################################################################################
|
||||
#End Region
|
||||
'
|
||||
''Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
|
||||
'
|
||||
@@ -225,7 +232,7 @@ Version=9.85
|
||||
' Starter.skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS wayPoints (codigo TEXT, indice INT)")
|
||||
' Dim server As String = "http://keymon.net:1782"
|
||||
'' Dim server As String = "http://192.168.100.10:1781"
|
||||
'' Dim server As String = "http://keymon.lat:9000"
|
||||
'' Dim server As String = "http://keymon.net:9000"
|
||||
'' server = "http://10.0.0.205:1782"
|
||||
'' Dim server As String = "http://192.168.100.10:1781"
|
||||
'' server = "http://11.0.0.44:1782"
|
||||
@@ -1173,16 +1180,23 @@ Version=9.85
|
||||
#Region Shared Files
|
||||
'#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
|
||||
'Ctrl + click to sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
|
||||
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
|
||||
'###########################################################################################################
|
||||
'###################### PULL #############################################################
|
||||
'Ctrl + click ide://run?file=%WINDIR%\System32\cmd.exe&Args=/c&Args=git&Args=pull
|
||||
'###########################################################################################################
|
||||
'###################### PULL FORZADO #############################################################
|
||||
'Ctrl + click Respaldar y Pull: ide://run?file=%WINDIR%\System32\cmd.exe&Args=/c&Args=start&Args=powershell.exe&Args=-ExecutionPolicy&Args=Bypass&Args=-File&Args=..\..\_sync_project.ps1
|
||||
'###########################################################################################################
|
||||
'###################### PUSH #############################################################
|
||||
'Ctrl + click ide://run?file=%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe&Args=github&Args=..\..\
|
||||
'###########################################################################################################
|
||||
'###################### PUSH TORTOISE GIT #########################################################
|
||||
'Ctrl + click ide://run?file=%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe&Args=TortoiseGitProc&Args=/command:commit&Args=/path:"./../../"&Args=/closeonend:2
|
||||
'###########################################################################################################
|
||||
'###################### PUSH TORTOISE GIT CON TAG ##################################################
|
||||
'Ctrl + clic para Git: ide://run?file=%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe&Args=-ExecutionPolicy&Args=Bypass&Args=-File&Args=..\_git_tag.ps1&Args=%22%PROJECT%%22&Args=%22%PROJECT_NAME%%22
|
||||
'###########################################################################################################
|
||||
#End Region
|
||||
|
||||
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
|
||||
@@ -1275,7 +1289,7 @@ Sub Class_Globals
|
||||
Private b_abono As Button
|
||||
Private cb_importarBDWA As CheckBox
|
||||
Private p_importarBDWA As Panel
|
||||
|
||||
Private importador As C_ImportaBD
|
||||
Dim intentUsado As Boolean = False
|
||||
End Sub
|
||||
|
||||
@@ -1403,7 +1417,7 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
Starter.skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS wayPoints (codigo TEXT, indice INT)")
|
||||
Dim server As String = "http://keymon.net:1781"
|
||||
' Dim server As String = "http://192.168.100.10:1781"
|
||||
' Dim server As String = "http://keymon.lat:9000"
|
||||
' Dim server As String = "http://keymon.net:9000"
|
||||
' server = "http://10.0.0.205:1782"
|
||||
' Dim server As String = "http://192.168.100.10:1781"
|
||||
' server = "http://11.0.0.44:1782"
|
||||
@@ -1413,7 +1427,7 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
' Dim P As PhoneId
|
||||
Log("provider")
|
||||
Provider.Initialize
|
||||
|
||||
importador.Initialize
|
||||
Subs.guardaAppInfo
|
||||
|
||||
' Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_READ_PHONE_STATE)
|
||||
@@ -1466,6 +1480,19 @@ Sub B4XPage_Appear
|
||||
' If Result Then
|
||||
' Log("Con permisos de escritura externa")
|
||||
' End If
|
||||
|
||||
Dim in As Intent = B4XPages.GetNativeParent(Me).GetStartingIntent
|
||||
If importador.ProcesarIntent(in) Then
|
||||
' Si entra aquí, la BD ya se copió exitosamente a File.DirInternal con el nombre "kmt.db"
|
||||
ToastMessageShow("BD importada correctamente", False)
|
||||
' (Opcional) Identificar si el origen fue WhatsApp:
|
||||
If importador.EsDeWhatsapp(in) Then
|
||||
B4XPages.SetTitle(Me, "BD cargada desde Whatsapp")
|
||||
End If
|
||||
' --> AQUI DEBES REINICIALIZAR TU CONEXION SQL <--
|
||||
Starter.skmt.Initialize(File.DirInternal, "kmt.db", True)
|
||||
user.Text = Subs.traeUsuario
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
||||
@@ -1746,7 +1773,7 @@ Private Sub i_engrane_Click
|
||||
Subs.centraBoton(b_regesar, Root.Width)
|
||||
Subs.centraBoton(b_server, p_serverList.Width)
|
||||
lv_server.Clear
|
||||
lv_server.AddSingleLine("http://keymon.lat:1781")
|
||||
lv_server.AddSingleLine("http://keymon.net:1781")
|
||||
|
||||
If user.Text = "KMTS1" Then lv_server.AddSingleLine("http://10.0.0.205:1781")
|
||||
' l_server.Text = Starter.server
|
||||
|
||||
@@ -723,8 +723,8 @@ Sub caculaRutaGPS(coords As List, agregarActual As Boolean)
|
||||
ProgressDialogShow2("Calculando distancia y tiempo, un momento por favor.", False)
|
||||
Dim j As HttpJob
|
||||
j.Initialize("trip", Me) 'Calculamos el resto de la ruta.
|
||||
j.Download($"http://keymon.lat:9002/ruteador?m=OSRM&r=${Subs.traeRutaReparto}&a=${Subs.traeAlmacen}&c=${coordsStr}"$) '&f=CEDIS,${Starter.cedisLocation.Longitude},${Starter.cedisLocation.Latitude}
|
||||
Log($"http://keymon.lat:9002/ruteador?m=OSRM&r=${Subs.traeRutaReparto}&a=${Subs.traeAlmacen}&c=${coordsStr}"$) '&f=CEDIS,${Starter.cedisLocation.Longitude},${Starter.cedisLocation.Latitude}
|
||||
j.Download($"http://keymon.net:9002/ruteador?m=OSRM&r=${Subs.traeRutaReparto}&a=${Subs.traeAlmacen}&c=${coordsStr}"$) '&f=CEDIS,${Starter.cedisLocation.Longitude},${Starter.cedisLocation.Latitude}
|
||||
Log($"http://keymon.net:9002/ruteador?m=OSRM&r=${Subs.traeRutaReparto}&a=${Subs.traeAlmacen}&c=${coordsStr}"$) '&f=CEDIS,${Starter.cedisLocation.Longitude},${Starter.cedisLocation.Latitude}
|
||||
Wait For (j) JobDone(j As HttpJob)
|
||||
If j.Success Then
|
||||
Dim jp As JSONParser
|
||||
|
||||
85
B4A/C_ImportaBD.bas
Normal file
85
B4A/C_ImportaBD.bas
Normal file
@@ -0,0 +1,85 @@
|
||||
B4A=true
|
||||
Group=Default Group
|
||||
ModulesStructureVersion=1
|
||||
Type=Class
|
||||
Version=12.8
|
||||
@EndOfDesignText@
|
||||
' ====================================================================================
|
||||
' CLASE: C_ImportaBD
|
||||
' DESCRIPCION: Gestor aislado para atrapar Intents (ej. compartir desde WhatsApp)
|
||||
' y poner la BD en la ruta interna de la app como "kmt.db".
|
||||
' ====================================================================================
|
||||
' INSTRUCCIONES (En cualquier B4XPage, usualmente B4XMainPage):
|
||||
'
|
||||
' 1. En Class_Globals se declara la instancia:
|
||||
' Private importador As C_ImportaBD
|
||||
'
|
||||
' 2. En B4XPage_Created se inicializa la clase:
|
||||
' importador.Initialize
|
||||
'
|
||||
' 3. En B4XPage_Appear se captura el Intent padre y se procesa:
|
||||
' Dim in As Intent = B4XPages.GetNativeParent(Me).GetStartingIntent
|
||||
'
|
||||
' If importador.ProcesarIntent(in) Then
|
||||
' ' Si entra aquí, la BD ya se copió exitosamente a File.DirInternal con el nombre "kmt.db"
|
||||
' ToastMessageShow("BD importada correctamente", False)
|
||||
'
|
||||
' ' (Opcional) Identificar si el origen fue WhatsApp:
|
||||
' If importador.EsDeWhatsapp(in) Then
|
||||
' B4XPages.SetTitle(Me, "BD cargada desde Whatsapp")
|
||||
' End If
|
||||
'
|
||||
' ' --> AQUI DEBES REINICIALIZAR TU CONEXION SQL <--
|
||||
' ' Ej: skmt.Initialize(File.DirInternal, "kmt.db", True)
|
||||
' End If
|
||||
|
||||
' 4. En el manifiesto agregar esta seccion para que se registre para abrir bases de datos
|
||||
' AddActivityText(Main,
|
||||
' <intent-filter>
|
||||
' <action android:name="android.intent.action.VIEW" />
|
||||
' <category android:name="android.intent.category.DEFAULT" />
|
||||
' <data android:pathPattern=".*\\.db" />
|
||||
' <data android:mimeType="*/*" />
|
||||
' </intent-filter>)
|
||||
' ====================================================================================
|
||||
|
||||
Sub Class_Globals
|
||||
Private intentUsado As Boolean = False
|
||||
End Sub
|
||||
|
||||
Public Sub Initialize
|
||||
intentUsado = False
|
||||
End Sub
|
||||
|
||||
' Procesa el intent. Retorna True si efectivamente copió una base de datos.
|
||||
Public Sub ProcesarIntent(in As Intent) As Boolean
|
||||
If intentUsado Or in = Null Then Return False
|
||||
If Not(in.IsInitialized) Then Return False
|
||||
|
||||
intentUsado = True ' Sellamos para que no vuelva a procesar el mismo intent
|
||||
|
||||
If in.GetData <> Null Then
|
||||
Dim XmlData As String = in.GetData
|
||||
Log("Intent recibido: " & XmlData)
|
||||
Try
|
||||
Dim OutStr As OutputStream = File.OpenOutput(File.DirInternal, "kmt.db", False)
|
||||
Dim InStr As InputStream = File.OpenInput("ContentDir", XmlData)
|
||||
File.Copy2(InStr, OutStr)
|
||||
OutStr.Close
|
||||
LogColor("BD copiada a interna.", Colors.Blue)
|
||||
Return True
|
||||
Catch
|
||||
Log("Error al copiar BD desde Intent: " & LastException)
|
||||
Return False
|
||||
End Try
|
||||
End If
|
||||
Return False
|
||||
End Sub
|
||||
|
||||
' Método auxiliar para revisar el origen
|
||||
Public Sub EsDeWhatsapp(in As Intent) As Boolean
|
||||
If in <> Null And in.IsInitialized Then
|
||||
If in.As(String).Contains("whatsapp") Then Return True
|
||||
End If
|
||||
Return False
|
||||
End Sub
|
||||
@@ -530,7 +530,7 @@ Sub B4XPage_Appear
|
||||
' Log(rescant2)
|
||||
r5r.Close
|
||||
Log(rescant2r)
|
||||
Log(rescant2r+rescantr)
|
||||
' Log(rescant2r+rescantr)
|
||||
|
||||
'''' FIN RECHAZO
|
||||
|
||||
@@ -624,7 +624,7 @@ Sub B4XPage_Appear
|
||||
pztotal = pztotal + r55.GetString("HVD_CANT")
|
||||
Next
|
||||
End If
|
||||
Log(rescant10)
|
||||
' Log(rescant10)
|
||||
r55.Close
|
||||
|
||||
' Private r5 As Cursor = Starter.skmt.ExecQuery($"select IFNULL(SUM(HVD_COSTO_TOT),0) AS HVD_COSTO_TOT, HVD_CANT from HIST_VENTAS where HVD_RECHAZO = '0' and BCAJAS = '1' AND HVD_CLIENTE IN (SELECT CAT_CL_CODIGO from kmt_info WHERE gestion = 2) "$)
|
||||
|
||||
Binary file not shown.
@@ -1,113 +1,109 @@
|
||||
Build1=Default,reparto_profina.keymon.lat,HU2_PUBLIC
|
||||
File1=2023.png
|
||||
File10=cliente.bal
|
||||
File100=ubicacionblanco.png
|
||||
File101=Ubicar_clientes.jpg
|
||||
File102=UBICARCLIENTE.png
|
||||
File103=usuario.png
|
||||
File104=vecteezy_abstract-color-polygon-background-design-abstract-geometric_22231666.jpg
|
||||
File105=vecteezy_abstract-color-polygon-background-design-abstract-geometric_22231666.png
|
||||
File106=vecteezy_abstract-color-polygon-background-design-abstract-geometric_22231666_.jpg
|
||||
File107=visitaazul.png
|
||||
File108=visitaazul1.png
|
||||
File109=visitadosblanco.png
|
||||
File11=clienteblanco.png
|
||||
File12=clientes.bal
|
||||
File13=Clientes_visitados.jpg
|
||||
File14=Clientes_VISITADOS.png
|
||||
File15=contrasena.png
|
||||
File16=datoscliente.bal
|
||||
File17=dbc.png
|
||||
File18=derecha.png
|
||||
File19=derecha1.png
|
||||
File2=alert2.png
|
||||
File20=detalle_promo.bal
|
||||
File21=detalleVenta.bal
|
||||
File22=DULCE.png
|
||||
File23=durakelo1.png
|
||||
File24=engrane.jpg
|
||||
File25=engrane1.png
|
||||
File26=folioabono.bal
|
||||
File27=fondo_kmt.jpg
|
||||
File28=foto.bal
|
||||
File29=frintal.png
|
||||
File3=alerta.jpg
|
||||
File30=frontal1.gif
|
||||
File31=frontal1.png
|
||||
File32=guardagestion.bal
|
||||
File33=guna_viejo.png
|
||||
File34=guna_viejo2.png
|
||||
File35=historico.bal
|
||||
File36=images.png
|
||||
File37=infonavit1.jpg
|
||||
File38=intmex_logo_192x192.jpg
|
||||
File39=intmex_logo_192x192.png
|
||||
File4=atras.png
|
||||
File40=inventarios.jpg
|
||||
File41=INVENTARIOS.png
|
||||
File42=itembuttonblue.png
|
||||
File43=izquierda.png
|
||||
File44=izquierda1.png
|
||||
File45=kelloggs.png
|
||||
File46=keymon_logo.png
|
||||
File47=kmt.db
|
||||
File48=kmt2.db
|
||||
File49=kmt3.db
|
||||
File5=atras1.png
|
||||
File50=login.bal
|
||||
File51=logo sanfer.jpg
|
||||
File52=logo_exitus1.jpg
|
||||
File53=logo_mariana.jpg
|
||||
File54=logo-guna-18.jpg
|
||||
File55=logo-guna-18.png
|
||||
File56=logo-guna-blanco.png
|
||||
File57=logo-guna-contorno.gif
|
||||
File58=logo-guna-contorno.png
|
||||
File59=logo-guna-contorno_.png
|
||||
File6=buscar.bal
|
||||
File60=MainPage.bal
|
||||
File61=malo.jpg
|
||||
File62=mapa.bal
|
||||
File63=mapa_cliente.bal
|
||||
File64=mapa_rutas.bal
|
||||
File65=mariana.jpg
|
||||
File66=mariana_logo_192x192.jpg
|
||||
File67=marker-amarillo.png
|
||||
File68=marker-azul.png
|
||||
File69=marker-azul1.png
|
||||
File7=CALIFICARCLIENTE.png
|
||||
File70=marker-azul2.png
|
||||
File71=marker-azul3.png
|
||||
File72=marker-azul4.png
|
||||
File73=marker-azul5.png
|
||||
File74=marker-rojo.png
|
||||
File75=marker-rojo1.png
|
||||
File76=marker-rojo2.png
|
||||
File77=marker-verde.png
|
||||
File78=no_venta.bal
|
||||
File79=nuevocliente.bal
|
||||
File8=check.bal
|
||||
File80=panel_pick_ciego.bal
|
||||
File81=pedido.bal
|
||||
File82=planfia_logo.png
|
||||
File83=planfia_logo_old.png
|
||||
File84=planfia_logo_old2.png
|
||||
File85=principal.bal
|
||||
File86=proditem.bal
|
||||
File87=proditem2.bal
|
||||
File88=productos.bal
|
||||
File89=profina.jpg
|
||||
File9=checklist.bal
|
||||
File90=PROFINA.png
|
||||
File91=rechazos.jpg
|
||||
File92=RECHAZOS.png
|
||||
File93=rechazosblanco.png
|
||||
File94=sync.png
|
||||
File95=tabulador.bal
|
||||
File96=Tabulador.jpg
|
||||
File97=TABULADOR.png
|
||||
File98=tabuladorblanco.png
|
||||
File99=telefonos.bal
|
||||
File1=alert2.png
|
||||
File10=clienteblanco.png
|
||||
File100=UBICARCLIENTE.png
|
||||
File101=usuario.png
|
||||
File102=vecteezy_abstract-color-polygon-background-design-abstract-geometric_22231666.jpg
|
||||
File103=visitaazul.png
|
||||
File104=visitaazul1.png
|
||||
File105=visitadosblanco.png
|
||||
File11=clientes.bal
|
||||
File12=Clientes_visitados.jpg
|
||||
File13=Clientes_VISITADOS.png
|
||||
File14=contrasena.png
|
||||
File15=datoscliente.bal
|
||||
File16=dbc.png
|
||||
File17=derecha.png
|
||||
File18=derecha1.png
|
||||
File19=detalle_promo.bal
|
||||
File2=alerta.jpg
|
||||
File20=detalleVenta.bal
|
||||
File21=DULCE.png
|
||||
File22=durakelo1.png
|
||||
File23=engrane.jpg
|
||||
File24=engrane1.png
|
||||
File25=folioabono.bal
|
||||
File26=fondo_kmt.jpg
|
||||
File27=foto.bal
|
||||
File28=frintal.png
|
||||
File29=frontal1.gif
|
||||
File3=atras.png
|
||||
File30=frontal1.png
|
||||
File31=guardagestion.bal
|
||||
File32=guna_viejo.png
|
||||
File33=guna_viejo2.png
|
||||
File34=historico.bal
|
||||
File35=images.png
|
||||
File36=infonavit1.jpg
|
||||
File37=intmex_logo_192x192.jpg
|
||||
File38=intmex_logo_192x192.png
|
||||
File39=inventarios.jpg
|
||||
File4=atras1.png
|
||||
File40=INVENTARIOS.png
|
||||
File41=itembuttonblue.png
|
||||
File42=izquierda.png
|
||||
File43=izquierda1.png
|
||||
File44=kelloggs.png
|
||||
File45=keymon_logo.png
|
||||
File46=kmt.db
|
||||
File47=kmt2.db
|
||||
File48=kmt3.db
|
||||
File49=login.bal
|
||||
File5=buscar.bal
|
||||
File50=logo sanfer.jpg
|
||||
File51=logo_exitus1.jpg
|
||||
File52=logo_mariana.jpg
|
||||
File53=logo-guna-18.jpg
|
||||
File54=logo-guna-18.png
|
||||
File55=logo-guna-blanco.png
|
||||
File56=logo-guna-contorno.png
|
||||
File57=logo-guna-contorno_.png
|
||||
File58=MainPage.bal
|
||||
File59=malo.jpg
|
||||
File6=CALIFICARCLIENTE.png
|
||||
File60=mapa.bal
|
||||
File61=mapa_cliente.bal
|
||||
File62=mapa_rutas.bal
|
||||
File63=mariana.jpg
|
||||
File64=mariana_logo_192x192.jpg
|
||||
File65=marker-amarillo.png
|
||||
File66=marker-azul.png
|
||||
File67=marker-azul1.png
|
||||
File68=marker-azul2.png
|
||||
File69=marker-azul3.png
|
||||
File7=check.bal
|
||||
File70=marker-azul4.png
|
||||
File71=marker-azul5.png
|
||||
File72=marker-rojo.png
|
||||
File73=marker-rojo1.png
|
||||
File74=marker-rojo2.png
|
||||
File75=marker-verde.png
|
||||
File76=no_venta.bal
|
||||
File77=nuevocliente.bal
|
||||
File78=panel_pick_ciego.bal
|
||||
File79=pedido.bal
|
||||
File8=checklist.bal
|
||||
File80=planfia_logo.png
|
||||
File81=planfia_logo_old.png
|
||||
File82=planfia_logo_old2.png
|
||||
File83=principal.bal
|
||||
File84=proditem.bal
|
||||
File85=proditem2.bal
|
||||
File86=productos.bal
|
||||
File87=profina.jpg
|
||||
File88=PROFINA.png
|
||||
File89=rechazos.jpg
|
||||
File9=cliente.bal
|
||||
File90=RECHAZOS.png
|
||||
File91=rechazosblanco.png
|
||||
File92=sync.png
|
||||
File93=tabulador.bal
|
||||
File94=Tabulador.jpg
|
||||
File95=TABULADOR.png
|
||||
File96=tabuladorblanco.png
|
||||
File97=telefonos.bal
|
||||
File98=ubicacionblanco.png
|
||||
File99=Ubicar_clientes.jpg
|
||||
FileGroup1=Default Group
|
||||
FileGroup10=Default Group
|
||||
FileGroup100=Default Group
|
||||
@@ -116,10 +112,6 @@ FileGroup102=Default Group
|
||||
FileGroup103=Default Group
|
||||
FileGroup104=Default Group
|
||||
FileGroup105=Default Group
|
||||
FileGroup106=Default Group
|
||||
FileGroup107=Default Group
|
||||
FileGroup108=Default Group
|
||||
FileGroup109=Default Group
|
||||
FileGroup11=Default Group
|
||||
FileGroup12=Default Group
|
||||
FileGroup13=Default Group
|
||||
@@ -249,37 +241,38 @@ ManifestCode='This code will be applied to the manifest file during compilation.
|
||||
Module1=appUpdater
|
||||
Module10=C_Foto
|
||||
Module11=C_Historico
|
||||
Module12=C_Mapas
|
||||
Module13=C_NoVenta
|
||||
Module14=C_NuevoCliente
|
||||
Module15=C_Pedidos
|
||||
Module16=C_Principal
|
||||
Module17=C_Productos
|
||||
Module18=C_tabulador
|
||||
Module19=C_TicketsDia
|
||||
Module12=C_ImportaBD
|
||||
Module13=C_Mapas
|
||||
Module14=C_NoVenta
|
||||
Module15=C_NuevoCliente
|
||||
Module16=C_Pedidos
|
||||
Module17=C_Principal
|
||||
Module18=C_Productos
|
||||
Module19=C_tabulador
|
||||
Module2=B4XMainPage
|
||||
Module20=C_UpdateAvailable
|
||||
Module21=CameraExClass
|
||||
Module22=DBRequestManager
|
||||
Module23=EscPosPrinter
|
||||
Module24=foto
|
||||
Module25=ManageExternalStorage
|
||||
Module26=MAPA_CLIENTE
|
||||
Module27=MAPA_RUTAS
|
||||
Module28=QRGenerator
|
||||
Module29=Starter
|
||||
Module20=C_TicketsDia
|
||||
Module21=C_UpdateAvailable
|
||||
Module22=CameraExClass
|
||||
Module23=DBRequestManager
|
||||
Module24=EscPosPrinter
|
||||
Module25=foto
|
||||
Module26=ManageExternalStorage
|
||||
Module27=MAPA_CLIENTE
|
||||
Module28=MAPA_RUTAS
|
||||
Module29=QRGenerator
|
||||
Module3=BatteryUtilities
|
||||
Module30=Subs
|
||||
Module31=Tracker
|
||||
Module30=Starter
|
||||
Module31=Subs
|
||||
Module32=Tracker
|
||||
Module4=C_Buscar
|
||||
Module5=C_Cheklist
|
||||
Module6=C_Cliente
|
||||
Module7=C_Clientes
|
||||
Module8=C_Detalle_Promo
|
||||
Module9=C_DetalleVenta
|
||||
NumberOfFiles=109
|
||||
NumberOfFiles=105
|
||||
NumberOfLibraries=27
|
||||
NumberOfModules=31
|
||||
NumberOfModules=32
|
||||
Version=12.8
|
||||
@EndOfDesignText@
|
||||
#Region Project Attributes
|
||||
|
||||
@@ -24,6 +24,7 @@ ModuleBookmarks29=
|
||||
ModuleBookmarks3=
|
||||
ModuleBookmarks30=
|
||||
ModuleBookmarks31=
|
||||
ModuleBookmarks32=
|
||||
ModuleBookmarks4=
|
||||
ModuleBookmarks5=
|
||||
ModuleBookmarks6=
|
||||
@@ -56,6 +57,7 @@ ModuleBreakpoints29=
|
||||
ModuleBreakpoints3=
|
||||
ModuleBreakpoints30=
|
||||
ModuleBreakpoints31=
|
||||
ModuleBreakpoints32=
|
||||
ModuleBreakpoints4=
|
||||
ModuleBreakpoints5=
|
||||
ModuleBreakpoints6=
|
||||
@@ -88,12 +90,13 @@ ModuleClosedNodes29=
|
||||
ModuleClosedNodes3=
|
||||
ModuleClosedNodes30=
|
||||
ModuleClosedNodes31=
|
||||
ModuleClosedNodes32=
|
||||
ModuleClosedNodes4=
|
||||
ModuleClosedNodes5=
|
||||
ModuleClosedNodes6=
|
||||
ModuleClosedNodes7=
|
||||
ModuleClosedNodes8=
|
||||
ModuleClosedNodes9=
|
||||
NavigationStack=B4XMainPage,i_engrane_Click,1744,0,C_Principal,Class_Globals,0,0,C_Principal,connecta_Click,1954,0,C_Principal,JobDone,1283,1,Starter,Process_Globals,5,0,C_Principal,Subir_Click,824,0,Starter,ENVIA_ULTIMA_GPS,120,0,Diseñador Visual,principal.bal,-100,4,C_Principal,envioinfo,1017,2,C_Principal,ImageView1_LongClick,2904,0,C_Principal,B4XPage_Appear,312,0
|
||||
NavigationStack=C_Clientes,caculaRutaGPS,720,0,Diseñador Visual,principal.bal,-100,2,Diseñador Visual,clientes.bal,-100,5,C_Principal,B4XPage_Appear,620,0,C_Cliente,Guardado,814,0,C_Cliente,mandaPendientesreparto,1695,0,C_NoVenta,mandaPendientesreparto,228,0,C_Cheklist,mandaPendientes,723,0,Starter,Process_Globals,31,0,B4XMainPage,B4XPage_Created,1411,0
|
||||
SelectedBuild=0
|
||||
VisibleModules=1,2,3,4,5,6,7,8,9,10,16
|
||||
VisibleModules=2,30,6,7,17
|
||||
|
||||
@@ -35,7 +35,7 @@ Sub Process_Globals
|
||||
Dim reqManager As DBRequestManager
|
||||
' Dim server As String = "http://187.189.244.154:1782"
|
||||
Dim server As String = "http://keymon.net:1781"
|
||||
' Dim server As String = "http://keymon.lat:9000"
|
||||
' Dim server As String = "http://keymon.net:9000"
|
||||
' Dim server = "http://192.168.100.10:1781"
|
||||
Dim muestraProgreso = 0
|
||||
Dim c As Cursor
|
||||
|
||||
127
B4A/_git_tag.ps1
Normal file
127
B4A/_git_tag.ps1
Normal file
@@ -0,0 +1,127 @@
|
||||
# --- SCRIPT DE COMMIT Y TAG (MODO IDE B4A) ---
|
||||
|
||||
# 0. CONFIGURACIÓN
|
||||
$HacerPush = $true # Cambia a $true para que suba los cambios a GitHub
|
||||
|
||||
# Cargar librería visual para el MessageBox (por si se necesita en el Push)
|
||||
Add-Type -AssemblyName System.Windows.Forms
|
||||
|
||||
# 1. AUTODESCUBRIMIENTO
|
||||
$projectPath = $PSScriptRoot
|
||||
Write-Host "Ruta del proyecto: $projectPath"
|
||||
|
||||
$b4aFileItem = Get-ChildItem -Path $projectPath -Filter "*.b4a" | Select-Object -First 1
|
||||
|
||||
if (-Not $b4aFileItem) {
|
||||
Write-Host "ERROR: No hay archivo .b4a en esta carpeta."
|
||||
return
|
||||
}
|
||||
|
||||
$projectName = $b4aFileItem.BaseName
|
||||
Write-Host "Proyecto detectado: $projectName"
|
||||
|
||||
# 2. LEER VERSIÓN
|
||||
$versionLine = Get-Content $b4aFileItem.FullName | Select-String "#VersionName:"
|
||||
if (-Not $versionLine) {
|
||||
Write-Host "ERROR: Falta #VersionName en el archivo .b4a"
|
||||
return
|
||||
}
|
||||
$version = ($versionLine -split ":")[1].Trim()
|
||||
# Reemplaza cualquier espacio en blanco por un guion bajo solo para el tag
|
||||
$tagName = "$version".Replace(" ", "_")
|
||||
|
||||
Set-Location $projectPath
|
||||
|
||||
# 3. COMMIT CON TORTOISEGIT
|
||||
$oldCommit = git rev-parse HEAD 2>$null
|
||||
|
||||
Write-Host "----------------------------------------"
|
||||
Write-Host "Version a etiquetar: $version"
|
||||
Write-Host "Abriendo ventana de TortoiseGit..."
|
||||
|
||||
$pathArg = '/path:"{0}"' -f $projectPath
|
||||
$msgArg = '/logmsg:"VERSION {0}"' -f $version
|
||||
$cmdArg = "/command:commit"
|
||||
|
||||
Start-Process "TortoiseGitProc.exe" -ArgumentList $cmdArg, $pathArg, $msgArg
|
||||
|
||||
Write-Host "Esperando a que termines el commit en TortoiseGit..."
|
||||
# El freno de mano: espera a que cierres la ventana
|
||||
while (Get-Process "TortoiseGitProc" -ErrorAction SilentlyContinue) {
|
||||
Start-Sleep -Seconds 1
|
||||
}
|
||||
|
||||
$newCommit = git rev-parse HEAD 2>$null
|
||||
|
||||
# 4. VALIDACIÓN
|
||||
if ($oldCommit -eq $newCommit) {
|
||||
Write-Host "WARNING: Commit cancelado o sin cambios detectados."
|
||||
return
|
||||
}
|
||||
|
||||
Write-Host "Commit registrado exitosamente: $newCommit"
|
||||
|
||||
# 5. GESTIÓN DE TAGS
|
||||
$tagGenerado = $false
|
||||
|
||||
# Revisamos si el tag ya existe localmente y lo borramos para recrearlo con el nuevo commit
|
||||
if (git tag -l $tagName) {
|
||||
git tag -d $tagName 2>$null | Out-Null
|
||||
}
|
||||
|
||||
# Creamos el tag nuevo apuntando al commit que acabamos de hacer
|
||||
git tag -a $tagName -m "Release version $version"
|
||||
if ($?) { $tagGenerado = $true }
|
||||
|
||||
# 6. LÓGICA DE PUSH
|
||||
if ($HacerPush) {
|
||||
Write-Host "Conectando con GitHub..."
|
||||
$remoteTagInfo = git ls-remote --tags origin $tagName
|
||||
|
||||
if ($remoteTagInfo) {
|
||||
# Conflicto: Ya existe en remoto
|
||||
$topForm = New-Object System.Windows.Forms.Form
|
||||
$topForm.TopMost = $true
|
||||
$topForm.Opacity = 0
|
||||
$topForm.ShowInTaskbar = $false
|
||||
$topForm.StartPosition = "CenterScreen"
|
||||
$topForm.Show()
|
||||
$topForm.Activate()
|
||||
|
||||
[System.Console]::Beep(1000, 200)
|
||||
|
||||
$msgBody = "El tag '$tagName' YA EXISTE en GitHub.`n`nDeseas SOBRESCRIBIRLO?`n`nSi = Borrar anterior y actualizar (Force Push).`nNo = Subir solo codigo (mantener tag viejo)."
|
||||
$msgTitle = "Conflicto de Versiones - $projectName"
|
||||
|
||||
$respuesta = [System.Windows.Forms.MessageBox]::Show($topForm, $msgBody, $msgTitle, "YesNo", "Warning")
|
||||
$topForm.Dispose()
|
||||
|
||||
if ($respuesta -eq "Yes") {
|
||||
Write-Host "Sobrescribiendo tag en GitHub (Force Push)..."
|
||||
git push origin
|
||||
git push origin $tagName --force
|
||||
} else {
|
||||
Write-Host "Conservando tag anterior en GitHub..."
|
||||
git push origin
|
||||
}
|
||||
} else {
|
||||
# Tag Nuevo
|
||||
Write-Host "Subiendo codigo y tag nuevo a GitHub..."
|
||||
git push origin --follow-tags
|
||||
}
|
||||
} else {
|
||||
Write-Host "Push OMITIDO (Switch de control apagado)."
|
||||
}
|
||||
|
||||
# 7. REPORTE FINAL PARA EL IDE
|
||||
$EstadoPush = if($HacerPush) { "SI" } else { "NO (Modo de prueba local)" }
|
||||
$EstadoTag = if($tagGenerado) { "SI ($tagName)" } else { "NO (Error al generar)" }
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "========================================"
|
||||
Write-Host " REPORTE DE VERSION "
|
||||
Write-Host "========================================"
|
||||
Write-Host " PROYECTO : $projectName"
|
||||
Write-Host " TAG CREADO : $EstadoTag"
|
||||
Write-Host " PUSH GITHUB: $EstadoPush"
|
||||
Write-Host "========================================"
|
||||
@@ -78,7 +78,7 @@ Sub Process_Globals
|
||||
'These variables can be accessed from all modules.
|
||||
|
||||
'Aqui va la liga al archivo .ver en el servidor que contiene la información de la aplicacion
|
||||
Public lnk As String = "https://keymon.lat/movil/Profina/Profina_reparto.ver"
|
||||
Public lnk As String = "https://keymon.net/movil/Profina/Profina_reparto.ver"
|
||||
|
||||
'/// En el servidor se necesita un archivo de texto (.ver) que tenga los siguientes
|
||||
'/// datos separados por un tabulador
|
||||
|
||||
61
_sync_project.ps1
Normal file
61
_sync_project.ps1
Normal file
@@ -0,0 +1,61 @@
|
||||
# 1. Mensaje inicial y pausa
|
||||
Clear-Host
|
||||
Write-Host "Se va a hacer un respaldo del codigo actual en el directorio ""AutoBackups""" -ForegroundColor Yellow
|
||||
Write-Host "y al terminar, traemos desde GitHub la ultima version del codigo." -ForegroundColor Yellow
|
||||
Write-Host ""
|
||||
Write-Host "Presione cualquier tecla para continuar..." -ForegroundColor Yellow
|
||||
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
|
||||
|
||||
# 2. Asegurar ubicación en la raíz
|
||||
Set-Location $PSScriptRoot
|
||||
Write-Host "`nScript ejecutado desde: $PWD" -ForegroundColor DarkGray
|
||||
|
||||
# 3. Buscar el proyecto
|
||||
$B4AFile = Get-ChildItem -Path ".\B4A\*.b4a" | Select-Object -First 1
|
||||
if (!$B4AFile) {
|
||||
Write-Host "ERROR: No encontre el archivo .b4a" -ForegroundColor Red
|
||||
Start-Sleep -Seconds 3
|
||||
exit
|
||||
}
|
||||
|
||||
$ProjectName = $B4AFile.BaseName
|
||||
$BackupDir = ".\B4A\AutoBackups"
|
||||
if (!(Test-Path $BackupDir)) { New-Item -ItemType Directory -Path $BackupDir }
|
||||
|
||||
Write-Host "Respaldando $ProjectName..." -ForegroundColor Cyan
|
||||
|
||||
# 4. Preparar archivos limpios (Método Copiar y Podar)
|
||||
$tempFolder = Join-Path $env:TEMP "B4A_Stage_$ProjectName"
|
||||
if (Test-Path $tempFolder) { Remove-Item $tempFolder -Recurse -Force -ErrorAction SilentlyContinue }
|
||||
New-Item -ItemType Directory -Path $tempFolder | Out-Null
|
||||
|
||||
Write-Host "Extrayendo archivos de codigo..." -ForegroundColor Gray
|
||||
foreach ($f in @("B4A", "Files")) {
|
||||
if (Test-Path $f) {
|
||||
$target = Join-Path $tempFolder $f
|
||||
Copy-Item -Path $f -Destination $target -Recurse -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "Podando carpetas Objects y AutoBackups..." -ForegroundColor Gray
|
||||
Remove-Item -Path "$tempFolder\B4A\Objects" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "$tempFolder\B4A\AutoBackups" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "$tempFolder\B4A\*.zip" -Force -ErrorAction SilentlyContinue
|
||||
|
||||
# 5. Zipear
|
||||
$Timestamp = Get-Date -Format "yyyyMMdd_HHmmss"
|
||||
Write-Host "Comprimiendo..." -ForegroundColor Gray
|
||||
Compress-Archive -Path "$tempFolder\*" -DestinationPath "$BackupDir\$ProjectName`_$Timestamp.zip" -Force
|
||||
Remove-Item $tempFolder -Recurse -Force -ErrorAction SilentlyContinue
|
||||
|
||||
Write-Host "¡Respaldo limpio creado con exito en AutoBackups!`n" -ForegroundColor Green
|
||||
|
||||
# 6. Sincronizar con GitHub (Pull forzado)
|
||||
Write-Host "--- Sincronizando con GitHub (Borrando cambios locales) ---" -ForegroundColor Cyan
|
||||
git fetch --all
|
||||
git reset --hard origin/main
|
||||
git pull
|
||||
|
||||
Write-Host "`n¡PROCESO COMPLETADO!" -ForegroundColor Green
|
||||
# Pausa de 3 segundos para que veas el resultado antes de que se cierre sola
|
||||
Start-Sleep -Seconds 3
|
||||
Reference in New Issue
Block a user