SCRIPTING
Choose from Menu

Menu Result
SCRIPTING
Use Current Location

Menu Result
LOCATION
Get current weather at
Current Location

Weather Conditions
LOCATION
Get
Location
from
Weather Conditions

Location
LOCATION
Get
ZIP Code
from
Location

ZIP Code
VARIABLES
Set variable
ZipCode
to
Input
SCRIPTING
Enter Zip Code

Menu Result
SCRIPTING
Ask
Enter ZIP CODE you would like to calculate sales tax for:

Provided Input
SCRIPTING
Count
Characters
in
Input

Count
SCRIPTING
If
Input
Condition
TEXT
0
Ask for Input

Text
VARIABLES
Set variable
ZipCode
to
Input
SCRIPTING
Otherwise
VARIABLES
Get
Ask for Input
VARIABLES
Set variable
ZipCode
to
Input
SCRIPTING
End If

If Result
SCRIPTING
End Menu

Menu Result
URL
http://www.salestaxstates.com/

URL
NETWORK
Get contents of
URL
Options Under Construction

Contents of URL
DOCUMENTS
Get text from
Input

Text
TEXT
Split
Text
by
Custom
)

Split Text
SCRIPTING
Count
Items
in
Input

Count
SCRIPTING
If
Input
Condition
VARIABLES
Get
Split Text
SCRIPTING
Get
Item At Index
3.0
from
List

Item from List
SCRIPTING
Otherwise
SCRIPTING
Show alert
Cannot get tax information for zip code
ZipCode
Title
[{'value': 'Cannot get tax information for zip code ', 'class': 'text'}, {'class': 'magic', 'value': 'ZipCode', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}]
SCRIPTING
Exit shortcut with
Result
SCRIPTING
End If

If Result
TEXT
Split
Text
by
Custom
%

Split Text
SCRIPTING
Get
First Item
from
List

Item from List
VARIABLES
Set variable
StateTax
to
Input
VARIABLES
Get
Split Text
SCRIPTING
Get
Item At Index
4.0
from
List

Item from List
TEXT
Split
Text
by
Custom
%

Split Text
SCRIPTING
Get
First Item
from
List

Item from List
VARIABLES
Set variable
CityTax
to
Input
COMMENT
SPECIAL RATES
VARIABLES
Get
Split Text
SCRIPTING
Get
Item At Index
5.0
from
List

Item from List
SCRIPTING
If
Input
Condition
TEXT
Split
Text
by
Custom
%

Split Text
SCRIPTING
Get
First Item
from
List

Item from List
VARIABLES
Set variable
SpecialRate
to
Input
SCRIPTING
End If

If Result
COMMENT
END SPECIAL RATES
VARIABLES
Get
Text
TEXT
Split
Text
by
New Lines

Split Text
SCRIPTING
Get
Item At Index
8.0
from
List

Item from List
TEXT
Split
Text
by
Custom
-

Split Text
SCRIPTING
Get
First Item
from
List

Item from List
VARIABLES
Set variable
State
to
Input
VARIABLES
Get
Split Text
SCRIPTING
Get
Item At Index
2.0
from
List

Item from List
VARIABLES
Set variable
City
to
Input
VARIABLES
Get
SpecialRate
SCRIPTING
If
Input
Condition
MATHS
Number
+
StateTax
Options Under Construction

Calculation Result
MATHS
Number
+
CityTax
Options Under Construction

Calculation Result
VARIABLES
Set variable
Combined
to
Input
SCRIPTING
Otherwise
VARIABLES
Get
StateTax
MATHS
Number
+
CityTax
Options Under Construction

Calculation Result
VARIABLES
Set variable
Combined
to
Input
SCRIPTING
End If

If Result
COMMENT
Use the following text statement to check individual tax rates if necessary.

Text
COMMENT
Leave blank.
VARIABLES
Get
Combined
MATHS
Number
÷
100.0
Options Under Construction

Calculation Result
SCRIPTING
Ask
What is the sub total?

Provided Input
MATHS
Number
×
Percentage
Options Under Construction

Calculation Result
VARIABLES
Set variable
TaxTotal
to
Input
MATHS
Number
+
Sub Total
Options Under Construction

Calculation Result
VARIABLES
Set variable
GrandTotal
to
Input
VARIABLES
Get
SpecialRate
SCRIPTING
If
Input
Condition
SCRIPTING
Show alert
Your total bill is $
GrandTotal
Title
[{'value': 'Your total bill is $', 'class': 'text'}, {'class': 'magic', 'value': 'GrandTotal', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}]
SCRIPTING
Otherwise
SCRIPTING
Show alert
Your total bill is $
GrandTotal
Title
[{'value': 'Your total bill is $', 'class': 'text'}, {'class': 'magic', 'value': 'GrandTotal', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}]
SCRIPTING
End If

If Result
VARIABLES
Get
GrandTotal
SHARING
Copy
Content
to clipboard
COMMENT
@DigmasterFunk
u/DigmasterFunk
Huge thanks to:
@VanishingTacos
u/VanishingTacos
For location services and number formatting.