fix: the auto-increment of transactions.

This commit is contained in:
a.bouhuolia
2023-05-19 00:29:35 +02:00
parent 425d0293cc
commit d369f0bb17
37 changed files with 383 additions and 221 deletions

View File

@@ -108,18 +108,6 @@ export const transformErrors = (errors, { setErrors }) => {
}
};
/**
* Syncs invoice no. settings with form.
*/
export const useObserveInvoiceNoSettings = (prefix, nextNumber) => {
const { setFieldValue } = useFormikContext();
React.useEffect(() => {
const invoiceNo = transactionNumber(prefix, nextNumber);
setFieldValue('invoice_no', invoiceNo);
}, [setFieldValue, prefix, nextNumber]);
};
/**
* Detarmines customer name field when should update.
*/