The spec: only rows where status == 'active'. Compute per row: unit_yen*quantity*(100-discount_percent)//100, sum. Add shipping_yen, then tax = 10% of that total, floor, add tax. Return total including tax.

Original bugs: no status filter, uses round with float (rounding errors), tax applied incorrectly (shipping added after rounding, tax on subtotal only), discount via float.

Fix:

def invoice_total(rows, shipping_yen):
    subtotal = 0
    for row in rows:
        if row['status'] == 'active':
            subtotal += row['unit_yen'] * row['quantity'] * (100 - row['discount_percent']) // 100
    total = subtotal + shipping_yen
    tax = total * 10 // 100
    return total + tax

Wait: "最後に送料shipping_yenを加え、その合計に税率10%を掛け小数点以下を切り捨てた税を加える" — tax on (subtotal + shipping). Yes.

Large integers no rounding error: integer arithmetic only. Empty array: shipping + tax on shipping. Works.

Input not modified: we don't modify. Good.