DISCOUNT - Any Item - Ask Custom Amount

How do you have it set to calculate quantity x price x ?

I think that why. I donā€™t have system in front of me right now I will check that tomorrow.

Its because {ORDER TAG TOTAL:X} is pulling value from ORDER TAG it does not see any calculations. So it is working as intended your calculations are throwing it off.

I donā€™t think I change formular. I just change how to read input both $ and %

Reading the input is the same thingā€¦ because that is whats setting your priceā€¦ but order tag stays same. Order tag is still $5 your just telling it how to display the total differently. but {ORDER TAG TOTAL:X} is reading the Order Tag value not your amount you told it to show.

Thank you, I think that is the problem

I think you can still get it to work you just need to rethink your approach. It will technically be a different type of discount than this tutorialā€¦

I think so, sambapos is flexible enough to do anything.
Good night

Here is my rule for discount amount:


Tag Value: *** Discount $[=ā€™[:CommandValue]ā€™.substr(1,-1)] ***
Tag Price: [=-1*TN(ā€™[:CommandValue]ā€™.substr(1,-1))]

It doesnā€™t have Quantity, just Order Tag Price. SampaPOS automatically calculate quantity.

EDIT: Hmm I am not sure how to get it working for you. Let me look into it more.

{ORDER TAG TOTAL:X} is working I am able to use it and it works just fine. But something with how its calculating the {PRICE} when qty key is used and the way your using the tags is causing it not to add up the calculations for qty of items.

It is designed to be a static amountā€¦ your able to get it to somewhat calculate on qty level but technically its still just a static amount.

Sorry, I still donā€™t quite get it.

Order Tag Name: Discount
Order tag list:

I use {ORDER TAG TOTAL:Discount} to read total discount.

Yes but Price will be what you inputā€¦ you input 5 Price will be 5ā€¦ {ORDER TAG TOTAL:X} is reading total of each items order tagā€¦ you only have 1 order tagā€¦ its price is what you entered for Command Valueā€¦

For {ORDER TAG TOTAL:X} to show your method you would have to have multiple order tags for that 1 item based off how many qty.

So if you had 3x item and you wanted $1.00 off each itemā€¦ you would need to apply 3 order tags each for $1.00 Then it can add up the QTY of Order tags and the PRice

Your using 1 order tag and then using Value to show combined price

Let forget about Automation,
If I use regular order tag for discount $1 and order line have 2x items. {ORDER TAG TOTAL:X} still read $1.
But the total bill still show the price (after discount $2) correctly.

I think {ORDER TAG TOTAL:X} still need to be fixed though.

Yes it seems ignores order quantity. Fixed thanks.

2 Likes

Yes I did not mean we did not need to fix it. I was just trying to understand what it was doing.

Awesome!

@Jesse @QMcKay and others

Thank you for your help to get discounts working.

Best Regards,

Actually, I donā€™t need multiple order tags now since we have {ORDER TAG NOTE}. So, want back to original one order tag list and add {ORDER TAG NOTE} to printer template.

2 Likes

@Jesse now we can use a keypad popup instead of the full keyboard popping up to enter discount amount, what do i need to change and what expression do i need?

I managed to get keypad to popup instead of full keyboard but i cant get the expression right so that i can enter a value, it either lets me enter 1 or 0 no other numbers work and i cant do double digits, it literally is 1 or 0

EDIT: I know where to edit I just dont know what to put in the expression to enable you to type values between 1-100 for percentage off AND to type any value for Amount off in respective rules

@Jesse @emre ive worked out how to get the keypad to appear and enter digits 1-9 but it will only let me enter a single digit either 1,2,3,4,5,6,7,8 or 9. what do i need to do to my expression to let it enter 2 digits so i can discount more than 9, eg 35, 28, 68, any two digit combination. below is my expression that is just letting me enter 1 digit, i thougtht by using [1-99] it wouid let me enter any number between 1-99 and not just 1 single digit?

[?Enter Discount Percentage;([0-99]);;N]

Try:

[?Enter Discount Percentage;;;ON]

Or

[?Enter Discount Percentage;\d{2};;ON]