new reports
This commit is contained in:
@@ -223,6 +223,21 @@ const API = {
|
||||
}
|
||||
},
|
||||
|
||||
// Due-Diligence Reports API
|
||||
reports: {
|
||||
getArAging: (asOf, anonymize = false) => {
|
||||
const params = new URLSearchParams({ asOf });
|
||||
if (anonymize) params.set('anonymize', 'true');
|
||||
return fetch('/api/reports/ar-aging?' + params.toString()).then(r => r.json());
|
||||
},
|
||||
getRevenue: (from, to, anonymize = false, groupByMonth = false) => {
|
||||
const params = new URLSearchParams({ from, to });
|
||||
if (anonymize) params.set('anonymize', 'true');
|
||||
if (groupByMonth) params.set('groupByMonth', 'true');
|
||||
return fetch('/api/reports/revenue?' + params.toString()).then(r => r.json());
|
||||
}
|
||||
},
|
||||
|
||||
// Settings API
|
||||
settings: {
|
||||
getLogo: () => fetch('/api/logo-info').then(r => r.json()),
|
||||
|
||||
Reference in New Issue
Block a user