mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
feat: Inventory item details report.
feat: Cash flow statement report.
This commit is contained in:
@@ -402,3 +402,63 @@ export function useVendorsTransactionsReport(query, props) {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve cash flow statement report.
|
||||
*/
|
||||
export function useCashFlowStatementReport(query, props) {
|
||||
return useRequestQuery(
|
||||
[t.FINANCIAL_REPORT, t.CASH_FLOW_STATEMENT, query],
|
||||
{
|
||||
method: 'get',
|
||||
url: '/financial_statements/cash-flow',
|
||||
params: query,
|
||||
headers: {
|
||||
Accept: 'application/json+table',
|
||||
},
|
||||
},
|
||||
{
|
||||
select: (res) => ({
|
||||
columns: res.data.table.columns,
|
||||
data: res.data.table.data,
|
||||
tableRows: res.data.table.data,
|
||||
}),
|
||||
defaultData: {
|
||||
tableRows: [],
|
||||
data: [],
|
||||
columns: [],
|
||||
},
|
||||
...props,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve inventory item detail report.
|
||||
*/
|
||||
export function useInventoryItemDetailsReport(query, props) {
|
||||
return useRequestQuery(
|
||||
[t.FINANCIAL_REPORT, t.INVENTORY_ITEM_DETAILS, query],
|
||||
{
|
||||
method: 'get',
|
||||
url: '/financial_statements/inventory-item-details',
|
||||
params: query,
|
||||
headers: {
|
||||
Accept: 'application/json+table',
|
||||
},
|
||||
},
|
||||
{
|
||||
select: (res) => ({
|
||||
columns: res.data.table.columns,
|
||||
data: res.data.table.data,
|
||||
tableRows: res.data.table.data,
|
||||
}),
|
||||
defaultData: {
|
||||
tableRows: [],
|
||||
data: [],
|
||||
columns: [],
|
||||
},
|
||||
...props,
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -20,7 +20,9 @@ const FINANCIAL_REPORTS = {
|
||||
CUSTOMERS_BALANCE_SUMMARY: 'CUSTOMERS_BALANCE_SUMMARY',
|
||||
SALES_BY_ITEMS: 'SALES_BY_ITEMS',
|
||||
PURCHASES_BY_ITEMS: 'PURCHASES_BY_ITEMS',
|
||||
INVENTORY_VALUATION: 'INVENTORY_VALUATION'
|
||||
INVENTORY_VALUATION: 'INVENTORY_VALUATION',
|
||||
CASH_FLOW_STATEMENT: 'CASH_FLOW_STATEMENT',
|
||||
INVENTORY_ITEM_DETAILS:'INVENTORY_ITEM_DETAILS'
|
||||
};
|
||||
|
||||
const BILLS = {
|
||||
|
||||
Reference in New Issue
Block a user