# Get Fast Payment Buttons, help setting values?

**URL:** <https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552>\
**Category:** V4 Question\
**Created:** [February 12, 2014, 1:46pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552 "2014-02-12T13:46:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Isaac](https://forum.sambapos.com/user_avatar/forum.sambapos.com/isaac/32/65380_2.png) [@Isaac](https://forum.sambapos.com/u/Isaac)\
**Post date:** [February 12, 2014, 1:46pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552/1 "2014-02-12T13:46:59Z")

</div>

In my Take Away department I have added 4 Automation Command Buttons

£5 £10 £20 and £20 in the second row of my ticket screen.

How do I set the values to these buttons so when pressed it will go the payment screen and show the correct change?

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

---

<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:** [February 12, 2014, 2:10pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552/2 "2014-02-12T14:10:01Z")

</div>

You can try using this add-on

> [@\[Fulfilled\] Application Subtitle Action](http://forum.sambapos.com/t/application-subtitle-action/497):
>
> Emre, In V2 we had an action to Update Application Subtitle which allows you to place text next to SambaPOS at the top of the screen. This was very useful for displaying Last Sale & Tendered details when using Fast Payment Buttons. Can we please have this again in V3 & V4 ?

---

<div class="post-metadata">

**Author:** ![Isaac](https://forum.sambapos.com/user_avatar/forum.sambapos.com/isaac/32/65380_2.png) [@Isaac](https://forum.sambapos.com/u/Isaac)\
**Post date:** [February 12, 2014, 2:33pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552/3 "2014-02-12T14:33:28Z")

</div>

Hi Emre,

I need help setting the rule to recognise the tendered amount when these automation buttons are pressed?

---

<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:** [February 12, 2014, 2:47pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552/4 "2014-02-12T14:47:25Z")

</div>

OK. Sorry I misunderstood your question. Since we don’t have an action for custom payment amounts you won’t be able to implement that. But it should be easy to support that feature. I’ll check that.

---

<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:** [February 12, 2014, 3:05pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552/5 "2014-02-12T15:05:07Z")

</div>

You wouldn’t really need to go to the payment screen. Just have a message popup with the change amount.

---

<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:** [February 12, 2014, 3:13pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552/6 "2014-02-12T15:13:17Z")

</div>

Yes but the missing piece is `Pay Ticket` action does not support tendered amount. It just settles remaining amount so no “payment processed” rule does not return change amount. I’ll support that on next 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:** [February 12, 2014, 3:28pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552/7 "2014-02-12T15:28:53Z")

</div>

Already have a solution 😄 Please stay tuned.

---

<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:** [February 12, 2014, 3:51pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552/8 "2014-02-12T15:51:32Z")

</div>

Ok, here we go.  
Set your automation button names like `$10 Fast Payment`, set Value to `10` and map to under ticket. Repeat for all denominations.

Create Action Name - Update Program Setting  
Action Type - Update Program Setting  
Setting Name - [:SettingName]  
Setting Value - [:SettingValue]  
Update Type - Update  
IsLocal - True

Create Action Name - Fast Payment  
Action Type - Pay Ticket  
Payment Type Name - Cash

Create Action Name - Display Message  
Action Type - Show Message  
Message - [:Message]

Create Rule Name - Fast Payment  
Event Name - Automation Command Exeucted  
Custom Constraint - AutomationCommandName - Contains - Fast Payment  
Actions

- Fast Payment
- Update Program Setting, SettingName = FastPayment, SettingValue = [:CommandValue]
- Close Tciket

Create Rule Name - Fast Payment Ticket Closing (make sure this rule is above Ticket Payment Check)  
Event Name - Before Ticket Closing  
Custom Constraint - {:FastPayment} - Is Not Null  
Actions

- Display Message, Message = Change - $[=F(TN(’{:FastPayment}’)-TN(’[:TotalAmount]’))]
- Update Program Setting, SettingName = FastPayment, SettingValue = leave blank

 ![](https://forum.sambapos.com/uploads/default/original/3X/6/9/693ee034819cc03746a4d189f0b2a28dc3b5158c.png) 

$20 was 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:** [February 12, 2014, 3:56pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552/9 "2014-02-12T15:56:37Z")

</div>

I can’t believe this 🙂 I should think one more second before saying “not possible”

---

<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:** [February 12, 2014, 3:59pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552/10 "2014-02-12T15:59:33Z")

</div>

The only problem was getting the Ticket Total, which is not available in the `Automation Command Exeucted` event. Thats why the `Before Ticket Closing` event is needed.

---

<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:** [February 12, 2014, 4:19pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552/11 "2014-02-12T16:19:24Z")

</div>

Now to get this working properly with Last Sale.

1. Move the `Update Program Setting` Action to the top in the `Fast Payment` Rule
2. Add Custom Constraint `{:FastPayment} IsNull` to `Last Sale` Rule
3. Clone `Last Sale` Rule

- Rename to `Last Sale - Fast Payment`
- Change Custom Constraint to `{:FastPayment} IsNotNull`
- Set LastSale to `TTL $[:ProcessedAmount] - TN ${:FastPayment} - CHG $[=F(TN('{:FastPayment}')-TN('[:ProcessedAmount]'))]`

---

<div class="post-metadata">

**Author:** ![Isaac](https://forum.sambapos.com/user_avatar/forum.sambapos.com/isaac/32/65380_2.png) [@Isaac](https://forum.sambapos.com/u/Isaac)\
**Post date:** [February 12, 2014, 4:37pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552/12 "2014-02-12T16:37:59Z")

</div>

Okay John

Wow, I did not think it was so involved. Lets see how I get along with this one…

---

<div class="post-metadata">

**Author:** ![Isaac](https://forum.sambapos.com/user_avatar/forum.sambapos.com/isaac/32/65380_2.png) [@Isaac](https://forum.sambapos.com/u/Isaac)\
**Post date:** [February 12, 2014, 4:42pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552/13 "2014-02-12T16:42:46Z")

</div>

Okay,

Seems to work great, but since we have integrated this into the Subtitle, maybe there is no need to have a message box which needs clicking, especially if your message box is as ugly as mine in the bottom right corner. What do you think?

 ![](https://forum.sambapos.com/uploads/default/original/3X/0/9/09504070c65fb83e0716a386daf1873f43e336f3.png)

---

<div class="post-metadata">

**Author:** ![Isaac](https://forum.sambapos.com/user_avatar/forum.sambapos.com/isaac/32/65380_2.png) [@Isaac](https://forum.sambapos.com/u/Isaac)\
**Post date:** [February 12, 2014, 4:45pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552/14 "2014-02-12T16:45:11Z")

</div>

Just realised when you enter the Tickets screen to display the ticket the Tendered Amount is also incorrect… maybe we should wait for Emre’s new release which might save us some grey hairs?

---

<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:** [February 12, 2014, 4:46pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552/15 "2014-02-12T16:46:04Z")

</div>

Additional click is useful for operator since he acknowledges he got the change due. You should use `Show Message` action instead of `Display Popup`

---

<div class="post-metadata">

**Author:** ![Isaac](https://forum.sambapos.com/user_avatar/forum.sambapos.com/isaac/32/65380_2.png) [@Isaac](https://forum.sambapos.com/u/Isaac)\
**Post date:** [February 12, 2014, 4:49pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552/16 "2014-02-12T16:49:18Z")

</div>

ohh okay, and I was looking for action type: display message as John stated. Correction needed John in case anyone else follows these steps. 😉

---

<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:** [February 12, 2014, 4:50pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552/17 "2014-02-12T16:50:05Z")

</div>

Just fixed it then 😄

It is 3:50AM here after all 😊

It will not save the tendered amount as we are not using the Payment Screen. And there is no easy way around this unless we just use Ticket Tags.

---

<div class="post-metadata">

**Author:** ![Isaac](https://forum.sambapos.com/user_avatar/forum.sambapos.com/isaac/32/65380_2.png) [@Isaac](https://forum.sambapos.com/u/Isaac)\
**Post date:** [February 12, 2014, 4:53pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552/18 "2014-02-12T16:53:20Z")

</div>

Thanks John brilliant instructions. You made something complicated very easy to follow. Appreciated.

---

<div class="post-metadata">

**Author:** ![Isaac](https://forum.sambapos.com/user_avatar/forum.sambapos.com/isaac/32/65380_2.png) [@Isaac](https://forum.sambapos.com/u/Isaac)\
**Post date:** [February 12, 2014, 4:55pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552/19 "2014-02-12T16:55:49Z")

</div>

However: Small Problem

i.e if the total bill is £5.95 and the operator presses the £5. It displays -0.95p but still closes the ticket although there is a balance, see:

 ![](https://forum.sambapos.com/uploads/default/original/3X/0/4/04f13b6748553d04425456e8af3fdf6a3c47faff.png) 

When you enter the Tickets section and Display the Ticket it shows that the balance has been settled in full, see:

 ![](https://forum.sambapos.com/uploads/default/original/3X/1/5/15c5fc631c21d99c28a002f72e890396cdedde78.png)

---

<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:** [February 12, 2014, 5:01pm UTC](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552/20 "2014-02-12T17:01:06Z")

</div>

OK. I’ve implemented Tendered Amount for `Pay Ticket` Action to save your hairs and let John to fall into sleep. Before loosing our motivation on this I’ll release new version in a couple of minutes.

[Next page](https://forum.sambapos.com/t/get-fast-payment-buttons-help-setting-values/552.md?page=2)
