有谁知道我如何通过isl
上的micros 3700
代码打开检查项目?
我想选择它并对它进行折扣。
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
答案 0 :(得分:0)
我得出的结论是,当用户用他的手做时,不可能在支票中选择一个项目。所以我不能对支票上的所选商品进行折扣。
我的问题的解决方案是计算折扣金额并使用预定义的宏执行未结金额折扣。
...
LOADKYBDMACRO key(5, 217)//a predefined discount macro open amount
LOADKYBDMACRO makekeys(DiscountPrice)
LOADKYBDMACRO @KEY_ENTER
...
答案 1 :(得分:0)
据我所知,无法从ISL中选择项目,但您可以使用ItemDiscount命令来折扣检查项目:
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