Kundenstatistik: Templates
[kivitendo-erp.git] / templates / webpages / customer_vendor_turnover / turnover_statistic.html
diff --git a/templates/webpages/customer_vendor_turnover/turnover_statistic.html b/templates/webpages/customer_vendor_turnover/turnover_statistic.html
new file mode 100644 (file)
index 0000000..c2ea10e
--- /dev/null
@@ -0,0 +1,21 @@
+[%- USE T8 %]
+[%- USE LxERP %]
+[%- USE L %]
+[%- USE HTML %]
+<p> 
+[% L.radio_button_tag('period', value='year', label= LxERP.t8('Year'), onclick='show_turnover_stat("y");') %]
+
+[% L.radio_button_tag('period', value='month', label= LxERP.t8('Month'), onclick='show_turnover_stat("m");') %]
+</p>
+<script type="text/javascript">
+  function show_turnover_stat(period) {
+    if (period === 'y') {
+      var url = 'controller.pl?action=CustomerVendorTurnover/turnover_by_year&id=' + $('#cv_id').val();
+      $('#turnovers').load(url);
+    } else {
+      var url = 'controller.pl?action=CustomerVendorTurnover/turnover_by_month&id=' + $('#cv_id').val();
+      $('#turnovers').load(url);
+    }
+  }
+</script>
+<div id="turnovers"></div>