DISCOUNT - Any Item - Ask Custom Percent

ok got it thanks keep up the good work for helping out

the table is printing with thermal printer t-81

1 Like

i am unable to show the discounted price on my ticket

[ORDER TAGS:Discount Custom Percent]
{ORDER TAG NAME} {ORDER TAG NOTE} {ORDER TAG PRICE}

Can you show your printer template. I do not know where your expecting or what your expecting with the screen you showed.

I want it to show discounted price

*********Discounted 50% -$6.45

in template:

[ORDER TAGS:Discount Custom Percent]
{ORDER TAG NAME} {ORDER TAG NOTE} {ORDER TAG PRICE}

@Jesse i read in this artice order tag price dont print if this is the case then can you help with the syntax.

Discounted Price = (Product Original Price) - (Order Price)

Try {ORDER TAG TOTAL:Discount Custom}

yup its working thanks

One more thing how cani do the grouping for discount

30% Total: etc…
i have try this but its not working

{REPORT ORDER TOTAL:OTN.Discount Custom Percent,OTP.Discount Custom Percent, :(OTN.Discount Custom Percent=%30%)}

{REPORT ORDER TOTAL:<fields>:<expression>}

{REPORT ORDER TOTAL:OTN.Discount Custom Percent,OTP.Discount Custom Percent:(OTN.Discount Custom Percent=30)}

Hi @QMcKay,

Thank you for this excellent “Idiot Proof” tutorial, but somehow I seem to have missed something.

I have followed your steps to the dot and achieved a functional discounting action. The problem is the “Untag” Action doesn’t seem to be doing its job.

Instead of removing the tag, I get the "*** Discounted: 0.0% showing as attached. Any suggestions?

By the way, just to ensure that I have not missed anything in your steps, I have delete and recreated everything twice now AC,RU and Automation Commands even. :smile:

That means you have a constraint wrong. He uses a constraint to allow 0 to take it off.

Post screenshots of your rules.

BTW I included this setup as a Database import tool file which will import setup and working for you. Go to the prebuilt databases forum category and look at the sticky for the files. You must have the Database Tools module purchased and installed/activated.

Thank you, if all fails I will resort to a DB Import. Would love to see where I went wrong though, since I have even copied and pasted the constraints rather than typing to ensure I get it right.

EDIT: Sharks… will try and get better images, Unless you can zoom in?

Hello again,

Deleted all my old rules, triple checked and made sure no traces exist. Then used Database tools to Import the Ask for Discount Rules. I still have Untag issues. Discount works like a charm, including discounting to “0”

Only issue is the Tag Remains and refuses to go away. Not a big issue for me, but its driving me nuts not knowing what could be wrong. :grin:

Please help me keep my sanity… :grinning:

In those screens you need to set it to matches all. If you did not delete the ok setup before you imported and the were named the same it would have skipped them and not overwritten.

1 Like

Hi @kendash

I have given up, I have attached the Backup of the DB, its a work in progress from a baseline of a DB created by a member here gibraelnonsense.

I have deleted all rules/actions/automationcommands/OrderTags for discounts and imported your settings. The behaviour is still the same i.e. Untag doesn’t have any impact.

Could you please take a look at what I might have missed? Thank you again in advance for your help.

Sambapos 4.182 SQL 2014 and admin pin 1234

SambaPOS4.bak.zip (2.3 MB)

Ok, I found the problem. The input mask is interfering with the Rule Constraints.

Basically, when you enter 00.00, this does NOT equal 0 (zero), so we need to change the constraints in the 2 Rules.

Try this:

You should also be able to use the following as constraints because the TN() function converts the value to a number:

NOT zero:

[=TN([:CommandValue])] Not Equals 0

Zero:

[=TN([:CommandValue])] Equals 0
2 Likes

Thanks @QMcKay , question : you are saying that either I can follow the amendments you show in the screen or leave the rules as is and replace the command values to a TN statement. Is my assumption correct?

Correct. Either way should should work.

I only officially tested the change shown in the screenshots, but I’m fairly certain the using TN() function would fix the problem as well.

This works perfect for % discount rule and tag is removed, however when using it for a value amount my rules dont seem to work, keying zero does not remove the discount or the tag any ideas?

Here are my rules, theres an additional constraint that i think was put there to stop the discount value being more than the item price