negative when there's discount
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user