-Se quitó la restricción de los RMIs, ahora se pueden meter puros RMIs y ya no los borra del pedido.

This commit is contained in:
2024-04-12 14:43:09 -06:00
parent e122b8c83e
commit 9e44af4b70
5 changed files with 14 additions and 7 deletions

View File

@@ -390,7 +390,7 @@ Sub ListView1_ItemLongClick (Position As Int, Value As Object)
End Sub
Sub gest_Click
Log($"${cuest.encuestaIniciada} - ${cuest.clienteConCuestionario(Subs.traeCliente)}"$)
' Log($"${cuest.encuestaIniciada} - ${cuest.clienteConCuestionario(Subs.traeCliente)}"$)
If Not(cuest.encuestaIniciada) And Not(cuest.clienteConCuestionario(Subs.traeCliente)) Then
cuest.agregaPregunta("1", "¿Se puede acceder al negocio o está enrejado?", Array As String("No, está enrejado o no se tiene acceso", "Si se pude acceder"))
Return False
@@ -1214,7 +1214,7 @@ Sub B_INV_Click
End Sub
Sub B_VENTA_Click
Log($"${cuest.encuestaIniciada} - ${cuest.clienteConCuestionario(Subs.traeCliente)}"$)
' Log($"${cuest.encuestaIniciada} - ${cuest.clienteConCuestionario(Subs.traeCliente)}"$)
If Not(cuest.encuestaIniciada) And Not(cuest.clienteConCuestionario(Subs.traeCliente)) Then
cuest.agregaPregunta("1", "¿Se puede acceder al negocio o está enrejado?", Array As String("No, está enrejado o no se tiene acceso", "Si se pude acceder"))
Return False

View File

@@ -1074,6 +1074,7 @@ Private Sub lv_prodsPedido_ItemLongClick (Position As Int, Value As Object)
If c.GetString("CUANTOS") > 0 Then
Log($"============== TOTAL = ${c.GetString("TOTAL_CLIE")}"$)
If c.GetString("TOTAL_CLIE") < 1 Then
Log("Borramos RMI")
Starter.skmt.ExecNonQuery("delete from pedido where PE_PRONOMBRE like 'CAMBIO%' and PE_CLIENTE In (select cuenta from cuentaa)"$)
End If
@@ -1085,8 +1086,7 @@ Private Sub lv_prodsPedido_ItemLongClick (Position As Int, Value As Object)
Starter.skmt.ExecNonQuery("UPDATE kmt_info set gestion = 0 where CAT_CL_CODIGO In (select cuenta from cuentaa)")
End If
Log("xxx")
Subs.revisaRMIs(Subs.traeCliente)
Subs.revisaRMIs(Subs.traeCliente)
b_terminar1_Click
End If
Else
@@ -1143,7 +1143,7 @@ Sub l_prodX_Click
End Sub
Private Sub l_prodX_LongClick
' Log("longClic = "&Sender.as(Label).Text)
Log("longClic = "&Sender.as(Label).Text)
If Subs.traeCliente <> 0 Then
Dim index As Int = clv_prods_ll.GetItemFromView(Sender)
nuevaCantRMI = 0
@@ -1455,6 +1455,7 @@ Private Sub b_rmi_mas_Click
End If
nuevaCantRMI = (rmiMap.Get("totalRMI") - l_rmi_cant.Text) * -1
Log(nuevaCantRMI)
p_botonesVenta.Visible = True
End Sub
Private Sub b_rmi_Click

View File

@@ -1398,7 +1398,7 @@ Version=12.8
#Region Project Attributes
#ApplicationLabel: Durakelo
#VersionCode: 1
#VersionName: 4.04.03ENCU
#VersionName: 4.04.011ENCU
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False

View File

@@ -73,6 +73,6 @@ ModuleClosedNodes6=
ModuleClosedNodes7=
ModuleClosedNodes8=
ModuleClosedNodes9=
NavigationStack=C_Principal,connecta_Click,1970,0,C_Cliente,B_INV_Click,1097,0,Main,Globals,25,0,C_Cliente,B4XPage_Appear,224,0,B4XMainPage,B4XPage_Appear,212,0,Subs,fechanormal,1396,0,C_Principal,cargar_Click,940,6,C_Principal,JobDone,1127,6,C_Cliente,B_IMP_Click,659,6,C_Cliente,B_IMP2_Click,923,6
NavigationStack=C_Productos,b_rmi_Click,1464,0,C_Productos,b_prodMas_Click,652,0,Subs,actualizaProducto,783,0,C_Productos,b_terminar1_Click,828,0,C_Productos,lv_prodsPedido_ItemLongClick,1082,5,Visual Designer,productos.bal,-100,2,Subs,revisaRMIs,1429,6,C_Productos,B4XPage_Appear,194,0,C_Productos,B4XPage_CloseRequest,505,0,C_Productos,b_rmi_mas_Click,1448,2
SelectedBuild=0
VisibleModules=1,2,10,4,5,6,8,9,11,24,23

View File

@@ -1428,6 +1428,12 @@ End Sub
'Borra los RMIs del pedido mayores que los productos del pedido y si borro RMIs regresa FALSE.
Sub revisaRMIs(clienteId As String) As Boolean 'ignore
Log("Revisamos RMIs y borramos si es necesario.")
' ######################################################
Return True ' Regresamos verdadero para brincarnos el candado de RMIs, asi se pueden meter RMIs sin restricción.
' ######################################################
Private validos As Boolean = True
Private cr As Cursor = Starter.skmt.ExecQuery($"select sum(pe_cant) as cuantos from pedido where pe_cedis = 'DUR' and pe_cliente = '${clienteId}'"$)
Private cp As Cursor = Starter.skmt.ExecQuery($"select sum(pe_cant) as cuantos from pedido where pe_cedis <> 'DUR' and pe_cliente = '${clienteId}'"$)