Invoice totals lose cents

Code reviewMedium20 minStripe and PayPal style

Your task

Review this schema and the Python that writes to it.

def create_invoice(conn, customer, amount, tax_rate):
    total = amount + amount * tax_rate
    conn.execute(
        "INSERT INTO invoices (customer, amount) VALUES (%s, %s)",
        (customer, total),
    )