Can't add custom disc. percentage to ticket


I have a calculation type “Disc %” that uses “Discount % Transaction” and calculation method of “Rate from ticket amount”.

The problem is when using POS, I can only enter specific numbers for discount percentage: 10, 15, 20, 25, 50. I can’t enter custom percentages.

My settings for the calculation type are as following:
Rate or Amount: 0.000
Max Amount: 0.000 (I also tried 100.00)
Rounding: 0.000
Checked boxes: Decrease Amount, Toggle Calculation

I couldn’t find anywhere specifying fixed percentages. Would appreciate your assistance.

On Settlement screen you should be able to type in any number? Is this a custom prompt input?

Yes I can type any number in the screen.
This is a button at the end of the screen

% Discount has the following prompt, in which I can only specify certain numbers

This is my setting for the discount calc. button

Note that the other button “Discount Amount” allows me to type any number without issues. The problem is only in the Discount %

Go to Automation > Rules and find this discount button rule, can you send photos of all the actions laid out?

You have a regular expression there thats stopping you from entering whatever you want

Thank you!
This seems what is constricting it.

How do I fix it? just replace it with [?Discount Rate] without any options?

Change Discount Rate
[?Discount Rate;[0-0]|5|10|15|20|25|50]
[?Discount Rate;;;;]


If you use this: [?Discount Rate;;;OCN;] this will give you a numeric keyboard instead of the alapha/numeric keyboard.

If you want to get really fancy you could use [?Discount Rate;\d{1,2};;OCN;] This will restrict the input to numbers only (prevents accidental physical keyboard inputs) and a maximum of 2 digits.


Thank you so much!
Would you mind explaining the Syntax for me or guide me through a tutorial for regex used by samba as I couldn’t find one? more specifically on the meaning of the many ;

He has a Discount Reason in there thats why I didnt force numeric keyboard, + SambaPOS will do internal check whether Discount is int or string.

You can find many tutorials online, Id recommend to look for JavaScript tutorials

Character classes
.	any character except newline
\w\d\s	word, digit, whitespace
\W\D\S	not word, digit, whitespace
[abc]	any of a, b, or c
[^abc]	not a, b, or c
[a-g]	character between a & g

^abc$	start / end of the string
\b\B	word, not-word boundary

Escaped characters
\.\*\\	escaped special characters
\t\n\r	tab, linefeed, carriage return

Groups & Lookaround
(abc)	capture group
\1	backreference to group #1
(?:abc)	non-capturing group
(?=abc)	positive lookahead
(?!abc)	negative lookahead

Quantifiers & Alternation
a*a+a?	0 or more, 1 or more, 0 or 1
a{5}a{2,}	exactly five, two or more
a{1,3}	between one & three
a+?a{2,}?	match as few as possible
ab|cd	match ab or cd