mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
Validation for Minimum and Maximum discount
This commit is contained in:
@@ -129,7 +129,7 @@ function ReceiptForm({
|
||||
is: (quantity, rate) => quantity || rate,
|
||||
then: Yup.number().required(),
|
||||
}),
|
||||
discount: Yup.number().nullable(),
|
||||
discount: Yup.number().nullable().min(0).max(100),
|
||||
description: Yup.string().nullable(),
|
||||
}),
|
||||
),
|
||||
@@ -383,9 +383,9 @@ function ReceiptForm({
|
||||
|
||||
export default compose(
|
||||
withReceiptActions,
|
||||
withReceiptDetail(),
|
||||
withDashboardActions,
|
||||
withMediaActions,
|
||||
withReceiptDetail(),
|
||||
withSettings(({ receiptSettings }) => ({
|
||||
receiptNextNumber: receiptSettings?.nextNumber,
|
||||
receiptNumberPrefix: receiptSettings?.numberPrefix,
|
||||
|
||||
Reference in New Issue
Block a user