mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 23:00:34 +00:00
fix(paymentReceive):catch error.
This commit is contained in:
@@ -54,7 +54,7 @@ function PaymentReceiveForm({
|
|||||||
// Payment receive number.
|
// Payment receive number.
|
||||||
const nextPaymentNumber = transactionNumber(
|
const nextPaymentNumber = transactionNumber(
|
||||||
paymentReceiveNumberPrefix,
|
paymentReceiveNumberPrefix,
|
||||||
paymentReceiveNextNumber
|
paymentReceiveNextNumber,
|
||||||
);
|
);
|
||||||
// Form initial values.
|
// Form initial values.
|
||||||
const initialValues = useMemo(
|
const initialValues = useMemo(
|
||||||
@@ -105,10 +105,10 @@ function PaymentReceiveForm({
|
|||||||
}
|
}
|
||||||
const form = {
|
const form = {
|
||||||
...omit(values, ['payment_receive_no_manually', 'payment_receive_no']),
|
...omit(values, ['payment_receive_no_manually', 'payment_receive_no']),
|
||||||
...(values.payment_receive_no_manually) && ({
|
...(values.payment_receive_no_manually && {
|
||||||
payment_receive_no: values.payment_receive_no,
|
payment_receive_no: values.payment_receive_no,
|
||||||
}),
|
}),
|
||||||
entries
|
entries,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Handle request response success.
|
// Handle request response success.
|
||||||
@@ -144,6 +144,12 @@ function PaymentReceiveForm({
|
|||||||
formatMessage({ id: 'payment_number_is_not_unique' }),
|
formatMessage({ id: 'payment_number_is_not_unique' }),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (getError('PAYMENT_RECEIVE_NO_REQUIRED')) {
|
||||||
|
setFieldError(
|
||||||
|
'payment_receive_no',
|
||||||
|
formatMessage({ id: 'payment_receive_number_required' }),
|
||||||
|
);
|
||||||
|
}
|
||||||
setSubmitting(false);
|
setSubmitting(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user