mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
feat: add view detail cash flow transaction.
This commit is contained in:
@@ -20,6 +20,7 @@ const commonInvalidateQueries = (queryClient) => {
|
||||
|
||||
// Invalidate financial reports.
|
||||
queryClient.invalidateQueries(t.FINANCIAL_REPORT);
|
||||
queryClient.invalidateQueries(t.CASH_FLOW_TRANSACTION);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -71,6 +72,21 @@ export function useCreateCashflowTransaction(props) {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve account transactions list.
|
||||
*/
|
||||
export function useCashflowTransaction(id, props) {
|
||||
return useRequestQuery(
|
||||
[t.CASH_FLOW_TRANSACTIONS, id],
|
||||
{ method: 'get', url: `cashflow/transactions/${id}` },
|
||||
{
|
||||
select: (res) => res.data.cashflow_transaction,
|
||||
defaultData: [],
|
||||
...props,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes the given sale invoice.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user