mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
refactoring: WIP payment receive and made form.
This commit is contained in:
@@ -119,3 +119,26 @@ export function useOpenBill(props) {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the due bills of the given vendor id.
|
||||
* @param {number} vendorId -
|
||||
*/
|
||||
export function useDueBills(vendorId, props) {
|
||||
const states = useQuery(
|
||||
['BILLS_DUE', vendorId],
|
||||
() =>
|
||||
ApiService.get(`purchases/bills/due`, {
|
||||
params: { vendor_id: vendorId },
|
||||
}),
|
||||
{
|
||||
select: (res) => res.data.bills,
|
||||
...props,
|
||||
},
|
||||
);
|
||||
|
||||
return {
|
||||
...states,
|
||||
data: defaultTo(states.data, []),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user