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