mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
fix: allocate landed cost on inventory items.
This commit is contained in:
@@ -22,6 +22,10 @@ const commonInvalidateQueries = (queryClient) => {
|
||||
|
||||
// Invalidate financial reports.
|
||||
queryClient.invalidateQueries(t.FINANCIAL_REPORT);
|
||||
|
||||
// Invalidate landed cost.
|
||||
queryClient.invalidateQueries(t.LANDED_COST);
|
||||
queryClient.invalidateQueries(t.LANDED_COST_TRANSACTION);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,6 +25,10 @@ const commonInvalidateQueries = (queryClient) => {
|
||||
// Invalidate the cashflow transactions.
|
||||
queryClient.invalidateQueries(t.CASH_FLOW_TRANSACTIONS);
|
||||
queryClient.invalidateQueries(t.CASHFLOW_ACCOUNT_TRANSACTIONS_INFINITY);
|
||||
|
||||
// Invalidate landed cost.
|
||||
queryClient.invalidateQueries(t.LANDED_COST);
|
||||
queryClient.invalidateQueries(t.LANDED_COST_TRANSACTION);
|
||||
};
|
||||
|
||||
const transformExpenses = (response) => ({
|
||||
|
||||
@@ -39,6 +39,7 @@ export function useCreateLandedCost(props) {
|
||||
export function useDeleteLandedCost(props) {
|
||||
const queryClient = useQueryClient();
|
||||
const apiRequest = useApiRequest();
|
||||
|
||||
return useMutation(
|
||||
(landedCostId) =>
|
||||
apiRequest.delete(`purchases/landed-cost/${landedCostId}`),
|
||||
@@ -65,7 +66,6 @@ export function useLandedCostTransaction(query, props) {
|
||||
},
|
||||
{
|
||||
select: (res) => res.data,
|
||||
|
||||
defaultData: {
|
||||
transactions: [],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user