summaryrefslogtreecommitdiff
path: root/views/mods/mod_statistics/chartsalestopaymentmethod
diff options
context:
space:
mode:
Diffstat (limited to 'views/mods/mod_statistics/chartsalestopaymentmethod')
-rw-r--r--views/mods/mod_statistics/chartsalestopaymentmethod/all.phtml91
-rw-r--r--views/mods/mod_statistics/chartsalestopaymentmethod/data.phtml68
2 files changed, 159 insertions, 0 deletions
diff --git a/views/mods/mod_statistics/chartsalestopaymentmethod/all.phtml b/views/mods/mod_statistics/chartsalestopaymentmethod/all.phtml
new file mode 100644
index 0000000..c519090
--- /dev/null
+++ b/views/mods/mod_statistics/chartsalestopaymentmethod/all.phtml
@@ -0,0 +1,91 @@
+<?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?>
+
+<?php if (wpsg_isSizedArray($this->view['chart']['data']['records'])) { ?>
+
+<div id="chartsalestopaymentmethod-bar" style="height:<?php echo $this->get_option('wpsg_mod_statistics_bar_chart_height'); ?>px; width:<?php echo $this->get_option('wpsg_mod_statistics_bar_chart_width'); ?>px;"></div>
+
+<br/>
+<h3><?php echo __('Anteile (prozentual)', 'wpsg'); ?></h3>
+<div id="chartsalestopaymentmethod-pie" style="height:<?php echo $this->get_option('wpsg_mod_statistics_pie_chart_height'); ?>px; width:<?php echo $this->get_option('wpsg_mod_statistics_bar_chart_width'); ?>px;"></div>
+
+<br/>
+
+<div id="table-data">
+ <?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/chartsalestopaymentmethod/data.phtml'); ?>
+</div>
+
+<div class="wpsg_clearer"></div>
+
+<?php
+
+ foreach ($this->view['chart']['data']['records'] as $data)
+ {
+ $barChartJS['payment'] .= "'".wpsg_hspc($data['name'])."', ";
+ $barChartJS['total'] .= wpsg_hspc($data['total']).", ";
+ $pieChartJS .= "['".wpsg_hspc($data['name'])."', ".wpsg_hspc($data['percent'])."], ";
+ }
+
+ $barChartJS['payment'] = substr($barChartJS['payment'], 0, -2);
+ $barChartJS['total'] = substr($barChartJS['total'], 0, -2);
+ $pieChartJS = substr($pieChartJS, 0, -2);
+
+?>
+
+<script type="text/javascript">
+ jQuery(document).ready(function()
+ {
+
+ jQuery.jqplot.config.enablePlugins = true;
+ var totals = [<?php echo $barChartJS['total']; ?>];
+ var payment = [<?php echo $barChartJS['payment']; ?>];
+
+ var chartsalestopaymentmethodBar = jQuery.jqplot('chartsalestopaymentmethod-bar', [totals], {
+ animate: !jQuery.jqplot.use_excanvas,
+ seriesDefaults:{
+ renderer:jQuery.jqplot.BarRenderer,
+ rendererOptions: {
+ varyBarColor: true
+ },
+ pointLabels: { show: true }
+ },
+ axesDefaults: {
+ labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer
+ },
+ axes: {
+ xaxis: {
+ renderer: jQuery.jqplot.CategoryAxisRenderer,
+ ticks: payment,
+ label:'<?php echo wpsg_hspc($this->view['chart']['info']['xaxis']['label']); ?>'
+ },
+ yaxis:{
+ label:'<?php echo wpsg_hspc($this->view['chart']['info']['yaxis']['label']); ?>',
+ tickOptions: {
+ formatter: wpsg_statistics_number_format
+ },
+ min:0
+ }
+ },
+ highlighter: { show: false }
+ });
+
+ var data = [<?php echo $pieChartJS; ?>];
+
+ var chartsalestopaymentmethodPie = jQuery.jqplot ('chartsalestopaymentmethod-pie', [data],
+ {
+ seriesDefaults: {
+ renderer: jQuery.jqplot.PieRenderer,
+ rendererOptions: { padding: 50, sliceMargin: 4, showDataLabels: true }
+ },
+ legend: { show:true, location: 'e' }
+ }
+ );
+
+ wpsg_statistic_addExportButton();
+
+ });
+</script>
+
+
+<?php } else { ?>
+<?php echo __('Keine Daten zur Auswertung vorhanden.', 'wpsg'); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_statistics/chartsalestopaymentmethod/data.phtml b/views/mods/mod_statistics/chartsalestopaymentmethod/data.phtml
new file mode 100644
index 0000000..f65ad5a
--- /dev/null
+++ b/views/mods/mod_statistics/chartsalestopaymentmethod/data.phtml
@@ -0,0 +1,68 @@
+<table style="width:auto !important;" class="widefat fixed tags" border="0" cellspacing="0" cellpadding="0">
+ <thead>
+ <tr>
+ <th class="manage-column sortable">
+ <a id="name" class="sortable <?php if($this->view['filter']['sort'] == 'name' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'name' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
+ <span><?php echo __('Zahlungsart', 'wpsg')?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column th-right">
+ <a id="total" class="sortable <?php if($this->view['filter']['sort'] == 'total' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'total' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
+ <span><?php echo __('Umsatz in', 'wpsg').' '.$this->get_option('wpsg_currency'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column th-right">
+ <a id="percent" class="sortable <?php if($this->view['filter']['sort'] == 'percent' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'percent' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
+ <span><?php echo __('Prozent', 'wpsg')?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ </tr>
+ </thead>
+ <tbody class="the-list">
+ <?php foreach ($this->view['chart']['data']['records'] as $data) { ?>
+ <tr class="alternate">
+ <td><strong><?php echo wpsg_hspc($data['name']); ?></strong></td>
+ <td class="td-right"><?php echo wpsg_ff($data['total']); ?></td>
+ <td class="td-right"><?php echo wpsg_ff($data['percent']); ?></td>
+ </tr>
+ <?php } ?>
+ </tbody>
+</table>
+
+<script type="text/javascript">
+
+jQuery(document).ready(function(){
+
+ jQuery('.sortable').bind('click', function(){
+
+ var order = '';
+ if(jQuery(this).hasClass('orderup'))
+ {
+ jQuery('#wpsg_statistics_order').val('orderup');
+ }
+ else
+ {
+ jQuery('#wpsg_statistics_order').val('orderdown');
+ }
+
+ jQuery('#wpsg_statistics_sort').val(jQuery(this).attr('id'));
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_statistics&noheader=1&do=sorting',
+ type: 'post',
+ data: jQuery('#wpsg_statistics_form').serialize(),
+ success: function(data) {
+ jQuery('#table-data').html(data);
+
+ }
+ } );
+
+ return false;
+ });
+
+});
+
+</script> \ No newline at end of file