feat: add download report sale
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 9s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 9s
This commit is contained in:
parent
cd231513ee
commit
5278f4952e
2 changed files with 45 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue