💰 Order Discount Calculator

Calculate your order total with discounts and taxes using custom functions

â„šī¸ This example demonstrates using function services to perform calculations, validations, and business logic. All calculations are handled by custom functions defined in the services configuration.

đŸ“Ļ Product Information

Subtotal

$100.00

đŸŽŸī¸ Discount Code

Available codes: SAVE10 (10% off $50+), SAVE20 (20% off $100+), SAVE30 (30% off $200+), VIP50 (50% off $500+)

📊 Tax & Total

Tax (8.5%)

$8.50

Total

$108.50

🔍 Calculation Breakdown

1ī¸âƒŖ Subtotal = Price × Quantity = $100 × 1 = $100.00

2ī¸âƒŖ Discount = Subtotal × 0% = $0.00

3ī¸âƒŖ After Discount = $100.00 - $0.00 = $100.00

4ī¸âƒŖ Tax = After Discount × 8.5% = $8.50

5ī¸âƒŖ Total = After Discount + Tax = $108.50