mirror of
https://github.com/KeymonSoft/Mazapa-Reparto.git
synced 2026-04-17 13:06:13 +00:00
Version: 5.06.01
Se corrigio el tiempo real y se guarda el server si se modifica
This commit is contained in:
@@ -226,6 +226,8 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
' Dim P As PhoneId
|
||||
Log("provider")
|
||||
Provider.Initialize
|
||||
|
||||
Subs.guardaAppInfo
|
||||
|
||||
' Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_READ_PHONE_STATE)
|
||||
' Wait For B4XPage_PermissionResult (Permission As String, Result As Boolean)
|
||||
@@ -625,10 +627,17 @@ Private Sub i_engrane_Click
|
||||
Subs.centraBoton(b_arqueocieego, Root.Width)
|
||||
Subs.centraBoton(b_server, p_serverList.Width)
|
||||
lv_server.Clear
|
||||
lv_server.AddSingleLine("http://keymon.lat:1782")
|
||||
If user.Text = "KMTS1" Then lv_server.AddSingleLine("http://10.0.0.205:1782")
|
||||
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
|
||||
et_server.Text = server
|
||||
Dim serv As Cursor = Starter.skmt.ExecQuery($"SELECT CAT_VA_VALOR FROM CAT_VARIABLES where CAT_VA_DESCRIPCION = 'SERVER'"$)
|
||||
If serv.RowCount > 0 Then
|
||||
serv.Position = 0
|
||||
et_server.Text = serv.GetString("CAT_VA_VALOR")
|
||||
server = serv.GetString("CAT_VA_VALOR")
|
||||
Starter.server = serv.GetString("CAT_VA_VALOR")
|
||||
End If
|
||||
Subs.panelVisible(p_appUpdate, 0, 0)
|
||||
|
||||
c = Starter.skmt.ExecQuery("SELECT HABILITADO FROM GPS")
|
||||
|
||||
@@ -386,7 +386,7 @@ Sub B4XPage_Appear
|
||||
Next
|
||||
End If
|
||||
Starter.ENVIA_ULTIMA_GPS
|
||||
|
||||
|
||||
' Log($"ENTREGADOS: ${Subs.traeEntregados}"$)
|
||||
' Log($"RECHAZADOS: ${Subs.traeRechazados}"$)
|
||||
' Log($"VENDIDOS: ${Subs.traeVendidos}"$)
|
||||
@@ -583,21 +583,89 @@ Sub B4XPage_Appear
|
||||
Log(rescant7)
|
||||
r5.Close
|
||||
|
||||
Private r55 As Cursor = Starter.skmt.ExecQuery($"select HVD_COSTO_TOT, HVD_CANT from HIST_VENTAS where HVD_RECHAZO = '0' AND HVD_CLIENTE IN (SELECT CAT_CL_CODIGO from kmt_info WHERE gestion = '2')"$)
|
||||
Private rescant10 As Double
|
||||
Private pztotal As Int
|
||||
If r55.RowCount > 0 Then
|
||||
For r75 = 0 To r55.RowCount -1
|
||||
r55.Position = r75
|
||||
rescant10 = rescant10 + r55.GetString("HVD_COSTO_TOT")
|
||||
rescant10 = NumberFormat2(rescant10, 0, 2, 2, False)
|
||||
pztotal = pztotal + r55.GetString("HVD_CANT")
|
||||
Next
|
||||
End If
|
||||
Log(rescant10)
|
||||
r55.Close
|
||||
|
||||
Private r5 As Cursor = Starter.skmt.ExecQuery($"select IFNULL(SUM(PE_COSTO_TOT),0) AS PE_COSTO_TOT, IFNULL(SUM(PE_CANT),0) AS PE_CANT from PEDIDO "$)
|
||||
Private pztotal2 As Int
|
||||
Private rescant11 As Double
|
||||
If r5.RowCount > 0 Then
|
||||
r5.Position = 0
|
||||
rescant11 = r5.GetString("PE_COSTO_TOT")
|
||||
pztotal2 = pztotal2 + r5.GetString("PE_CANT")
|
||||
End If
|
||||
Log(rescant11)
|
||||
r5.Close
|
||||
''
|
||||
Private r5 As Cursor = Starter.skmt.ExecQuery($"select IFNULL(HVD_COSTO_TOT,0) AS HVD_COSTO_TOT, IFNULL(HVD_CANT,0) AS HVD_CANT, IFNULL(HVD_RECHAZOCANT,0) AS HVD_RECHAZOCANT, HVD_PROID, HVD_CLIENTE, CONSECUTIVO from HIST_VENTAS where HVD_RECHAZO = '1' AND HVD_CLIENTE IN (SELECT CAT_CL_CODIGO from kmt_info WHERE gestion = 2) "$)
|
||||
Private pztotal3 As Int
|
||||
Private rescant12 As Double
|
||||
If r5.RowCount > 0 Then
|
||||
For j4 = 0 To r5.RowCount -1
|
||||
r5.Position = j4
|
||||
Private r6 As Cursor = Starter.skmt.ExecQuery($"select IFNULL(SUM(PE_CANT),0) AS PE_CANT from PEDIDO where PE_CLIENTEOR = '${r5.GetString("HVD_CLIENTE")}' AND PE_PROID = '${r5.GetString("HVD_PROID")}' AND CONSECUTIVO = '${r5.GetString("CONSECUTIVO")}' "$)
|
||||
r6.Position = 0
|
||||
LogColor(r5.GetString("HVD_COSTO_TOT")&" / "& r5.GetString("HVD_CANT")&" * "&r5.GetString("HVD_RECHAZOCANT")&" - "&r6.GetString("PE_CANT"),Colors.Blue)
|
||||
LogColor(r6.GetString("PE_CANT"),Colors.Blue)
|
||||
rescant12 = rescant12 + ((r5.GetString("HVD_COSTO_TOT")/(r5.GetString("HVD_CANT")))*(r5.GetString("HVD_CANT")- r5.GetString("HVD_RECHAZOCANT")))
|
||||
pztotal3 = pztotal3 + (r5.GetString("HVD_CANT")- r5.GetString("HVD_RECHAZOCANT"))
|
||||
Log(rescant12)
|
||||
r6.Close
|
||||
Next
|
||||
End If
|
||||
If rescant12 = "NaN" Then rescant12 = 0
|
||||
LogColor(rescant12,Colors.Red)
|
||||
r5.Close
|
||||
|
||||
l_rechazo.text = NumberFormat2((rescant + rescant2),0,2,2,False)
|
||||
L_MONTOE.Text = NumberFormat2((rescant3 + rescant4 + rescant5 + rescant6 + rescant7),0,2,2,False)
|
||||
|
||||
|
||||
B4XPages.MainPage.clientesVisitados = L_MONTOE.Text
|
||||
B4XPages.MainPage.clientesVenta = l_cuantosc.Text
|
||||
Dim cltVisitados As Int = (l_cuantosc.Text).As(Int) + (l_cuantosn.Text).As(Int)
|
||||
B4XPages.MainPage.clientesVisitados = cltVisitados
|
||||
Log("Esto es clientes visitados: " & B4XPages.MainPage.clientesVisitados)
|
||||
' Log("clientesVisitados ? " & B4XPages.MainPage.clientesVisitados)
|
||||
|
||||
B4XPages.MainPage.clientesVenta = NumberFormat2((rescant10 + rescant11 + rescant12 ),0,2,2,False)
|
||||
Log("Esto es Monto Recibido " & B4XPages.MainPage.clientesVenta)
|
||||
|
||||
B4XPages.MainPage.clientesRechazo = l_cuantosn.Text
|
||||
Log("Esto deberia ser el rechazo: " & l_cuantosn.Text)
|
||||
Log("clientesRechazo ? " & B4XPages.MainPage.clientesRechazo)
|
||||
|
||||
B4XPages.MainPage.clientestotal = l_porvisitar.Text
|
||||
B4XPages.MainPage.montoActual = Round2(l_montoSalida.Text - rechMap.Get("monto"), 2)
|
||||
Log("clientestotal ? " & B4XPages.MainPage.clientestotal)
|
||||
|
||||
' B4XPages.MainPage.montoActual = Round2(l_montoSalida.Text - rechMap.Get("monto"), 2)
|
||||
B4XPages.MainPage.montoActual = l_montoSalida.Text
|
||||
Log("montoActual ? " & B4XPages.MainPage.montoActual)
|
||||
|
||||
B4XPages.MainPage.porVisitar = l_ctast.text
|
||||
Log("porVisitar ? " & B4XPages.MainPage.porVisitar)
|
||||
|
||||
B4XPages.MainPage.entregas = l_cuantosc.text
|
||||
Log("entregas ? " & B4XPages.MainPage.entregas)
|
||||
|
||||
B4XPages.MainPage.rechazos = l_cuantosn.text
|
||||
B4XPages.MainPage.montoEntregado = L_MONTOE.text
|
||||
Log("rechazos ? " & B4XPages.MainPage.rechazos)
|
||||
|
||||
' B4XPages.MainPage.montoEntregado = L_MONTOE.text
|
||||
B4XPages.MainPage.montoEntregado = NumberFormat2((rescant10 + rescant11 + rescant12 ),0,2,2,False)
|
||||
Log("montoEntregado ? " & B4XPages.MainPage.montoEntregado)
|
||||
|
||||
B4XPages.MainPage.montoRechazado = l_rechazo.text
|
||||
Log("montoRechazado ? " & B4XPages.MainPage.montoRechazado)
|
||||
|
||||
reqManager.Initialize(Me, B4XPages.MainPage.server)
|
||||
' LogColor($"ReqServer = ${B4XPages.MainPage.server}"$, Colors.red)
|
||||
@@ -700,6 +768,10 @@ Sub Subir_Click
|
||||
End Sub
|
||||
|
||||
Sub envioinfo
|
||||
|
||||
Log("*** Entramos a envia info***")
|
||||
Log("--- Entramos a envia info---")
|
||||
Log("### Entramos a envia info###")
|
||||
successfulRequests = 0
|
||||
totalRegistros = 0
|
||||
totalRegistrosTotales = 0
|
||||
@@ -751,11 +823,12 @@ Sub envioinfo
|
||||
' PEDIDO
|
||||
c=Starter.skmt.ExecQuery("SELECT PE_TIPO, PE_RUTA, PE_CEDIS, PE_COSTO_TOT, PE_COSTOU, PE_CANT, PE_PRONOMBRE, PE_PROID, PE_CLIENTE, PE_FECHA, PE_USUARIO, PE_CLIENTEOR, PE_CAJAS, PE_BCAJAS, CONSECUTIVO, FECHA_PREV, RUTA_REP, PE_REGALO FROM PEDIDO")
|
||||
If c.RowCount>0 Then
|
||||
Log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Pedido reparto <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<")
|
||||
Log($"Procesando PEDIDO: ${c.RowCount} registros"$)
|
||||
totalRegistros = totalRegistros + c.RowCount
|
||||
totalRegistrosTotales = totalRegistrosTotales + c.RowCount
|
||||
Log($"Total acumulado: ${totalRegistros}"$)
|
||||
|
||||
Log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Pedido reparto <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<")
|
||||
For i=0 To c.RowCount -1
|
||||
c.Position=i
|
||||
Dim cmd As DBCommand
|
||||
@@ -1145,7 +1218,7 @@ Sub cargadedia
|
||||
' reqManager.ExecuteQuery(cmd , 0, "version")
|
||||
Dim cmd As DBCommand
|
||||
cmd.Initialize
|
||||
cmd.Name = "select_ruta_re_REPG_MAZAPA7"
|
||||
cmd.Name = "select_ruta_re_REPG_MAZAPA8"
|
||||
cmd.Parameters = Array As Object(ALMACEN, e_ruta.text, imei)
|
||||
' Log($"${ALMACEN}, ${e_ruta.text}, ${imei}"$)
|
||||
reqManager.ExecuteQuery(cmd , 0, "ruta")
|
||||
|
||||
Binary file not shown.
@@ -3004,12 +3004,12 @@ Module9=C_DetalleVenta
|
||||
NumberOfFiles=1470
|
||||
NumberOfLibraries=29
|
||||
NumberOfModules=31
|
||||
Version=12.8
|
||||
Version=13.1
|
||||
@EndOfDesignText@
|
||||
#Region Project Attributes
|
||||
#ApplicationLabel: MAZAPA Reparto
|
||||
#VersionCode: 1
|
||||
#VersionName: 5.05.20
|
||||
#VersionName: 5.06.01
|
||||
'Aun no la subo, suvela
|
||||
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
||||
#SupportedOrientations: portrait
|
||||
|
||||
@@ -94,6 +94,6 @@ ModuleClosedNodes6=
|
||||
ModuleClosedNodes7=
|
||||
ModuleClosedNodes8=
|
||||
ModuleClosedNodes9=
|
||||
NavigationStack=C_Principal,envioinfo,824,0,Diseñador Visual,principal.bal,-100,4,C_Principal,connecta_LongClick,2172,0,C_Principal,B4XPage_Appear,418,6,Starter,Timer1_Tick,95,0,Starter,ENVIA_ULTIMA_GPS,98,0,Starter,Process_Globals,31,3,B4XMainPage,B4XPage_Created,210,4,C_Principal,cargar_Click,1057,0,C_Principal,JobDone,1432,0
|
||||
NavigationStack=C_Principal,B4XPage_Appear,604,6,Main,Globals,22,0,C_Principal,Subir_Click,758,0,C_Principal,envioinfo,1039,6,C_Principal,connecta_Click,1803,0,C_Principal,cargadedia,1214,0,Diseñador Visual,login.bal,-100,3,Starter,JobDone,149,0,B4XMainPage,i_engrane_Click,623,6,B4XMainPage,b_server_Click,682,0
|
||||
SelectedBuild=0
|
||||
VisibleModules=1,2,6,7,16,31,29,30,17,13
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="reparto_mazapa.keymon.lat"
|
||||
android:versionCode="1"
|
||||
android:versionName="5.05.20"
|
||||
android:versionName="5.06.01"
|
||||
android:installLocation="internalOnly">
|
||||
|
||||
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="33"/>
|
||||
@@ -63,6 +63,7 @@
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"/>
|
||||
<application
|
||||
android:name="androidx.multidex.MultiDexApplication"
|
||||
android:icon="@drawable/icon"
|
||||
android:label="MAZAPA Reparto"
|
||||
android:theme="@style/LightTheme"
|
||||
|
||||
BIN
B4A/Objects/Mazapa_Reparto.apk
Normal file
BIN
B4A/Objects/Mazapa_Reparto.apk
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user