This commit is contained in:
cvaldes1201
2025-01-21 17:12:03 -06:00
parent da46e318db
commit de4c5240a5
609 changed files with 2651 additions and 2493 deletions

View File

@@ -343,10 +343,11 @@ Sub Guardado
d.Position = 0 d.Position = 0
Dim rutapre As String = d.GetString("CAT_CL_RUTA") Dim rutapre As String = d.GetString("CAT_CL_RUTA")
d.Close d.Close
d = Starter.skmt.ExecQuery("SELECT HVD_FECHA FROM HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")
d.Position = 0 ' d = Starter.skmt.ExecQuery("SELECT HVD_FECHA FROM HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")
Dim fechaprev As String = d.GetString("HVD_FECHA") ' d.Position = 0
d.Close Dim fechaprev As String = Subs.traefECHAPREV
' d.Close
Dim rutaactualizar As String Dim rutaactualizar As String
Dim rut As Cursor = Starter.skmt.ExecQuery("SELECT CAT_CL_RUTA FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)") Dim rut As Cursor = Starter.skmt.ExecQuery("SELECT CAT_CL_RUTA FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)")
@@ -363,7 +364,7 @@ Sub Guardado
mandaPendientesreparto mandaPendientesreparto
Dim mandamapa As Cursor = Starter.skmt.ExecQuery("SELECT * FROM kmt_info WHERE gestion = 0") Dim mandamapa As Cursor = Starter.skmt.ExecQuery("SELECT * FROM kmt_info WHERE gestion = 0 and CAT_CL_CODIGO <> 63403")
If mandamapa.RowCount > 0 Then If mandamapa.RowCount > 0 Then
StartActivity(MAPA_RUTAS) StartActivity(MAPA_RUTAS)
Else If mandamapa.RowCount = 0 Then Else If mandamapa.RowCount = 0 Then
@@ -393,7 +394,7 @@ Sub DATOS_Click
End Sub End Sub
Sub Guardar_Click Sub Guardar_Click
Dim mandamapa As Cursor = Starter.skmt.ExecQuery("SELECT * FROM kmt_info WHERE gestion = 0") Dim mandamapa As Cursor = Starter.skmt.ExecQuery("SELECT * FROM kmt_info WHERE gestion = 0 AND cat_cl_codigo <> 63403")
If mandamapa.RowCount > 0 Then If mandamapa.RowCount > 0 Then
StartActivity(MAPA_RUTAS) StartActivity(MAPA_RUTAS)
Else If mandamapa.RowCount = 0 Then Else If mandamapa.RowCount = 0 Then

View File

@@ -72,7 +72,7 @@ Sub B4XPage_Appear
Else Else
ListView1.Top = lv1Top + 100 ListView1.Top = lv1Top + 100
End If End If
c=Starter.skmt.ExecQuery("select codigo, indice, CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_NOEXT from waypoints inner join kmt_info on waypoints.codigo = kmt_info.CAT_CL_CODIGO where gestion = 0 order by indice") c=Starter.skmt.ExecQuery("select codigo, indice, CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_NOEXT from waypoints inner join kmt_info on waypoints.codigo = kmt_info.CAT_CL_CODIGO where gestion = 0 AND CAT_CL_RUTA <> 1000 order by indice")
If c.RowCount > 0 Then 'Ya hay waypoints en la base de datos If c.RowCount > 0 Then 'Ya hay waypoints en la base de datos
c.Position = 0 c.Position = 0
' Log("Ya hay waypoints.") ' Log("Ya hay waypoints.")
@@ -152,7 +152,7 @@ Sub ListView1_ItemClick (Position As Int, Value As Object)
laRuta = lrt.SubString(6) 'Quitamos el texto "Ruta: " para obtener el numero de la ruta. laRuta = lrt.SubString(6) 'Quitamos el texto "Ruta: " para obtener el numero de la ruta.
Log($"Original: ${Value} - Mod: |${lrt.SubString(6)}| - laRuta: ${laRuta}"$) Log($"Original: ${Value} - Mod: |${lrt.SubString(6)}| - laRuta: ${laRuta}"$)
rutaacambiar = laRuta rutaacambiar = laRuta
c2 = Starter.skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO, CAT_CL_LAT, CAT_CL_LONG from kmt_info where CAT_CL_RUTA = ? and gestion = 0 order by CAT_CL_NOMBRE ", Array As String(laRuta)) c2 = Starter.skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO, CAT_CL_LAT, CAT_CL_LONG from kmt_info where CAT_CL_RUTA = ? and gestion = 0 AND CAT_CL_RUTA <> 1000 order by CAT_CL_NOMBRE ", Array As String(laRuta))
Private thisLoc As Location Private thisLoc As Location
Private label1 As Label Private label1 As Label
Private label2 As Label Private label2 As Label
@@ -211,7 +211,7 @@ Sub generaListViewRutas
label2.TextSize = 15 label2.TextSize = 15
label2.TextColor = Colors.Black label2.TextColor = Colors.Black
ListView1.TwoLinesLayout.ItemHeight = 60dip ListView1.TwoLinesLayout.ItemHeight = 60dip
c=Starter.skmt.ExecQuery("select CAT_CL_RUTA, count(*) as cuantos from kmt_info where gestion = 0 group by CAT_CL_RUTA order by CAT_CL_RUTA asc") c=Starter.skmt.ExecQuery("select CAT_CL_RUTA, count(*) as cuantos from kmt_info where gestion = 0 AND CAT_CL_RUTA <> 1000 group by CAT_CL_RUTA order by CAT_CL_RUTA asc")
If c.RowCount>0 Then If c.RowCount>0 Then
ListView1.Clear ListView1.Clear
For i=0 To c.RowCount -1 For i=0 To c.RowCount -1
@@ -240,7 +240,7 @@ End Sub
Sub BUSCA_TextChanged (Old As String, New As String) Sub BUSCA_TextChanged (Old As String, New As String)
q_buscar = "%" & busca.Text & "%" q_buscar = "%" & busca.Text & "%"
c2=Starter.skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where CAT_CL_NOMBRE like ? and gestion = 0 order by CAT_CL_CODIGO ", Array As String(q_buscar)) c2=Starter.skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where CAT_CL_NOMBRE like ? and gestion = 0 AND CAT_CL_RUTA <> 1000 order by CAT_CL_CODIGO ", Array As String(q_buscar))
ListView1.Clear ListView1.Clear
lfila.text = "Nombre y Calle" lfila.text = "Nombre y Calle"
Subs.SetDivider(ListView1, Colors.LightGray, 2) Subs.SetDivider(ListView1, Colors.LightGray, 2)
@@ -456,7 +456,7 @@ Sub traeRutaDia(aVisitar As B4XOrderedMap)
entro = 3 entro = 3
Log("Generamos ListView1 en traeRutaDia") Log("Generamos ListView1 en traeRutaDia")
'Traemos las visitas restantes ordenadas por el indice de waypoints (este indice nos indica el orden en la ruta calculada). 'Traemos las visitas restantes ordenadas por el indice de waypoints (este indice nos indica el orden en la ruta calculada).
c=Starter.skmt.ExecQuery("select codigo, indice, CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_NOEXT from waypoints inner join kmt_info on waypoints.codigo = kmt_info.CAT_CL_CODIGO where gestion = 0 order by indice") c=Starter.skmt.ExecQuery("select codigo, indice, CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_NOEXT from waypoints inner join kmt_info on waypoints.codigo = kmt_info.CAT_CL_CODIGO where gestion = 0 AND CAT_CL_RUTA <> 1000 order by indice")
If c.RowCount > 0 Then If c.RowCount > 0 Then
For i=0 To c.RowCount -1 'Generamos el listView con la lista ordenada. For i=0 To c.RowCount -1 'Generamos el listView con la lista ordenada.
c.Position=i c.Position=i
@@ -536,13 +536,13 @@ Sub traeTodosAVisitar As B4XOrderedMap 'ignore
thisLoc.Initialize thisLoc.Initialize
clientesMapaO.Clear clientesMapaO.Clear
'Traemos las rutas asignadas al repartidor. 'Traemos las rutas asignadas al repartidor.
c=Starter.skmt.ExecQuery("select CAT_CL_RUTA, count(*) as cuantos from kmt_info where gestion = 0 group by CAT_CL_RUTA order by CAT_CL_RUTA asc") c=Starter.skmt.ExecQuery("select CAT_CL_RUTA, count(*) as cuantos from kmt_info where gestion = 0 AND CAT_CL_RUTA <> 1000 group by CAT_CL_RUTA order by CAT_CL_RUTA asc")
If c.RowCount>0 Then If c.RowCount>0 Then
'Traemos los clientes de cada ruta. 'Traemos los clientes de cada ruta.
For i=0 To c.RowCount -1 For i=0 To c.RowCount -1
c.Position=i c.Position=i
' Log($"Renglones ruta: ${c.RowCount} - i=${i} - Ruta: ${c.GetString("CAT_CL_RUTA")}"$) ' Log($"Renglones ruta: ${c.RowCount} - i=${i} - Ruta: ${c.GetString("CAT_CL_RUTA")}"$)
c2=Starter.skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO, CAT_CL_LAT, CAT_CL_LONG from kmt_info where CAT_CL_RUTA = ? and gestion = 0 order by CAT_CL_NOMBRE ", Array As String(c.GetString("CAT_CL_RUTA"))) c2=Starter.skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO, CAT_CL_LAT, CAT_CL_LONG from kmt_info where CAT_CL_RUTA = ? and gestion = 0 AND CAT_CL_RUTA <> 1000 order by CAT_CL_NOMBRE ", Array As String(c.GetString("CAT_CL_RUTA")))
If c2.RowCount>0 Then If c2.RowCount>0 Then
For j=0 To c2.RowCount -1 'Generamos lista de clientes For j=0 To c2.RowCount -1 'Generamos lista de clientes
c2.Position=j c2.Position=j
@@ -638,7 +638,7 @@ Sub caculaRutaGPS(coords As List)
Starter.skmt.ExecNonQuery($"update kmt_info set SECUENCIA = ${ti.Get("pos")} where CAT_CL_CODIGO = '${ti.Get("id").As(String).SubString(1)}'"$) ' Ponemos la secuencia con el orden del ruteo para poder verla en el mapa. Starter.skmt.ExecNonQuery($"update kmt_info set SECUENCIA = ${ti.Get("pos")} where CAT_CL_CODIGO = '${ti.Get("id").As(String).SubString(1)}'"$) ' Ponemos la secuencia con el orden del ruteo para poder verla en el mapa.
Starter.skmt.ExecNonQuery($"insert into waypoints (codigo, indice) values ('${ti.Get("id").As(String).SubString(1)}', '${ti.Get("pos")}')"$) Starter.skmt.ExecNonQuery($"insert into waypoints (codigo, indice) values ('${ti.Get("id").As(String).SubString(1)}', '${ti.Get("pos")}')"$)
Next Next
c = Starter.skmt.ExecQuery("select codigo, indice, CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_NOEXT from waypoints inner join kmt_info on waypoints.codigo = kmt_info.CAT_CL_CODIGO where gestion = 0 order by indice") c = Starter.skmt.ExecQuery("select codigo, indice, CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_NOEXT from waypoints inner join kmt_info on waypoints.codigo = kmt_info.CAT_CL_CODIGO where gestion = 0 AND CAT_CL_RUTA <> 1000 order by indice")
If c.RowCount > 0 Then 'Ya hay waypoints en la base de datos. If c.RowCount > 0 Then 'Ya hay waypoints en la base de datos.
c.Position = 0 c.Position = 0
conMapa = True conMapa = True
@@ -676,7 +676,7 @@ Sub todosAVisitar As List
If entro = 3 Then sqlDeRuta = $"and CAT_CL_RUTA = '${laRuta}'"$ If entro = 3 Then sqlDeRuta = $"and CAT_CL_RUTA = '${laRuta}'"$
Private aVisitar, tmpList As List Private aVisitar, tmpList As List
aVisitar.Initialize aVisitar.Initialize
Private coords As ResultSet = Starter.skmt.ExecQuery($"select CAT_CL_CODIGO, CAT_CL_LAT, CAT_CL_LONG from kmt_info where gestion = 0 ${sqlDeRuta}"$) Private coords As ResultSet = Starter.skmt.ExecQuery($"select CAT_CL_CODIGO, CAT_CL_LAT, CAT_CL_LONG from kmt_info where gestion = 0 AND CAT_CL_RUTA <> 500 ${sqlDeRuta}"$)
Do While coords.NextRow Do While coords.NextRow
tmpList.Initialize tmpList.Initialize
tmpList.AddAll(Array As String(coords.GetString("CAT_CL_CODIGO"), coords.GetString("CAT_CL_LONG"), coords.GetString("CAT_CL_LAT"))) tmpList.AddAll(Array As String(coords.GetString("CAT_CL_CODIGO"), coords.GetString("CAT_CL_LONG"), coords.GetString("CAT_CL_LAT")))

View File

@@ -94,6 +94,7 @@ Sub Class_Globals
Private p_prod As Panel Private p_prod As Panel
Private b_regreso As Button Private b_regreso As Button
Private lv_prod_Prin As ListView Private lv_prod_Prin As ListView
Private b_venta_emp As Button
End Sub End Sub
'You can add more parameters here. 'You can add more parameters here.
@@ -117,10 +118,10 @@ Private Sub B4XPage_Created (Root1 As B4XView)
b=Starter.skmt.ExecQuery("Select count(*) as CUANTOS from pedido_cliente") b=Starter.skmt.ExecQuery("Select count(*) as CUANTOS from pedido_cliente")
b.Position=0 b.Position=0
Cuantos = b.GetString("CUANTOS") Cuantos = b.GetString("CUANTOS")
d=Starter.skmt.ExecQuery("select count(*) as TOTAL_VISITAR from kmt_info where gestion = 0") d=Starter.skmt.ExecQuery("select count(*) as TOTAL_VISITAR from kmt_info where gestion = 0 AND CAT_CL_RUTA <> 1000")
D.Position=0 D.Position=0
b.Close b.Close
e=Starter.skmt.ExecQuery("select count(*) as POR_VISITAR from kmt_info") e=Starter.skmt.ExecQuery("select count(*) as POR_VISITAR from kmt_info WHERE CAT_CL_RUTA <> 1000")
e.Position=0 e.Position=0
If Cuantos = 0 Then If Cuantos = 0 Then
l_aLiquidar.Text = 0 l_aLiquidar.Text = 0
@@ -209,7 +210,7 @@ Sub B4XPage_Appear
l_ruta.Text = 0 l_ruta.Text = 0
l_rutasP.Text = 0 l_rutasP.Text = 0
Else Else
f=Starter.skmt.ExecQuery("select distinct CAT_CL_RUTA from kmt_info order by CAT_CL_RUTA") f=Starter.skmt.ExecQuery("select distinct CAT_CL_RUTA from kmt_info WHERE CAT_CL_RUTA <> 1000 order by CAT_CL_RUTA")
' f.Position=0 ' f.Position=0
l_rutasP.Text = "" l_rutasP.Text = ""
For i = 0 To f.RowCount - 1 For i = 0 To f.RowCount - 1
@@ -227,10 +228,10 @@ Sub B4XPage_Appear
b=Starter.skmt.ExecQuery("Select count(*) as CUANTOS from kmt_info") b=Starter.skmt.ExecQuery("Select count(*) as CUANTOS from kmt_info")
b.Position=0 b.Position=0
If b.RowCount > 0 Then Cuantos = b.GetString("CUANTOS") If b.RowCount > 0 Then Cuantos = b.GetString("CUANTOS")
d=Starter.skmt.ExecQuery("select count(*) as TOTAL_VISITAR from kmt_info where gestion = 0") d=Starter.skmt.ExecQuery("select count(*) as TOTAL_VISITAR from kmt_info where gestion = 0 AND CAT_CL_RUTA <> 1000")
D.Position=0 D.Position=0
b.Close b.Close
e=Starter.skmt.ExecQuery("select count(*) as POR_VISITAR from kmt_info") e=Starter.skmt.ExecQuery("select count(*) as POR_VISITAR from kmt_info WHERE CAT_CL_RUTA <> 1000")
e.Position=0 e.Position=0
' f=Starter.skmt.ExecQuery("select count(*) as CAT_CL_RUTA from kmt_info") ' f=Starter.skmt.ExecQuery("select count(*) as CAT_CL_RUTA from kmt_info")
' f.Position=0 ' f.Position=0
@@ -267,9 +268,9 @@ Sub B4XPage_Appear
f1=Starter.skmt.ExecQuery("select sum(hvd_costo_tot) as MONTO_TOTAL_DIA from hist_ventas2 where hvd_cliente in (select cat_cl_codigo from kmt_info ) AND HVD_RECHAZO = 0") f1=Starter.skmt.ExecQuery("select sum(hvd_costo_tot) as MONTO_TOTAL_DIA from hist_ventas2 where hvd_cliente in (select cat_cl_codigo from kmt_info ) AND HVD_RECHAZO = 0")
f2=Starter.skmt.ExecQuery("select sum(REP_COSTO_TOT) as MONTO_REC_DIA FROM REPARTO where REP_cliente in (Select cat_cl_codigo from kmt_info)") f2=Starter.skmt.ExecQuery("select sum(REP_COSTO_TOT) as MONTO_REC_DIA FROM REPARTO where REP_cliente in (Select cat_cl_codigo from kmt_info)")
' b=Starter.skmt.ExecQuery("select count(*) as CUANTOS from noventa where nv_cliente in (select cat_cl_codigo from kmt_info where gestion = 3)") ' b=Starter.skmt.ExecQuery("select count(*) as CUANTOS from noventa where nv_cliente in (select cat_cl_codigo from kmt_info where gestion = 3)")
b=Starter.skmt.ExecQuery("select count(DISTINCT NV_CLIENTE) as CUANTOS from noventa where nv_motivo <> 'ENTREGA'") b=Starter.skmt.ExecQuery("select count(DISTINCT NV_CLIENTE) as CUANTOS from noventa where nv_motivo <> 'ENTREGA' and NV_CLIENTE <> 63403")
' L=Starter.skmt.ExecQuery("select count(*) as CLIENTES_DIA from noventa where nv_cliente in (select cat_cl_codigo from kmt_info where gestion = 2)") ' L=Starter.skmt.ExecQuery("select count(*) as CLIENTES_DIA from noventa where nv_cliente in (select cat_cl_codigo from kmt_info where gestion = 2)")
L=Starter.skmt.ExecQuery("select count(DISTINCT NV_CLIENTE) as CLIENTES_DIA from noventa where nv_motivo = 'ENTREGA'") L=Starter.skmt.ExecQuery("select count(DISTINCT NV_CLIENTE) as CLIENTES_DIA from noventa where nv_motivo = 'ENTREGA' and NV_CLIENTE <> 63403")
f2.Position=0 f2.Position=0
' F4=Starter.skmt.execqUery("select count(*) as CUANTOS FROM PEDIDO") ' F4=Starter.skmt.execqUery("select count(*) as CUANTOS FROM PEDIDO")
' F4.Position = 0 ' F4.Position = 0
@@ -594,9 +595,18 @@ Sub B4XPage_Appear
If l_ctast.Text = 0 And l_porvisitar.Text <> 0 Then If l_ctast.Text = 0 And l_porvisitar.Text <> 0 Then
Label9.Visible = True Label9.Visible = True
L_MONTOE.Visible = True L_MONTOE.Visible = True
'' hacer validacion su hay rechazo
c=Starter.skmt.ExecQuery("select * from HIST_VENTAS WHERE hvd_rechazo <> 2 and HVD_RECHAZOCANT > 0 order by HVD_CODPROMO desc, HVD_PRONOMBRE asc")
If c.RowCount > 0 Then
b_venta_emp.Visible = True
Else
b_venta_emp.Visible = False
End If
Else Else
Label9.Visible = False Label9.Visible = False
L_MONTOE.Visible = False L_MONTOE.Visible = False
b_venta_emp.Visible = False
End If End If
' If l_ctast.Text = 0 Then ' If l_ctast.Text = 0 Then
@@ -671,6 +681,9 @@ Sub Subir_Click
End Sub End Sub
Sub envioinfo Sub envioinfo
' NOVENTA ' NOVENTA
c = Starter.skmt.ExecQuery("SELECT NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON, NV_FOTO FROM NOVENTA") c = Starter.skmt.ExecQuery("SELECT NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON, NV_FOTO FROM NOVENTA")
D=Starter.skmt.ExecQuery("SELECT COUNT(*) AS CUANTOS_NOVENTA FROM NOVENTA") D=Starter.skmt.ExecQuery("SELECT COUNT(*) AS CUANTOS_NOVENTA FROM NOVENTA")
@@ -805,9 +818,10 @@ Sub envioinfo
If c.RowCount > 0 Then If c.RowCount > 0 Then
For i=0 To c.RowCount -1 For i=0 To c.RowCount -1
c.Position = i c.Position = i
Log(c.GetString("HVD_CLIENTE"))
Private d4 As Cursor = Starter.skmt.ExecQuery($"SELECT CAT_CL_RUTA FROM kmt_info WHERE CAT_CL_CODIGO = '${c.GetString("HVD_CLIENTE")}'"$) Private d4 As Cursor = Starter.skmt.ExecQuery($"SELECT CAT_CL_RUTA FROM kmt_info WHERE CAT_CL_CODIGO = '${c.GetString("HVD_CLIENTE")}'"$)
d4.Position = 0 d4.Position = 0
Log(d4.GetString("CAT_CL_RUTA"))
Private d5 As Cursor = Starter.skmt.ExecQuery($"SELECT IFNULL(Sum(PE_CANT),0) AS PE_CANT FROM PEDIDO WHERE PE_CLIENTEOR = '${c.GetString("HVD_CLIENTE")}' AND PE_PROID = '${c.GetString("HVD_PROID")}' AND CONSECUTIVO = '${c.GetString("CONSECUTIVO")}'"$) Private d5 As Cursor = Starter.skmt.ExecQuery($"SELECT IFNULL(Sum(PE_CANT),0) AS PE_CANT FROM PEDIDO WHERE PE_CLIENTEOR = '${c.GetString("HVD_CLIENTE")}' AND PE_PROID = '${c.GetString("HVD_PROID")}' AND CONSECUTIVO = '${c.GetString("CONSECUTIVO")}'"$)
d5.Position = 0 d5.Position = 0
Private restacant As String = d5.GetString("PE_CANT") Private restacant As String = d5.GetString("PE_CANT")
@@ -834,6 +848,7 @@ Sub envioinfo
Else Else
cmd.Initialize cmd.Initialize
cmd.Name = "update_HVD_MAZAPArep2" cmd.Name = "update_HVD_MAZAPArep2"
Log( c.GetString("CANTC")& c.GetString("HVD_CLIENTE")& c.GetString("HVD_PROID")&fecha3&" "&hora(0)& d4.GetString("CAT_CL_RUTA")&ALMACEN&l_ruta.Text&c.GetString("HVD_CODPROMO")&c.GetString("HVD_NUM_TICKET")& c.GetString("HVD_CANT"))
cmd.Parameters = Array As String("",c.GetString("BCAJAS"), c.GetString("CANTC"),"","", c.GetString("HVD_CLIENTE"), c.GetString("HVD_PROID"),fecha3&" "&hora(0), d4.GetString("CAT_CL_RUTA"),ALMACEN,l_ruta.Text,c.GetString("HVD_CODPROMO"),c.GetString("HVD_NUM_TICKET"), c.GetString("HVD_CANT")) cmd.Parameters = Array As String("",c.GetString("BCAJAS"), c.GetString("CANTC"),"","", c.GetString("HVD_CLIENTE"), c.GetString("HVD_PROID"),fecha3&" "&hora(0), d4.GetString("CAT_CL_RUTA"),ALMACEN,l_ruta.Text,c.GetString("HVD_CODPROMO"),c.GetString("HVD_NUM_TICKET"), c.GetString("HVD_CANT"))
reqManager.ExecuteCommand(cmd, "update_hvd") reqManager.ExecuteCommand(cmd, "update_hvd")
End If End If
@@ -1047,6 +1062,7 @@ Sub JobDone(Job As HttpJob)
' Log(reqs.Size) ' Log(reqs.Size)
End If End If
Starter.skmt.BeginTransaction Starter.skmt.BeginTransaction
' If reqManager.HandleJob(Job).Rows.Size > 0 Then
For Each records() As Object In result.Rows For Each records() As Object In result.Rows
Dim CAT_CL_CODIGO As String = records(result.Columns.Get("CAT_CL_CODIGO")) Dim CAT_CL_CODIGO As String = records(result.Columns.Get("CAT_CL_CODIGO"))
Dim CAT_CL_RUTA As String = records(result.Columns.Get("CAT_CL_RUTA")) Dim CAT_CL_RUTA As String = records(result.Columns.Get("CAT_CL_RUTA"))
@@ -1071,6 +1087,8 @@ Sub JobDone(Job As HttpJob)
' Log(" ++ insert into kmt_info: "&CAT_CL_RUTA&","&CAT_CL_CODIGO&","&CAT_CL_RUTA&","&CAT_CL_NOMBRE) ' Log(" ++ insert into kmt_info: "&CAT_CL_RUTA&","&CAT_CL_CODIGO&","&CAT_CL_RUTA&","&CAT_CL_NOMBRE)
Starter.skmt.ExecNonQuery2("INSERT INTO kmt_info(CAT_CL_CODIGO,CAT_CL_RUTA,CAT_CL_NOMBRE,CAT_CL_ATIENDE1,CAT_CL_ATIENTE2,CAT_CL_TELEFONO,CAT_CL_EMAIL,CAT_CL_CALLE,CAT_CL_NOEXT,CAT_CL_NOINT,CAT_CL_CALLE1,CAT_CL_CALLE2,CAT_CL_COLONIA,CAT_CL_MUNI,CAT_CL_EDO,CAT_CL_CP,CAT_CL_LONG,CAT_CL_LAT,CAT_CL_BCREDITO, gestion,SECUENCIA) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,0,?)", Array As Object (CAT_CL_CODIGO,CAT_CL_RUTA,CAT_CL_NOMBRE,CAT_CL_ATIENDE1,CAT_CL_ATIENTE2,CAT_CL_TELEFONO,CAT_CL_EMAIL,CAT_CL_CALLE,CAT_CL_NOEXT,CAT_CL_NOINT,CAT_CL_CALLE1,CAT_CL_CALLE2,CAT_CL_COLONIA,CAT_CL_MUNI,CAT_CL_EDO,CAT_CL_CP,CAT_CL_LONG,CAT_CL_LAT,CAT_CL_BCREDITO,CAT_CL_SECUENCIA)) Starter.skmt.ExecNonQuery2("INSERT INTO kmt_info(CAT_CL_CODIGO,CAT_CL_RUTA,CAT_CL_NOMBRE,CAT_CL_ATIENDE1,CAT_CL_ATIENTE2,CAT_CL_TELEFONO,CAT_CL_EMAIL,CAT_CL_CALLE,CAT_CL_NOEXT,CAT_CL_NOINT,CAT_CL_CALLE1,CAT_CL_CALLE2,CAT_CL_COLONIA,CAT_CL_MUNI,CAT_CL_EDO,CAT_CL_CP,CAT_CL_LONG,CAT_CL_LAT,CAT_CL_BCREDITO, gestion,SECUENCIA) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,0,?)", Array As Object (CAT_CL_CODIGO,CAT_CL_RUTA,CAT_CL_NOMBRE,CAT_CL_ATIENDE1,CAT_CL_ATIENTE2,CAT_CL_TELEFONO,CAT_CL_EMAIL,CAT_CL_CALLE,CAT_CL_NOEXT,CAT_CL_NOINT,CAT_CL_CALLE1,CAT_CL_CALLE2,CAT_CL_COLONIA,CAT_CL_MUNI,CAT_CL_EDO,CAT_CL_CP,CAT_CL_LONG,CAT_CL_LAT,CAT_CL_BCREDITO,CAT_CL_SECUENCIA))
Next Next
Starter.skmt.ExecNonQuery2("INSERT INTO kmt_info(CAT_CL_CODIGO,CAT_CL_RUTA,CAT_CL_NOMBRE,CAT_CL_ATIENDE1,CAT_CL_ATIENTE2,CAT_CL_TELEFONO,CAT_CL_EMAIL,CAT_CL_CALLE,CAT_CL_NOEXT,CAT_CL_NOINT,CAT_CL_CALLE1,CAT_CL_CALLE2,CAT_CL_COLONIA,CAT_CL_MUNI,CAT_CL_EDO,CAT_CL_CP,CAT_CL_LONG,CAT_CL_LAT,CAT_CL_BCREDITO, gestion,SECUENCIA) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,0,?)", Array As Object (63403,1000, "VENTA RECHAZO","","","","","","","","","","","","","","-98.8357694","19.6906052","0","1"))
' End If
Starter.skmt.TransactionSuccessful Starter.skmt.TransactionSuccessful
Starter.skmt.EndTransaction Starter.skmt.EndTransaction
Listo1 = 1 Listo1 = 1
@@ -1572,7 +1590,7 @@ Sub connecta_Click
reqManager.ExecuteQuery(cmd , 0, "version") reqManager.ExecuteQuery(cmd , 0, "version")
Dim cmd As DBCommand Dim cmd As DBCommand
cmd.Initialize cmd.Initialize
cmd.Name = "select_ruta_re_REPG_MAZAPA5" cmd.Name = "select_ruta_re_REPG_MAZAPA6"
cmd.Parameters = Array As Object(ALMACEN, e_ruta.text, imei) cmd.Parameters = Array As Object(ALMACEN, e_ruta.text, imei)
' Log($"${ALMACEN}, ${e_ruta.text}, ${imei}"$) ' Log($"${ALMACEN}, ${e_ruta.text}, ${imei}"$)
reqManager.ExecuteQuery(cmd , 0, "ruta") reqManager.ExecuteQuery(cmd , 0, "ruta")
@@ -1976,3 +1994,9 @@ End Sub
Private Sub p_prod_Click Private Sub p_prod_Click
End Sub End Sub
Private Sub b_venta_emp_Click
Starter.skmt.ExecNonQuery("delete from CUENTAA")
Starter.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object("63403"))
B4XPages.ShowPage("Cliente")
End Sub

BIN
B4A/Files/0marker-azul5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
B4A/Files/0marker-azul7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
B4A/Files/0marker-azul8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Some files were not shown because too many files have changed in this diff Show More