sales tax

This commit is contained in:
2026-05-30 13:49:56 -05:00
parent 2cb8722d9d
commit b020ded682
4 changed files with 71 additions and 2 deletions

View File

@@ -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
// ════════════════════════════════════════════════════════════════════

View File

@@ -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