mirror of
https://github.com/KeymonSoft/Marquez.git
synced 2026-04-20 22:29:28 +00:00
Version: 5.06.01
Se le agrego el boton de cobranza, la cual verifica del CAT_GUNAPROD2 si hay cuentas por cobrar, si encuentra, las muestra y si ya tienen abonos los indica y los suma.
This commit is contained in:
@@ -946,6 +946,7 @@ Sub GUADAVENTA2
|
|||||||
b_ventaabordo.Enabled = True
|
b_ventaabordo.Enabled = True
|
||||||
HIST.Enabled = True
|
HIST.Enabled = True
|
||||||
banderaimp = 0
|
banderaimp = 0
|
||||||
|
mandaPendientePagare
|
||||||
B4XPages.ShowPage("Principal")
|
B4XPages.ShowPage("Principal")
|
||||||
Else If B4XPages.MainPage.recarga = "1" Then
|
Else If B4XPages.MainPage.recarga = "1" Then
|
||||||
DateTime.DateFormat = "MM/dd/yyyy"
|
DateTime.DateFormat = "MM/dd/yyyy"
|
||||||
@@ -2016,6 +2017,22 @@ Sub mandaPendientes
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Sub mandaPendientePagare
|
||||||
|
c = B4XPages.MainPage.skmt.ExecQuery("SELECT * FROM ABONOS where ifnull(a_enviado, 0) <> 1")
|
||||||
|
Log($"ABONO PENDIENTE: ${c.RowCount}"$)
|
||||||
|
If c.RowCount>0 Then
|
||||||
|
For i=0 To c.RowCount -1
|
||||||
|
c.Position=i
|
||||||
|
Dim cmd As DBCommand
|
||||||
|
cmd.Initialize
|
||||||
|
cmd.Name = "insert_abono_MARQUEZ"
|
||||||
|
cmd.Parameters = Array As Object( c.GetString("a_usuario"), c.GetString("a_ruta"), c.GetString("a_cliente"), c.GetString("a_abono"), c.GetString("a_fecha"),ALMACEN )
|
||||||
|
reqManager.ExecuteCommand(cmd , $"ins_abonosPendientes_${c.GetString("a_cliente")}"$)
|
||||||
|
Log($"ins_abonosPendientes_${c.GetString("a_cliente")}"$)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Sub mandaPendientesrecarga
|
Sub mandaPendientesrecarga
|
||||||
' PEDIDO_CLIENTE (Pendientes)
|
' PEDIDO_CLIENTE (Pendientes)
|
||||||
Log(">>>>>>> MANDA PENDIENTES")
|
Log(">>>>>>> MANDA PENDIENTES")
|
||||||
|
|||||||
27
B4A/C_Cobranza.bas
Normal file
27
B4A/C_Cobranza.bas
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
B4A=true
|
||||||
|
Group=Default Group
|
||||||
|
ModulesStructureVersion=1
|
||||||
|
Type=Class
|
||||||
|
Version=13.1
|
||||||
|
@EndOfDesignText@
|
||||||
|
Sub Class_Globals
|
||||||
|
Private Root As B4XView 'ignore
|
||||||
|
Private xui As XUI 'ignore
|
||||||
|
Private pnlCobranza As Panel
|
||||||
|
Private clvCobranza As CustomListView
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'You can add more parameters here.
|
||||||
|
Public Sub Initialize As Object
|
||||||
|
Return Me
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'This event will be called once, before the page becomes visible.
|
||||||
|
Private Sub B4XPage_Created (Root1 As B4XView)
|
||||||
|
Root = Root1
|
||||||
|
'load the layout to Root
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
||||||
@@ -224,6 +224,25 @@ Sub Class_Globals
|
|||||||
Private et_buspc As EditText
|
Private et_buspc As EditText
|
||||||
Private b_tabulador As Button
|
Private b_tabulador As Button
|
||||||
Private p_b_tabulador As Panel
|
Private p_b_tabulador As Panel
|
||||||
|
Private pnlCobranza As Panel
|
||||||
|
Private clvCobranza As CustomListView
|
||||||
|
Private pnlBtnCobranza As Panel
|
||||||
|
Private btnCobranza As Button
|
||||||
|
Private pnlBtnRegresar As Panel
|
||||||
|
Private btnRegresar As Button
|
||||||
|
Private l_Secuencia As Label
|
||||||
|
Dim pnlContenedorCobranza As Panel
|
||||||
|
Private l_Nombre As Label
|
||||||
|
Private l_CuentaXCobrar As Label
|
||||||
|
Private l_Abono As Label
|
||||||
|
Private pnlCabecero As Panel
|
||||||
|
Private lblAbono As Label
|
||||||
|
Private lblSaldo As Label
|
||||||
|
Private lblCliente As Label
|
||||||
|
Private lblSec As Label
|
||||||
|
Private pnlTotal As Panel
|
||||||
|
Private lblTotal As Label
|
||||||
|
Private lblVersion As Label
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'You can add more parameters here.
|
'You can add more parameters here.
|
||||||
@@ -429,8 +448,10 @@ Sub B4XPage_Appear
|
|||||||
If l_ruta.Text = 0 Then
|
If l_ruta.Text = 0 Then
|
||||||
l_ruta.Text =0
|
l_ruta.Text =0
|
||||||
p_b_tabulador.Visible = False
|
p_b_tabulador.Visible = False
|
||||||
|
pnlBtnCobranza.Visible = False
|
||||||
Else
|
Else
|
||||||
p_b_tabulador.Visible = True
|
p_b_tabulador.Visible = True
|
||||||
|
pnlBtnCobranza.Visible = True
|
||||||
f=B4XPages.MainPage.skmt.ExecQuery("select CAT_CL_RUTA from kmt_info")
|
f=B4XPages.MainPage.skmt.ExecQuery("select CAT_CL_RUTA from kmt_info")
|
||||||
f.Position=0
|
f.Position=0
|
||||||
l_ruta.Text = f.GetString("CAT_CL_RUTA")
|
l_ruta.Text = f.GetString("CAT_CL_RUTA")
|
||||||
@@ -2202,8 +2223,6 @@ End Sub
|
|||||||
|
|
||||||
Private Sub B4XPage_CloseRequest As ResumableSub
|
Private Sub B4XPage_CloseRequest As ResumableSub
|
||||||
'Return True to close, False to cancel
|
'Return True to close, False to cancel
|
||||||
|
|
||||||
|
|
||||||
If SCROLL_RESDIA.Visible Then
|
If SCROLL_RESDIA.Visible Then
|
||||||
SCROLL_RESDIA.Visible = False
|
SCROLL_RESDIA.Visible = False
|
||||||
B_OK_RES_Click
|
B_OK_RES_Click
|
||||||
@@ -2211,6 +2230,9 @@ Private Sub B4XPage_CloseRequest As ResumableSub
|
|||||||
Else if Panel5.Visible Then
|
Else if Panel5.Visible Then
|
||||||
B_OK_PANEL5_Click
|
B_OK_PANEL5_Click
|
||||||
Return False
|
Return False
|
||||||
|
Else If pnlCobranza.Visible Then
|
||||||
|
pnlCobranza.Visible = False
|
||||||
|
Return False
|
||||||
Else
|
Else
|
||||||
B4XPages.ShowPage("login")
|
B4XPages.ShowPage("login")
|
||||||
End If
|
End If
|
||||||
@@ -2959,3 +2981,93 @@ End Sub
|
|||||||
Private Sub b_tabulador_Click
|
Private Sub b_tabulador_Click
|
||||||
B4XPages.ShowPage("tabulador")
|
B4XPages.ShowPage("tabulador")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnCobranza_Click
|
||||||
|
Log("Entrando al Panel de Cobranza")
|
||||||
|
|
||||||
|
pnlCobranza.Width = Root.Width
|
||||||
|
pnlCobranza.Height = Root.Height
|
||||||
|
pnlCobranza.Left = 0
|
||||||
|
pnlCobranza.Top = 0
|
||||||
|
pnlCobranza.BringToFront
|
||||||
|
pnlCobranza.Visible = True
|
||||||
|
pnlTotal.Visible = True
|
||||||
|
Dim ct As Cursor = B4XPages.MainPage.skmt.ExecQuery($"SELECT IFNULL(sum(IFNULL(a.a_abono,0)),0) as suma_abono FROM kmt_info2 ki LEFT JOIN ABONOSP ap ON ki.CAT_CL_CODIGO = ap.CLIENTE LEFT JOIN ABONOS a ON ki.CAT_CL_CODIGO = a.a_cliente WHERE CAST(ap.SALDO_PENDIENTE AS REAL) > 0"$)
|
||||||
|
ct.Position = 0
|
||||||
|
If ct.RowCount > 0 Then
|
||||||
|
lblTotal.Text = "El total abonado es: $" & ct.getString("suma_abono")
|
||||||
|
End If
|
||||||
|
lblVersion.Text = Application.VersionName
|
||||||
|
ct.Close
|
||||||
|
CargarDatosCobranza
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargarDatosCobranza
|
||||||
|
For i = pnlCobranza.NumberOfViews - 1 To 0 Step -1
|
||||||
|
Dim v As View = pnlCobranza.GetView(i)
|
||||||
|
If v Is Label Then
|
||||||
|
Dim lbl As Label = v
|
||||||
|
If lbl.Text = "No hay cuentas por cobrar" Then
|
||||||
|
pnlCobranza.RemoveViewAt(i)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
c = B4XPages.MainPage.skmt.ExecQuery($"SELECT ROW_NUMBER() OVER (ORDER BY ki.CAT_CL_NOMBRE) AS Secuencia, ki.CAT_CL_CODIGO, ki.CAT_CL_NOMBRE, ap.SALDO_PENDIENTE, IFNULL(a.a_abono,0) as a_abono FROM kmt_info2 ki LEFT JOIN ABONOSP ap ON ki.CAT_CL_CODIGO = ap.CLIENTE LEFT JOIN ABONOS a ON ki.CAT_CL_CODIGO = a.a_cliente WHERE CAST(ap.SALDO_PENDIENTE AS REAL) > 0"$)
|
||||||
|
Log("Número de registros: " & c.RowCount)
|
||||||
|
|
||||||
|
clvCobranza.Clear
|
||||||
|
|
||||||
|
For i = 0 To c.RowCount - 1
|
||||||
|
c.Position = i
|
||||||
|
|
||||||
|
Dim pItem As B4XView = xui.CreatePanel("")
|
||||||
|
pItem.LoadLayout("C_CuentasXCobrar")
|
||||||
|
pItem.SetLayoutAnimated(0, 0, 0, Root.Width, 100dip)
|
||||||
|
pItem.Color = Colors.White
|
||||||
|
|
||||||
|
pnlContenedorCobranza.SetLayoutAnimated(0, 0, 0, pItem.Width, pItem.Height)
|
||||||
|
pnlContenedorCobranza.Color = xui.Color_Transparent
|
||||||
|
|
||||||
|
l_Secuencia.Text = c.GetString("Secuencia")
|
||||||
|
|
||||||
|
' Manejo seguro del nombre
|
||||||
|
Dim codigo As String = c.GetString("CAT_CL_CODIGO")
|
||||||
|
Dim nombre As String = c.GetString("CAT_CL_NOMBRE")
|
||||||
|
If codigo = Null Then codigo = ""
|
||||||
|
If nombre = Null Then nombre = ""
|
||||||
|
l_Nombre.SingleLine = False
|
||||||
|
l_Nombre.Text = codigo & " " & nombre
|
||||||
|
|
||||||
|
l_CuentaXCobrar.Text = "$" & NumberFormat(c.GetDouble("SALDO_PENDIENTE"), 1, 2)
|
||||||
|
l_Abono.Text = "$" & NumberFormat(c.GetDouble("a_abono"), 1, 2)
|
||||||
|
|
||||||
|
clvCobranza.Add(pItem, "Item-" & i)
|
||||||
|
Next
|
||||||
|
|
||||||
|
c.Close
|
||||||
|
pnlCobranza.Invalidate
|
||||||
|
|
||||||
|
If c.RowCount = 0 Then
|
||||||
|
Dim lblEmpty As Label
|
||||||
|
lblEmpty.Initialize("")
|
||||||
|
lblEmpty.Text = "No hay cuentas por cobrar"
|
||||||
|
lblEmpty.TextSize = 16
|
||||||
|
lblEmpty.TextColor = Colors.Gray
|
||||||
|
lblEmpty.Gravity = Gravity.CENTER
|
||||||
|
pnlCobranza.AddView(lblEmpty, 0, 100dip, Root.Width, 50dip)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnRegresar_Click
|
||||||
|
pnlCobranza.Visible = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub pnlCobranza_Click
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Private Sub clvCobranza_ItemClick (Index As Int, Value As Object)
|
||||||
|
' Dim CodigoCliente As Cursor = Value
|
||||||
|
' CodigoCliente = B4XPages.MainPage.skmt.ExecQuery($"SELECT ROW_NUMBER() OVER (ORDER BY ki.CAT_CL_NOMBRE) AS Secuencia, ki.CAT_CL_NOMBRE, ap.SALDO_PENDIENTE, IFNULL(a.a_abono,0) as a_abono FROM kmt_info2 ki LEFT JOIN ABONOSP ap ON ki.CAT_CL_CODIGO = ap.CLIENTE LEFT JOIN ABONOS a ON ki.CAT_CL_CODIGO = a.a_cliente WHERE CAST(ap.SALDO_PENDIENTE AS REAL) > 0"$)
|
||||||
|
' B4XPages.ShowPage("cliente")
|
||||||
|
'End Sub
|
||||||
BIN
B4A/Files/c_cuentasxcobrar.bal
Normal file
BIN
B4A/Files/c_cuentasxcobrar.bal
Normal file
Binary file not shown.
BIN
B4A/Files/cobranza.bal
Normal file
BIN
B4A/Files/cobranza.bal
Normal file
Binary file not shown.
Binary file not shown.
132
B4A/MARQUEZ.b4a
132
B4A/MARQUEZ.b4a
@@ -1,71 +1,73 @@
|
|||||||
Build1=Default,marquez.keymon.com.mx
|
Build1=Default,marquez.keymon.com.mx
|
||||||
File1=abordo.png
|
File1=abordo.png
|
||||||
File10=datoscliente.bal
|
File10=clientes.bal
|
||||||
File11=durakelo.png
|
File11=Cobranza.bal
|
||||||
File12=engrane.jpg
|
File12=datoscliente.bal
|
||||||
File13=engrane_gris.png
|
File13=durakelo.png
|
||||||
File14=folioabono.bal
|
File14=engrane.jpg
|
||||||
File15=fondo_kmt.jpg
|
File15=engrane_gris.png
|
||||||
File16=gps20.png
|
File16=folioabono.bal
|
||||||
File17=guna_viejo.png
|
File17=fondo_kmt.jpg
|
||||||
File18=Hacer pedido.jpg
|
File18=gps20.png
|
||||||
File19=hacerpedido30.jpg
|
File19=guna_viejo.png
|
||||||
File2=alert2.png
|
File2=alert2.png
|
||||||
File20=hacerpedido30.png
|
File20=Hacer pedido.jpg
|
||||||
File21=intmex_logo_192x192.jpg
|
File21=hacerpedido30.jpg
|
||||||
File22=intmex_logo_192x192.png
|
File22=hacerpedido30.png
|
||||||
File23=itembuttonblue.png
|
File23=intmex_logo_192x192.jpg
|
||||||
File24=kmt.db
|
File24=intmex_logo_192x192.png
|
||||||
File25=login.bal
|
File25=itembuttonblue.png
|
||||||
File26=Logo_192x192.jpg
|
File26=kmt.db
|
||||||
File27=logo_mariana.jpg
|
File27=login.bal
|
||||||
File28=MainPage.bal
|
File28=Logo_192x192.jpg
|
||||||
File29=Malo.jpg
|
File29=logo_mariana.jpg
|
||||||
File3=alerta_amarilla.png
|
File3=alerta_amarilla.png
|
||||||
File30=mapa_cliente.bal
|
File30=MainPage.bal
|
||||||
File31=mapa_rutas.bal
|
File31=Malo.jpg
|
||||||
File32=mariana.jpg
|
File32=mapa_cliente.bal
|
||||||
File33=nota.bal
|
File33=mapa_rutas.bal
|
||||||
File34=noventa.bal
|
File34=mariana.jpg
|
||||||
File35=nuevocliente.bal
|
File35=nota.bal
|
||||||
File36=nuevocliente.jpg
|
File36=noventa.bal
|
||||||
File37=nuevo-cliente20.png
|
File37=nuevocliente.bal
|
||||||
File38=Nvo Cliente.jpg
|
File38=nuevocliente.jpg
|
||||||
File39=palomita_verde.png
|
File39=nuevo-cliente20.png
|
||||||
File4=anterior.jpg
|
File4=anterior.jpg
|
||||||
File40=PANEL_PICK_CIEGO.bal
|
File40=Nvo Cliente.jpg
|
||||||
File41=pedido.bal
|
File41=palomita_verde.png
|
||||||
File42=planfia_logo.png
|
File42=PANEL_PICK_CIEGO.bal
|
||||||
File43=principal.bal
|
File43=pedido.bal
|
||||||
File44=proditem.bal
|
File44=planfia_logo.png
|
||||||
File45=proditem1.bal
|
File45=principal.bal
|
||||||
File46=proditem2.bal
|
File46=proditem.bal
|
||||||
File47=productos.bal
|
File47=proditem1.bal
|
||||||
File48=profina.jpg
|
File48=proditem2.bal
|
||||||
File49=PROFINA.png
|
File49=productos.bal
|
||||||
File5=bus-ar.png
|
File5=bus-ar.png
|
||||||
File50=promociones.bal
|
File50=profina.jpg
|
||||||
File51=resdia.bal
|
File51=PROFINA.png
|
||||||
File52=ResDia.jpg
|
File52=promociones.bal
|
||||||
File53=resdia20.png
|
File53=resdia.bal
|
||||||
File54=resumendia.jpg
|
File54=ResDia.jpg
|
||||||
File55=salma.jpg
|
File55=resdia20.png
|
||||||
File56=salma.png
|
File56=resumendia.jpg
|
||||||
File57=scrollpromos.bal
|
File57=salma.jpg
|
||||||
File58=senial.jpg
|
File58=salma.png
|
||||||
File59=sync.png
|
File59=scrollpromos.bal
|
||||||
File6=carrito.png
|
File6=C_CuentasXCobrar.bal
|
||||||
File60=tabulador.bal
|
File60=senial.jpg
|
||||||
File61=tache_rojo.png
|
File61=sync.png
|
||||||
File62=Ticket dia.jpg
|
File62=tabulador.bal
|
||||||
File63=ticketdia20.jpg
|
File63=tache_rojo.png
|
||||||
File64=ticketdia20.png
|
File64=Ticket dia.jpg
|
||||||
File65=ticketsdia.bal
|
File65=ticketdia20.jpg
|
||||||
File66=Tiendita.jpg
|
File66=ticketdia20.png
|
||||||
File67=verde.png
|
File67=ticketsdia.bal
|
||||||
File7=celltitle.bal
|
File68=Tiendita.jpg
|
||||||
File8=cliente.bal
|
File69=verde.png
|
||||||
File9=clientes.bal
|
File7=carrito.png
|
||||||
|
File8=celltitle.bal
|
||||||
|
File9=cliente.bal
|
||||||
FileGroup1=Default Group
|
FileGroup1=Default Group
|
||||||
FileGroup10=Default Group
|
FileGroup10=Default Group
|
||||||
FileGroup11=Default Group
|
FileGroup11=Default Group
|
||||||
@@ -130,6 +132,8 @@ FileGroup64=Default Group
|
|||||||
FileGroup65=Default Group
|
FileGroup65=Default Group
|
||||||
FileGroup66=Default Group
|
FileGroup66=Default Group
|
||||||
FileGroup67=Default Group
|
FileGroup67=Default Group
|
||||||
|
FileGroup68=Default Group
|
||||||
|
FileGroup69=Default Group
|
||||||
FileGroup7=Default Group
|
FileGroup7=Default Group
|
||||||
FileGroup8=Default Group
|
FileGroup8=Default Group
|
||||||
FileGroup9=Default Group
|
FileGroup9=Default Group
|
||||||
@@ -199,7 +203,7 @@ Module6=C_Cuestionario
|
|||||||
Module7=C_Historico
|
Module7=C_Historico
|
||||||
Module8=C_Mapas
|
Module8=C_Mapas
|
||||||
Module9=C_Nota
|
Module9=C_Nota
|
||||||
NumberOfFiles=67
|
NumberOfFiles=69
|
||||||
NumberOfLibraries=33
|
NumberOfLibraries=33
|
||||||
NumberOfModules=31
|
NumberOfModules=31
|
||||||
Version=13.1
|
Version=13.1
|
||||||
@@ -207,7 +211,7 @@ Version=13.1
|
|||||||
#Region Project Attributes
|
#Region Project Attributes
|
||||||
#ApplicationLabel: Marquez
|
#ApplicationLabel: Marquez
|
||||||
#VersionCode: 1
|
#VersionCode: 1
|
||||||
#VersionName: 5.05.04
|
#VersionName: 5.06.01
|
||||||
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
||||||
#SupportedOrientations: portrait
|
#SupportedOrientations: portrait
|
||||||
#CanInstallToExternalStorage: False
|
#CanInstallToExternalStorage: False
|
||||||
|
|||||||
@@ -94,6 +94,6 @@ ModuleClosedNodes6=
|
|||||||
ModuleClosedNodes7=
|
ModuleClosedNodes7=
|
||||||
ModuleClosedNodes8=
|
ModuleClosedNodes8=
|
||||||
ModuleClosedNodes9=
|
ModuleClosedNodes9=
|
||||||
NavigationStack=C_Principal,B4XPage_Appear,582,0,Subs,borraPedidoCredito,1528,0,C_Cliente,TraeVendedor,1115,0,C_Cliente,TraeNumVendedor,1138,0,C_Cliente,imprime_venta,1575,0,C_Cliente,GUADAVENTA2,959,0,C_Cliente,Guardar_Click,657,0,C_Cliente,imprime_preventa,1145,6,B4XMainPage,B4XPage_Appear,330,0,C_Cliente,B4XPage_Appear,502,2
|
NavigationStack=Diseñador Visual,principal.bal,-100,6,C_Principal,btnCobranza_Click,2994,6,Main,Activity_KeyPress,40,0,Main,Activity_ActionBarHomeClick,37,0,Main,Create_Menu,56,0,B4XMainPage,i_engrane_Click,883,0,C_Nota,Class_Globals,0,0,C_Nota,B4XPage_Appear,124,0,C_Nota,borra_Click,296,0,C_Nota,ListView1_ItemLongClick,302,0
|
||||||
SelectedBuild=0
|
SelectedBuild=0
|
||||||
VisibleModules=1,2,13,4,5,7,8,9,10,14
|
VisibleModules=1,2,13,4,5,7,8,9,10,14
|
||||||
|
|||||||
Reference in New Issue
Block a user