feat: add date range selection to credit note, debit note, and receipt management

This commit is contained in:
puriphatt 2025-04-17 17:38:09 +07:00
parent 1e6be274e2
commit ac42ee60d8
6 changed files with 61 additions and 15 deletions

View file

@ -28,6 +28,8 @@ export async function getCreditNoteList(params?: {
pageSize?: number;
query?: string;
creditNoteStatus?: Status;
startDate?: string;
endDate?: string;
}) {
const res = await api.get<PaginationResult<Data>>(`/${ENDPOINT}`, {
params,

View file

@ -28,6 +28,8 @@ export async function getDebitNoteList(params?: {
query?: string;
status?: Status;
includeRegisteredBranch?: boolean;
startDate?: string;
endDate?: string;
}) {
const res = await api.get<PaginationResult<Data>>(`/${ENDPOINT}`, {
params,

View file

@ -101,6 +101,8 @@ export const useReceipt = defineStore('receipt-store', () => {
debitNoteId?: string;
debitNoteOnly?: boolean;
quotationOnly?: boolean;
startDate?: string;
endDate?: string;
}) {
const res = await api.get<PaginationResult<Receipt>>('/receipt', {
params: opts,