mirror of
https://github.com/KeymonSoft/Kelloggs_V3.git
synced 2026-04-20 06:09:32 +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"
|
||||
|
||||
Reference in New Issue
Block a user