๐Ÿ’ก All calculations happen automatically! No custom functions needed - just declare what should be computed.

๐Ÿ’ฐ Order Details

๐Ÿ“Š Auto-Calculated Values

Subtotal

$100

Discount (10%)

-$0

After Discount

$0

Tax (8.5%)

$0

Total

$0

๐Ÿ”ข The Formulas

subtotal = price ร— quantity

discount = subtotal ร— (discountPercent รท 100)

afterDiscount = subtotal - discount

tax = afterDiscount ร— (taxPercent รท 100)

total = afterDiscount + tax