mirror of
https://github.com/KeymonSoft/ADM2.git
synced 2026-04-17 19:36:33 +00:00
VERSION 6.01.10
- Se corrige en resumen dia la venta por marcas
This commit is contained in:
@@ -299,7 +299,6 @@ Sub B4XPage_Appear
|
||||
Else
|
||||
b_cxc.Visible = True
|
||||
End If
|
||||
|
||||
If la_cuenta.Text = "0" Or la_cuenta.Text = "1" Then
|
||||
p_cbFactura.Visible = False
|
||||
l_factura.Visible = False
|
||||
@@ -410,8 +409,8 @@ Sub B4XPage_Appear
|
||||
CallSubDelayed(Tracker, "Track")
|
||||
CallSubDelayed(Tracker, "StartFLPSmall")
|
||||
If Tracker.FLP.IsInitialized And Tracker.FLP.GetLastKnownLocation.IsInitialized Then 'Si tenemos "UltimaUbicaccionConocida" la usamos.
|
||||
B4XPages.MainPage.lat_gps = Tracker.FLP.GetLastKnownLocation.Latitude
|
||||
B4XPages.MainPage.lon_gps = Tracker.FLP.GetLastKnownLocation.Longitude
|
||||
' B4XPages.MainPage.lat_gps = Tracker.FLP.GetLastKnownLocation.Latitude
|
||||
' B4XPages.MainPage.lon_gps = Tracker.FLP.GetLastKnownLocation.Longitude
|
||||
' Log($"Tenemos UUC: ${Tracker.FLP.GetLastKnownLocation.Latitude},${Tracker.FLP.GetLastKnownLocation.Longitude}"$)
|
||||
GPS_LocationChanged(Tracker.FLP.GetLastKnownLocation)
|
||||
End If
|
||||
@@ -437,9 +436,6 @@ Sub B4XPage_Appear
|
||||
' gest.Visible = False
|
||||
' b_ventaabordo.Visible = False
|
||||
|
||||
|
||||
|
||||
|
||||
c = skmt.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("MACIMP"))
|
||||
If c.RowCount > 0 Then
|
||||
c.Position = 0
|
||||
@@ -455,11 +451,8 @@ Sub B4XPage_Appear
|
||||
Else
|
||||
Printer1.DisConnect
|
||||
Printer1.Connect
|
||||
Log("2")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
pre_act = Subs.traeTotalClientepreventaparacredito
|
||||
|
||||
'SELECT CAT_CL_BCREDITO, CAT_CL_CODIGO, Ifnull(SALDO_PENDIENTE,0) FROM KMT_INFO INNER JOIN ABONOSP ON CAT_CL_CODIGO = CLIENTE WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)
|
||||
@@ -516,11 +509,14 @@ End Sub
|
||||
|
||||
Sub GPS_LocationChanged (Location1 As Location)
|
||||
' LogColor($"Entrando a Cliente.GPS_LocationChanged"$, Colors.red)
|
||||
If Tracker.FLP.GetLastKnownLocation.IsInitialized And Tracker.FLP.GetLastKnownLocation.Latitude <> 0 Then
|
||||
B4XPages.MainPage.lat_gps = Tracker.FLP.GetLastKnownLocation.Latitude
|
||||
B4XPages.MainPage.lon_gps = Tracker.FLP.GetLastKnownLocation.Longitude
|
||||
' Log("Coords set to: " & B4XPages.MainPage.lat_gps & " and " & B4XPages.MainPage.lon_gps)
|
||||
End If
|
||||
' If Tracker.FLP.GetLastKnownLocation.IsInitialized And Tracker.FLP.GetLastKnownLocation.Latitude <> 0 Then
|
||||
' B4XPages.MainPage.lat_gps = Tracker.FLP.GetLastKnownLocation.Latitude
|
||||
' B4XPages.MainPage.lon_gps = Tracker.FLP.GetLastKnownLocation.Longitude
|
||||
'' Log("Coords set to: " & B4XPages.MainPage.lat_gps & " and " & B4XPages.MainPage.lon_gps)
|
||||
' End If
|
||||
|
||||
B4XPages.MainPage.lat_gps = Location1.Latitude
|
||||
B4XPages.MainPage.lon_gps = Location1.Longitude
|
||||
|
||||
' ToastMessageShow(B4XPages.MainPage.lat_gps,False)
|
||||
|
||||
@@ -531,6 +527,7 @@ Sub GPS_LocationChanged (Location1 As Location)
|
||||
|
||||
If BT_QR.IsInitialized Then BT_QR.Enabled = True
|
||||
If LA_GPS.IsInitialized Then LA_GPS.TextColor = Colors.Blue
|
||||
Log("CON UBICACION: " & Location1.Latitude & "," & Location1.Longitude)
|
||||
If LA_GPS.IsInitialized Then LA_GPS.Text = "CON UBICACION GPS"
|
||||
' B_GPS.Enabled = True
|
||||
'now we need the distance between our location and the target location
|
||||
@@ -540,7 +537,7 @@ Sub GPS_LocationChanged (Location1 As Location)
|
||||
If LA_GEO.IsInitialized Then LA_GEO.TextColor = Colors.Blue
|
||||
Tels.Visible = True
|
||||
gest.Visible = True
|
||||
b_ventaabordo.Visible = True
|
||||
' b_ventaabordo.Visible = True
|
||||
bitacora.banderaGeoCerca = "1"
|
||||
Else
|
||||
Tels.Visible = False
|
||||
@@ -898,7 +895,7 @@ Sub GUADAVENTA2
|
||||
b_cxc.Enabled = True
|
||||
Tar.Enabled = True
|
||||
Tels.Enabled = True
|
||||
b_ventaabordo.Enabled = True
|
||||
' b_ventaabordo.Enabled = True
|
||||
HIST.Enabled = True
|
||||
banderaimp = 0
|
||||
' B4XPages.ShowPage("Principal")
|
||||
@@ -1104,7 +1101,7 @@ Sub imprime_preventa
|
||||
Sleep(500)
|
||||
impresoraConectada = False
|
||||
End If
|
||||
|
||||
|
||||
TAMANO = 0
|
||||
ESPACIO = 22
|
||||
BLANCO = " "
|
||||
@@ -1113,18 +1110,16 @@ Sub imprime_preventa
|
||||
' Dim myimage As AnImage = Printer1.ImageToBWIMage(bmp)
|
||||
|
||||
' myimage = Printer1.DitherImage2D(myimage, 128)
|
||||
'
|
||||
|
||||
' myimage= Printer1.PackImage(myimage)
|
||||
' Printer1.WriteString(CRLF) ' nudge the printer to show the user something is happening
|
||||
' Printer1.WriteString(Printer1.REVERSE)
|
||||
'
|
||||
' Printer1.PrintImage(myimage)
|
||||
' Printer1.WriteString(Printer1.UNREVERSE)
|
||||
|
||||
' Printer1.Justify = 1
|
||||
'printer.Initialize(cmp20.OutputStream)
|
||||
' Printer1.WriteString("DISTRIBUIDORA ROCHA TULA PACHUCA" & CRLF)
|
||||
Printer1.WriteString("ADM Distribuciones" & CRLF)
|
||||
Printer1.WriteString("ADM" & CRLF)
|
||||
' Printer1.WriteString(sucursal & CRLF)
|
||||
Printer1.WriteString(sDate & CRLF)
|
||||
Printer1.WriteString(sTime & CRLF)
|
||||
@@ -1140,10 +1135,10 @@ Sub imprime_preventa
|
||||
c = skmt.ExecQuery2("SELECT * FROM PEDIDO WHERE PE_FOLIO = ?",Array As String("PREVENTA"))
|
||||
If c.RowCount > 0 Then
|
||||
Printer1.WriteString("-----------PREVENTA-----------" & CRLF)
|
||||
|
||||
|
||||
' Printer1.WriteString("--------------------------------" & CRLF)
|
||||
Printer1.WriteString("Cant. Precio Importe" & CRLF)
|
||||
|
||||
|
||||
Printer1.WriteString("------------------------------" & CRLF)
|
||||
' aqui es donde esta el pedo de julieta de los descuentos quitar el precio2 pero meter un if para saber si es ruta especial o es normal o que show.
|
||||
s=skmt.ExecQuery2("select PE_PRONOMBRE, PE_CANT, length(pe_cant) as L_CANT, PE_COSTOU, length(PE_COSTOU) as L_COSTOU,PE_CANT * PE_COSTOU AS PE_COSTO_TOT, length(PE_CANT * PE_COSTOU) as L_COSTO_TOT,PE_PROID, PE_CEDIS FROM PEDIDO WHERE PE_FOLIO = ? AND LENGTH(PE_CEDIS) < 4 AND PE_CLIENTE IN (Select CUENTA from cuentaa) order by PE_PROID", Array As String("PREVENTA"))
|
||||
@@ -1152,15 +1147,13 @@ Sub imprime_preventa
|
||||
S.Position=i
|
||||
If s.GetString("PE_CEDIS") = s.GetString("PE_PROID") Then
|
||||
Printer1.WriteString(s.GetString("PE_PRONOMBRE") & CRLF)
|
||||
|
||||
Else
|
||||
|
||||
Printer1.WriteString(s.GetString("PE_PRONOMBRE") & CRLF)
|
||||
LogColor(s.GetLong("L_CANT"),Colors.Magenta)
|
||||
LogColor(s.GetLong("L_COSTOU"),Colors.Magenta)
|
||||
LogColor(s.GetLong("L_COSTO_TOT"),Colors.Magenta)
|
||||
TAMANO = s.GetLong("L_CANT") + TAMANO
|
||||
|
||||
|
||||
If s.GetLong("L_COSTOU") = 1 Then
|
||||
TAMANO = s.GetLong("L_COSTOU") + TAMANO + 4
|
||||
Else If s.GetLong("L_COSTOU") = 2 Then
|
||||
@@ -1172,7 +1165,7 @@ Sub imprime_preventa
|
||||
Else
|
||||
TAMANO = s.GetLong("L_COSTOU") + TAMANO
|
||||
End If
|
||||
|
||||
|
||||
' If s.GetLong("L_COSTOU") = 1 Then
|
||||
' TAMANO = s.GetLong("L_COSTOU") + TAMANO + 3
|
||||
' Else If s.GetLong("L_COSTOU") = 2 Then
|
||||
@@ -1182,7 +1175,7 @@ Sub imprime_preventa
|
||||
' Else
|
||||
' TAMANO = s.GetLong("L_COSTOU") + TAMANO
|
||||
' End If
|
||||
'
|
||||
|
||||
' If s.GetLong("L_COSTO_TOT") = 1 Then
|
||||
' TAMANO = s.GetLong("L_COSTO_TOT") + TAMANO + 5
|
||||
' Else If s.GetLong("L_COSTO_TOT") = 2 Then
|
||||
@@ -1208,18 +1201,18 @@ Sub imprime_preventa
|
||||
Else
|
||||
TAMANO = s.GetLong("L_COSTO_TOT") + TAMANO
|
||||
End If
|
||||
|
||||
|
||||
ESPACIO = ESPACIO - TAMANO
|
||||
|
||||
|
||||
For E=0 To ESPACIO -1
|
||||
BLANCO = " " & BLANCO
|
||||
Next
|
||||
Printer1.Justify = 0
|
||||
Printer1.WriteString( s.GETSTRING("PE_CANT")& BLANCO)
|
||||
Printer1.WriteString(s.GETSTRING("PE_CANT")& BLANCO)
|
||||
Printer1.Justify = 1
|
||||
Printer1.WriteString(s.GETSTRING("PE_COSTOU")& BLANCO)
|
||||
Printer1.WriteString(NumberFormat2(s.GETSTRING("PE_COSTOU"),1,2,2,True) & BLANCO)
|
||||
Printer1.Justify = 2
|
||||
Printer1.WriteString(s.GETSTRING("PE_COSTO_TOT") & CRLF )
|
||||
Printer1.WriteString(NumberFormat2(s.GETSTRING("PE_COSTO_TOT"),1,2,2,True) & CRLF )
|
||||
TAMANO = 0
|
||||
ESPACIO = 22
|
||||
BLANCO = " "
|
||||
@@ -1239,7 +1232,6 @@ Sub imprime_preventa
|
||||
S.Position=i
|
||||
If s.GetString("PE_CEDIS") = s.GetString("PE_PROID") Then
|
||||
Printer1.WriteString(s.GetString("PE_PRONOMBRE") & CRLF)
|
||||
|
||||
Else
|
||||
TAMANO = 0
|
||||
Printer1.WriteString(s.GetString("PE_PRONOMBRE") & CRLF)
|
||||
@@ -1267,9 +1259,9 @@ Sub imprime_preventa
|
||||
Else
|
||||
TAMANO = s.GetLong("L_COSTO_TOT") + TAMANO
|
||||
End If
|
||||
|
||||
|
||||
ESPACIO = ESPACIO - TAMANO
|
||||
|
||||
|
||||
For E=0 To ESPACIO -1
|
||||
BLANCO = " " & BLANCO
|
||||
Next
|
||||
@@ -1277,9 +1269,9 @@ Sub imprime_preventa
|
||||
Printer1.Justify = 0
|
||||
Printer1.WriteString( s.GETSTRING("PE_CANT")& BLANCO)
|
||||
Printer1.Justify = 1
|
||||
Printer1.WriteString(s.GETSTRING("PE_COSTOU")& BLANCO)
|
||||
Printer1.WriteString(NumberFormat2(s.GETSTRING("PE_COSTOU"),1,2,2,True) & BLANCO)
|
||||
Printer1.Justify = 2
|
||||
Printer1.WriteString(s.GETSTRING("PE_COSTO_TOT") & CRLF )
|
||||
Printer1.WriteString(NumberFormat2(s.GETSTRING("PE_COSTO_TOT"),1,2,2,True) & CRLF )
|
||||
TAMANO = 0
|
||||
ESPACIO = 22
|
||||
BLANCO = " "
|
||||
@@ -1382,7 +1374,7 @@ Private Sub Label20_LongClick
|
||||
|
||||
PDF.outImage(xui.DefaultFolder,"mariana1.jpg",1,pagina-55,70,0)
|
||||
multiplicador = multiplicador +1
|
||||
PDF.outtext(1,pagina-multiplicador*6,"ADM Distribuciones")
|
||||
PDF.outtext(1,pagina-multiplicador*6,"ADM")
|
||||
|
||||
multiplicador = multiplicador +1
|
||||
PDF.outtext(1,pagina-multiplicador*6,sDate& " " & sTime)
|
||||
@@ -1566,7 +1558,7 @@ Private Sub PDFGENERAR
|
||||
|
||||
PDF.outImage(xui.DefaultFolder,"mariana1.jpg",1,pagina-55,70,0)
|
||||
multiplicador = multiplicador +1
|
||||
PDF.outtext(1,pagina-multiplicador*6,"ADM Distribuciones")
|
||||
PDF.outtext(1,pagina-multiplicador*6,"ADM")
|
||||
|
||||
multiplicador = multiplicador +1
|
||||
PDF.outtext(1,pagina-multiplicador*6,sDate& " " & sTime)
|
||||
@@ -1789,7 +1781,6 @@ private Sub openPDF(afile As String)
|
||||
#End If
|
||||
End Sub
|
||||
|
||||
|
||||
Sub imprime_venta
|
||||
c=skmt.ExecQuery("select USUARIO from usuarioa")
|
||||
c.Position=0
|
||||
@@ -1852,7 +1843,7 @@ Sub imprime_venta
|
||||
' Printer1.Justify = 1
|
||||
'printer.Initialize(cmp20.OutputStream)
|
||||
' Printer1.WriteString("DISTRIBUIDORA ROCHA TULA PACHUCA" & CRLF)
|
||||
Printer1.WriteString("ADM Distribuciones" & CRLF)
|
||||
Printer1.WriteString("ADM" & CRLF)
|
||||
' Printer1.WriteString(sucursal & CRLF)
|
||||
Printer1.WriteString(sDate & CRLF)
|
||||
Printer1.WriteString(sTime & CRLF)
|
||||
@@ -3168,7 +3159,7 @@ Private Sub b_acept_tp_Click
|
||||
b_cxc.Enabled = True
|
||||
Tar.Enabled = True
|
||||
Tels.Enabled = True
|
||||
b_ventaabordo.Enabled = True
|
||||
' b_ventaabordo.Enabled = True
|
||||
HIST.Enabled = True
|
||||
banderaimp = 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user