by TimStone » Wed Mar 13, 2019 5:57 pm
Otto,
It is easier to explain the process than provide the code since my code is very application specific:
1). Create a multi=dimensional array
2). Create a loop -
a) Scan the item
b) Look up the item in your database
c).Add the array element with a logical field ( default to .t. ), the UPC number, the part number, the quantity, and the description.
d).Loop and continue to scan in parts.
3). Provide a browse of the array. Allow the user to uncheck the first field for any parts they decide not to add, and to change the quantity if desired.
4). Provide a "Process button" and when pressed, it will add the parts desired to the invoice. It can go back and get the additional data it may need, and adjust the inventory at this time.
I use a live inventory, so whenever a part is used it reflects immediately in the stock on hand and sales report. Using this process does prevent any errors from occuring, although it is easy to fix them should they happen. ( Modifying the quantity or deleting an item in my program automatically adjusts the inventory properly.)
Of course, you can also provide safety by being sure Enter simply moves to the next field and does not trigger an exit button, or simply set the barcode reader to not automatically add the Enter after the string. So far, none of my clients have experienced difficulty with my method.
Tim