# Discount Authorization

**URL:** <https://forum.sambapos.com/t/discount-authorization/793>\
**Category:** V4 Question\
**Created:** [March 17, 2014, 6:17am UTC](https://forum.sambapos.com/t/discount-authorization/793 "2014-03-17T06:17:37Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![jagvir90](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/eb8c5e/32.png) [@jagvir90](https://forum.sambapos.com/u/jagvir90)\
**Post date:** [March 17, 2014, 6:17am UTC](https://forum.sambapos.com/t/discount-authorization/793/1 "2014-03-17T06:17:37Z")

</div>

Hi Emre,

I am great fan of SambaPos, and hats off to your hard work and dedication. actually i am looking for guidance on matter bellow:-  
**Is there any way to setup admin authorization on discounts and change price.**  
if yes please guide me when possible, your help is much appreciated.  
Thanks  
Jagvir

---

<div class="post-metadata">

**Author:** ![JohnS](https://forum.sambapos.com/user_avatar/forum.sambapos.com/johns/32/24916_2.png) [@JohnS](https://forum.sambapos.com/u/JohnS)\
**Post date:** [March 17, 2014, 11:03am UTC](https://forum.sambapos.com/t/discount-authorization/793/2 "2014-03-17T11:03:13Z")

</div>

Only Automation Commands can have an Admin override, otherwise an Admin operator will need to login, select the ticket and apply price changes or apply discounts.

For the Change Price situation, you can create an `Automation Button` called `Price Change`, set `Conformation` to `Admin Pin` and map to `Order Line`, then create a Rule to use this Automation Button, with the price from the Numberpad `{:NUMBERPAD}` and `Update Order` by setting `Price` to `{:NUMBERPAD}`

 ![](https://forum.sambapos.com/uploads/default/original/3X/d/a/da81049d2ad2494222c8fff29d10d7060f6825e7.png)

---

<div class="post-metadata">

**Author:** ![jagvir90](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/eb8c5e/32.png) [@jagvir90](https://forum.sambapos.com/u/jagvir90)\
**Post date:** [March 18, 2014, 1:21am UTC](https://forum.sambapos.com/t/discount-authorization/793/3 "2014-03-18T01:21:10Z")

</div>

Hi John S,  
Many Many Thanks for your help Sir, I really appreciated 😄  
we can hide discounts from payment screen i know how to do it, But is there any way we can put admin pin on “discount button” on Payment Screen. if possible, please guide me Sir.

Thanks  
Jagvir Singh

---

<div class="post-metadata">

**Author:** ![JohnS](https://forum.sambapos.com/user_avatar/forum.sambapos.com/johns/32/24916_2.png) [@JohnS](https://forum.sambapos.com/u/JohnS)\
**Post date:** [March 18, 2014, 1:19pm UTC](https://forum.sambapos.com/t/discount-authorization/793/4 "2014-03-18T13:19:40Z")

</div>

@emre, to achieve the same result on the Payment Screen (as we do in the Ticket Screen), we need to be able to read the NumberPad, but I am not getting any values.  
Is it possible to have this ability?  
Then we can use an Automation Command to apply a variable discount with Admin override.

---

<div class="post-metadata">

**Author:** ![JohnS](https://forum.sambapos.com/user_avatar/forum.sambapos.com/johns/32/24916_2.png) [@JohnS](https://forum.sambapos.com/u/JohnS)\
**Post date:** [March 18, 2014, 9:32pm UTC](https://forum.sambapos.com/t/discount-authorization/793/5 "2014-03-18T21:32:59Z")

</div>

@emre, I was also thinking, is there a way to disable the original Change Price button ? As it still is visible but greyed out for non admin users.

---

<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:** [March 19, 2014, 8:57am UTC](https://forum.sambapos.com/t/discount-authorization/793/6 "2014-03-19T08:57:29Z")

</div>

Should we hide it for non admin users or remove it completely?

---

<div class="post-metadata">

**Author:** ![JohnS](https://forum.sambapos.com/user_avatar/forum.sambapos.com/johns/32/24916_2.png) [@JohnS](https://forum.sambapos.com/u/JohnS)\
**Post date:** [March 19, 2014, 9:29am UTC](https://forum.sambapos.com/t/discount-authorization/793/7 "2014-03-19T09:29:59Z")

</div>

We can replace it with an Automation Command, so removing it would not be an issue. But are we taking a step backwards and making it a little harder to setup.  
I think hide it for non admin users.  
We can revisit this later and remove completely if needed.

---

<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:** [March 19, 2014, 9:33am UTC](https://forum.sambapos.com/t/discount-authorization/793/8 "2014-03-19T09:33:16Z")

</div>

OK so I’ll leave it as is for now. I can include that feature in default rules for new users but that will be an issue for existing users.

I’m trying to solve import, export issue and if I can solve it soon I’ll create another solution. If not I’ll remove it for admin users on the other release.

---

<div class="post-metadata">

**Author:** ![JohnS](https://forum.sambapos.com/user_avatar/forum.sambapos.com/johns/32/24916_2.png) [@JohnS](https://forum.sambapos.com/u/JohnS)\
**Post date:** [March 19, 2014, 10:01am UTC](https://forum.sambapos.com/t/discount-authorization/793/9 "2014-03-19T10:01:44Z")

</div>

Just hide the button completely for non admin so we can’t see Change Price greyed out. Less confusing if we are using an Automation Command Button.

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [May 23, 2014, 5:25pm UTC](https://forum.sambapos.com/t/discount-authorization/793/10 "2014-05-23T17:25:58Z")

</div>

The value for `{:NUMBERPAD}` doesn’t seem to be captured. Let me know if I’ve got something wrong here…

 ![](https://forum.sambapos.com/uploads/default/original/3X/c/2/c29082b2e6694bfec0d5fc559237cf5303684fd6.png)

---

<div class="post-metadata">

**Author:** ![JohnS](https://forum.sambapos.com/user_avatar/forum.sambapos.com/johns/32/24916_2.png) [@JohnS](https://forum.sambapos.com/u/JohnS)\
**Post date:** [May 23, 2014, 11:56pm UTC](https://forum.sambapos.com/t/discount-authorization/793/11 "2014-05-23T23:56:22Z")

</div>

Select item, type the price using the NumberPad and press Change Price.

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [May 24, 2014, 3:32am UTC](https://forum.sambapos.com/t/discount-authorization/793/12 "2014-05-24T03:32:37Z")

</div>

There are 2 issues here: one with the hard-coded button, and one with the new button I’ve created using automation.

`Change Price` (hard-coded button) doesn’t function on first attempt.  
Type a value into NumberPad, select item, click Change Price, message appears saying I need to enter a value (which I’ve already done), close the modifier list (since it appears when you select an item), **retype** the value into the NumberPad, select the item (modifier list appears again), click `Change Price`, then price is updated. The requirement to do this twice is not intuitive. And of course, it’s only available to Administrators.

Since I wanted to create my own `Automation Command` for `Price Change` (in order to control permissions), I’ve done so, as you’ve instructed @JohnS , but as you can see from the screenshots, the `{:NUMBERPAD}` value is not being captured (the `Message Box` is evidence of this), thus, the price isn’t being changed.

---

<div class="post-metadata">

**Author:** ![JohnS](https://forum.sambapos.com/user_avatar/forum.sambapos.com/johns/32/24916_2.png) [@JohnS](https://forum.sambapos.com/u/JohnS)\
**Post date:** [May 24, 2014, 4:20am UTC](https://forum.sambapos.com/t/discount-authorization/793/13 "2014-05-24T04:20:25Z")

</div>

@emre, can you look into this please. I can see the problem @QMcKay has as he has Auto Select for his items.  
{:NUMBERPAD} is not holding the value after an item is selected.

---

<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:** [May 24, 2014, 9:00am UTC](https://forum.sambapos.com/t/discount-authorization/793/14 "2014-05-24T09:00:18Z")

</div>

I see. I’ve changed how it works to handle this case but there is a better implementation.  
You can configure update price rule like this

 ![](https://forum.sambapos.com/uploads/default/original/3X/a/9/a99788ed6f18f3acdf401fa76530e45d58328155.jpeg) 

SambaPOS will display a dialog box to let user input the item price. So you won’t need to deal with numberpad value. User will just click on change price and input price.

`[?Price:\d+\.?\d{0,2}]` means `Ask Price value and only allow numbers with two decimal places.`

 ![](https://forum.sambapos.com/uploads/default/original/3X/8/e/8ebc52879c4cb69d668a81c1321baf62a734d1c0.jpeg)

---

<div class="post-metadata">

**Author:** ![JohnS](https://forum.sambapos.com/user_avatar/forum.sambapos.com/johns/32/24916_2.png) [@JohnS](https://forum.sambapos.com/u/JohnS)\
**Post date:** [May 24, 2014, 11:41am UTC](https://forum.sambapos.com/t/discount-authorization/793/15 "2014-05-24T11:41:26Z")

</div>

I think the issue with the change price process and number pad might have started when we got the ability to enter a price and select a misc item (which doesn’t have a price set) to set it’s price.

> [@Open Price Option](http://forum.sambapos.com/t/open-price-option/484):
>
> I have created a ‘MISC’ product which we sometimes use to process random payments amounts. Is there a way to make this a open price item so I can enter amount on numerator pad and hit the ‘MISC’ product which will then set the price for this item?

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [May 24, 2014, 1:19pm UTC](https://forum.sambapos.com/t/discount-authorization/793/16 "2014-05-24T13:19:09Z")

</div>

Excellent, this is even better! Simple, intuitive. Why didn’t I think of this? Thanks @emre, it works great!

 ![](https://forum.sambapos.com/uploads/default/original/3X/8/5/858867056ee3e0306c25f263fba8958f94603e55.png)

---

<div class="post-metadata">

**Author:** ![AndyW](https://forum.sambapos.com/user_avatar/forum.sambapos.com/andyw/32/2863_2.png) [@AndyW](https://forum.sambapos.com/u/AndyW)\
**Post date:** [August 10, 2014, 10:56pm UTC](https://forum.sambapos.com/t/discount-authorization/793/17 "2014-08-10T22:56:41Z")

</div>

John, I followed all the steps in this post but still missing the Conformation with Admin PIN step.

I guess I have this working for Admin and Manager, but want to be able to do this via a Sales logon. With a manager approval. I’m missing that step/connection.

Thanks  
/Andy

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [August 10, 2014, 11:02pm UTC](https://forum.sambapos.com/t/discount-authorization/793/18 "2014-08-10T23:02:53Z")

</div>

It’s an option in the Automation Command, main settings, called Confirmation.

---

<div class="post-metadata">

**Author:** ![AndyW](https://forum.sambapos.com/user_avatar/forum.sambapos.com/andyw/32/2863_2.png) [@AndyW](https://forum.sambapos.com/u/AndyW)\
**Post date:** [August 10, 2014, 11:11pm UTC](https://forum.sambapos.com/t/discount-authorization/793/19 "2014-08-10T23:11:46Z")

</div>

Thank you. Found it, and got it working.
