fix(webapp): warehouse and branch reset on invoice form

This commit is contained in:
a.bouhuolia
2023-05-24 23:52:05 +02:00
parent 4d54d180bc
commit aaceea5338
5 changed files with 36 additions and 25 deletions

View File

@@ -123,18 +123,6 @@ export const fullAmountPaymentEntries = (entries) => {
}));
};
/**
* Syncs payment receive number settings with form.
*/
export const useObservePaymentNoSettings = (prefix, nextNumber) => {
const { setFieldValue } = useFormikContext();
React.useEffect(() => {
const invoiceNo = transactionNumber(prefix, nextNumber);
setFieldValue('payment_receive_no', invoiceNo);
}, [setFieldValue, prefix, nextNumber]);
};
/**
* Detarmines the customers fast-field should update.
*/