Keeping with the Christmas spirit and inspired by @RickH great work and responses to Fast Payment Buttons - I thought I would add a little gift back.
How to use 1 rule instead of several to control Fast Payment Automation Buttons
I have set a few buttons up:
Note: I have used the same description format for each button!
In each button specify the Value to pass
Instead of setting a rule for each button (and optional “Ticket Value Greater” message), I decided to see if Samba would give?:
The magic of Samba - 1 Rule “Cash FP Button”:
What happens? “Emre’s magic parsing”
Custom Constraint ZCFP_Cash Fast $[:CommandValue] becomes ZCFP_Cash Fast $10 - matches Automation Button Name
less [:CommandValue].01 becomes less 10.01 - so cool
You can guess the rest.
The optional “Ticket Greater than Fast Payment Button” rule is done the same way:
Oh yea I just have 1 Payment Action as well as you see above I pass the Payment Method - “Method”.
Thanks Rick, Emre Leaders and Posters - without your support I could not do this!
Happy xmas 2015
#Samba just keeps giving…