fix(webapp): payment receive auto-increment

This commit is contained in:
a.bouhuolia
2023-05-26 00:02:47 +02:00
parent e92c4486aa
commit c90ffed67f
10 changed files with 57 additions and 18 deletions

View File

@@ -239,3 +239,14 @@ export const useReceiptIsForeignCustomer = () => {
);
return isForeignCustomer;
};
export const resetFormState = ({ initialValues, values, resetForm }) => {
resetForm({
values: {
// Reset the all values except the warehouse and brand id.
...initialValues,
warehouse_id: values.warehouse_id,
brand_id: values.brand_id,
},
});
};