import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
from checkout.service import calculate_checkout

for subtotal in (99.0, 100.0, 101.0, 120.0):
    r = calculate_checkout(subtotal, "SAVE10")
    print(f"subtotal={subtotal:6.2f} discount={r.discount:5.2f} taxable_base={r.taxable_base:6.2f} total={r.total:6.2f}")
