I think this is what you are looking for:
This is assuming you are using a Surcharge on the whole payment or last form of payment.
Weâll need to create a new Surcharge button, Create a âUpdate Ticket Calculationâ action & a Display Payment Screen action, then use a rule to tie everything together.
Automation Commands:
Name: Surcharge
Button Header: Surcharge
Mappings: (Visibility Column) Payment
Actions:
Action Name: Surcharge
Action Type: Update Ticket Calculation
Calculation Type: Surcharge
Amount: [:Amount]
Reset Ticket: [:Reset Ticket T/F]
Remove Calculation: [:Remove Calculation T/F]
Round Amount: [:Round Amount T/F]
! (This action may already be already been created, if so use that one)
Action name: Display Payment Screen
Balance Mode: Leave Blank
Display In Background: Leave Blank
Grouping Order State: Leave Blank
Rules:
Rule Name: Surcharge
Event Name: Automation Command Executed
Add Custom Constraint: Automation Command Name Equals Surcharge
Actions: Surcharge
x2 (search for Surcharge, right click in white results area, select âDisplay all Valuesâ
Display Payment Screen
First Surcharge Action:
Constraint: {CALCULATION TOTAL:Surcharge} > 0
amount: Leave Blank
Reset Ticket T/F: Leave Blank
Remove Calculation T/F: True
Round Amount T/F: Leave Blank
Explaination
This first Action will be used to remove the calculation from the ticket when a Surcharge calculation is present. We have to put it first, otherwise it would cancel out the Calculation amount, if we put it second.
Second Surcharge Action:
Constraint: {CALCULATION TOTAL:Surcharge} == ''
amount: [=F(TN(â{REMAINING TOTAL}â).15-TN(â{CALCULATION TOTAL:Surcharge}â).15,â0.00â)]
âThis option will directly fill in the Surcharge Calculation.
-------OR--------
amount: [?Surcharge Amount;;[=F(TN(â{REMAINING TOTAL}â).15-TN(â{CALCULATION TOTAL:Surcharge}â).15,â0.00â)];OCN]
âThis option will give a pop-up window with the calculated amount with the ability to override with another amount.
Reset Ticket T/F: Leave Blank
Remove Calculation T/F: True
Round Amount T/F: Leave Blank
Display Payment Screen
Constraint: Leave Blank
(this is needed to refresh the screen to show the calculation on the ticket)
Clicking the Surcharge button will add the Surcharge Calculation. Clicking the Surcharge button again, will remove the calculation.
You will have 2 Surcharge buttons on the payment screen. If you want to remove your first Surcharge (original) button, go to Manage -> Tickets -> Calculation Selectors -> Surcharge (or the name you gave it) -> Mappings. Delete the mappings, (there should be no mappings listed). If you want to re-enable it, just re-map it.