# Discount button with Admin confirmation

**URL:** <https://forum.sambapos.com/t/discount-button-with-admin-confirmation/7291>\
**Category:** V5 Tutorial\
**Created:** [September 25, 2015, 2:40pm UTC](https://forum.sambapos.com/t/discount-button-with-admin-confirmation/7291 "2015-09-25T14:40:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [September 25, 2015, 2:38pm UTC](https://forum.sambapos.com/t/discount-button-with-admin-confirmation/7291/1 "2015-09-25T14:38:19Z")

</div>

This tutorial shows how to add a discount button to payment screen that asks for Admin pin.

Remove this calculation selector to remove default `Discount` button.

 ![](https://forum.sambapos.com/uploads/default/original/2X/b/bb08ef4f9141b4ec8d04427e2fc42944cd78d673.jpg)

Create new automation command for discount button.

 ![](https://forum.sambapos.com/uploads/default/original/2X/7/7d9e02588f073c5023df17bac84ed0d1a87d3fe9.jpg)

Map it to payment screen.

 ![](https://forum.sambapos.com/uploads/default/original/2X/f/fda4c761cc374f965a943102550daf910e65f009.jpg)

After saving it Create a new action. This action adds discount to ticket.

 ![](https://forum.sambapos.com/uploads/default/original/2X/7/74a50ba321dbe20e31d4c00d5d5beaee12c32c69.jpg)

Create a new rule to add discount when discount button clicked. {:TENDEREDAMOUNT} reads value you typed on numberpad. `Display Payment Screen` action refreshes payment screen to update discounted amounts.

 ![](https://forum.sambapos.com/uploads/default/original/2X/b/b03c4de5fd9552cf8a64003af2aa4c422661a765.jpg)

So when you type 5 and click discount button it adds %5 discount.

 ![](https://forum.sambapos.com/uploads/default/original/2X/4/4abe664f9e17ac471f398aae13196403f0c6e61e.jpg)

If you login with a non-admin user it will also ask Admin pin. While testing be sure you’ve logged in with a non-admin user as it won’t ask confirmation for admins.

---

<div class="post-metadata">

**Author:** ![Johan\_yo](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@Johan\_yo](https://forum.sambapos.com/u/Johan_yo)\
**Post date:** [September 25, 2015, 2:49pm UTC](https://forum.sambapos.com/t/discount-button-with-admin-confirmation/7291/2 "2015-09-25T14:49:55Z")

</div>

Can we add limit discount available, like less than 30%?

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [September 25, 2015, 3:04pm UTC](https://forum.sambapos.com/t/discount-button-with-admin-confirmation/7291/3 "2015-09-25T15:04:18Z")

</div>

Put a Custom Constraint on the rule for {:TENDEREDAMOUNT} Less 30

---

<div class="post-metadata">

**Author:** ![Johan\_yo](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@Johan\_yo](https://forum.sambapos.com/u/Johan_yo)\
**Post date:** [September 25, 2015, 3:12pm UTC](https://forum.sambapos.com/t/discount-button-with-admin-confirmation/7291/4 "2015-09-25T15:12:49Z")

</div>

Sorry, i still can’t add Custom Constraint rule. Please how to add it?

---

<div class="post-metadata">

**Author:** ![Johan\_yo](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@Johan\_yo](https://forum.sambapos.com/u/Johan_yo)\
**Post date:** [September 25, 2015, 4:05pm UTC](https://forum.sambapos.com/t/discount-button-with-admin-confirmation/7291/5 "2015-09-25T16:05:22Z")

</div>

Oke, Now It’s Work. Thank You
