I am working with a client's Micros 3700 system writing a custom ISL script. I am having issues with finding the proper global variables to read certain data. IN this version no INQ events fire. I am trying to read all of the data for the menu items, condiments and discounts in the current check. I able to catch the MI event and get the menu items. But I still cannot get any custom strings (typed in from the keyboard for a custom item) or the discount value. I am able to intercept the DSC event but don't know which global variable holds the values. Here is my script:
retainglobalvar
var dll_handle:N32
event inq : *
infomessage "test"
endevent
event signin
DLLCALL_CDECL dll_handle, cdshowcustomerdisplay ()
endevent
event init
DLLLoad dll_handle, "customerdisplay.dll"
endevent
event exit//signout
DLLFree dll_handle
endevent
event signout
DLLCall_CDECL dll_handle, cdsenddata (2,0," ",0," "," "," ")
endevent
event begin_check
DLLCALL_CDECL dll_handle, cdsetdisplaymode (1)
DLLCALL_CDECL dll_handle, cdsenddata (2,1," ",0, " ", " ", " ")
endevent
Event MI
var i:N3
var messagetype:N2
var item_name:A100
var prefix:A10
for i = 1 to @NUMDTLT // @NUMDTLR = Number of Detail Entries this Service Roun
if @DTL_TYPE = "M" // M = Menu Item; I = Check Information Detail; D = Discount Name; S = Service Charge; T = Tender Media; R = Reference Number; C = CA Detail
prefix = ""
infomessage @dtl_name
if @Dtl_is_cond = 1
messagetype = 1
if @Dtl_slvl = 2
infomessage "easy.."
elseif @Dtl_slvl = 3
prefix = "O/S "
elseif @Dtl_slvl = 4
item_name = "ADD "
elseif @Dtl_slvl = 4
prefix = "NO "
elseif @Dtl_slvl = 4
prefix = "EXTRA "
elseif @Dtl_slvl = 4
prefix = "N/C "
endif
else
messagetype = 0
endif
item_name = " "
if prefix = ""
item_name = @DTL_NAME
else
format item_name as prefix, @DTL_NAME
endif
DLLCall_CDECL dll_handle, cdsenddata (messagetype, i, item_name, @DTL_QTY, @dtl_ttl, @tax[1], "")
elseif @DTL_TYPE = "D"
infomessage "test"
infomessage @dtl_name
endif
endfor
EndEvent
event dsc
infomessage "discounts:"
infomessage @dsc[0]
infomessage @Numdsc
DLLCall_CDECL dll_handle, cdsenddata (3, 0, "", 0, "", "", @DSC);
endevent
event DSC_VOID
DLLCALL_CDECL dll_handle, cdsenddata (3,0," ",0, " ", " ", "0")
endevent
event MI_VOID
infomessage "void"
DLLCALL_CDECL dll_handle, cdsenddata (5,@obj," ",0, " ", " ", " ")
endevent
event MI_return
infomessage "void"
endevent
event mi_return
endevent
event repopen_check
endevent
event trans_cncl
DLLCALL_CDECL dll_handle, cdsetdisplaymode (1)
endevent
event void_check
endevent
event final_tender
DLLCALL_CDECL dll_handle, cdsenddata (4,0," ",0, @ttldue, " ",@Tndttl)
DLLCALL_CDECL dll_handle, cdsetdisplaymode (2)
endevent
retainglobalvar
var dll_handle:N32
event inq : *
infomessage "test"
endevent
event signin
DLLCALL_CDECL dll_handle, cdshowcustomerdisplay ()
endevent
event init
DLLLoad dll_handle, "customerdisplay.dll"
endevent
event exit//signout
DLLFree dll_handle
endevent
event signout
DLLCall_CDECL dll_handle, cdsenddata (2,0," ",0," "," "," ")
endevent
event begin_check
DLLCALL_CDECL dll_handle, cdsetdisplaymode (1)
DLLCALL_CDECL dll_handle, cdsenddata (2,1," ",0, " ", " ", " ")
endevent
Event MI
var i:N3
var messagetype:N2
var item_name:A100
var prefix:A10
for i = 1 to @NUMDTLT // @NUMDTLR = Number of Detail Entries this Service Roun
if @DTL_TYPE = "M" // M = Menu Item; I = Check Information Detail; D = Discount Name; S = Service Charge; T = Tender Media; R = Reference Number; C = CA Detail
prefix = ""
infomessage @dtl_name
if @Dtl_is_cond = 1
messagetype = 1
if @Dtl_slvl = 2
infomessage "easy.."
elseif @Dtl_slvl = 3
prefix = "O/S "
elseif @Dtl_slvl = 4
item_name = "ADD "
elseif @Dtl_slvl = 4
prefix = "NO "
elseif @Dtl_slvl = 4
prefix = "EXTRA "
elseif @Dtl_slvl = 4
prefix = "N/C "
endif
else
messagetype = 0
endif
item_name = " "
if prefix = ""
item_name = @DTL_NAME
else
format item_name as prefix, @DTL_NAME
endif
DLLCall_CDECL dll_handle, cdsenddata (messagetype, i, item_name, @DTL_QTY, @dtl_ttl, @tax[1], "")
elseif @DTL_TYPE = "D"
infomessage "test"
infomessage @dtl_name
endif
endfor
EndEvent
event dsc
infomessage "discounts:"
infomessage @dsc[0]
infomessage @Numdsc
DLLCall_CDECL dll_handle, cdsenddata (3, 0, "", 0, "", "", @DSC);
endevent
event DSC_VOID
DLLCALL_CDECL dll_handle, cdsenddata (3,0," ",0, " ", " ", "0")
endevent
event MI_VOID
infomessage "void"
DLLCALL_CDECL dll_handle, cdsenddata (5,@obj," ",0, " ", " ", " ")
endevent
event MI_return
infomessage "void"
endevent
event mi_return
endevent
event repopen_check
endevent
event trans_cncl
DLLCALL_CDECL dll_handle, cdsetdisplaymode (1)
endevent
event void_check
endevent
event final_tender
DLLCALL_CDECL dll_handle, cdsenddata (4,0," ",0, @ttldue, " ",@Tndttl)
DLLCALL_CDECL dll_handle, cdsetdisplaymode (2)
endevent