Skip to content

Commit

Permalink
fix(issue-71): deperdition_renouvellement_air must use surface_ventil…
Browse files Browse the repository at this point in the history
…e if present
  • Loading branch information
Jérôme GAVIGNET committed Aug 23, 2024
1 parent d1653a6 commit add3465
Show file tree
Hide file tree
Showing 3 changed files with 4,905 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/4_ventilation.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,13 @@ export default function calc_ventilation(vt, cg, th, Sdep, mur_list, ph_list, po
const du = {};
const di = {};

let Sh;
if (th === 'maison' || th === 'appartement') Sh = cg.surface_habitable_logement;
else if (th === 'immeuble') Sh = cg.surface_habitable_immeuble;
let Sh = requestInput(de, du, 'surface_ventile', 'float');

if (Sh === undefined) {
if (th === 'maison' || th === 'appartement') Sh = cg.surface_habitable_logement;
else if (th === 'immeuble') Sh = cg.surface_habitable_immeuble;
}

const Hsp = cg.hsp;

tv_debits_ventilation(di, de, du);
Expand Down
3 changes: 2 additions & 1 deletion test/corpus.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,6 @@
"2387E0576340J",
"2387E2058698D",
"2387E2603968B",
"2432E0658897O"
"2432E0658897O",
"2444E2616926V"
]
Loading

0 comments on commit add3465

Please sign in to comment.