negative when there's discount

This commit is contained in:
2025-12-24 02:15:49 -03:00
parent ed6b97846e
commit 82ab691fbb

View File

@@ -91,7 +91,7 @@ export function Bulk({ courses, onSubmit }: BulkProps) {
0
)
const discount = coupon
? applyDiscount(subtotal, coupon.amount, coupon.type)
? applyDiscount(subtotal, coupon.amount, coupon.type) * -1
: 0
const total = subtotal > 0 ? subtotal - discount : 0
@@ -319,7 +319,7 @@ export function Bulk({ courses, onSubmit }: BulkProps) {
<InputGroupInput
name="discount"
value={currency(discount * -1)}
value={currency(discount)}
tabIndex={-1}
className="pointer-events-none text-muted-foreground"
readOnly