feat: add Auto increment in credit note number.

This commit is contained in:
elforjani13
2021-12-01 14:02:31 +02:00
parent eeb16f4362
commit 432e2d202a
10 changed files with 311 additions and 13 deletions

View File

@@ -10,6 +10,7 @@ import {
useEditCreditNote,
useItems,
useCustomers,
useSettingsCreditNotes,
} from 'hooks/query';
const CreditNoteFormContext = React.createContext();
@@ -40,6 +41,9 @@ function CreditNoteFormProvider({ creditNoteId, ...props }) {
},
);
// Handle fetching settings.
useSettingsCreditNotes();
// Create and edit credit note mutations.
const { mutateAsync: createCreditNoteMutate } = useCreateCreditNote();
const { mutateAsync: editCreditNoteMutate } = useEditCreditNote();