feat: add download report sale
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 9s

This commit is contained in:
Methapon2001 2025-03-06 15:31:30 +07:00
parent cd231513ee
commit 5278f4952e
2 changed files with 45 additions and 3 deletions

View file

@ -74,6 +74,15 @@ export async function getReportReceipt() {
return null;
}
export async function downloadReportSale(
category: 'by-product-group' | 'by-sale' | 'by-customer',
) {
await _download(
baseUrl + '/' + ENDPOINT + '/sale/' + category + '/download',
'sale-' + category + '-report',
);
}
export async function getReportSale() {
const res = await api.get<ReportSale>(`/${ENDPOINT}/sale`);
@ -133,6 +142,7 @@ export const useReportStore = defineStore('report-store', () => {
getReportInvoice,
downloadReportReceipt,
getReportReceipt,
downloadReportSale,
getReportSale,
downloadReportProduct,
getReportProduct,