Resulta que mi aplicacion P.O.S (Point of sale) aqui la llaman PTV (Punto de Venta).
en la seccion Ventas se introduce mediante el lector o manualmente un codigo, cuando es encontrado ese codigo se acumula en un GRID, se calcula el total de ITEMS y el TOTAL de VENTA de esos ITEMS.
la maquina registradora original despues de introducir ese producto el operador ingresaba '3' y despues el signo 'X' para decir que incremente en 3 la cantidad del producto antes ingresado.
es decir. con el lector se ingres el producto, despues como hago que un textbox_1 pueda aceptar desde '1' hasta '10' mas el signo '+' , de esa forma automatizar mejor el proceso ya que muchos productos se venden en forma unitaria y eso se carga automaticamente.
el signo '+' reemplazaria al signo 'x' o signo '*' por ser mas grande en todo teclado de computadora y mas accesible como la tecla enter.
Translate Google :
Hi Everyone:
Turns out my application POS (Point of sale) PTV call here.
In the section Sales is introduced by a code reader or manually, when the code is found in a GRID accumulates, it calculates the total of items and the total sale of these items.
Original the cash register after entering the product entered the operator '3 'and after the sign' X 'to say that increases in the amount of product 3 entered before.
ie. with the reader enters the product, as I do after a textbox_1 can accept from '1 ' to '10' plus the '+', thus better automate the process since many products are sold as a unit and that is automatically load
the '+' sign would replace the 'x' or '*' sign being larger in all computer keyboard and more accessible as the enter key.
TEXT_1 :799000000001[Enter]
TEXT_1 : 3+ [Procedure Test()]
Change 1 to 3 items in grid.
Code: Select all
DEFINE GRID Articulos
ROW 50
COL 5
WIDTH 755
HEIGHT 460
VALUE 1
WIDTHS { 50 , 140 ,260 ,130 ,150 }
HEADERS {'Cant',' Codigo',' Descripción ',' P.Unitario ','Total'}
FONTNAME "Arial"
FONTSIZE 12
TOOLTIP "Grid de Facturación"
JUSTIFY { GRID_JTFY_RIGHT,GRID_JTFY_RIGHT, GRID_JTFY_LEFT ,GRID_JTFY_RIGHT,GRID_JTFY_RIGHT}
COLUMNCONTROLS { {'TEXTBOX','NUMERIC','99' } , ;
{'TEXTBOX','CHARACTER' } , ;
{'TEXTBOX','CHARACTER' } , ;
{'TEXTBOX','NUMERIC','$ 999999.99' } , ;
{'TEXTBOX','NUMERIC','$ 999999.99' } }
Code: Select all
DEFINE TEXTBOX Text_1
ROW 90
COL 800
WIDTH 200
HEIGHT 30
FONTNAME "Arial"
FONTSIZE 16
TOOLTIP "Ingrese codigo de Producto"
ONCHANGE Test()
FONTBOLD .T.
ONENTER VentasGrid()
TABSTOP .T.
VISIBLE .T.
MAXLENGTH 13
BACKCOLOR NIL
FONTCOLOR NIL
INPUTMASK "9999999999999"
FORMAT Nil
VALUE ""
END TEXTBOX
Code: Select all
Procedure Test()
Local nTest := 0
Local cTest := 0
cTest := Alltrim(Ventas.Text_1.Value)
nTest := Val( cTest )
If nTest > 0 .and. nTest < 11
If RIGHT(cTest,1)= '+'
msgbox("Sum")
Endif
endif
return
Code: Select all
Procedure VentasGrid() // PART of ventasgrid()
Productos->( DBGOTOP() )
IF Productos->(DBSEEK(Ventas.Text_1.Value))
Ventas.Articulos.AddItem ( { Ventas.Text_4.Value , ;
Productos->Codigo , ;
Productos->SCS , ;
Productos->P_Publico , ;
Productos->P_Publico * Ventas.Text_4.Value } )
Ventas.nTotalArt.Value := Ventas.nTotalArt.Value + Ventas.Text_4.Value
Ventas.nTotal.Value := Ventas.nTotal.Value + (Ventas.Text_3.Value * Ventas.Text_4.Value )
Ventas.Text_41.SetFocus