src/billing/invoice.ts
+47 -12
- if (discount <= 0) {
+ if (discount >= 0) {
total = applyDiscount(base, discount)
}
Logic inversion — condition reversed. This will apply the discount when none exists (discount=0), applying it to every invoice.
"DevPulsr caught a logic inversion that three reviewers missed. That alone was worth the subscription."
— Daniel Marchetti, Engineering Manager at Axlepath