Subversion Repositories SmartDukaan

Rev

Rev 37761 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 37761 Rev 37775
Line 280... Line 280...
280
      color: var(--soft);
280
      color: var(--soft);
281
      font-weight: 600;
281
      font-weight: 600;
282
      margin-left: 3px
282
      margin-left: 3px
283
    }
283
    }
284
 
284
 
-
 
285
    .kpi .val .rdrr-kpi-billed {
-
 
286
      font-size: 20px;
-
 
287
      color: var(--soft);
-
 
288
      font-weight: 700;
-
 
289
      margin-left: 4px;
-
 
290
      letter-spacing: -.01em
-
 
291
    }
-
 
292
 
285
    .kpi .foot {
293
    .kpi .foot {
286
      font-size: 11.5px;
294
      font-size: 11.5px;
287
      color: var(--soft);
295
      color: var(--soft);
288
      margin-top: 8px;
296
      margin-top: 8px;
289
      font-weight: 500
297
      font-weight: 500
Line 2240... Line 2248...
2240
          </svg>
2248
          </svg>
2241
        </div>
2249
        </div>
2242
        <div class="label">Total Achieved</div>
2250
        <div class="label">Total Achieved</div>
2243
      </div>
2251
      </div>
2244
      <div class="val" id="rdrrKpiAch">&mdash;</div>
2252
      <div class="val" id="rdrrKpiAch">&mdash;</div>
2245
      <div class="foot" id="rdrrKpiAchSub">Actual billed across all RBMs</div>
2253
      <div class="foot" id="rdrrKpiAchSub">PO value / Actually billed (invoiced)</div>
2246
    </div>
2254
    </div>
2247
    <div class="kpi b">
2255
    <div class="kpi b">
2248
      <div class="top">
2256
      <div class="top">
2249
        <div class="ic">
2257
        <div class="ic">
2250
          <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round"
2258
          <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round"
Line 2798... Line 2806...
2798
    // Extracted from renderFiltered() so both RBM-source and Sales-source paths share it.
2806
    // Extracted from renderFiltered() so both RBM-source and Sales-source paths share it.
2799
    function renderRowsAsGrid(rows, isSalesView) {
2807
    function renderRowsAsGrid(rows, isSalesView) {
2800
 
2808
 
2801
      // Recompute totals from the filtered subset. Cheaper + correct vs using server totals.
2809
      // Recompute totals from the filtered subset. Cheaper + correct vs using server totals.
2802
      var t = {
2810
      var t = {
2803
        totalAch: 0, totalTgt: 0, hidAch: 0, hidTgt: 0, fastAch: 0, fastTgt: 0,
2811
        totalAch: 0, totalTgt: 0, totalBilled: 0, hidAch: 0, hidTgt: 0, fastAch: 0, fastTgt: 0,
2804
        runAch: 0, runTgt: 0, slowAch: 0, slowTgt: 0, otherAch: 0, otherTgt: 0,
2812
        runAch: 0, runTgt: 0, slowAch: 0, slowTgt: 0, otherAch: 0, otherTgt: 0,
2805
        rbmsAtOrAbove100: 0, rbmRowCount: rows.length
2813
        rbmsAtOrAbove100: 0, rbmRowCount: rows.length
2806
      };
2814
      };
2807
      rows.forEach(function (r) {
2815
      rows.forEach(function (r) {
2808
        t.totalAch += Number(r.totalAch) || 0;
2816
        t.totalAch += Number(r.totalAch) || 0;
2809
        t.totalTgt += Number(r.totalTgt) || 0;
2817
        t.totalTgt += Number(r.totalTgt) || 0;
-
 
2818
        t.totalBilled += Number(r.actualBilled) || 0;
2810
        t.hidAch += Number(r.hidAch) || 0;
2819
        t.hidAch += Number(r.hidAch) || 0;
2811
        t.hidTgt += Number(r.hidTgt) || 0;
2820
        t.hidTgt += Number(r.hidTgt) || 0;
2812
        t.fastAch += Number(r.fastAch) || 0;
2821
        t.fastAch += Number(r.fastAch) || 0;
2813
        t.fastTgt += Number(r.fastTgt) || 0;
2822
        t.fastTgt += Number(r.fastTgt) || 0;
2814
        t.runAch += Number(r.runAch) || 0;
2823
        t.runAch += Number(r.runAch) || 0;
Line 2818... Line 2827...
2818
        t.otherAch += Number(r.otherAch) || 0;
2827
        t.otherAch += Number(r.otherAch) || 0;
2819
        t.otherTgt += Number(r.otherTgt) || 0;
2828
        t.otherTgt += Number(r.otherTgt) || 0;
2820
        if (r.totalTgt > 0 && r.totalAch >= r.totalTgt) t.rbmsAtOrAbove100++;
2829
        if (r.totalTgt > 0 && r.totalAch >= r.totalTgt) t.rbmsAtOrAbove100++;
2821
      });
2830
      });
2822
 
2831
 
2823
      $("#rdrrKpiAch").html('&#8377;&nbsp;' + fmtLakh(t.totalAch));
2832
      $("#rdrrKpiAch").html('&#8377;&nbsp;' + fmtLakh(t.totalAch) +
-
 
2833
              ' <span class="rdrr-kpi-billed">/ &#8377;&nbsp;' + fmtLakh(t.totalBilled) + '</span>');
2824
      $("#rdrrKpiTgt").html('&#8377;&nbsp;' + fmtLakh(t.totalTgt));
2834
      $("#rdrrKpiTgt").html('&#8377;&nbsp;' + fmtLakh(t.totalTgt));
2825
      var pk = pctLabel(t.totalAch, t.totalTgt);
2835
      var pk = pctLabel(t.totalAch, t.totalTgt);
2826
      $("#rdrrKpiPct").html(pk.cls === "na" ? '<span class="u">n/a</span>' :
2836
      $("#rdrrKpiPct").html(pk.cls === "na" ? '<span class="u">n/a</span>' :
2827
              '<span class="pct ' + pk.cls + '">' + pk.text + '</span>');
2837
              '<span class="pct ' + pk.cls + '">' + pk.text + '</span>');
2828
      $("#rdrrKpiTop").html((t.rbmsAtOrAbove100 || 0) + ' <span class="u">/ ' + (t.rbmRowCount || 0) + '</span>');
2838
      $("#rdrrKpiTop").html((t.rbmsAtOrAbove100 || 0) + ' <span class="u">/ ' + (t.rbmRowCount || 0) + '</span>');