User Tools

Site Tools

handleiding_nieuw:sub_spacematrix

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
handleiding_nieuw:sub_spacematrix [2025/04/15 15:39] supporthandleiding_nieuw:sub_spacematrix [2025/04/15 15:51] (current) support
Line 169: Line 169:
         const fsi = parseFloat(document.getElementById("fsi").value);         const fsi = parseFloat(document.getElementById("fsi").value);
         const voorzieningPerc = parseFloat(document.getElementById("voorziening").value) / 100;         const voorzieningPerc = parseFloat(document.getElementById("voorziening").value) / 100;
- 
         const laadvermogen = opp * fsi;         const laadvermogen = opp * fsi;
         const woonBVO = laadvermogen * (1 - voorzieningPerc);         const woonBVO = laadvermogen * (1 - voorzieningPerc);
Line 178: Line 177:
  
         for (let i = 0; i < types.length; i++) {         for (let i = 0; i < types.length; i++) {
-            const perc = parseFloat(document.getElementById(`perc_${i}`).value); +            const perc = parseFloat(document.getElementById(`perc_${i}`).value) || 0
-            const bvo = parseFloat(document.getElementById(`bvo_${i}`).value);+            const bvo = parseFloat(document.getElementById(`bvo_${i}`).value) || 0;
             gewogenBVO += (perc / 100) * bvo;             gewogenBVO += (perc / 100) * bvo;
             totalPerc += perc;             totalPerc += perc;
Line 185: Line 184:
         }         }
  
-        if (totalPerc === 0) return;+        if (totalPerc === 0 || gewogenBVO === 0) return;
  
         const totaalWoningenExact = woonBVO / gewogenBVO;         const totaalWoningenExact = woonBVO / gewogenBVO;
Line 192: Line 191:
         let wonPerType = [];         let wonPerType = [];
  
-        // Afronden 
         let restant = Math.round(totaalWoningenExact);         let restant = Math.round(totaalWoningenExact);
         for (let i = 0; i < details.length; i++) {         for (let i = 0; i < details.length; i++) {
Line 233: Line 231:
 </script> </script>
 </html> </html>
 +
handleiding_nieuw/sub_spacematrix.1744731554.txt.gz · Last modified: 2025/04/15 15:39 by support