ShareShortcuts

Tip Calculator

Add your total bill amount Add a tip, options: 10%,15%,20% or any other you like

tonydudley
Fork “Tip Calculator”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so tonydudley gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
72K
Saved
0
Actions
50
Category
API
Version
3.0
Language
EN

Preview

Add your total bill amount

Add a tip, options: 10%,15%,20% or any other you like.

Then split the bill by how many people you have with you.

Menu options:

Returns to Control Centre 7

Return to Super Hub

Repeat Tip Calculator.

On import you are asked to set your currency symbol such as £ €$ ¥

What's New

Version 3.0

Menu update

Version History
3.0 Jan 24, 2019

Menu update

2.1 Jan 20, 2019

Import question

2.0 Jan 20, 2019

On import set your currency symbol

1.0 Jan 19, 2019

First release

What it does

50 actions
  1. Comment
    Created by Tony Dudley @TonyJDudley U/tonyguitars
  2. Text
  3. Set Variable
    Logo
  4. Text
  5. Set Variable
    Title
  6. Choose from Menu
    …
  7. Choose from Menu
    Run Tip
  8. Ask for Input
    Enter your total bill amount
  9. Set Variable
    Bill
  10. Choose from Menu
    Choose a tip percentage
  11. Choose from Menu
    10%
  12. Text
  13. Set Variable
    Amount
  14. Number
  15. Set Variable
    Tip
  16. Choose from Menu
    15%
  17. Text
  18. Set Variable
    Amount
  19. Number
  20. Set Variable
    Tip
  21. Choose from Menu
    20%
  22. Text
  23. Set Variable
    Amount
  24. Number
  25. Set Variable
    Tip
  26. Choose from Menu
    Other
  27. Ask for Input
    Enter a percentage tip
  28. Set Variable
    Amount
  29. Calculate
  30. Set Variable
    Tip
  31. Get Variable
  32. Calculate
  33. Format Number
  34. Set Variable
    TipAmount
  35. Calculate
  36. Format Number
  37. Set Variable
    Total
  38. Ask for Input
    Number of People
  39. Get Variable
  40. Calculate
  41. Format Number
  42. Round Number
  43. Text
  44. Set Variable
    All
  45. Run Shortcut
    Control Centre Screen Report
  46. Choose from Menu
    Return to CC7
  47. Run Shortcut
    Control Centre 7
  48. Choose from Menu
    Return to Super Hub
  49. Run Shortcut
    Super Hub
  50. Run Shortcut
    Tip Calculator

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#include 'actions/math'
#define color yellow
#define glyph utensils

/*
Created by Tony Dudley
@TonyJDudley
U/tonyguitars 
*/
@Logo = "£"
@Title = "***********************\nTip Calculator \n***********************\nSplit the Bill."

menu  {
item "Run Tip":
	prompt("Enter your total bill amount", "Number")
	@Bill = nil
	menu "Choose a tip percentage" {
	item "10%":
		@Amount = "10"
		@Tip = 0.1
	item "15%":
		@Amount = "15"
		@Tip = 0.15
	item "20%":
		@Amount = "20"
		@Tip = 0.2
	item "Other":
		prompt("Enter a percentage tip", "Number")
		@Amount = nil
		@Tip = nil / 100
	}
	// TODO: Get Variable not supported: Assign variable here to '@Bill'.
	formatNumber(0)
	@TipAmount = nil
	const CalculationResultBill = nil + @Bill
	formatNumber(0)
	@Total = nil
	const People = prompt("Number of People", "Number")
	// TODO: Get Variable not supported: Assign variable here to '@Total'.
	formatNumber(0)
	const RoundedUp = round(0)
	@All = "<p>{@Title}</p>\n\n<p>The bill is {@Logo} {@Bill} </p>\n<p>___________________</p>\n<p>with a {@Amount}% tip  <p>\n<p>{@Logo} {@TipAmount}</p>\n\n<p>Your total is {@Logo} {CalculationResultBill}</p>\n<p>____________________</p>\n<p>Divided by {People} </p>\n<p>*********************\n= {@Logo} {} Each\n*********************</p>\n<p>Round UP  {@Logo} {RoundedUp}</p>\n-------------------"
	runSelf()
item "Return to CC7":
	runSelf()
item "Return to Super Hub":
	runSelf()
}
runSelf()
Open in Cherri Playground Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.

Ratings & Reviews

Write a Review
–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Advertisement

More by tonydudley

See All

You Might Also Like

See All
Advertisement