mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feat: bill payment transactions.
This commit is contained in:
@@ -178,3 +178,18 @@ export function useRefreshBills() {
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export function useBillPaymentTransactions(id, props) {
|
||||
return useRequestQuery(
|
||||
[t.BILLS_PAYMENT_TRANSACTIONS, id],
|
||||
{
|
||||
method: 'get',
|
||||
url: `purchases/bills/${id}/payment-transactions`,
|
||||
},
|
||||
{
|
||||
select: (res) => res.data.data,
|
||||
defaultData: [],
|
||||
...props,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -30,6 +30,9 @@ const commonInvalidateQueries = (client) => {
|
||||
// Invalidate the cashflow transactions.
|
||||
client.invalidateQueries(t.CASH_FLOW_TRANSACTIONS);
|
||||
client.invalidateQueries(t.CASHFLOW_ACCOUNT_TRANSACTIONS_INFINITY);
|
||||
|
||||
// Invalidate bills payment transactions.
|
||||
client.invalidateQueries(t.BILLS_PAYMENT_TRANSACTIONS);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user