mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-18 02:29:13 +00:00
- Se agregó "CHECKLIST" en el nombre cuando se envia el evento de "Salida de almacen".
- Se agregó el evento de "Fin Dia" a la bitacora.
This commit is contained in:
@@ -2145,6 +2145,7 @@ Sub e_ruta_EnterPressed
|
||||
If File.Exists(File.DirInternal,"FOTO2.jpg") Then File.Delete(File.DirInternal,"FOTO2.jpg")
|
||||
If File.Exists(File.DirInternal,"FOTO3.jpg") Then File.Delete(File.DirInternal,"FOTO3.jpg")
|
||||
If File.Exists(File.DirInternal,"FOTO4.jpg") Then File.Delete(File.DirInternal,"FOTO4.jpg")
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now),usuario,ALMACEN,l_ruta.Text,"Fin Día", "",Subs.fechanormal(DateTime.Now),Subs.fechanormal(DateTime.Now),Starter.lat_gps,Starter.lon_gps,"2","","")
|
||||
B4XPage_Appear
|
||||
End If
|
||||
Else if e_ruta.Text = "FIN DIA" Then
|
||||
|
||||
@@ -327,7 +327,7 @@ Sub lv_catalogos_ItemClick (Position As Int, Value As Object)
|
||||
For i=0 To c2.RowCount -1
|
||||
c2.Position=i
|
||||
Private tm As Map = Subs.procesaPromocion(c2.GetString("CAT_GP_ID"), clienteId)
|
||||
' promosC.procesaPromocion(c2.GetString("CAT_GP_ID"), clienteId)
|
||||
promosC.procesaPromocion(c2.GetString("CAT_GP_ID"), clienteId)
|
||||
If tm.Get("status") = "ok" Then 'Solo muestrala si hay producto.
|
||||
lv_promos.AddTwoLines(c2.GetString("CAT_GP_NOMBRE"),"# " & c2.GetString("CAT_GP_ALMACEN") & " $ " & c2.GetString("CAT_GP_PRECIO") & " F:" & tm.Get("mp").As(Map).Get("prodsFijosCant") & " V:" & tm.Get("mp").As(Map).Get("prodsVariablesCant"))
|
||||
End If
|
||||
|
||||
@@ -888,7 +888,7 @@ Version=12.8
|
||||
#Region Project Attributes
|
||||
#ApplicationLabel: Kelloggs Venta
|
||||
#VersionCode: 3000
|
||||
#VersionName: 4.05.09
|
||||
#VersionName: 4.05.10
|
||||
#SupportedOrientations: portrait
|
||||
#CanInstallToExternalStorage: False
|
||||
#BridgeLogger:true
|
||||
|
||||
@@ -91,6 +91,6 @@ ModuleClosedNodes6=
|
||||
ModuleClosedNodes7=
|
||||
ModuleClosedNodes8=
|
||||
ModuleClosedNodes9=
|
||||
NavigationStack=C_Cliente,JobDone,4047,5,Subs,bitacora,1716,0,Promociones,restaFijosPromo,328,1,C_Productos,lv_catalogos_ItemClick,302,5,C_Cliente,Bt_GuardarBoleta_Click,3674,0,C_Cliente,BP_DOE_R1_Click,4205,0,C_Cliente,b_inicioFinVenta_Click,4215,0,Visual Designer,cliente.bal,-100,2,C_Cliente,Guardar_Click,959,6,Main,Globals,26,0
|
||||
NavigationStack=C_Principal,B_OK_PAS_Click,2316,0,C_Cliente,Guardar_Click,959,6,B4XMainPage,B4XPage_Created,127,0,C_Productos,lv_catalogos_ItemClick,323,5,Promociones,restaFijosPromo,363,6,C_Principal,SUBIR_INFO_PEDIDO,2841,0,C_CheckList,Bt_GuardarCheck_Click,558,0,Subs,bitacora,1696,2,C_Principal,B4XPage_Appear,304,0,C_Principal,e_ruta_EnterPressed,2131,3,Main,Globals,24,0
|
||||
SelectedBuild=0
|
||||
VisibleModules=1,28,11,3,12,4,29,8,26,13
|
||||
VisibleModules=1,28,11,3,12,4,29,8,26,13,2
|
||||
|
||||
@@ -339,6 +339,7 @@ Sub restaFijosPromo(idPromo As String, promoMap As Map) As Map 'ignore
|
||||
Log($"Prods fijos requeridos ${prodsFijos.Size}"$)
|
||||
If prodsFijos.Size = 0 Then inventariosDisponiblesParaEstaPromo.Put("resultado", "ok") 'Si no lleva prods fijos la promo, entonces ponemos FIJOS OK.
|
||||
For p = 0 To prodsFijos.Size - 1
|
||||
Log(555)
|
||||
Private t As String = prodsFijos.Get(p) 'Obtenemos el Id de este producto desde la lista de productos fijos.
|
||||
Private p2 As Map = prodsmap.Get(t) 'Obtenemos un mapa con los datos de este producto (id, precio, almacen, tipo, piezas, etc.)
|
||||
If thisLog Then Log($"T: ${t}, prod ${p2.Get("idProducto")}, piezas: ${p2.Get("piezas")}"$) 'Producto y piezas requeridas
|
||||
@@ -354,6 +355,10 @@ Sub restaFijosPromo(idPromo As String, promoMap As Map) As Map 'ignore
|
||||
If thisLog Then LogColor("Sin suficiente inventario fijo: " & t, Colors.Blue)
|
||||
Exit
|
||||
End If
|
||||
|
||||
'Aqui necesitamos el inventario del produccto de "t"
|
||||
traeInventario(t, "CAT_GUNAPROD2") 'Hay que poner codigo para seleccionar la tabla dependiendo de si es venta o abordo
|
||||
|
||||
If i - p2.Get("piezas") < 0 Then
|
||||
inventariosDisponiblesParaEstaPromo.Put("resultado", "No hay suficiente producto para la promocion.") 'Si el inventario de este producto sale negativo, quiere decir que no tenemos suficiente inventario para la promoción.
|
||||
Exit
|
||||
@@ -455,4 +460,14 @@ Sub traeListFromPromo(col As String, promo As String) As List
|
||||
res.Initialize
|
||||
End If
|
||||
Return res
|
||||
End Sub
|
||||
|
||||
'Regresa el inventario de un producto dado de la tabla dada.
|
||||
Sub traeInventario(id As String, tabla As String) As Int
|
||||
Private inv As Int = 0
|
||||
Private c As ResultSet = db.ExecQuery($"select CAT_GP_ALMACEN from ${tabla} where CAT_GP_ID = ${id}"$)
|
||||
Do While c.NextRow
|
||||
inv = c.GetInt("CAT_GP_ALMACEN")
|
||||
Loop
|
||||
Return inv
|
||||
End Sub
|
||||
@@ -1700,6 +1700,7 @@ Sub bitacora(fechab As String, usuariob As String, almacenb As String, rutab As
|
||||
Log("BITACORA3")
|
||||
Private nombreCliente As String = traeNombreCliente(clienteb)
|
||||
If eventob = "Llega a almacen" Then nombreCliente = "BOLETA"
|
||||
If eventob = "Salida almacen" Then nombreCliente = "CHECKLIST"
|
||||
Log($"'${almacenb}', '${usuariob}', '${rutab}', '${eventob}', '${clienteb}', '${nombreCliente}','${ iniciob}', '${finb}','${ latitudb}','${ longitudb}', '${precision}', '${motivonoventa}', '${motivonovisita}', '${fechab}'"$)
|
||||
' TMP_ALMACEN, TMP_USUARIO, TMP_RUTA, TMP_EVENTO, TMP_ID_CLIENTE, TMP_NOMBRE_CLIENTE, TMP_INICIO, TMP_FINAL, TMP_LATITUD, TMP_LONGITUD, TMP_PRESICION, TMP_MOTIVO_NO_VENTA, TMP_MOTIVO_NO_VISITA, TMP_FECHA_SINC, TMP_FECHA_MOVIL
|
||||
cmd.Parameters = Array As Object(almacenb, usuariob, rutab, eventob, clienteb, nombreCliente, iniciob, finb, latitudb, longitudb, precision, motivonoventa, motivonovisita, fechab)
|
||||
|
||||
Reference in New Issue
Block a user