- VERSION 4.11.19

- Se agregó Durakelo a la sección de "Borrar Venta".
- Se agregó la revisión de duplicados para Kelloggs y Durakelo y la opción de borrarlos.
This commit is contained in:
Jose Alberto Guerra Ugalde
2024-11-20 12:40:46 -06:00
parent 79fda54144
commit 4e0980157d
2 changed files with 159 additions and 25 deletions

View File

@@ -34,7 +34,7 @@ Version=12.8
@EndOfDesignText@ @EndOfDesignText@
#Region Project Attributes #Region Project Attributes
#ApplicationLabel: Soporte Keymonsoft #ApplicationLabel: Soporte Keymonsoft
#VersionName: 4.11.18 #VersionName: 4.11.19
'SupportedOrientations possible values: unspecified, landscape or portrait. 'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait #SupportedOrientations: portrait
#CanInstallToExternalStorage: False #CanInstallToExternalStorage: False
@@ -112,8 +112,8 @@ Sub Globals
Private s_tipoVenta As Spinner Private s_tipoVenta As Spinner
Private et_usuario As EditText Private et_usuario As EditText
Dim empresasMap As Map Dim empresasMap As Map
Dim spinnerGunaMap, spinnerKelloggsMap, spinnerKelloggs2Map, spinnerSalmaMap, spinnerDanvitMap, spinnerMardsMap, spinnerEmpresaMap As Map Dim spinnerGunaMap, spinnerKelloggsMap, spinnerKelloggs2Map, spinnerSalmaMap, spinnerDanvitMap, spinnerDurakeloMap, spinnerMardsMap, spinnerEmpresaMap As Map
Dim almacenGuna, almacenKelloggs, almacenKelloggs2, almacenSalma, almacenDanvit, almacenDeRuta, almacenMards, almacenEmpresa As String Dim almacenGuna, almacenKelloggs, almacenKelloggs2, almacenSalma, almacenDanvit, almacenDurakelo, almacenDeRuta, almacenMards, almacenEmpresa As String
Dim tipoVentaKelloggs As String = "VENTA" Dim tipoVentaKelloggs As String = "VENTA"
Private l_version As Label Private l_version As Label
Private l_cita As Label Private l_cita As Label
@@ -182,6 +182,7 @@ Sub Globals
Private b_borrarVentaBV As Button Private b_borrarVentaBV As Button
Private b_forzarVentaBV As Button Private b_forzarVentaBV As Button
Dim laEmpresa As String = "" Dim laEmpresa As String = ""
Dim laRuta As String = ""
Private l_tipoVentaBV As Label Private l_tipoVentaBV As Label
Private p_tipoVentaBV As Panel Private p_tipoVentaBV As Panel
Dim elTipoDeVenta As String Dim elTipoDeVenta As String
@@ -250,10 +251,11 @@ Sub Activity_Create(FirstTime As Boolean)
spinnerKelloggs2Map.Initialize spinnerKelloggs2Map.Initialize
spinnerSalmaMap.Initialize spinnerSalmaMap.Initialize
spinnerDanvitMap.Initialize spinnerDanvitMap.Initialize
spinnerDurakeloMap.Initialize
spinnerMardsMap.Initialize spinnerMardsMap.Initialize
spinnerEmpresaMap.Initialize spinnerEmpresaMap.Initialize
s_empresaBV.Clear s_empresaBV.Clear
s_empresaBV.AddAll(Array As String("-= Seleccione =-", "Danvit", "Guna", "Kelloggs", "Mards", "Salma")) s_empresaBV.AddAll(Array As String("-= Seleccione =-", "Danvit", "Durakelo", "Guna", "Kelloggs", "Mards", "Salma"))
s_tipoVentaBV.AddAll(Array As String("VENTA", "ABORDO")) s_tipoVentaBV.AddAll(Array As String("VENTA", "ABORDO"))
s_tipoVentaBV.SelectedIndex = 0 s_tipoVentaBV.SelectedIndex = 0
@@ -269,6 +271,8 @@ Sub Activity_Create(FirstTime As Boolean)
reqManager.ExecuteQuery(cmd , 0, "almacenesDanvit", 0) reqManager.ExecuteQuery(cmd , 0, "almacenesDanvit", 0)
reqManager.Initialize(Me, DBRS_1781) reqManager.Initialize(Me, DBRS_1781)
cmd.Name = "select_almacenes_DURAKELO"
reqManager.ExecuteQuery(cmd , 0, "almacenesDurakelo", 0)
'Traemos los almacenes de Kelloggs 'Traemos los almacenes de Kelloggs
' cmd.Initialize ' cmd.Initialize
cmd.Name = "select_almacenes_KELL" cmd.Name = "select_almacenes_KELL"
@@ -539,6 +543,12 @@ Sub s_almacen4_ItemClick (Position As Int, Value As Object)
Log($"Almacén ${almacenDanvit} de Danvit seleccionado"$ ) Log($"Almacén ${almacenDanvit} de Danvit seleccionado"$ )
End Sub End Sub
'Sub s_almacen5_ItemClick (Position As Int, Value As Object)
' almacenDurakelo = spinnerDurakeloMap.Get(Value)
' almacenDeRuta = Value
' Log($"Almacén ${almacenDurakelo} de Danvit seleccionado"$ )
'End Sub
Private Sub s_almacenMards_ItemClick (Position As Int, Value As Object) Private Sub s_almacenMards_ItemClick (Position As Int, Value As Object)
almacenMards = spinnerMardsMap.Get(Value) almacenMards = spinnerMardsMap.Get(Value)
almacenDeRuta = Value almacenDeRuta = Value
@@ -589,6 +599,8 @@ Sub borrarVentaForzadaKelloggs
Private rutaVenta As Int Private rutaVenta As Int
If p_borrarVenta.Visible Then If p_borrarVenta.Visible Then
rutaVenta = et_rutaBV.Text.trim rutaVenta = et_rutaBV.Text.trim
almacenKelloggs = spinnerEmpresaMap.Get(s_almacenBV.SelectedItem)
tipoVentaKelloggs = s_tipoVentaBV.SelectedItem
Else Else
rutaVenta = et_ruta2.Text.Trim rutaVenta = et_ruta2.Text.Trim
End If End If
@@ -602,11 +614,32 @@ Sub borrarVentaForzadaKelloggs
reqManager.ExecuteCommand(cmd , "borrarVentaKelloggs") reqManager.ExecuteCommand(cmd , "borrarVentaKelloggs")
End Sub End Sub
'Forzamos el borrado de la venta de Kelloggs
Sub borrarVentaForzadaDurakelo
Private rutaVenta As Int
tipoVentaKelloggs = s_tipoVentaBV.SelectedItem
almacenEmpresa = spinnerEmpresaMap.Get(s_almacenBV.SelectedItem)
If p_borrarVenta.Visible Then
rutaVenta = et_rutaBV.Text.trim
Else
rutaVenta = et_ruta2.Text.Trim
End If
Private usrSoporte As String = "appSoporte"
' Private tipoVenta As String = tipoVentaKelloggs
Private bandera As Int = 1
cmd.Initialize 'Se borra la venta forzada
cmd.Name = "proc_QUITAR_VENTA_DURAKELO"
cmd.Parameters = Array As Object(almacenEmpresa, rutaVenta, usrSoporte, tipoVentaKelloggs)
Log("Madamos borrar venta Kellogs: " & almacenEmpresa&"|"& rutaVenta&"|"&usrSoporte&"|"&tipoVentaKelloggs&"|"&bandera)
reqManager.ExecuteCommand(cmd , "borrarVentaKelloggs")
End Sub
'Forzamos el borrado de la venta de Guna 'Forzamos el borrado de la venta de Guna
Sub borrarVentaForzadaGuna Sub borrarVentaForzadaGuna
Private rutaVenta As Int Private rutaVenta As Int
If p_borrarVenta.Visible Then If p_borrarVenta.Visible Then
rutaVenta = et_rutaBV.Text.trim rutaVenta = et_rutaBV.Text.trim
almacenGuna = spinnerEmpresaMap.Get(s_almacenBV.SelectedItem)
Else Else
rutaVenta = et_ruta1.Text.Trim rutaVenta = et_ruta1.Text.Trim
End If End If
@@ -837,17 +870,27 @@ Sub JobDone(Job As HttpJob)
s_almacen4.Add(records(result.Columns.Get("CAT_AG_NOMBRE"))) s_almacen4.Add(records(result.Columns.Get("CAT_AG_NOMBRE")))
spinnerDanvitMap.Put(records(result.Columns.Get("CAT_AG_NOMBRE")), records(result.Columns.Get("CAT_AG_ID"))) spinnerDanvitMap.Put(records(result.Columns.Get("CAT_AG_NOMBRE")), records(result.Columns.Get("CAT_AG_ID")))
empresasMap.Put("Danvit", spinnerDanvitMap) empresasMap.Put("Danvit", spinnerDanvitMap)
' Log(spinnerDanvitMap)
Next
End If
If result.Tag = "almacenesDurakelo" Then 'query tag
' s_almacen4.Add("-= Selecciona =-")
For Each records() As Object In result.Rows
' s_almacen4.Add(records(result.Columns.Get("CAT_AG_NOMBRE")))
spinnerDurakeloMap.Put(records(result.Columns.Get("CAT_AG_NOMBRE")), records(result.Columns.Get("CAT_AG_ID")))
empresasMap.Put("Durakelo", spinnerDurakeloMap)
' Log(spinnerDanvitMap) ' Log(spinnerDanvitMap)
Next Next
End If End If
End If End If
If Job.JobName = "DBRequest" Then 'Regresamos validación de si la venta esta liquidada (Kellogg's). If Job.JobName = "DBRequest" Then 'Regresamos validación de si la venta esta liquidada (Kellogg's).
Dim result As DBResult = reqManager.HandleJob(Job) Dim result As DBResult = reqManager.HandleJob(Job)
If result.Tag = "revisa_liquidada_Kell" Then 'query tag If result.Tag = "revisa_liquidada_Kell" Or result.Tag = "revisa_liquidada_Durakelo" Then 'query tag
For Each records() As Object In result.Rows For Each records() As Object In result.Rows
For Each k As String In result.Columns.Keys For Each k As String In result.Columns.Keys
Log(result.Tag & ": " & k & ": " & records(result.Columns.Get(k))) Log(result.Tag & ": " & k & ": " & records(result.Columns.Get(k)))
Next Next
Log(records(result.Columns.Get("LIQUIDADA")))
If records(result.Columns.Get("LIQUIDADA")) > 0 Then If records(result.Columns.Get("LIQUIDADA")) > 0 Then
Log("La venta ya esta impresa, forzar el borrado??") Log("La venta ya esta impresa, forzar el borrado??")
' ToastMessageShow("La ruta ya esta impresa!", True) ' ToastMessageShow("La ruta ya esta impresa!", True)
@@ -858,7 +901,8 @@ Sub JobDone(Job As HttpJob)
b_forzarVenta2.Visible = True b_forzarVenta2.Visible = True
End If End If
Else Else
borrarVentaForzadaKelloggs If result.Tag = "revisa_liquidada_Kell" Then borrarVentaForzadaKelloggs
If result.Tag = "revisa_liquidada_Durakelo" Then borrarVentaForzadaDurakelo
End If End If
Next Next
End If End If
@@ -983,6 +1027,28 @@ Sub JobDone(Job As HttpJob)
p_resVentaTransparente.Left = 0 : p_resVentaTransparente.top = 0 p_resVentaTransparente.Left = 0 : p_resVentaTransparente.top = 0
p_resVentaTransparente.Width = Activity.Width : p_resVentaTransparente.height = Activity.height p_resVentaTransparente.Width = Activity.Width : p_resVentaTransparente.height = Activity.height
Subs.centraPanelEnPanel(p_resVenta, p_resVentaTransparente) Subs.centraPanelEnPanel(p_resVenta, p_resVentaTransparente)
p_resVentaTransparente.BringToFront
p_resVentaTransparente.Visible = True
Next
If result.Rows.Size = 0 Then Toast("NO HAY VENTA", 0)
End If
If result.Tag = "select_ventaXrutaDurakelo_soporte" Then 'query tag
b_revisaVenta2.text = "Revisar Venta"
Log(reqManager.HandleJob(Job).Rows.Size)
Log(result.Rows.Size)
Log(456)
For Each records() As Object In result.Rows
For Each k As String In result.Columns.Keys
Log(result.Tag & ": " & k & ": " & records(result.Columns.Get(k)))
Next
Toast($"Ruta ${records(result.Columns.Get("HVD_RUTA"))}${CRLF}$$1.2{records(result.Columns.Get("MONTO"))}, ${records(result.Columns.Get("HVD_TIPOVENTA"))}"$, 0)
Log(123)
l_resVentaTitulo.Text = $"Ruta ${records(result.Columns.Get("HVD_RUTA"))}"$
l_resVentaTotal.Text = $"$$1.2{records(result.Columns.Get("MONTO"))}, ${records(result.Columns.Get("HVD_TIPOVENTA"))}"$
p_resVentaTransparente.Left = 0 : p_resVentaTransparente.top = 0
p_resVentaTransparente.Width = Activity.Width : p_resVentaTransparente.height = Activity.height
Subs.centraPanelEnPanel(p_resVenta, p_resVentaTransparente)
p_resVentaTransparente.BringToFront
p_resVentaTransparente.Visible = True p_resVentaTransparente.Visible = True
Next Next
If result.Rows.Size = 0 Then Toast("NO HAY VENTA", 0) If result.Rows.Size = 0 Then Toast("NO HAY VENTA", 0)
@@ -1177,7 +1243,7 @@ Sub JobDone(Job As HttpJob)
b_pasarInfoMovilKellogs.Text = $"PasarInfoMovil Kelloggs"$ b_pasarInfoMovilKellogs.Text = $"PasarInfoMovil Kelloggs"$
Toast("Corriendo PasarInfoMovil Kelloggs.", 0) Toast("Corriendo PasarInfoMovil Kelloggs.", 0)
End If End If
If result.Tag = "revisaArqueoYLiquidacion_Kelloggs" Then If result.Tag = "revisaArqueoYLiquidacion_Kelloggs" or result.Tag = "revisaArqueoYLiquidacion_Durakelo" Then
b_revisaVenta2.text = "Revisar Venta" b_revisaVenta2.text = "Revisar Venta"
Subs.logJobDoneResultados(result) Subs.logJobDoneResultados(result)
For Each records() As Object In result.Rows For Each records() As Object In result.Rows
@@ -1193,7 +1259,7 @@ Sub JobDone(Job As HttpJob)
' p_resVentaTransparente.Visible = True ' p_resVentaTransparente.Visible = True
End If End If
If result.Tag = "revisaDuplicados_Kelloggs" Then If result.Tag = "revisaDuplicados_Kelloggs" Or result.Tag = "revisaDuplicados_Durakelo" Then
' Subs.logJobDoneResultados(result) ' Subs.logJobDoneResultados(result)
If result.Rows.Size > 0 Then If result.Rows.Size > 0 Then
Log("=====> Hay Duplicados <======") Log("=====> Hay Duplicados <======")
@@ -1208,6 +1274,14 @@ Sub JobDone(Job As HttpJob)
If result.Tag = "quitarDuplicados_Kelloggs" Then If result.Tag = "quitarDuplicados_Kelloggs" Then
Subs.logJobDoneResultados(result) Subs.logJobDoneResultados(result)
b_resDuplicadosKell.Enabled = False
b_resDuplicadosKell.Text = "¡Listo!" & CRLF & "Duplicados Borrados"
End If
If result.Tag = "quitarDuplicados_Durakelo" Then
Subs.logJobDoneResultados(result)
b_resDuplicadosKell.Enabled = False
b_resDuplicadosKell.Text = "¡Listo!" & CRLF & "Duplicados Borrados"
End If End If
End If End If
Job.Release Job.Release
@@ -1298,6 +1372,9 @@ Private Sub b_revisaVenta_Click
End Sub End Sub
Private Sub b_revisaVenta2_Click Private Sub b_revisaVenta2_Click
laEmpresa = "Kelloggs"
laRuta = et_ruta2.Text.trim
almacenEmpresa = almacenKelloggs
kb.HideKeyboard kb.HideKeyboard
b_revisaVenta2.text = "Revisando ..." b_revisaVenta2.text = "Revisando ..."
Private rut As String = et_ruta2.text.Trim Private rut As String = et_ruta2.text.Trim
@@ -1306,7 +1383,6 @@ Private Sub b_revisaVenta2_Click
Log($"mandamos: ruta=${rut}, almacen=${almacenKelloggs}"$) Log($"mandamos: ruta=${rut}, almacen=${almacenKelloggs}"$)
reqManager.ExecuteQuery(cmd, 0 , "select_ventaXrutaKelloggs_soporte", 0) reqManager.ExecuteQuery(cmd, 0 , "select_ventaXrutaKelloggs_soporte", 0)
reqManager.Initialize(Me, DBRS_1781) reqManager.Initialize(Me, DBRS_1781)
cmd.Name = "revisaDuplicados_Kelloggs" cmd.Name = "revisaDuplicados_Kelloggs"
cmd.Parameters = Array As Object(almacenKelloggs, rut) cmd.Parameters = Array As Object(almacenKelloggs, rut)
@@ -1466,17 +1542,37 @@ Private Sub b_borrarVentaMards_Click
End Sub End Sub
Private Sub b_forzarVentaBV_Click Private Sub b_forzarVentaBV_Click
Private rutaVenta As Int
rutaVenta = et_rutaBV.Text.trim
almacenEmpresa = spinnerEmpresaMap.Get(s_almacenBV.SelectedItem)
Private usrSoporte As String = "appSoporte"
' Private tipoVenta As String = tipoVentaKelloggs
Private bandera As Int = 1
cmd.Initialize 'Se borra la venta forzada
If laEmpresa = "Kelloggs" Then
cmd.Name = "proc_QUITAR_VENTA_KELL"
cmd.Parameters = Array As Object(almacenEmpresa, rutaVenta, usrSoporte, tipoVentaKelloggs, bandera)
End If
If laEmpresa = "Durakelo" Then
cmd.Name = "proc_QUITAR_VENTA_DURAKELO"
cmd.Parameters = Array As Object(almacenEmpresa, rutaVenta, usrSoporte, bandera)
End If
Log($"Madamos borrar venta ${laEmpresa}: "$ & almacenEmpresa&"|"& rutaVenta&"|"&usrSoporte&"|"&tipoVentaKelloggs&"|"&bandera)
reqManager.ExecuteCommand(cmd , "borrarVentaKelloggs")
End Sub End Sub
Private Sub b_borrarVentaBV_Click Private Sub b_borrarVentaBV_Click
laEmpresa = s_empresaBV.SelectedItem
almacenEmpresa = s_almacenBV.SelectedItem
almacenEmpresa = spinnerEmpresaMap.Get(s_almacenBV.SelectedItem)
b_forzarVentaBV.Visible = False
If et_rutaBV.text <> "" And almacenEmpresa <> "" Then If et_rutaBV.text <> "" And almacenEmpresa <> "" Then
kb.HideKeyboard kb.HideKeyboard
Private rutaVenta As Int = et_rutaBV.Text.Trim Private rutaVenta As Int = et_rutaBV.Text.Trim
Private usrSoporte As String = "appSoporte" Private usrSoporte As String = "appSoporte"
elTipoDeVenta = s_tipoVentaBV.SelectedItem
cmd.Initialize cmd.Initialize
Private laEmp As String = laEmpresa.ToUpperCase Private laEmp As String = laEmpresa.ToUpperCase
If laEmp = "KELLOGGS" Then If laEmp = "KELLOGGS" Then
cmd.Name = "revisa_liquidada_Kell" 'Primero revisamos que no este liquidada o con descuento. cmd.Name = "revisa_liquidada_Kell" 'Primero revisamos que no este liquidada o con descuento.
cmd.Parameters = Array As Object(almacenEmpresa, rutaVenta, elTipoDeVenta) cmd.Parameters = Array As Object(almacenEmpresa, rutaVenta, elTipoDeVenta)
@@ -1487,6 +1583,21 @@ Private Sub b_borrarVentaBV_Click
cmd.Parameters = Array As Object(almacenEmpresa, rutaVenta) cmd.Parameters = Array As Object(almacenEmpresa, rutaVenta)
Log($"Revisamos venta liquidada Guna: almacen: ${almacenEmpresa}, ruta: ${rutaVenta} "$) Log($"Revisamos venta liquidada Guna: almacen: ${almacenEmpresa}, ruta: ${rutaVenta} "$)
reqManager.ExecuteQuery(cmd , 0, "revisa_liquidada_Guna", 0) reqManager.ExecuteQuery(cmd , 0, "revisa_liquidada_Guna", 0)
else if laEmp = "SALMA" Then
cmd.Name = "proc_QUITAR_VENTA_SALMA"
cmd.Parameters = Array As Object(almacenEmpresa, rutaVenta, usrSoporte)
Log($"Mandamos borrar venta de Salma, almacen: ${almacenEmpresa}, ruta: ${rutaVenta}, usuario: '${usrSoporte}'"$)
reqManager.ExecuteCommand(cmd , "borrarVentaSalma")
else if laEmp = "MARDS" Then
cmd.Name = "proc_QUITAR_VENTA_MARDS"
cmd.Parameters = Array As Object(almacenEmpresa, rutaVenta, usrSoporte)
Log($"Mandamos borrar venta de Mards, almacen: ${almacenEmpresa}, ruta: ${rutaVenta}, usuario: '${usrSoporte}'"$)
reqManager.ExecuteCommand(cmd , "borrarVentaMards")
else if laEmp = "DURAKELO" Then
cmd.Name = "revisa_liquidada_Durakelo"
cmd.Parameters = Array As Object(almacenEmpresa, rutaVenta, elTipoDeVenta)
Log($"Revisamos venta liquidada Durakelo: almacen: ${almacenEmpresa}, ruta: ${rutaVenta}, tipoVenta:${elTipoDeVenta}"$)
reqManager.ExecuteQuery(cmd , 0, "revisa_liquidada_Durakelo", 0)
Else Else
If laEmpresa = "Kelloggs" Then laEmp = "KELL" If laEmpresa = "Kelloggs" Then laEmp = "KELL"
cmd.Name = $"proc_QUITAR_VENTA_${laEmp}"$ cmd.Name = $"proc_QUITAR_VENTA_${laEmp}"$
@@ -1494,10 +1605,7 @@ Private Sub b_borrarVentaBV_Click
cmd.Parameters = Array As Object(almacenEmpresa, rutaVenta, usrSoporte) cmd.Parameters = Array As Object(almacenEmpresa, rutaVenta, usrSoporte)
Log($"Mandamos borrar venta de Mards, almacen: ${almacenEmpresa}, ruta: ${rutaVenta}, usuario: '${usrSoporte}'"$) Log($"Mandamos borrar venta de Mards, almacen: ${almacenEmpresa}, ruta: ${rutaVenta}, usuario: '${usrSoporte}'"$)
reqManager.ExecuteCommand(cmd , "borrarVentaGlobal") reqManager.ExecuteCommand(cmd , "borrarVentaGlobal")
End If End If
Else Else
Toast("Por favor ingrese ruta y almacén 🙄", 600) Toast("Por favor ingrese ruta y almacén 🙄", 600)
End If End If
@@ -1505,11 +1613,38 @@ End Sub
Private Sub b_revisarVentaBV_Click Private Sub b_revisarVentaBV_Click
kb.HideKeyboard kb.HideKeyboard
b_forzarVentaBV.Visible = False
laEmpresa = s_empresaBV.SelectedItem
tipoVentaKelloggs = s_tipoVentaBV.SelectedItem
' Log("============================= " & CRLF & spinnerEmpresaMap)
almacenEmpresa = spinnerEmpresaMap.Get(s_almacenBV.SelectedItem)
Private rut As String = et_rutaBV.text.Trim Private rut As String = et_rutaBV.text.Trim
laRuta = rut
cmd.Name = $"select_ventaXruta${laEmpresa}_soporte"$ cmd.Name = $"select_ventaXruta${laEmpresa}_soporte"$
cmd.Parameters = Array As Object(rut, almacenEmpresa) cmd.Parameters = Array As Object(rut, almacenEmpresa)
If laEmpresa = "Kelloggs" Then
cmd.Parameters = Array As Object(rut, almacenEmpresa, tipoVentaKelloggs)
Log($"mandamos: ruta=${rut}, almacen=${almacenEmpresa}, ${tipoVentaKelloggs}, select_ventaXruta${laEmpresa}_soporte"$)
End If
Log($"mandamos: ruta=${rut}, almacen=${almacenEmpresa}, select_ventaXruta${laEmpresa}_soporte"$) Log($"mandamos: ruta=${rut}, almacen=${almacenEmpresa}, select_ventaXruta${laEmpresa}_soporte"$)
reqManager.ExecuteQuery(cmd, 0 , $"select_ventaXruta${laEmpresa}_soporte"$, 0) reqManager.ExecuteQuery(cmd, 0 , $"select_ventaXruta${laEmpresa}_soporte"$, 0)
If laEmpresa = "Kelloggs" Or laEmpresa = "Durakelo" Then
reqManager.Initialize(Me, DBRS_1781)
cmd.Name = $"revisaDuplicados_${laEmpresa}"$
cmd.Parameters = Array As Object(almacenEmpresa, rut)
b_resDuplicadosKell.Enabled = False
b_resDuplicadosKell.Text = "Buscando duplicados ..."
Log($"Duplicados mandamos: ruta=${rut}, almacen=${almacenEmpresa}"$)
reqManager.ExecuteQuery(cmd, 0 , $"revisaDuplicados_${laEmpresa}"$, 0)
Log($"################ REVISAMOS DUPLICADOS ${almacenEmpresa}, ${rut} ########################"$)
cmd.Name = $"revisaArqueoYLiquidacion_${laEmpresa}"$
cmd.Parameters = Array As Object(almacenEmpresa, rut, almacenEmpresa, rut)
Log($"revisaArqueoYLiquidacion mandamos: ruta=${rut}, almacen=${almacenEmpresa}"$)
reqManager.ExecuteQuery(cmd, 0 , $"revisaArqueoYLiquidacion_${laEmpresa}"$, 0)
Sleep(500)
End If
End Sub End Sub
Private Sub s_tipoVentaBV_ItemClick (Position As Int, Value As Object) Private Sub s_tipoVentaBV_ItemClick (Position As Int, Value As Object)
@@ -1538,8 +1673,9 @@ Private Sub s_empresaBV_ItemClick (Position As Int, Value As Object)
s_tipoVentaBV.Visible = False s_tipoVentaBV.Visible = False
p_tipoVentaBV.Visible = False p_tipoVentaBV.Visible = False
End If End If
If laEmpresa = "Mards" Then If laEmpresa = "Mards" Or laEmpresa = "Kelloggs" Or laEmpresa = "Durakelo" Or laEmpresa = "Salma" Then
reqManager.Initialize(Me, DBRS_1781) reqManager.Initialize(Me, DBRS_1781)
Log("Mards o Kelloggs")
Else Else
reqManager.Initialize(Me, DBRS_1782) reqManager.Initialize(Me, DBRS_1782)
End If End If
@@ -1614,11 +1750,9 @@ End Sub
Private Sub b_resDuplicadosKell_Click Private Sub b_resDuplicadosKell_Click
reqManager.Initialize(Me, DBRS_1781) reqManager.Initialize(Me, DBRS_1781)
cmd.Name = "quitarDuplicados_Kelloggs" cmd.Name = $"quitarDuplicados_${laEmpresa}"$
cmd.Parameters = Array As Object(almacenKelloggs, et_ruta2.text.Trim, "appSoporte") cmd.Parameters = Array As Object(almacenEmpresa, laRuta, "appSoporte")
b_resDuplicadosKell.Enabled = False Log($"mandamos QUITAR duplicados: ruta=${laRuta}, almacen=${almacenEmpresa}"$)
b_resDuplicadosKell.Text = "Sin Duplicados" reqManager.ExecuteCommand(cmd, $"quitarDuplicados_${laEmpresa}"$)
Log($"mandamos: ruta=${et_ruta2.text.Trim}, almacen=${almacenKelloggs}"$) Log($"################ QUITAMOS DUPLICADOS ${laEmpresa}, ${almacenEmpresa}, ${laRuta} ########################"$)
reqManager.ExecuteCommand(cmd, "quitarDuplicados_Kelloggs")
Log($"################ QUITAMOS DUPLICADOS ${almacenKelloggs}, ${et_ruta2.text.Trim} ########################"$)
End Sub End Sub

View File

@@ -10,6 +10,6 @@ ModuleClosedNodes0=2
ModuleClosedNodes1= ModuleClosedNodes1=
ModuleClosedNodes2=1 ModuleClosedNodes2=1
ModuleClosedNodes3=1,9,11 ModuleClosedNodes3=1,9,11
NavigationStack=Main,b_forzarVenta1_Click,530,0,Main,b_forzarVenta2_Click,549,0,Main,borrarVentaForzadaKelloggs,560,0,Main,p_resVentaTransparente_Click,1573,0,Subs,generaSaludo,171,0,Main,b_borrarVenta2_Click,535,0,Visual Designer,layout1.bal,-100,6,Main,b_revisaVenta2_Click,1275,6,Main,b_resDuplicadosKell_Click,1581,4,Main,JobDone,1173,6 NavigationStack=Main,b_resDuplicadosKell_Click,1709,6,Main,b_cerrarTicket_Click,1442,0,Main,borrarVentaForzadaDurakelo,584,0,Main,b_revisarVentaBV_Click,1581,2,Main,b_forzarVentaBV_Click,1525,0,Main,b_borrarVentaBV_Click,1542,0,Main,JobDone,867,6,Main,b_forzarVenta2_Click,561,0,Main,borrarVentaForzadaKelloggs,567,2,Main,borrarVentaForzadaGuna,616,1
SelectedBuild=0 SelectedBuild=0
VisibleModules=2,3,1 VisibleModules=2,3,1