mirror of
https://github.com/KeymonSoft/Kelloggs_V3.git
synced 2026-04-18 05:09:27 +00:00
Correccion de total que redondeaba (IMPRESION Y VISUALIZACION DEL CLIENTE)
This commit is contained in:
@@ -294,6 +294,7 @@ Sub Class_Globals
|
||||
Private R_5 As RadioButton
|
||||
Private e_comm As EditText
|
||||
Private motivo As String
|
||||
Dim cursorprueba As Cursor
|
||||
End Sub
|
||||
|
||||
'You can add more parameters here.
|
||||
@@ -336,6 +337,7 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
l_atiende2.Text = c.GetString("CAT_CL_ATIENTE2")
|
||||
la_saldotot.Text = c.GetString("CAT_CL_TELEFONO")
|
||||
''' ESTO SE AGREGA PARA QUE SE VEA LOS CLIENTES DOE
|
||||
|
||||
If c.GetString("CAT_CL_EMAIL") = "1" Then
|
||||
L_doe.Visible = True
|
||||
Else
|
||||
@@ -376,6 +378,7 @@ End Sub
|
||||
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
||||
|
||||
Sub B4XPage_Appear
|
||||
Dim sumatotal As Double = 0
|
||||
If Subs.traeUltimaActividadBD <> "Cliente" Then Subs.iniciaActividad(Subs.traeUltimaActividadBD)
|
||||
If Not(muestraBoleta) Then P_INF_GENERAL.Visible = True
|
||||
|
||||
@@ -428,6 +431,16 @@ Sub B4XPage_Appear
|
||||
S1=Starter.skmt.ExecQuery("select count(*) as CUANTOS FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")
|
||||
S1.Position=0
|
||||
Log("hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh "&c.RowCount)
|
||||
cursorprueba = Starter.skmt.ExecQuery2("select PE_COSTO_TOT from pedido where PE_CEDIS <> PE_PROID and pe_cliente in (Select CUENTA from cuentaa) AND PE_CEDIS <> ?", Array As String("DOE"))
|
||||
For i= 0 To cursorprueba.RowCount -1
|
||||
cursorprueba.Position = i
|
||||
LogColor(cursorprueba.GetString("PE_COSTO_TOT"),Colors.Red)
|
||||
sumatotal = sumatotal + cursorprueba.GetString("PE_COSTO_TOT")
|
||||
sumatotal = NumberFormat2(sumatotal, 0, 2, 2, False)
|
||||
|
||||
Log(NumberFormat2(sumatotal, 0, 2, 2, False))
|
||||
Next
|
||||
cursorprueba.Close
|
||||
c.Position=0
|
||||
la_cuenta.Text = c.GetString("CAT_CL_CODIGO")
|
||||
La_nombre.Text = c.GetString("CAT_CL_NOMBRE")
|
||||
@@ -439,8 +452,8 @@ Sub B4XPage_Appear
|
||||
l_entre2.Text = c.GetString("CAT_CL_CALLE2")
|
||||
l_atiende.Text = c.GetString("CAT_CL_ATIENDE1")
|
||||
l_atiende2.Text = c.GetString("CAT_CL_ATIENTE2")
|
||||
l_total.Text = s.GetString("TOTAL_CLIE")
|
||||
total_cliente = s.GetString("TOTAL_CLIE")
|
||||
l_total.Text = sumatotal
|
||||
total_cliente = sumatotal
|
||||
m_lat =c.GetString("CAT_CL_LAT")
|
||||
m_lon =c.GetString("CAT_CL_LONG")
|
||||
CREDITO_DISPONIBLE = c.GetString("CAT_CL_BFACTURA")
|
||||
@@ -1285,11 +1298,24 @@ Sub B_IMP2_Click
|
||||
s=Starter.skmt.ExecQuery2("select sum(PE_CANT) as CANTIDAD, SUM(PE_COSTO_TOT) AS TOTAL FROM PEDIDO WHERE PE_CEDIS <> PE_PROID AND PE_TIPO = ? and substr(pe_pronombre,1,6) <> ? AND PE_CEDIS <> ? AND PE_CLIENTE IN (Select CUENTA from cuentaa)", Array As String("VENTA","CAMBIO","DOE"))
|
||||
s.Position = 0
|
||||
Private sTotal2 As Double
|
||||
If s.GetString("TOTAL") <> Null And IsNumber(s.GETSTRING("TOTAL")) Then
|
||||
sTotal2 = s.GetString("TOTAL")
|
||||
Else
|
||||
sTotal2 = 0
|
||||
End If
|
||||
|
||||
cursorprueba = Starter.skmt.ExecQuery2("select PE_COSTO_TOT from pedido where PE_CEDIS <> PE_PROID and pe_cliente in (Select CUENTA from cuentaa) AND PE_CEDIS <> ?", Array As String("DOE"))
|
||||
For i= 0 To cursorprueba.RowCount -1
|
||||
cursorprueba.Position = i
|
||||
LogColor(cursorprueba.GetString("PE_COSTO_TOT"),Colors.Red)
|
||||
sTotal2 = sTotal2 + cursorprueba.GetString("PE_COSTO_TOT")
|
||||
sTotal2 = NumberFormat2(sTotal2, 0, 2, 2, False)
|
||||
|
||||
Log(NumberFormat2(sTotal2, 0, 2, 2, False))
|
||||
Next
|
||||
cursorprueba.Close
|
||||
Log(sTotal2)
|
||||
'
|
||||
' If s.GetString("TOTAL") <> Null And IsNumber(s.GETSTRING("TOTAL")) Then
|
||||
' sTotal2 = s.GetString("TOTAL")
|
||||
' Else
|
||||
' sTotal2 = 0
|
||||
' End If
|
||||
Printer1.WriteString(Printer1.REVERSE & "===============================" & CRLF)
|
||||
Printer1.WriteString( Printer1.UNREVERSE & Printer1.BOLD & $"Sub Total Venta: $${NumberFormat2(sTotal2, 1, 2, 2, False)}"$ & CRLF)
|
||||
Private cantidad1 As String = "0"
|
||||
|
||||
@@ -38,6 +38,7 @@ Sub Class_Globals
|
||||
Private ListView3 As ListView
|
||||
Private L_CANT_D As Label
|
||||
Private L_TOTAL_D As Label
|
||||
Dim cursorprueba As Cursor
|
||||
End Sub
|
||||
|
||||
'You can add more parameters here.
|
||||
@@ -87,6 +88,8 @@ End Sub
|
||||
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
||||
|
||||
Sub B4XPage_Appear
|
||||
Dim sumatotal As Double = 0
|
||||
|
||||
c=Starter.skmt.ExecQuery2("select count(*) as CUANTOS FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa) AND PE_CEDIS = ?", Array As String("DOE"))
|
||||
c.Position = 0
|
||||
ListView1.Visible = True
|
||||
@@ -123,7 +126,9 @@ Sub B4XPage_Appear
|
||||
C_DOE=Starter.skmt.ExecQuery2("select sum(pe_cant) AS CANTIDAD, sum(pe_costo_tot) AS MONTO from pedido where PE_CEDIS <> PE_PROID and pe_cliente in (Select CUENTA from cuentaa) AND PE_CEDIS = ?", Array As String("DOE"))
|
||||
C_DOE.Position=0
|
||||
L_CANT_D.Text = C_DOE.GetString("CANTIDAD")
|
||||
|
||||
L_TOTAL_D.Text = C_DOE.GetString("MONTO")
|
||||
|
||||
c.Close
|
||||
Else
|
||||
B_PEDIDO_DOE.VISIBLE = False
|
||||
@@ -168,8 +173,20 @@ Sub B4XPage_Appear
|
||||
If Existe <> 0 Then
|
||||
c=Starter.skmt.ExecQuery2("select sum(pe_cant) AS CANTIDAD, sum(pe_costo_tot) AS MONTO from pedido where PE_CEDIS <> PE_PROID and pe_cliente in (Select CUENTA from cuentaa) AND PE_CEDIS <> ?", Array As String("DOE"))
|
||||
C.Position=0
|
||||
|
||||
cursorprueba = Starter.skmt.ExecQuery2("select PE_COSTO_TOT from pedido where PE_CEDIS <> PE_PROID and pe_cliente in (Select CUENTA from cuentaa) AND PE_CEDIS <> ?", Array As String("DOE"))
|
||||
For i= 0 To cursorprueba.RowCount -1
|
||||
cursorprueba.Position = i
|
||||
LogColor(cursorprueba.GetString("PE_COSTO_TOT"),Colors.Red)
|
||||
sumatotal = sumatotal + cursorprueba.GetString("PE_COSTO_TOT")
|
||||
sumatotal = NumberFormat2(sumatotal, 0, 2, 2, False)
|
||||
|
||||
Log(NumberFormat2(sumatotal, 0, 2, 2, False))
|
||||
Next
|
||||
cursorprueba.Close
|
||||
L_CANT.Text = c.GetString("CANTIDAD")
|
||||
L_TOTAL.Text = c.GetString("MONTO")
|
||||
L_TOTAL.Text = sumatotal
|
||||
Log(c.GetString("MONTO"))
|
||||
c.Close
|
||||
c=Starter.skmt.ExecQuery("select SUM(IFNULL(PE_DESC,0)) AS DESCUENTO FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")
|
||||
c.Position=0
|
||||
|
||||
@@ -12,6 +12,7 @@ Sub Class_Globals
|
||||
Dim ListView1 As ListView
|
||||
Dim b_noventa As Button
|
||||
Dim nombre_boton As String
|
||||
Dim cursorprueba As Cursor
|
||||
End Sub
|
||||
|
||||
'You can add more parameters here.
|
||||
@@ -46,6 +47,7 @@ End Sub
|
||||
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
||||
|
||||
Sub B4XPage_Appear
|
||||
Dim sumatotal As Double = 0
|
||||
nombre_boton = "NOVENTA"
|
||||
c=Starter.skmt.ExecQuery("select PC_CLIENTE,PC_MONTO,PC_NOART,(select CAT_CL_NOMBRE from kmt_info where cat_cl_codigo = pc_cliente ) as NOMBRE FROM PEDIDO_CLIENTE ORDER BY PC_FECHA asc")
|
||||
ListView1.Clear
|
||||
@@ -60,7 +62,19 @@ Sub B4XPage_Appear
|
||||
label2 = ListView1.TwoLinesLayout.SecondLabel
|
||||
label2.TextSize = 13
|
||||
label2.TextColor = Colors.Black
|
||||
ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),c.GetString("NOMBRE") &" Cant. #"& c.GetString("PC_NOART")& " SubTotal $"& c.GetString("PC_MONTO"))
|
||||
|
||||
cursorprueba = Starter.skmt.ExecQuery2("select PE_COSTO_TOT from pedido where PE_CEDIS <> PE_PROID and pe_cliente = ? AND PE_CEDIS <> ?", Array As String(c.GetString("PC_CLIENTE"),"DOE"))
|
||||
For i= 0 To cursorprueba.RowCount -1
|
||||
cursorprueba.Position = i
|
||||
LogColor(cursorprueba.GetString("PE_COSTO_TOT"),Colors.Red)
|
||||
sumatotal = sumatotal + cursorprueba.GetString("PE_COSTO_TOT")
|
||||
sumatotal = NumberFormat2(sumatotal, 0, 2, 2, False)
|
||||
|
||||
Log(NumberFormat2(sumatotal, 0, 2, 2, False))
|
||||
Next
|
||||
cursorprueba.Close
|
||||
|
||||
ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),c.GetString("NOMBRE") &" Cant. #"& c.GetString("PC_NOART")& " SubTotal $"& sumatotal)
|
||||
Next
|
||||
End If
|
||||
c.Close
|
||||
|
||||
BIN
B4A/Files/kellanova.png
Normal file
BIN
B4A/Files/kellanova.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
BIN
B4A/Files/knv_logo_white.png
Normal file
BIN
B4A/Files/knv_logo_white.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
@@ -82,6 +82,6 @@ ModuleClosedNodes6=
|
||||
ModuleClosedNodes7=
|
||||
ModuleClosedNodes8=
|
||||
ModuleClosedNodes9=
|
||||
NavigationStack=Diseñador Visual,mapa_rutas.bal,-100,4,Diseñador Visual,detalle_promo.bal,-100,3,Diseñador Visual,checklist.bal,-100,2,Diseñador Visual,checks.bal,-100,2,MAPA_RUTAS,Activity_Create,72,0,Diseñador Visual,errormanager.bal,-100,3,Diseñador Visual,cliente.bal,-100,1,C_Cliente,GPS_LocationChanged,664,6,Diseñador Visual,principal.bal,-100,6,C_Cliente,B_IMP2_Click,1006,0,C_Productos,HACER_PEDIDO,621,0
|
||||
NavigationStack=Diseñador Visual,login.bal,-100,1,Diseñador Visual,principal.bal,-100,1,C_Principal,B4XPage_Created,242,0,C_NoVenta,Class_Globals,0,0,C_Clientes,Class_Globals,0,0,C_Cliente,Class_Globals,291,6,C_Nota,B4XPage_Appear,84,0,C_Nota,ListView1_ItemLongClick,320,0,C_Nota,b_desc_Click,353,0,C_Cliente,B4XPage_Appear,427,6,C_Cliente,B_IMP2_Click,1307,6
|
||||
SelectedBuild=0
|
||||
VisibleModules=1,2,3,4,5,6,7,8,9,10,12
|
||||
VisibleModules=1,2,3,4,5,6,7,8,9,10,14,11
|
||||
|
||||
Reference in New Issue
Block a user