1

Does anyone know how can I select an item from open check through isl code on micros 3700?

I want to select it and perform a discount on it.

VAR CheckItemIndex : N2
VAR DetailsRow : N2
VAR CheckItems[64] : N10
VAR CheckItemsCount : N2

CheckItemsCount = 0
CheckItemIndex = 1

DetailsRow = 1
WINDOW 8, 75, "TEST WINDOW" 
DISPLAY DetailsRow, 2, "CHECK ITEMS"
//dtl_type I Info, M Item, D Discount, S ServiceCharge, T Tender/Media, R ReferenceNumber, C CA Detail
FOR i = 1 TO @numdtlt
    IF @DTL_TYPE[i] = "M" //AND BIT(@DTL_STATUS[i], 5) = 0
        DetailsRow = DetailsRow + 1
        DISPLAY DetailsRow, 2, @DTL_NAME[i], " ", @DTL_OBJNUM[i], " ", @DTL_TYPE[i], " ", @DTL_TYPEDEF[i], " S: ", @DTL_STATUS[i]
        CheckItems[CheckItemIndex] = @DTL_OBJNUM[i]
        CheckItemIndex = CheckItemIndex + 1
        CheckItemsCount = CheckItemsCount + 1
    ENDIF
ENDFOR

//I want to select an item here (for example the 2nd one) and perform a discount

LOADDBKYBDMACRO 545 // this is a predefined macro for 100% discount
nvacalo
  • 11
  • 1
  • 3

2 Answers2

0

I have concluded that it is not possible to select an item in the check as a user makes with his hand. So i cant perform a discount on a selected item from check.

A solution for my problem is to calculate the discount amount and perform an open amount discount using a predefined macro.

...
LOADKYBDMACRO key(5, 217)//a predefined discount macro open amount
LOADKYBDMACRO makekeys(DiscountPrice)
LOADKYBDMACRO @KEY_ENTER
...
nvacalo
  • 11
  • 1
  • 3
0

As far as I know it is not possible to select item from ISL, but you could use ItemDiscount command to discount check item:

var dtl_arr[2]: N10 //dtl indexes array
var disc_val_arr[2]: $10 // discount value array 
dtl_arr[1] = 1 //...index of item to discount...
disc_val_array[1] = 50  // eg. 50% discount on item

ItemDiscount 1000053, 1, dtl_arr, disc_val_arr //1000053 is the discount obj num, 1 is the number of items to discount
kolec
  • 109
  • 1
  • 4