Compare commits

1 Commits
Author SHA1 Message Date
greptile-bot 9059665ed2 Add tax calculation 2026-07-25 14:51:54 -07:00
+10
View File
@@ -0,0 +1,10 @@
import { totalCents, type CartItem, type Discount } from './cart'
export function totalWithTaxCents(
items: CartItem[],
taxRatePercent: number,
discount?: Discount,
): number {
const base = totalCents(items, discount)
return base + base * (taxRatePercent / 100)
}