|
|
@@ -203,7 +203,7 @@ router.get('/:id/invoice', async (req, res) => {
|
|
|
res.sendFile(filePath);
|
|
|
});
|
|
|
|
|
|
-// Deductible charges summary over 10 years for a property
|
|
|
+// Deductible charges summary over 11 years for a property
|
|
|
router.get('/deductible-summary/:property_id', async (req, res) => {
|
|
|
const { property_id } = req.params;
|
|
|
|
|
|
@@ -211,7 +211,7 @@ router.get('/deductible-summary/:property_id', async (req, res) => {
|
|
|
if (!prop) return res.status(403).json({ error: 'Bien non autorisé' });
|
|
|
|
|
|
const currentYear = new Date().getFullYear();
|
|
|
- const startYear = currentYear - 9;
|
|
|
+ const startYear = currentYear - 10;
|
|
|
|
|
|
const rows = (await pool.query(`
|
|
|
SELECT year, SUM(amount) as total, COUNT(*) as count
|