ShareShortcuts

Calculate Tip & Split

idelaware
Bifurcar “Calculate Tip & Split”

¿Creaste algo nuevo a partir de este atajo? Compártelo como bifurcación: se convierte en un atajo tuyo, que tú administras, y ambas páginas se enlazan entre sí para que idelaware reciba el crédito.

  1. 1Obtén el atajo y modifícalo en la app Atajos. Ponle un nombre propio.
  2. 2Compártelo desde la app Atajos y copia el enlace de iCloud.
  3. 3Vuelve aquí, pega el enlace y describe qué es diferente, p. ej., “Se añadió un paso que usa Apple Intelligence para personalizar el texto”.
Descargas
75K
Guardado
1
Acciones
58
Categoría
Calculations
Versión
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.

Novedades

Versión 5.0

Complete rewrite with tip tables and easy to view options.

Historial de versiones
5.0 28 de oct. de 2018

Complete rewrite with tip tables and easy to view options.

4.0 26 de oct. de 2018

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

3.0 22 de oct. de 2018

Streamlined final result by formatting numbers correctly.

2.0 22 de oct. de 2018

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

1.0 22 de oct. de 2018

First release

Qué hace

58 acciones
  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 las acciones de este atajo escritas en Cherri, un lenguaje de programación para Atajos. Ideal para aprender cómo 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 en Cherri Playground Descompilado con cherri 2.3.0 (GPL-2.0). Puede que necesite pequeños ajustes antes de compilarse.

Valoraciones y reseñas

Escribe una reseña
–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aún no hay reseñas. ¡Sé el primero en compartir tu opinión!

Publicidad

Más de idelaware

Ver todo

También te puede gustar

Ver todo
Publicidad