|
@@ -267,7 +267,7 @@ router.get('/bilan/:property_id/:year/pdf', async (req, res) => {
|
|
|
const totalChargesReelles = parseFloat(totalChargesRow?.total || 0);
|
|
const totalChargesReelles = parseFloat(totalChargesRow?.total || 0);
|
|
|
|
|
|
|
|
const chargesList = (await pool.query(`
|
|
const chargesList = (await pool.query(`
|
|
|
- SELECT * FROM charges WHERE property_id = $1 AND year = $2 AND user_id = $3
|
|
|
|
|
|
|
+ SELECT * FROM charges WHERE property_id = $1 AND year = $2 AND user_id = $3 AND recoverable_type = 'recoverable'
|
|
|
ORDER BY date ASC
|
|
ORDER BY date ASC
|
|
|
`, [property_id, year, req.userId])).rows;
|
|
`, [property_id, year, req.userId])).rows;
|
|
|
|
|
|