Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simphony 2 Functionality like Micros 3700

Status
Not open for further replies.

nvak

Programmer
May 25, 2015
60
GR
Hello guys,

On Micros 3700 there is a function with name GetMaxDiscount which expects as parameters the index of a check item and an object number of a discount and returns the max available amount discount.

There is also a command with name ItemDiscount which takes as parameters an object number of a discount, the number of items you want to append the discount, an array with theirs indexes and an array with the amounts.

My question is how can i do the same thing on Simphony 2?

Code:
VAR i : N3
VAR DiscIndex : N3
VAR DscAmountArray[64] : $5
VAR DtlIndexArray[64] : N3
		
FOR i = 1 TO @NUMDTLT
	IF @DTL_TYPE[i] = "M" AND @DTL_IS_VOID[i] = 0
		DiscIndex = DiscIndex + 1
		DtlIndexArray[DiscIndex] = i
		DscAmountArray[DiscIndex] = GetMaxDiscount(i,2)
	ENDIF
ENDFOR
							
ItemDiscount 2, DiscIndex, DtlIndexArray, DscAmountArray
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top