mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
fix(webapp): auto-increment estimate transactions
This commit is contained in:
@@ -56,13 +56,13 @@ export const EstimateIncrementSyncSettingsToForm = R.compose(
|
||||
const { setFieldValue } = useFormikContext();
|
||||
|
||||
useUpdateEffect(() => {
|
||||
// Do not update if the estimate auto-increment mode is disabled.
|
||||
if (!estimateAutoIncrement) return null;
|
||||
|
||||
const estimateNo = transactionNumber(
|
||||
estimateNumberPrefix,
|
||||
estimateNextNumber,
|
||||
setFieldValue(
|
||||
'estimate_number',
|
||||
transactionNumber(estimateNumberPrefix, estimateNextNumber),
|
||||
);
|
||||
setFieldValue('estimate_number', estimateNo);
|
||||
}, [
|
||||
setFieldValue,
|
||||
estimateNumberPrefix,
|
||||
|
||||
Reference in New Issue
Block a user