Persönliche Werkzeuge

Vorlage:BV-BgPreisIndex

Aus BogenWiki

(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
Zeile 94: Zeile 94:
     if (eBgList) eBgList.innerHTML = sTabHTML;
     if (eBgList) eBgList.innerHTML = sTabHTML;
     var eBgPreise = document.getElementById('BVBgPreise.'+Param.Gebiet+'.'+Param.Gebiet1+'.'+Param.KatNr);
     var eBgPreise = document.getElementById('BVBgPreise.'+Param.Gebiet+'.'+Param.Gebiet1+'.'+Param.KatNr);
 +
    var aGroupBy = '';
 +
    for (o = 0; o < aOptions.length; o++) {
 +
      if (aOptions[o].split(':')[0] == 'GroupBy')
 +
        aGroupBy = aOptions[o].split(':')[1].split('+');
 +
    }
     sTabHTML = '<table id="BVBgPreise.'+Param.Gebiet+'.'+Param.Gebiet1+'.'+Param.KatNr+'.Tab" style="background:silver" cellpadding=1 cellspacing=1>'+
     sTabHTML = '<table id="BVBgPreise.'+Param.Gebiet+'.'+Param.Gebiet1+'.'+Param.KatNr+'.Tab" style="background:silver" cellpadding=1 cellspacing=1>'+
-
               '  <tr style="background:#E0E0E0" valign=top>'+
+
               '  <tr style="background:#E0E0E0" valign=top>';
-
              '    <td><div style="'+sCellPadding+'"><b>Group</b></div></td>'+
+
    for (g = 0; g < aGroupBy.length; g++)
-
              '    <td><div style="'+sCellPadding+'"><b>Min</b></div></td>'+
+
      sTabHTML += '    <td><div style="'+sCellPadding+'"><b>'+aGroupBy[g]+'</b></div></td>';
-
              '    <td><div style="'+sCellPadding+'"><b>Avg.</b></div></td>'+
+
    sTabHTML += '    <td><div style="'+sCellPadding+'"><b>Min</b></div></td>'+
-
              '    <td><div style="'+sCellPadding+'"><b>Med.</b></div></td>'+
+
                '    <td><div style="'+sCellPadding+'"><b>Avg.</b></div></td>'+
-
              '    <td><div style="'+sCellPadding+'"><b>Max</b></div></td>'+
+
                '    <td><div style="'+sCellPadding+'"><b>Med.</b></div></td>'+
-
              '    <td><div style="'+sCellPadding+'"><b>Anz.</b></div></td>'+
+
                '    <td><div style="'+sCellPadding+'"><b>Max</b></div></td>'+
-
              '  </tr>';
+
                '    <td><div style="'+sCellPadding+'"><b>Anz.</b></div></td>'+
 +
                '  </tr>';
     BVBgPreise.sort((a, b) => a.GroupValue > b.GroupValue ? 1 : -1);
     BVBgPreise.sort((a, b) => a.GroupValue > b.GroupValue ? 1 : -1);
     for (var p = 0; p < BVBgPreise.length; p++)
     for (var p = 0; p < BVBgPreise.length; p++)
-
       sTabHTML += '  <tr style="background:#FCFCFC" valign=top>'+
+
      var aGroupValues = BVBgPreise[p].GroupValue.split('::');
-
                  '    <td><div style="'+sCellPadding+'">'+BVBgPreise[p].GroupValue+'</div></td>'+
+
       sTabHTML += '  <tr style="background:#FCFCFC" valign=top>';
-
                  '    <td align=right><div style="'+sCellPadding+'">'+BVBgPreise[p].Min.toFixed(2).replace(/\./,',')+'€</div></td>'+
+
      for (v = 0; v < aGroupValues.length-1; v++)
 +
        sTabHTML += '    <td><div style="'+sCellPadding+'">'+aGroupValues[v]+'</div></td>';
 +
      sTabHTML += '    <td align=right><div style="'+sCellPadding+'">'+BVBgPreise[p].Min.toFixed(2).replace(/\./,',')+'€</div></td>'+
                   '    <td align=right><div style="'+sCellPadding+'">'+(BVBgPreise[p].Sum/BVBgPreise[p].Count).toFixed(2).replace(/\./,',')+'€</div></td>'+
                   '    <td align=right><div style="'+sCellPadding+'">'+(BVBgPreise[p].Sum/BVBgPreise[p].Count).toFixed(2).replace(/\./,',')+'€</div></td>'+
                   '    <td align=right><div style="'+sCellPadding+'">'+median(BVBgPreise[p].Preise).toFixed(2).replace(/\./,',')+'€</div></td>'+
                   '    <td align=right><div style="'+sCellPadding+'">'+median(BVBgPreise[p].Preise).toFixed(2).replace(/\./,',')+'€</div></td>'+

Version vom 13:07, 24. Sep. 2023

Template BV_BgPreisIndex: Invalid value for parameter Cmd ("empty")!!!