mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
feat: inventory valuation csv and xlsx export (#308)
* feat: inventory valuation csv and xlsx export * feat(server): inventory valuation sheet exporting * feat(webapp): inventory valuation sheet dyanmic columns * feat: inventory valuation dynamic columns * feat: inventory valuation TS types
This commit is contained in:
@@ -176,34 +176,33 @@ export function useGeneralLedgerSheet(query, props) {
|
||||
);
|
||||
}
|
||||
export const useGeneralLedgerSheetXlsxExport = (query, args) => {
|
||||
return useDownloadFile({
|
||||
url: '/financial_statements/general_ledger',
|
||||
config: {
|
||||
headers: {
|
||||
accept: 'application/xlsx',
|
||||
return useDownloadFile({
|
||||
url: '/financial_statements/general_ledger',
|
||||
config: {
|
||||
headers: {
|
||||
accept: 'application/xlsx',
|
||||
},
|
||||
params: query,
|
||||
},
|
||||
params: query,
|
||||
},
|
||||
filename: 'general_ledger.xlsx',
|
||||
...args,
|
||||
});
|
||||
filename: 'general_ledger.xlsx',
|
||||
...args,
|
||||
});
|
||||
};
|
||||
|
||||
export const useGeneralLedgerSheetCsvExport = (query, args) => {
|
||||
return useDownloadFile({
|
||||
url: '/financial_statements/general_ledger',
|
||||
config: {
|
||||
headers: {
|
||||
accept: 'application/csv',
|
||||
return useDownloadFile({
|
||||
url: '/financial_statements/general_ledger',
|
||||
config: {
|
||||
headers: {
|
||||
accept: 'application/csv',
|
||||
},
|
||||
params: query,
|
||||
},
|
||||
params: query,
|
||||
},
|
||||
filename: 'general_ledger.csv',
|
||||
...args,
|
||||
});
|
||||
filename: 'general_ledger.csv',
|
||||
...args,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve journal sheet.
|
||||
*/
|
||||
@@ -376,6 +375,56 @@ export function useInventoryValuation(query, props) {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve inventory valuation.
|
||||
*/
|
||||
export function useInventoryValuationTable(query, props) {
|
||||
return useRequestQuery(
|
||||
[t.FINANCIAL_REPORT, t.INVENTORY_VALUATION, query],
|
||||
{
|
||||
method: 'get',
|
||||
url: '/financial_statements/inventory-valuation',
|
||||
params: query,
|
||||
headers: {
|
||||
Accept: 'application/json+table',
|
||||
},
|
||||
},
|
||||
{
|
||||
select: (res) => res.data,
|
||||
...props,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
export const useInventoryValuationXlsxExport = (query, args) => {
|
||||
return useDownloadFile({
|
||||
url: '/financial_statements/inventory-valuation',
|
||||
config: {
|
||||
headers: {
|
||||
accept: 'application/xlsx',
|
||||
},
|
||||
params: query,
|
||||
},
|
||||
filename: 'inventory_valuation.xlsx',
|
||||
...args,
|
||||
});
|
||||
};
|
||||
|
||||
export const useInventoryValuationCsvExport = (query, args) => {
|
||||
return useDownloadFile({
|
||||
url: '/financial_statements/inventory-valuation',
|
||||
config: {
|
||||
headers: {
|
||||
accept: 'application/csv',
|
||||
},
|
||||
params: query,
|
||||
},
|
||||
filename: 'inventory_valuation.csv',
|
||||
...args,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieve purchases by items.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user