Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision fe447b83

Von Bernd Bleßmann vor fast 2 Jahren hinzugefügt

  • ID fe447b83b3f299f19104fcaca51b1e4ed56ab848
  • Vorgänger 439ee771
  • Nachfolger 2e6fe034

Umsatzstatistik: Tabelle unter Chart anzeigen

Unterschiede anzeigen:

js/kivi.CustomerVendorTurnover.js
35 35
    $('#mails').load(url);
36 36
  };
37 37

  
38
  ns.show_turnover = function(period, year_for_month) {
39
    ns.show_turnover_chart(period, year_for_month);
40
    ns.show_turnover_stat(period);
41
  };
42

  
38 43
  ns.show_turnover_stat = function(period) {
39 44
    let mode = 'year';
40 45
    if (period === 'm') mode = 'month';
......
58 63
                   year: year_for_month
59 64
                 };
60 65
    $.getJSON('controller.pl', data, function( returned_data ) {
61
      const html = '<canvas id="turnovers_chart"></canvas>';
66
      const html = '<canvas id="turnovers_chart" height="70vH"></canvas>';
62 67
      $('#turnovers_chart_container').html(html);
63 68
      ns.draw_chart(returned_data);
64
      $("html, body").animate({ scrollTop: $("#turnovers_chart").offset().top }, "slow");
65 69
    });
66 70
  };
67 71

  
......
130 134
          const dataY = chart.scales.y.getValueForPixel(canvasPosition.y);
131 135

  
132 136
          if ((data[dataX].date_part || "").match(/^\d{1,4}$/)) {
133
            ns.show_turnover_chart('m', data[dataX].date_part);
137
            ns.show_turnover('m', data[dataX].date_part);
134 138
          } else {
135
            ns.show_turnover_chart('y');
139
            ns.show_turnover('y');
136 140
          }
137 141
        }
138 142
      }
......
183 187
        ns.get_sales_quotations();
184 188
      }
185 189
      if (ui.newPanel.attr('id') == 'turnover_stat') {
186
        ns.show_turnover_chart("y");
190
        ns.show_turnover("y");
187 191
      }
188 192
      return 1;
189 193
    });
......
193 197
        ns.get_sales_quotations();
194 198
      }
195 199
      if (ui.panel.attr('id') == 'turnover_stat') {
196
        ns.show_turnover_chart("y");
200
        ns.show_turnover("y");
197 201
      }
198 202
      return 1;
199 203
    });

Auch abrufbar als: Unified diff