Hi Robert,
We've talked about 3700 programming before so I'm assuming that's what your working with here.
Nothing in Micros is that easy. The check detail tables are a bit of a rat's nest. The main ones are:
micros.chk_dtl
micros.trans_dtl
micros.dtl
micros.mi_dtl
micros.tmed_dtl
micros.dsvc_dtl
micros.ref_dtl
You also have fields in these tables that reference the following:
micros.emp_def
micros.emp_status
micros.order_type_def
micros.rvc_def
micros.uws_def
Any "_dtl" table requires dba authority to edit/insert, so if you go this route you'll probably have to dig up the stored procedures that OPS uses to write data.
Personally I'd write a SIM to insert the checks. You'll have to work out a format for dumping the check to a flat file and a means of dropping it onto the Micros server.
The 1st line of the flat file would need all the info needed to start a check; login# and whatever forced prompts the employee class requires - covers, table#, RVC, Order Type, etc.
The rest would be object numbers for the check detail; food items, gratuities, payments, etc. I'd put each on a separate line with a type id, like a key pair:
B, 18, 25, 250
M, 100
M, 101
T, 1
or something like this to begin a check for login 18 w/ 25 covers on table 250, order menu items 100 & 101 and close it to tender 1.
Drop the file onto a set location/filename on the micros server and pick it up with an Idle_No_Count event.
So your SIM would have a general outline somthing like this:
Code:
event init
@idle_seconds = 10
endevent
event idle_no_trans
var fn : N5
var line: A20
var type: A1
var arg1: N5
var arg2: N5
var arg3: N5
// replace xx with server obj_num so this doesn't run on the WS's
if @WSID = xx
// open your export file here
fopen fn, "[i]export path[/i]", read
// make sure it opened correctly
if fn = 0
// while we're not at EOF, read & split the next line
while not Feof(fn)
freadln, fn, line
split line, ",", type, arg1, arg2, arg3
// use the type id to create & execute keystrokes
if type = "B"
// make keys to login and begin a check
// loadkybdmacro for each key
elseif type = "M"
// make & run a menu item key
elseif type = "T"
// make & run a tender key
endif
endwhile
endif
endif
endevent
I've been working almost exclusively on the 3700 for the last 10 years, but 8700/9700 SIM is close enough that you should be able to use this with some minor modifications on either system.
BTW, If you're still using notepad to do your SIM work, check out Textpad.com. They have a decent free trial and you can write your own syntax higlighting files.
Hope this helps,
Pat