mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-17 18:26:11 +00:00
- VERSION 4.07.24
- Se escondió el boton de Whatsapp. - Se escondió el boton de "Motivo de no venta" si todavia no se hace el "Checklist"
This commit is contained in:
@@ -852,7 +852,7 @@ Sub GPS_LocationChanged (Location1 As Location)
|
||||
|
||||
' Log($"${gps_boton_doe}|${clienteConPromo}"$)
|
||||
|
||||
If gps_boton_doe = "1" And clienteConPromo = "0" And revisaExistenciasDOE Then b_whats.Visible = True
|
||||
' If gps_boton_doe = "1" And clienteConPromo = "0" And revisaExistenciasDOE Then b_whats.Visible = True
|
||||
If Not(clienteDeudor) Then B_VENTA.Visible = True 'Si el cliente no tiene adeudo, habilitamos el boton de venta
|
||||
If Not(clienteId.StartsWith("N")) And la_cuenta.Text <> "0" Then b_noVenta.Visible = True 'Ni cliente nuevo, ni abordo.
|
||||
If Not(p_rechazoDOE.Visible) Then pedido_doe_muestra
|
||||
@@ -4061,6 +4061,7 @@ Private Sub l_ubicacion2_LongClick
|
||||
If laDist > 49 Then
|
||||
p_pideGeoPass.BringToFront
|
||||
p_pideGeoPass.Visible = True
|
||||
et_geopass.RequestFocus
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -421,12 +421,14 @@ Sub B4XPage_Appear
|
||||
B_MAPA_RUTA.Visible = False
|
||||
NUEVO.Visible = False
|
||||
B_PROXIMA.Visible = False
|
||||
b_motivoNoVisita.Visible = False
|
||||
Else
|
||||
' PONER EN FALSE
|
||||
Btn_CheckList.Visible = False
|
||||
B_MAPA_RUTA.Visible = True
|
||||
NUEVO.Visible = True
|
||||
B_PROXIMA.Visible = True
|
||||
b_motivoNoVisita.Visible = True
|
||||
If usuario = "JOSELUIS" Then Btn_CheckList.Visible = True 'Mod por CHV - 211125
|
||||
End If
|
||||
contador_strem = 0
|
||||
@@ -3606,6 +3608,8 @@ Private Sub b_noVisita_Click
|
||||
b_motivoNoVisita.Background = cd1
|
||||
B_MAPA_RUTA.Enabled = False
|
||||
trabajar.Enabled = False
|
||||
NUEVO.Enabled = False
|
||||
B_PROXIMA.Enabled = False
|
||||
Else If result = DialogResponse.CANCEL Then
|
||||
ToastMessageShow("CANCELAR", False)
|
||||
End If
|
||||
@@ -3631,6 +3635,8 @@ Private Sub b_reactivaRuta_Click
|
||||
b_motivoNoVisita.Background = cd1
|
||||
B_MAPA_RUTA.Enabled = True
|
||||
trabajar.Enabled = True
|
||||
NUEVO.Enabled = True
|
||||
B_PROXIMA.Enabled = True
|
||||
p_transparente2.Visible = False
|
||||
ToastMessageShow("Ruta activa", False)
|
||||
Else
|
||||
|
||||
@@ -637,8 +637,8 @@ Sub b_prodMas_Click
|
||||
' Log($"INV ${clv_prods_ll.GetValue(index).As(Map).Get("id")} = ${iq.GetString("CAT_GP_ALMACEN")}"$)
|
||||
End If
|
||||
' Log(tmpMap)
|
||||
Log($"${kh.traeLimiteCredito(Subs.traeCliente)} < ${kh.totalPedido + precio}"$)
|
||||
Log(kh.traeLimiteCredito(Subs.traeCliente) < (kh.totalPedido + precio))
|
||||
' Log($"${kh.traeLimiteCredito(Subs.traeCliente)} < ${kh.totalPedido + precio}"$)
|
||||
' Log(kh.traeLimiteCredito(Subs.traeCliente) < (kh.totalPedido + precio))
|
||||
If buttonTag = "vendido" Then
|
||||
' Log("VENDIDO")
|
||||
' Log($"${(laCant.Text + 1 <= inv)} And ${(kh.totalPedido - precio > 1)}"$)
|
||||
@@ -727,7 +727,7 @@ Private Sub et_pCant_TextChanged (Old As String, New As String)
|
||||
' If Not(Old = "0" And New = "") And etCantHasFocus Then cuentaProds
|
||||
If etCantHasFocus = True Then
|
||||
Try
|
||||
' LogColor($"txt changed: ${Old}|${New}, hasfocus=${etCantHasFocus}"$,Colors.Magenta)
|
||||
LogColor($"txt changed: ${Old}|${New}, hasfocus=${etCantHasFocus}"$,Colors.Magenta)
|
||||
Dim index As Int = clv_prods_ll.GetItemFromView(Sender)
|
||||
Dim pnl0 As B4XView = clv_prods_ll.GetPanel(index)
|
||||
Dim pnl As B4XView = pnl0.GetView(0)
|
||||
@@ -744,7 +744,6 @@ Private Sub et_pCant_TextChanged (Old As String, New As String)
|
||||
existencias = NumberFormat2(existencias, 1, 0, 0, False)
|
||||
Log($"${laCant.text}, ${precio}, DISPONIBLES: ${disp}"$)
|
||||
Private inv As String=clv_prods_ll.GetValue(index).As(Map).Get("almacen")
|
||||
Private inv As String=clv_prods_ll.GetValue(index).As(Map).Get("almacen")
|
||||
If(New = "" Or New = Null) Then New = 0
|
||||
If(New > invTotal) Then
|
||||
Sender.As(EditText).text = invTotal
|
||||
@@ -775,14 +774,20 @@ Private Sub et_pCant_TextChanged (Old As String, New As String)
|
||||
End If
|
||||
|
||||
' If New < existencias Then
|
||||
Log(999)
|
||||
Log($"${kh.traeLimiteCredito(Subs.traeCliente)} < ${kh.totalPedido + (precio*laCant.text)}"$)
|
||||
Log(kh.traeLimiteCredito(Subs.traeCliente) < (kh.totalPedido + (precio*laCant.text)))
|
||||
If kh.traeLimiteCredito(Subs.traeCliente) < (kh.totalPedido + (precio*laCant.text)) Then
|
||||
Log($"#######################${CRLF}#### LIMITE CREDITO SUPERADO${CRLF}#######################"$)
|
||||
ToastMessageShow("LIMITE DE CREDITO SUPERADO", False)
|
||||
laCant.text = 0
|
||||
End If
|
||||
Log(999)
|
||||
Private limCred As Double = kh.traeLimiteCredito(Subs.traeCliente)
|
||||
' Log($"${NumberFormat(limCred,1,2)} < ${kh.totalPedido + (precio*laCant.text)}"$)
|
||||
' Log(NumberFormat2(limCred,1,0,0,False))
|
||||
' limCred = NumberFormat2(limCred,1,0,0,False)
|
||||
Log((kh.totalPedido + (precio*laCant.text)))
|
||||
Log("|" & (limCred < (kh.totalPedido + (precio*laCant.text))) & "|")
|
||||
If limCred < (kh.totalPedido + (precio*laCant.text)) Then
|
||||
Log($"#######################${CRLF}#### LIMITE CREDITO SUPERADO${CRLF}#######################"$)
|
||||
ToastMessageShow("LIMITE DE CREDITO SUPERADO", False)
|
||||
laCant.text = 0
|
||||
Else
|
||||
Log("#### LIMITE DE CREDITO")
|
||||
End If
|
||||
' End If
|
||||
|
||||
' If Not(Old = "0" And New = "") And laCant.Text <> Null And laCant.Text <> "" And etCantHasFocus Then
|
||||
@@ -812,16 +817,20 @@ Private Sub et_pCant_TextChanged (Old As String, New As String)
|
||||
End Sub
|
||||
|
||||
Private Sub et_pCant_FocusChanged (HasFocus As Boolean)
|
||||
' LogColor($"focus changed=${HasFocus}"$, Colors.Magenta)
|
||||
LogColor($"focus changed=${HasFocus}"$, Colors.Magenta)
|
||||
etCantHasFocus = HasFocus
|
||||
Dim index As Int = clv_prods_ll.GetItemFromView(Sender)
|
||||
Dim pnl0 As B4XView = clv_prods_ll.GetPanel(index)
|
||||
Dim pnl As B4XView = pnl0.GetView(0)
|
||||
Dim laCant As B4XView = pnl.GetView(2).GetView(2)
|
||||
Private id As String=clv_prods_ll.GetValue(index).As(Map).Get("id")
|
||||
invTotal = laCant.Text + Subs.traeinventario(id)
|
||||
LogColor("InvTotal PRODMAS: " & invTotal, Colors.Red)
|
||||
cuentaProds
|
||||
Try
|
||||
Dim index As Int = clv_prods_ll.GetItemFromView(Sender)
|
||||
Dim pnl0 As B4XView = clv_prods_ll.GetPanel(index)
|
||||
Dim pnl As B4XView = pnl0.GetView(0)
|
||||
Dim laCant As B4XView = pnl.GetView(2).GetView(2)
|
||||
Private id As String=clv_prods_ll.GetValue(index).As(Map).Get("id")
|
||||
invTotal = laCant.Text + Subs.traeinventario(id)
|
||||
LogColor("InvTotal PRODMAS: " & invTotal, Colors.Red)
|
||||
cuentaProds
|
||||
Catch
|
||||
Log(LastException)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Sub cuentaProds
|
||||
|
||||
Binary file not shown.
@@ -887,7 +887,7 @@ Version=12.8
|
||||
#Region Project Attributes
|
||||
#ApplicationLabel: Kelloggs Venta
|
||||
#VersionCode: 3000
|
||||
#VersionName: 4.07.21
|
||||
#VersionName: 4.07.24
|
||||
#SupportedOrientations: portrait
|
||||
#CanInstallToExternalStorage: False
|
||||
#BridgeLogger:true
|
||||
|
||||
@@ -76,7 +76,7 @@ ModuleClosedNodes2=
|
||||
ModuleClosedNodes20=
|
||||
ModuleClosedNodes21=
|
||||
ModuleClosedNodes22=
|
||||
ModuleClosedNodes23=
|
||||
ModuleClosedNodes23=70
|
||||
ModuleClosedNodes24=
|
||||
ModuleClosedNodes25=
|
||||
ModuleClosedNodes26=
|
||||
@@ -91,6 +91,6 @@ ModuleClosedNodes6=
|
||||
ModuleClosedNodes7=
|
||||
ModuleClosedNodes8=
|
||||
ModuleClosedNodes9=
|
||||
NavigationStack=Subs,bitacora,1707,0,Main,Globals,24,0,C_Principal,Class_Globals,1,0,C_Principal,b_noVisita_Click,3591,6,C_Principal,p_transparente_Click,3560,0,C_Principal,b_motivoNoVisita_Click,3558,0,C_Principal,trabajar_Click,487,0,Visual Designer,principal.bal,-100,6,C_Principal,B4XPage_Appear,487,6,Main,Activity_Create,28,0
|
||||
NavigationStack=C_Productos,et_pCant_FocusChanged,808,1,C_Productos,l_prodX_LongClick,1167,0,C_Productos,et_pCant_TextChanged,719,6,kms_helperSubs,totalPedido,1181,0,kms_helperSubs,ping,1129,0,kms_helperSubs,traeLimiteCredito,1163,1,Visual Designer,principal.bal,-100,2,C_Principal,B4XPage_Appear,424,5,Subs,guardaProductoSinGestion,922,0,C_Productos,b_prodMas_Click,645,0
|
||||
SelectedBuild=0
|
||||
VisibleModules=1,28,11,3,26,23,29,12,4,13
|
||||
|
||||
@@ -848,8 +848,8 @@ End Sub
|
||||
Sub traeCliente As String 'ignore
|
||||
Private c As Cursor
|
||||
Private cl As String
|
||||
c=Starter.skmt.ExecQuery("Select CUENTA from cuentaa")
|
||||
c.Position=0
|
||||
c = Starter.skmt.ExecQuery("Select CUENTA from cuentaa")
|
||||
c.Position = 0
|
||||
cl = c.GetString("CUENTA")
|
||||
c.Close
|
||||
Return cl
|
||||
@@ -926,8 +926,8 @@ Sub guardaProductoSinGestion(cedis As String, costoU As String, cant As String,
|
||||
If cedis <> "DUR" Then Starter.skmt.ExecNonQuery2($"update ${traeTablaProds(tipoVenta)} set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? "$, Array As Object(cant, prodId))
|
||||
c=Starter.skmt.ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, SUM(PE_COSTO_SIN) AS TOTAL_CLIE_SIN FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")
|
||||
c.Position=0
|
||||
Log("###### delete from pedido_cliente - " & traeCliente & "|" & clienteId)
|
||||
Log($"delete from pedido_cliente where PC_CLIENTE = '${traeCliente}'"$)
|
||||
' Log("###### delete from pedido_cliente - " & traeCliente & "|" & clienteId)
|
||||
' Log($"delete from pedido_cliente where PC_CLIENTE = '${traeCliente}'"$)
|
||||
Starter.skmt.ExecNonQuery($"delete from pedido_cliente where PC_CLIENTE = '${traeCliente}'"$)
|
||||
Starter.skmt.ExecNonQuery2("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT,PC_ALMACEN,PC_RUTA,PC_COSTO_SIN) VALUES (?,?,?,?,?,?,?,?,?,?)", Array As Object(clienteId, fecha, usuario, c.GetString("CANT_CLIE"), c.GetString("TOTAL_CLIE"), B4XPages.MainPage.lon_gps, B4XPages.MainPage.lat_gps, cedis, rutaV, c.GetString("TOTAL_CLIE_SIN")))
|
||||
End Sub
|
||||
|
||||
@@ -198,6 +198,7 @@ Sub RD_restaura_cat_gunaprod
|
||||
ToastMessageShow($"No hay respaldo GP para la fecha"$, True)
|
||||
End If
|
||||
End If
|
||||
c.Close
|
||||
Log("R-GP: " & ((DateTime.Now - inicio)/1000) & " segs")
|
||||
End Sub
|
||||
|
||||
@@ -241,7 +242,7 @@ Sub RD_restaura_cat_gunaprod2
|
||||
ToastMessageShow($"No hay respaldo GP2 para la fecha"$, True)
|
||||
End If
|
||||
End If
|
||||
|
||||
c.Close
|
||||
'Agregamos al inventario las cantidades del abordo
|
||||
Private sqlAbordo As String = ""
|
||||
Private sqlfechaAbordo As String = ""
|
||||
@@ -307,6 +308,7 @@ Sub RD_restaura_cat_detalle_paq
|
||||
ToastMessageShow($"No hay respaldo DP para la fecha"$, True)
|
||||
End If
|
||||
End If
|
||||
c.Close
|
||||
Log("R-DP: " & ((DateTime.Now - inicio)/1000) & " segs")
|
||||
End Sub
|
||||
|
||||
@@ -356,6 +358,7 @@ Sub RD_restaura_kmt_info
|
||||
ToastMessageShow($"No hay respaldo KMTI para la fecha"$, True)
|
||||
End If
|
||||
End If
|
||||
c.Close
|
||||
Log("R-KMT: " & ((DateTime.Now - inicio)/1000) & " segs")
|
||||
End Sub
|
||||
|
||||
@@ -398,6 +401,7 @@ Sub RD_restaura_promos_comp
|
||||
ToastMessageShow($"No hay respaldo PC para la fecha"$, True)
|
||||
End If
|
||||
End If
|
||||
c.Close
|
||||
Log("R-KMT: " & ((DateTime.Now - inicio)/1000) & " segs")
|
||||
End Sub
|
||||
|
||||
@@ -440,6 +444,7 @@ Sub RD_restaura_cat_rmi
|
||||
ToastMessageShow($"No hay respaldo RMI para la fecha"$, True)
|
||||
End If
|
||||
End If
|
||||
c.Close
|
||||
Log("R-RMI: " & ((DateTime.Now - inicio)/1000) & " segs")
|
||||
End Sub
|
||||
|
||||
@@ -501,6 +506,7 @@ Sub agregaColumna(db As SQL, tabla As String, columna As String, tipo As String)
|
||||
db.ExecNonQuery($"ALTER TABLE ${tabla} ADD COLUMN ${columna} ${tipo}"$)
|
||||
Log($"Columna "${columna} ${tipo}", agregada a "${tabla}"."$)
|
||||
End If
|
||||
c.Close
|
||||
Catch 'Si no funciona "pragma_table_info" lo hacemos con try/catch
|
||||
Try
|
||||
db.ExecNonQuery($"ALTER TABLE ${tabla} ADD COLUMN ${columna} ${tipo}"$)
|
||||
@@ -526,10 +532,10 @@ Sub getTableColumnList(db As SQL, table As String) As String 'ignore
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
c.Close
|
||||
Else
|
||||
Return "No existe la tabla."
|
||||
End If
|
||||
c.Close
|
||||
Return l
|
||||
End Sub
|
||||
|
||||
@@ -548,10 +554,10 @@ Sub getTableColumnListName(db As SQL, table As String) As String 'ignore
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
c.Close
|
||||
Else
|
||||
Return "No existe la tabla."
|
||||
End If
|
||||
c.Close
|
||||
Return l
|
||||
End Sub
|
||||
|
||||
@@ -1112,6 +1118,7 @@ Sub traeDescXTipo(clienteId As String, tipo As String) As String 'ignore
|
||||
If tipo = "RTEC" Then desc = c.GetString("CAT_CL_DESCUENTO_RTEC")
|
||||
If tipo = "SALTY SNACKS" Then desc = c.GetString("CAT_CL_DESCUENTO_SS")
|
||||
End If
|
||||
c.Close
|
||||
Return desc
|
||||
End Sub
|
||||
|
||||
@@ -1160,10 +1167,10 @@ Sub traeLimiteCredito(idCliente As String) As Double
|
||||
Private limite As Double = 10000000
|
||||
Private c As ResultSet = khdb.ExecQuery($"select ifnull(CAT_CL_BFACTURA,10000000) as CAT_CL_BFACTURA from kmt_info where CAT_CL_CODIGO = '${idCliente}' and CAT_CL_BCREDITO = 0"$)
|
||||
Do While c.NextRow
|
||||
Log($"|${c.GetString("CAT_CL_BFACTURA")}|"$)
|
||||
limite = c.GetString("CAT_CL_BFACTURA")
|
||||
' Log($"-${c.GetDouble("CAT_CL_BFACTURA")}-"$)
|
||||
limite = c.GetDouble("CAT_CL_BFACTURA")
|
||||
Loop
|
||||
Log($"Limite: ${NumberFormat2(limite, 1, 0, 0, True)}"$)
|
||||
' Log($"Limite: ${NumberFormat2(limite, 1, 0, 0, True)}"$)
|
||||
Return limite
|
||||
End Sub
|
||||
|
||||
@@ -1178,7 +1185,7 @@ Sub totalPedido As Long 'ignore
|
||||
' Log("|"&cT.GetLong("total")&"|"&pTotal)
|
||||
Private tempT As String = cT.GetLong("total")
|
||||
If tempT <> "null" And tempT <> Null Then
|
||||
Log("|"&cT.GetLong("total")&"|")
|
||||
' Log("|"&cT.GetLong("total")&"|")
|
||||
pTotal = tempT
|
||||
End If
|
||||
' Log($"Cliente actual=${traeCliente}, hayPedido=${hay}"$)
|
||||
|
||||
Reference in New Issue
Block a user