Correccion de total que redondeaba (IMPRESION Y VISUALIZACION DEL CLIENTE)

This commit is contained in:
cvaldes1201
2023-10-27 12:29:08 -06:00
parent 16981ec1bd
commit 67403c695f
6 changed files with 68 additions and 11 deletions

View File

@@ -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