sales tax
This commit is contained in:
@@ -85,6 +85,16 @@ router.get('/reports/balance-sheet', async (req, res) => {
|
||||
} catch (err) { handleQboError(err, res, 'balance-sheet'); }
|
||||
});
|
||||
|
||||
router.get('/reports/tax-summary', async (req, res) => {
|
||||
try {
|
||||
res.json(await accountingService.getTaxSummary({
|
||||
startDate: req.query.startDate,
|
||||
endDate: req.query.endDate,
|
||||
accountingMethod: req.query.accountingMethod || 'Accrual'
|
||||
}));
|
||||
} catch (err) { handleQboError(err, res, 'tax-summary'); }
|
||||
});
|
||||
|
||||
// ════════════════════════════════════════════════════════════════════
|
||||
// Phase 2 Lieferung 1 — Sync + Cache-Reads
|
||||
// ════════════════════════════════════════════════════════════════════
|
||||
|
||||
@@ -367,6 +367,14 @@ async function getBalanceSheet({ asOfDate, accountingMethod = 'Accrual' } = {})
|
||||
return data;
|
||||
}
|
||||
|
||||
async function getTaxSummary({ startDate, endDate, accountingMethod = 'Accrual' } = {}) {
|
||||
const url = buildReportUrl('TaxSummary', { start_date: startDate, end_date: endDate, accounting_method: accountingMethod });
|
||||
const response = await makeQboApiCall({ url, method: 'GET' });
|
||||
const data = getJson(response);
|
||||
throwIfFault(data, 'TaxSummary report');
|
||||
return data;
|
||||
}
|
||||
|
||||
// ════════════════════════════════════════════════════════════════════
|
||||
// Phase 2 Lieferung 1 — Caches und Sync
|
||||
// ════════════════════════════════════════════════════════════════════
|
||||
@@ -1418,6 +1426,7 @@ module.exports = {
|
||||
getRegister,
|
||||
getProfitAndLoss,
|
||||
getBalanceSheet,
|
||||
getTaxSummary,
|
||||
normalizeTransactionListReport,
|
||||
|
||||
// Phase 2 Lieferung 1 — Sync
|
||||
|
||||
Reference in New Issue
Block a user