ShareShortcuts

Calculate Tip & Split

idelaware
Fazer fork de “Calculate Tip & Split”

Criou algo novo a partir deste atalho? Compartilhe como uma derivação: ela se torna um atalho seu, que você gerencia, e as duas páginas têm links entre si para que idelaware receba o crédito.

  1. 1Obtenha o atalho e altere-o no app Atalhos. Dê a ele um nome próprio.
  2. 2Compartilhe pelo app Atalhos e copie o link do iCloud.
  3. 3Volte aqui, cole o link e descreva o que mudou, por exemplo: “Adicionei uma etapa que usa a Apple Intelligence para personalizar o texto.”
Downloads
75K
Salvo
1
Ações
58
Categoria
Calculations
Versão
5.0
Idioma
EN

UPDATED WITH A FULL TIP TABLE: I can always figure out the tip in my head for myself, however the real reason and need for a calculator (for me) has always been when we have a group of people and everyone wants to be fair. Once you enter your bill amount, the calculator will do a regular calculation (if you want) and present you with options for 10%, 15%, 18%, and 20%, all rounded UP to the nearest dollar. (I did this because I believe that rounding down is rather rude.)

However, if you want to split the bill, you can run the shortcut, enter your total bill, enter the number of people who will be splitting the bill, and it will present you with the same percentage options, slightly rounded to the nearest few cents (as you can see from the final bill amounts of different cents on the dollar). This will allow you quick access to a full tip amount, split as fairly as possible.

Novidades

Versão 5.0

Complete rewrite with tip tables and easy to view options.

Histórico de versões
5.0 28 de out de 2018

Complete rewrite with tip tables and easy to view options.

4.0 26 de out de 2018

Final version (hopefully), fixed formatting for final message to the user.

3.0 22 de out de 2018

Streamlined final result by formatting numbers correctly.

2.0 22 de out de 2018

Fixed dialogue for tip splitting, indicating the $ amount of tip included in the split.

1.0 22 de out de 2018

First release

O que ele faz

58 ações
  1. Ask for Input
    How much is the total bill?
  2. Format Number
  3. Number
  4. Calculate
  5. Round Number
  6. Calculate
  7. Format Number
  8. Number
  9. Calculate
  10. Round Number
  11. Calculate
  12. Format Number
  13. Number
  14. Calculate
  15. Round Number
  16. Calculate
  17. Format Number
  18. Number
  19. Calculate
  20. Round Number
  21. Calculate
  22. Format Number
  23. Choose from Menu
    Are you splitting this bill?
  24. Choose from Menu
    No
  25. Show Alert
    Here are suggested tips:
  26. Stop This Shortcut
  27. Choose from Menu
    Yes
  28. Ask for Input
    How many people will be splitting this bill?
  29. Get Variable
  30. Calculate
  31. Round Number
  32. Format Number
  33. Get Variable
  34. Calculate
  35. Format Number
  36. Get Variable
  37. Calculate
  38. Round Number
  39. Format Number
  40. Get Variable
  41. Calculate
  42. Format Number
  43. Get Variable
  44. Calculate
  45. Round Number
  46. Format Number
  47. Get Variable
  48. Calculate
  49. Format Number
  50. Get Variable
  51. Calculate
  52. Round Number
  53. Format Number
  54. Get Variable
  55. Calculate
  56. Format Number
  57. Show Alert
    Here are suggested tips:
  58. Stop This Shortcut

Ver como código
Beta

Todas as ações deste atalho escritas em Cherri, uma linguagem de programação para o app Atalhos. Ótimo para aprender como ele funciona.

#include 'actions/math'
#define color green
#define glyph dollarSign

const BillAmount = prompt("How much is the total bill?", "Number")
const FormattedBillAmount = formatNumber(0)
const Number = 0.1
const RoundedNumber10 = round(0)
const FormattedNumber10 = formatNumber(0)
const RoundedNumber15 = round(0)
const FormattedNumber15 = formatNumber(0)
const RoundedNumber18 = round(0)
const FormattedNumber18 = formatNumber(0)
const RoundedNumber20 = round(0)
const FormattedNumber20 = formatNumber(0)

menu "Are you splitting this bill?" {
item "No":
	alert("Your total bill is: ${FormattedBillAmount}\n(All tips are rounded up.)\n\nA 10% tip is: ${RoundedNumber10}\nYour new total is: ${FormattedNumber10}\n\nA 15% tip is: ${RoundedNumber15}\nYour new total is: {FormattedNumber15}\n\nAn 18% tip is: ${RoundedNumber18}\nYour new total is: ${FormattedNumber18}\n\nA 20% tip is: ${RoundedNumber20}\nYour new total is: ${FormattedNumber20}", "Here are suggested tips:")
	stop()
item "Yes":
	const AskForInputSplit = prompt("How many people will be splitting this bill?", "Number")
	// TODO: Get Variable not supported: Assign variable here to 'FormattedNumber10'.
	round(0)
	const FormattedNumberSplit10 = formatNumber(0, 2)
	// TODO: Get Variable not supported: Assign variable here to 'FormattedNumberSplit10'.
	const FormattedNumberSplit10V2 = formatNumber(0)
	// TODO: Get Variable not supported: Assign variable here to 'FormattedNumber15'.
	round(0)
	const FormattedNumberSplit15 = formatNumber(0)
	// TODO: Get Variable not supported: Assign variable here to 'FormattedNumberSplit15'.
	const FormattedNumberSplit15V2 = formatNumber(0)
	// TODO: Get Variable not supported: Assign variable here to 'FormattedNumber18'.
	round(0)
	const FormattedNumberSplit18 = formatNumber(0)
	// TODO: Get Variable not supported: Assign variable here to 'FormattedNumberSplit18'.
	const FormattedNumberSplit18V2 = formatNumber(0)
	// TODO: Get Variable not supported: Assign variable here to 'FormattedNumber20'.
	round(0)
	const FormattedNumberSplit20 = formatNumber(0)
	// TODO: Get Variable not supported: Assign variable here to 'FormattedNumberSplit20'.
	const FormattedNumberSplit20V2 = formatNumber(0)
}
alert("Your total bill is: ${FormattedBillAmount}\nYou will be splitting this bill {AskForInputSplit} ways.\n(All tips are rounded up.)\n\nA 10% tip is: ${RoundedNumber10}\nEach person pays: ${FormattedNumberSplit10}\nYour new total is: ${FormattedNumberSplit10V2}\n\nA 15% tip is: ${RoundedNumber15}\nEach person pays: ${FormattedNumberSplit15}\nYour new total is: ${FormattedNumberSplit15V2}\n\nAn 18% tip is: ${RoundedNumber18}\nEach person pays: ${FormattedNumberSplit18}\nYour new total is: ${FormattedNumberSplit18V2}\n\nA 20% tip is: ${RoundedNumber20}\nEach person pays: ${FormattedNumberSplit20}\nYour new total is: ${FormattedNumberSplit20V2}", "Here are suggested tips:")
stop()
Abrir no Cherri Playground Descompilado com cherri 2.3.0 (GPL-2.0). Pode precisar de pequenos ajustes antes de compilar.

Avaliações e comentários

Escrever uma avaliação
–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Ainda não há avaliações. Seja o primeiro a compartilhar o que você pensa!

Publicidade

Mais de idelaware

Ver tudo

Você também pode gostar

Ver tudo
Publicidade