Ver código fonte

11 ans plutot que 10 pour les charges

jeremy 4 meses atrás
pai
commit
15e92bcb35
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      backend/src/routes/charges.js

+ 2 - 2
backend/src/routes/charges.js

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