diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index b31f6ad..5d74a6a 100755 --- a/Admin/Routes/Web/Backend.php +++ b/Admin/Routes/Web/Backend.php @@ -61,26 +61,4 @@ return [ ], ], ], - '^.*/sales/analysis/rep(\?.*|$)$' => [ - [ - 'dest' => '\Modules\ClientManagement\Controller\BackendController:viewSalesRepAnalysis', - 'verb' => RouteVerb::GET, - 'permission' => [ - 'module' => BackendController::MODULE_NAME, - 'type' => PermissionType::READ, - 'state' => PermissionState::ANALYSIS, - ], - ], - ], - '^.*/sales/analysis/region(\?.*|$)$' => [ - [ - 'dest' => '\Modules\ClientManagement\Controller\BackendController:viewRegionAnalysis', - 'verb' => RouteVerb::GET, - 'permission' => [ - 'module' => BackendController::MODULE_NAME, - 'type' => PermissionType::READ, - 'state' => PermissionState::ANALYSIS, - ], - ], - ], ]; diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 169ca54..24e5576 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -21,6 +21,7 @@ use Modules\Media\Models\Media; use phpOMS\Asset\AssetType; use phpOMS\Contract\RenderableInterface; use phpOMS\Localization\ISO3166NameEnum; +use phpOMS\Localization\ISO3166CharEnum; use phpOMS\Localization\Money; use phpOMS\Message\RequestAbstract; use phpOMS\Message\ResponseAbstract; @@ -199,9 +200,10 @@ final class BackendController extends Controller $view->addData('monthlySalesCosts', $monthlySalesCosts); - $salesCustomer = []; + ///// + $monthlySalesCustomer = []; for ($i = 1; $i < 13; ++$i) { - $salesCustomer[] = [ + $monthlySalesCustomer[] = [ 'net_sales' => $sales = \mt_rand(1200000000, 2000000000), 'customers' => \mt_rand(200, 400), 'year' => 2020, @@ -209,19 +211,32 @@ final class BackendController extends Controller ]; } - $view->addData('salesCustomer', $salesCustomer); + $view->addData('monthlySalesCustomer', $monthlySalesCustomer); - $customerRetention = []; + $annualSalesCustomer = []; + for ($i = 1; $i < 11; ++$i) { + $annualSalesCustomer[] = [ + 'net_sales' => $sales = \mt_rand(1200000000, 2000000000) * 12, + 'customers' => \mt_rand(200, 400) * 6, + 'year' => 2020 - 10 + $i, + ]; + } + + $view->addData('annualSalesCustomer', $annualSalesCustomer); + + ///// + $monthlyCustomerRetention = []; for ($i = 1; $i < 10; ++$i) { - $customerRetention[] = [ + $monthlyCustomerRetention[] = [ 'customers' => \mt_rand(200, 400), 'year' => \date('y') - 9 + $i, ]; } - $view->addData('customerRetention', $customerRetention); + $view->addData('monthlyCustomerRetention', $monthlyCustomerRetention); - $customerRegion = [ + ///// + $currentCustomerRegion = [ 'Europe' => (int) (\mt_rand(200, 400) / 4), 'America' => (int) (\mt_rand(200, 400) / 4), 'Asia' => (int) (\mt_rand(200, 400) / 4), @@ -230,31 +245,81 @@ final class BackendController extends Controller 'Other' => (int) (\mt_rand(200, 400) / 4), ]; - $view->addData('customerRegion', $customerRegion); + $view->addData('currentCustomerRegion', $currentCustomerRegion); - $customersRep = []; + for ($i = 1; $i < 11; ++$i) { + $annualCustomerRegion[] = [ + 'year' => 2020 - 10 + $i, + 'Europe' => $a = (int) (\mt_rand(200, 400) / 4), + 'America' => $b = (int) (\mt_rand(200, 400) / 4), + 'Asia' => $c = (int) (\mt_rand(200, 400) / 4), + 'Africa' => $d = (int) (\mt_rand(200, 400) / 4), + 'CIS' => $e = (int) (\mt_rand(200, 400) / 4), + 'Other' => $f = (int) (\mt_rand(200, 400) / 4), + 'Total' => $a + $b + $c + $d + $e + $f, + ]; + } + + $view->addData('annualCustomerRegion', $annualCustomerRegion); + + ///// + $currentCustomersRep = []; for ($i = 1; $i < 13; ++$i) { - $customersRep['Rep ' . $i] = [ + $currentCustomersRep['Rep ' . $i] = [ 'customers' => (int) (\mt_rand(200, 400) / 12), ]; } - \uasort($customersRep, function($a, $b) { return $b['customers'] <=> $a['customers']; }); + \uasort($currentCustomersRep, function($a, $b) { return $b['customers'] <=> $a['customers']; }); - $view->addData('customersRep', $customersRep); + $view->addData('currentCustomersRep', $currentCustomersRep); - $customersCountry = []; + $annualCustomersRep = []; for ($i = 1; $i < 13; ++$i) { + $annualCustomersRep['Rep ' . $i] = []; + + for ($j = 1; $j < 11; ++$j) { + $annualCustomersRep['Rep ' . $i][] = [ + 'customers' => (int) (\mt_rand(200, 400) / 12), + 'year' => 2020 - 10 + $j, + ]; + } + } + + $view->addData('annualCustomersRep', $annualCustomersRep); + + ///// + $currentCustomersCountry = []; + for ($i = 1; $i < 51; ++$i) { $country = ISO3166NameEnum::getRandom(); - $customersCountry[\substr($country, 0, 20)] = [ + $currentCustomersCountry[\substr($country, 0, 20)] = [ 'customers' => (int) (\mt_rand(200, 400) / 12), ]; } - \uasort($customersCountry, function($a, $b) { return $b['customers'] <=> $a['customers']; }); + \uasort($currentCustomersCountry, function($a, $b) { return $b['customers'] <=> $a['customers']; }); - $view->addData('customersCountry', $customersCountry); + $view->addData('currentCustomersCountry', $currentCustomersCountry); + $annualCustomersCountry = []; + for ($i = 1; $i < 51; ++$i) { + $countryCode = ISO3166CharEnum::getRandom(); + $countryName = ISO3166NameEnum::getByName('_' . $countryCode); + $annualCustomersCountry[\substr($countryName, 0, 20)] = []; + + for ($j = 1; $j < 11; ++$j) { + $annualCustomersCountry[\substr($countryName, 0, 20)][] = [ + 'customers' => (int) (\mt_rand(200, 400) / 12), + 'year' => 2020 - 10 + $j, + 'name' => $countryName, + 'code' => $countryCode, + ]; + } + } + + $view->addData('annualCustomersCountry', $annualCustomersCountry); + + ///// $customerGroups = []; for ($i = 1; $i < 7; ++$i) { $customerGroups['Group ' . $i] = [ @@ -264,49 +329,6 @@ final class BackendController extends Controller $view->addData('customerGroups', $customerGroups); - $salesRegion = [ - 'Europe' => (int) (\mt_rand(1200000000, 2000000000) / 4), - 'America' => (int) (\mt_rand(1200000000, 2000000000) / 4), - 'Asia' => (int) (\mt_rand(1200000000, 2000000000) / 4), - 'Africa' => (int) (\mt_rand(1200000000, 2000000000) / 4), - 'CIS' => (int) (\mt_rand(1200000000, 2000000000) / 4), - 'Other' => (int) (\mt_rand(1200000000, 2000000000) / 4), - ]; - - $view->addData('salesRegion', $salesRegion); - - $salesRep = []; - for ($i = 1; $i < 13; ++$i) { - $salesRep['Rep ' . $i] = [ - 'net_sales' => (int) (\mt_rand(1200000000, 2000000000) / 12), - ]; - } - - \uasort($salesRep, function($a, $b) { return $b['net_sales'] <=> $a['net_sales']; }); - - $view->addData('salesRep', $salesRep); - - $salesCountry = []; - for ($i = 1; $i < 13; ++$i) { - $country = ISO3166NameEnum::getRandom(); - $salesCountry[\substr($country, 0, 20)] = [ - 'net_sales' => (int) (\mt_rand(1200000000, 2000000000) / 12), - ]; - } - - \uasort($salesCountry, function($a, $b) { return $b['net_sales'] <=> $a['net_sales']; }); - - $view->addData('salesCountry', $salesCountry); - - $salesGroups = []; - for ($i = 1; $i < 7; ++$i) { - $salesGroups['Group ' . $i] = [ - 'net_sales' => (int) (\mt_rand(1200000000, 2000000000) / 12), - ]; - } - - $view->addData('salesGroups', $salesGroups); - return $view; } } diff --git a/Theme/Backend/Lang/ar.lang.php b/Theme/Backend/Lang/ar.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/Lang/cs.lang.php b/Theme/Backend/Lang/cs.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/Lang/da.lang.php b/Theme/Backend/Lang/da.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/Lang/de.lang.php b/Theme/Backend/Lang/de.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/Lang/el.lang.php b/Theme/Backend/Lang/el.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php old mode 100644 new mode 100755 index fb449d8..1affbfe --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -45,6 +45,7 @@ return ['ClientManagement' => [ 'Email' => 'Email', 'Fax' => 'Fax', 'Files' => 'Files', + 'Filter' => 'Filter', 'Freightage' => 'Freightage', 'Group' => 'Group', 'ID' => 'ID', diff --git a/Theme/Backend/Lang/es.lang.php b/Theme/Backend/Lang/es.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/Lang/fi.lang.php b/Theme/Backend/Lang/fi.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/Lang/fr.lang.php b/Theme/Backend/Lang/fr.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/Lang/hu.lang.php b/Theme/Backend/Lang/hu.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/Lang/it.lang.php b/Theme/Backend/Lang/it.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/Lang/ja.lang.php b/Theme/Backend/Lang/ja.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/Lang/ko.lang.php b/Theme/Backend/Lang/ko.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/Lang/no.lang.php b/Theme/Backend/Lang/no.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/Lang/pl.lang.php b/Theme/Backend/Lang/pl.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/Lang/pt.lang.php b/Theme/Backend/Lang/pt.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/Lang/ru.lang.php b/Theme/Backend/Lang/ru.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/Lang/sv.lang.php b/Theme/Backend/Lang/sv.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/Lang/th.lang.php b/Theme/Backend/Lang/th.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/Lang/tr.lang.php b/Theme/Backend/Lang/tr.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/Lang/uk.lang.php b/Theme/Backend/Lang/uk.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/Lang/zh.lang.php b/Theme/Backend/Lang/zh.lang.php old mode 100644 new mode 100755 diff --git a/Theme/Backend/client-analysis.tpl.php b/Theme/Backend/client-analysis.tpl.php index 226d0dc..b8f8fdb 100755 --- a/Theme/Backend/client-analysis.tpl.php +++ b/Theme/Backend/client-analysis.tpl.php @@ -13,6 +13,7 @@ declare(strict_types=1); use phpOMS\Localization\Money; +use phpOMS\Utils\RnG\Name; /* @todo: single month/quarter/fiscal year/calendar year */ /* @todo: time range (<= 12 month = monthly view; else annual view/comparison) */ @@ -26,11 +27,11 @@ echo $this->getData('nav')->render();
@@ -39,14 +40,54 @@ echo $this->getData('nav')->render();
-
getHtml('Filter'); ?>
+
getHtml('Filter'); ?>
- -
-
-
+
+ + +
+ +
+
+ + +
+ +
+ + +
+
+ +
+
+ + +
+ +
+ + +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
@@ -59,10 +100,10 @@ echo $this->getData('nav')->render();
- Sales / Customers + Sales / Customers - Monthly
- getData('salesCustomer'); ?> + getData('monthlySalesCustomer'); ?>
render();
-
+
- getData('customerRetention'); ?> +
+ Sales / Customers - Annual + +
+ getData('annualSalesCustomer'); ?>
- ], "datasets": [ { - "label": "getHtml('Retention'); ?>", + "label": "getHtml('Customers'); ?>", "type": "line", "data": [ + + ], + "yAxisID": "axis-2", + "fill": false, + "borderColor": "rgb(255, 99, 132)", + "backgroundColor": "rgb(255, 99, 132)", + "tension": 0.0 + }, + { + "label": "getHtml('Sales'); ?>", + "type": "bar", + "data": [ + @@ -218,48 +281,69 @@ echo $this->getData('nav')->render(); ] }, "options": { - "title": { - "display": true, - "text": "Customer retention" - }, + "title": { + "display": false, + "text": "Sales / Customers" + }, "scales": { "yAxes": [ { "id": "axis-1", "display": true, "position": "left" + }, + { + "id": "axis-2", + "display": true, + "position": "right", + "scaleLabel": { + "display": true, + "labelString": "getHtml('Customers'); ?>" + }, + "gridLines": { + "display": false + } } ] } } }'> - - - - - - - - -
Year - Retention -
- - -
Avg. - -
+
+ + +
+ + + + + + +
Year + Sales + Customer count +
+ getCurrency(); ?> + + +
+
+
-
-
+ +
- getData('customerRegion'); ?> +
+ Customers per Region - Current + +
+ getData('currentCustomerRegion'); ?>
render(); }, "options": { "title": { - "display": true, - "text": "Customers per region" + "display": false, + "text": "Customers per Region - Currently" } } }'> - - - - - $values) : $sum += $values; ?> - - -
Region - Customer count -
- - -
Total - -
+ +
+ + +
+ + + + + $values) : $sum += $values; ?> + + +
Region + Customer count +
+ + +
Total + +
+
+
+
+
+
+ Customers per Region - Annual + +
+ getData('annualCustomerRegion'); ?> +
+ + + ], + "datasets": [ + { + "label": "getHtml('Total'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(139, 139, 139)", + "backgroundColor": "rgb(139, 139, 139)", + "tension": 0.0 + }, + { + "label": "getHtml('Europe'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 99, 132)", + "backgroundColor": "rgb(255, 99, 132)", + "tension": 0.0 + }, + { + "label": "getHtml('America'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 159, 64)", + "backgroundColor": "rgb(255, 159, 64)", + "tension": 0.0 + }, + { + "label": "getHtml('Asia'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 205, 86)", + "backgroundColor": "rgb(255, 205, 86)", + "tension": 0.0 + }, + { + "label": "getHtml('Africa'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(75, 192, 192)", + "backgroundColor": "rgb(75, 192, 192)", + "tension": 0.0 + }, + { + "label": "getHtml('CIS'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(54, 162, 235)", + "backgroundColor": "rgb(54, 162, 235)", + "tension": 0.0 + }, + { + "label": "getHtml('Other'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(153, 102, 255)", + "backgroundColor": "rgb(153, 102, 255)", + "tension": 0.0 + } + ] + }, + "options": { + "title": { + "display": false, + "text": "Customers per Region - Annual" + }, + "scales": { + "yAxes": [ + { + "id": "axis-1", + "display": true, + "position": "left" + } + ] + } + } + }'> + +
+ + +
+ + + + + + +
Region + $values) : ?> + + +
+ $annual) : ?> + + +
+
+
+
+
+
+
- getData('customersRep'); ?> +
+ Customers per Rep - Current + +
+ getData('currentCustomersRep'); ?>
render(); }, "options": { "title": { - "display": true, + "display": false, "text": "Customers per rep" } } }'> - - - - - $values) : $sum += $values['customers']; ?> - - -
Rep - Customer count -
- - -
Total - -
+ +
+ + +
+ + + + + $values) : $sum += $values['customers']; ?> + + +
Rep + Customer count +
+ + +
Total + +
+
+
+
+
+
+ Customers per Rep - Annual + +
+ getData('annualCustomersRep'); ?> + + + + + $annual) : ?> + + +
Rep + + + +
+ $values) : + $sum[$values['year']] = ($sum[$values['year']] ?? 0) + $values['customers']; ?> + + + +
Total + + + +
+
+
+
- getData('customersCountry'); ?> +
+ Customers per Country - Current + +
+ getData('currentCustomersCountry'); ?>
- getData('nav')->render(); }, "options": { "title": { - "display": true, + "display": false, "text": "Customers per country" } } }'> - - - - - $values) : $sum += $values['customers']; ?> - - -
Country - Customer count -
- - -
Total - -
+
+ + +
+ + + + + $values) : $sum += $values['customers']; ?> + + +
Country + Customer count +
+ + +
Total + +
+
+
+
+
+
+ Customers per Country - Annual + +
+ getData('annualCustomersCountry'); ?> + + + + + $annual) : ?> + + +
Code + Country + + + +
+ + $values) : + $sum[$values['year']] = ($sum[$values['year']] ?? 0) + $values['customers']; ?> + + + +
Total + + + +
+
+
+
+
+ Customer per Attribute - Current + +
getData('customerGroups'); ?>
+
+ + +
+ +
render(); }, "options": { "title": { - "display": true, + "display": false, "text": "Customers per group" } } }'> +
- - - - - $values) : $sum += $values['customers']; ?> - - -
Groups - Customer count -
- - -
Total - -
+
+ + +
+ + + + + $values) : $sum += $values['customers']; ?> + + +
Groups + Customer count +
+ + +
Total + +
+
+
-
+
- getData('salesRegion'); ?> -
- , - , - , - , - , - - ], - "backgroundColor": [ - "rgb(255, 99, 132)", - "rgb(255, 159, 64)", - "rgb(255, 205, 86)", - "rgb(75, 192, 192)", - "rgb(54, 162, 235)", - "rgb(153, 102, 255)" - ] - }] - }, - "options": { - "title": { - "display": true, - "text": "Sales per region" - } - } - }'> +
+ Customer per Attribute - Annual +
-
-
- -
-
- getData('salesCountry'); ?> + getData('annualCustomerRegion'); ?>
- + +
+ +
+ ], "datasets": [ { - "label": "getHtml('Sales'); ?>", - "type": "horizontalBar", + "label": "getHtml('Total'); ?>", + "type": "line", "data": [ + + ], + "fill": false, + "borderColor": "rgb(139, 139, 139)", + "backgroundColor": "rgb(139, 139, 139)", + "tension": 0.0 + }, + { + "label": "getHtml('Europe'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 99, 132)", + "backgroundColor": "rgb(255, 99, 132)", + "tension": 0.0 + }, + { + "label": "getHtml('America'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 159, 64)", + "backgroundColor": "rgb(255, 159, 64)", + "tension": 0.0 + }, + { + "label": "getHtml('Asia'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 205, 86)", + "backgroundColor": "rgb(255, 205, 86)", + "tension": 0.0 + }, + { + "label": "getHtml('Africa'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(75, 192, 192)", + "backgroundColor": "rgb(75, 192, 192)", + "tension": 0.0 + }, + { + "label": "getHtml('CIS'); ?>", + "type": "line", + "data": [ + @@ -581,67 +1048,172 @@ echo $this->getData('nav')->render(); "borderColor": "rgb(54, 162, 235)", "backgroundColor": "rgb(54, 162, 235)", "tension": 0.0 + }, + { + "label": "getHtml('Other'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(153, 102, 255)", + "backgroundColor": "rgb(153, 102, 255)", + "tension": 0.0 } ] }, "options": { - "title": { - "display": true, - "text": "Sales per country" - } + "title": { + "display": false, + "text": "Customers per Region - Annual" + }, + "scales": { + "yAxes": [ + { + "id": "axis-1", + "display": true, + "position": "left" + } + ] + } } }'> -
-
-
+
-
+
+ + +
+ + + + + + +
Region + $values) : ?> + + +
+ $annual) : ?> + + +
+
+
+
+ +
+ +
- getData('salesGroups'); ?> +
+ Customer Retention - Annual + +
+ getData('monthlyCustomerRetention'); ?>
- $groups) { - $temp[] = $name; + foreach ($customerRetention as $monthly) { + $temp[] = (string) $monthly['year']; } ?> ], - "datasets": [{ - "data": [ - - - ], - "backgroundColor": [ - "rgb(255, 99, 132)", - "rgb(255, 159, 64)", - "rgb(255, 205, 86)", - "rgb(75, 192, 192)", - "rgb(54, 162, 235)", - "rgb(153, 102, 255)" + "datasets": [ + { + "label": "getHtml('Retention'); ?>", + "type": "bar", + "data": [ + + + ], + "yAxisID": "axis-1", + "fill": false, + "borderColor": "rgb(54, 162, 235)", + "backgroundColor": "rgb(54, 162, 235)", + "tension": 0.0 + } ] - }] - }, - "options": { - "title": { - "display": true, - "text": "Sales per group" - } - } - }'> + }, + "options": { + "title": { + "display": false, + "text": "Customer retention" + }, + "scales": { + "yAxes": [ + { + "id": "axis-1", + "display": true, + "position": "left" + } + ] + } + } + }'> + +
+ + +
+ + + + + + + +
Year + Retention +
+ + +
Avg. + +
+
+
-
-
-
+ +
+ request->uri->fragment === 'c-tab-3' ? ' checked' : ''; ?>> @@ -649,123 +1221,19 @@ echo $this->getData('nav')->render();
-
New customers
-
- Shows new customers and their sales +
+ Sales / New Customers - Monthly +
-
-
- -
-
-
New customers per region
+ getData('monthlySalesCustomer'); ?>
-
-
-
- -
-
-
New customers per sales rep
-
-
-
-
- -
-
-
New customers per sales group
-
-
-
-
- -
-
-
New customers per customer group
-
-
-
-
- -
-
-
New customers sales per customer group
-
-
-
-
-
- - - request->uri->fragment === 'c-tab-4' ? ' checked' : ''; ?>> -
-
-
-
-
Lost customers
-
- Shows lost customers and their sales -
-
-
- -
-
-
Lost customers per region
-
-
-
-
- -
-
-
Lost customers per sales rep
-
-
-
-
- -
-
-
Lost customers per sales group
-
-
-
-
- -
-
-
Lost customers per customer group
-
-
-
-
- -
-
-
Lost customers sales per customer group
-
-
-
-
-
-
- - request->uri->fragment === 'c-tab-5' ? ' checked' : ''; ?>> -
-
-
-
- getData('monthlySalesCosts'); ?> -
- @@ -773,13 +1241,13 @@ echo $this->getData('nav')->render(); ], "datasets": [ { - "label": "getHtml('Margin'); ?>", + "label": "getHtml('Customers'); ?>", "type": "line", "data": [ @@ -796,22 +1264,25 @@ echo $this->getData('nav')->render(); "data": [ ], "yAxisID": "axis-1", - "backgroundColor": "rgb(54, 162, 235)" + "fill": false, + "borderColor": "rgb(54, 162, 235)", + "backgroundColor": "rgb(54, 162, 235)", + "tension": 0.0 } ] }, "options": { - "title": { - "display": true, - "text": "Sales / Margin" - }, + "title": { + "display": false, + "text": "Sales / Customers" + }, "scales": { "yAxes": [ { @@ -825,58 +1296,3150 @@ echo $this->getData('nav')->render(); "position": "right", "scaleLabel": { "display": true, - "labelString": "getHtml('Margin'); ?> %" + "labelString": "getHtml('Customers'); ?>" }, "gridLines": { "display": false - }, - "beginAtZero": true, - "ticks": { - "min": 0, - "max": 100, - "stepSize": 10 } } ] } } }'> +
+ + +
+ + + + + + + +
Month + Sales + Customer count +
+ getCurrency(); ?> + + +
Total + getCurrency(); ?> + +
+
+
-
-
+ +
-
+
-
Margins per region
-
+
+ Sales / New Customers - Annual +
-
-
+ getData('annualSalesCustomer'); ?> +
+ + + ], + "datasets": [ + { + "label": "getHtml('Customers'); ?>", + "type": "line", + "data": [ + + + ], + "yAxisID": "axis-2", + "fill": false, + "borderColor": "rgb(255, 99, 132)", + "backgroundColor": "rgb(255, 99, 132)", + "tension": 0.0 + }, + { + "label": "getHtml('Sales'); ?>", + "type": "bar", + "data": [ + + + ], + "yAxisID": "axis-1", + "fill": false, + "borderColor": "rgb(54, 162, 235)", + "backgroundColor": "rgb(54, 162, 235)", + "tension": 0.0 + } + ] + }, + "options": { + "title": { + "display": false, + "text": "Sales / Customers" + }, + "scales": { + "yAxes": [ + { + "id": "axis-1", + "display": true, + "position": "left" + }, + { + "id": "axis-2", + "display": true, + "position": "right", + "scaleLabel": { + "display": true, + "labelString": "getHtml('Customers'); ?>" + }, + "gridLines": { + "display": false + } + } + ] + } + } + }'> +
+ + +
+ + + + + + +
Year + Sales + Customer count +
+ getCurrency(); ?> + + +
+
+
+
+ +
-
+
-
Margins per sales rep
-
+
+ New Customers per Region - Current +
-
-
+ getData('currentCustomerRegion'); ?> +
+ , + , + , + , + , + + ], + "backgroundColor": [ + "rgb(255, 99, 132)", + "rgb(255, 159, 64)", + "rgb(255, 205, 86)", + "rgb(75, 192, 192)", + "rgb(54, 162, 235)", + "rgb(153, 102, 255)" + ] + }] + }, + "options": { + "title": { + "display": false, + "text": "Customers per Region - Currently" + } + } + }'> -
-
-
Margins per sales group
-
+
+ + +
+ + + + + $values) : $sum += $values; ?> + + +
Region + Customer count +
+ + +
Total + +
+
+
-
-
+ +
-
+
-
Margins per customer group
-
+
+ New Customers per Region - Annual +
-
-
-
+ getData('annualCustomerRegion'); ?> +
+ + + ], + "datasets": [ + { + "label": "getHtml('Total'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(139, 139, 139)", + "backgroundColor": "rgb(139, 139, 139)", + "tension": 0.0 + }, + { + "label": "getHtml('Europe'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 99, 132)", + "backgroundColor": "rgb(255, 99, 132)", + "tension": 0.0 + }, + { + "label": "getHtml('America'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 159, 64)", + "backgroundColor": "rgb(255, 159, 64)", + "tension": 0.0 + }, + { + "label": "getHtml('Asia'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 205, 86)", + "backgroundColor": "rgb(255, 205, 86)", + "tension": 0.0 + }, + { + "label": "getHtml('Africa'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(75, 192, 192)", + "backgroundColor": "rgb(75, 192, 192)", + "tension": 0.0 + }, + { + "label": "getHtml('CIS'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(54, 162, 235)", + "backgroundColor": "rgb(54, 162, 235)", + "tension": 0.0 + }, + { + "label": "getHtml('Other'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(153, 102, 255)", + "backgroundColor": "rgb(153, 102, 255)", + "tension": 0.0 + } + ] + }, + "options": { + "title": { + "display": false, + "text": "Customers per Region - Annual" + }, + "scales": { + "yAxes": [ + { + "id": "axis-1", + "display": true, + "position": "left" + } + ] + } + } + }'> + +
+ + +
+ + + + + + +
Region + $values) : ?> + + +
+ $annual) : ?> + + +
+
+
+
+ +
+ +
+
+
+ New Customers per Rep - Current + +
+ getData('currentCustomersRep'); ?> +
+ + ], + "datasets": [ + { + "label": "getHtml('Customers'); ?>", + "type": "horizontalBar", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(54, 162, 235)", + "backgroundColor": "rgb(54, 162, 235)", + "tension": 0.0 + } + ] + }, + "options": { + "title": { + "display": false, + "text": "Customers per rep" + } + } + }'> + +
+ + +
+ + + + + $values) : $sum += $values['customers']; ?> + + +
Rep + Customer count +
+ + +
Total + +
+
+
+
+
+
+ +
+
+
+ New Customers per Rep - Annual + +
+ getData('annualCustomersRep'); ?> + + + + + $annual) : ?> + + +
Rep + + + +
+ $values) : + $sum[$values['year']] = ($sum[$values['year']] ?? 0) + $values['customers']; ?> + + + +
Total + + + +
+
+
+ +
+
+
+ New Customers per Country - Current + +
+ getData('currentCustomersCountry'); ?> +
+ + ], + "datasets": [ + { + "label": "getHtml('Customers'); ?>", + "type": "horizontalBar", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(54, 162, 235)", + "backgroundColor": "rgb(54, 162, 235)", + "tension": 0.0 + } + ] + }, + "options": { + "title": { + "display": false, + "text": "Customers per country" + } + } + }'> + +
+ + +
+ + + + + $values) : $sum += $values['customers']; ?> + + +
Country + Customer count +
+ + +
Total + +
+
+
+
+
+
+ +
+
+
+ New Customers per Country - Annual + +
+ getData('annualCustomersCountry'); ?> + + + + + $annual) : ?> + + +
Code + Country + + + +
+ + $values) : + $sum[$values['year']] = ($sum[$values['year']] ?? 0) + $values['customers']; ?> + + + +
Total + + + +
+
+
+ +
+
+
+ New Customer per Attribute - Current + +
+ getData('customerGroups'); ?> +
+
+ + +
+ +
+ + ], + "datasets": [{ + "data": [ + + + ], + "backgroundColor": [ + "rgb(255, 99, 132)", + "rgb(255, 159, 64)", + "rgb(255, 205, 86)", + "rgb(75, 192, 192)", + "rgb(54, 162, 235)", + "rgb(153, 102, 255)" + ] + }] + }, + "options": { + "title": { + "display": false, + "text": "Customers per group" + } + } + }'> +
+ +
+ + +
+ + + + + $values) : $sum += $values['customers']; ?> + + +
Groups + Customer count +
+ + +
Total + +
+
+
+
+
+
+ +
+
+
+ New Customer per Attribute - Annual + +
+ getData('annualCustomerRegion'); ?> +
+
+ + +
+ +
+ + + ], + "datasets": [ + { + "label": "getHtml('Total'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(139, 139, 139)", + "backgroundColor": "rgb(139, 139, 139)", + "tension": 0.0 + }, + { + "label": "getHtml('Europe'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 99, 132)", + "backgroundColor": "rgb(255, 99, 132)", + "tension": 0.0 + }, + { + "label": "getHtml('America'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 159, 64)", + "backgroundColor": "rgb(255, 159, 64)", + "tension": 0.0 + }, + { + "label": "getHtml('Asia'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 205, 86)", + "backgroundColor": "rgb(255, 205, 86)", + "tension": 0.0 + }, + { + "label": "getHtml('Africa'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(75, 192, 192)", + "backgroundColor": "rgb(75, 192, 192)", + "tension": 0.0 + }, + { + "label": "getHtml('CIS'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(54, 162, 235)", + "backgroundColor": "rgb(54, 162, 235)", + "tension": 0.0 + }, + { + "label": "getHtml('Other'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(153, 102, 255)", + "backgroundColor": "rgb(153, 102, 255)", + "tension": 0.0 + } + ] + }, + "options": { + "title": { + "display": false, + "text": "Customers per Region - Annual" + }, + "scales": { + "yAxes": [ + { + "id": "axis-1", + "display": true, + "position": "left" + } + ] + } + } + }'> +
+ +
+ + +
+ + + + + + +
Region + $values) : ?> + + +
+ $annual) : ?> + + +
+
+
+
+
+
+ +
+
+
+ New Customers + +
+ + + + + $annual) : ++$i; + if ($i > $rnd) break; + ?> + +
Code + Country + Rep + Name + Sales +
+ + Rep + + getCurrency(); ?> + +
+
+
+
+ + + request->uri->fragment === 'c-tab-4' ? ' checked' : ''; ?>> +
+
+
+
+
+ Sales / Lost Customers - Monthly + +
+ getData('monthlySalesCustomer'); ?> +
+ + + ], + "datasets": [ + { + "label": "getHtml('Customers'); ?>", + "type": "line", + "data": [ + + + ], + "yAxisID": "axis-2", + "fill": false, + "borderColor": "rgb(255, 99, 132)", + "backgroundColor": "rgb(255, 99, 132)", + "tension": 0.0 + }, + { + "label": "getHtml('Sales'); ?>", + "type": "bar", + "data": [ + + + ], + "yAxisID": "axis-1", + "fill": false, + "borderColor": "rgb(54, 162, 235)", + "backgroundColor": "rgb(54, 162, 235)", + "tension": 0.0 + } + ] + }, + "options": { + "title": { + "display": false, + "text": "Sales / Customers" + }, + "scales": { + "yAxes": [ + { + "id": "axis-1", + "display": true, + "position": "left" + }, + { + "id": "axis-2", + "display": true, + "position": "right", + "scaleLabel": { + "display": true, + "labelString": "getHtml('Customers'); ?>" + }, + "gridLines": { + "display": false + } + } + ] + } + } + }'> +
+ + +
+ + + + + + + +
Month + Sales + Customer count +
+ getCurrency(); ?> + + +
Total + getCurrency(); ?> + +
+
+
+
+
+
+ +
+
+
+ Sales / Sales Customers - Annual + +
+ getData('annualSalesCustomer'); ?> +
+ + + ], + "datasets": [ + { + "label": "getHtml('Customers'); ?>", + "type": "line", + "data": [ + + + ], + "yAxisID": "axis-2", + "fill": false, + "borderColor": "rgb(255, 99, 132)", + "backgroundColor": "rgb(255, 99, 132)", + "tension": 0.0 + }, + { + "label": "getHtml('Sales'); ?>", + "type": "bar", + "data": [ + + + ], + "yAxisID": "axis-1", + "fill": false, + "borderColor": "rgb(54, 162, 235)", + "backgroundColor": "rgb(54, 162, 235)", + "tension": 0.0 + } + ] + }, + "options": { + "title": { + "display": false, + "text": "Sales / Customers" + }, + "scales": { + "yAxes": [ + { + "id": "axis-1", + "display": true, + "position": "left" + }, + { + "id": "axis-2", + "display": true, + "position": "right", + "scaleLabel": { + "display": true, + "labelString": "getHtml('Customers'); ?>" + }, + "gridLines": { + "display": false + } + } + ] + } + } + }'> +
+ + +
+ + + + + + +
Year + Sales + Customer count +
+ getCurrency(); ?> + + +
+
+
+
+
+
+ +
+
+
+ Lost Customers per Region - Current + +
+ getData('currentCustomerRegion'); ?> +
+ , + , + , + , + , + + ], + "backgroundColor": [ + "rgb(255, 99, 132)", + "rgb(255, 159, 64)", + "rgb(255, 205, 86)", + "rgb(75, 192, 192)", + "rgb(54, 162, 235)", + "rgb(153, 102, 255)" + ] + }] + }, + "options": { + "title": { + "display": false, + "text": "Customers per Region - Currently" + } + } + }'> + +
+ + +
+ + + + + $values) : $sum += $values; ?> + + +
Region + Customer count +
+ + +
Total + +
+
+
+
+
+
+ +
+
+
+ Lost Customers per Region - Annual + +
+ getData('annualCustomerRegion'); ?> +
+ + + ], + "datasets": [ + { + "label": "getHtml('Total'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(139, 139, 139)", + "backgroundColor": "rgb(139, 139, 139)", + "tension": 0.0 + }, + { + "label": "getHtml('Europe'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 99, 132)", + "backgroundColor": "rgb(255, 99, 132)", + "tension": 0.0 + }, + { + "label": "getHtml('America'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 159, 64)", + "backgroundColor": "rgb(255, 159, 64)", + "tension": 0.0 + }, + { + "label": "getHtml('Asia'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 205, 86)", + "backgroundColor": "rgb(255, 205, 86)", + "tension": 0.0 + }, + { + "label": "getHtml('Africa'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(75, 192, 192)", + "backgroundColor": "rgb(75, 192, 192)", + "tension": 0.0 + }, + { + "label": "getHtml('CIS'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(54, 162, 235)", + "backgroundColor": "rgb(54, 162, 235)", + "tension": 0.0 + }, + { + "label": "getHtml('Other'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(153, 102, 255)", + "backgroundColor": "rgb(153, 102, 255)", + "tension": 0.0 + } + ] + }, + "options": { + "title": { + "display": false, + "text": "Customers per Region - Annual" + }, + "scales": { + "yAxes": [ + { + "id": "axis-1", + "display": true, + "position": "left" + } + ] + } + } + }'> + +
+ + +
+ + + + + + +
Region + $values) : ?> + + +
+ $annual) : ?> + + +
+
+
+
+
+
+ +
+
+
+ Lost Customers per Rep - Current + +
+ getData('currentCustomersRep'); ?> +
+ + ], + "datasets": [ + { + "label": "getHtml('Customers'); ?>", + "type": "horizontalBar", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(54, 162, 235)", + "backgroundColor": "rgb(54, 162, 235)", + "tension": 0.0 + } + ] + }, + "options": { + "title": { + "display": false, + "text": "Customers per rep" + } + } + }'> + +
+ + +
+ + + + + $values) : $sum += $values['customers']; ?> + + +
Rep + Customer count +
+ + +
Total + +
+
+
+
+
+
+ +
+
+
+ Lost Customers per Rep - Annual + +
+ getData('annualCustomersRep'); ?> + + + + + $annual) : ?> + + +
Rep + + + +
+ $values) : + $sum[$values['year']] = ($sum[$values['year']] ?? 0) + $values['customers']; ?> + + + +
Total + + + +
+
+
+ +
+
+
+ Lost Customers per Country - Current + +
+ getData('currentCustomersCountry'); ?> +
+ + ], + "datasets": [ + { + "label": "getHtml('Customers'); ?>", + "type": "horizontalBar", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(54, 162, 235)", + "backgroundColor": "rgb(54, 162, 235)", + "tension": 0.0 + } + ] + }, + "options": { + "title": { + "display": false, + "text": "Customers per country" + } + } + }'> + +
+ + +
+ + + + + $values) : $sum += $values['customers']; ?> + + +
Country + Customer count +
+ + +
Total + +
+
+
+
+
+
+ +
+
+
+ Lost Customers per Country - Annual + +
+ getData('annualCustomersCountry'); ?> + + + + + $annual) : ?> + + +
Code + Country + + + +
+ + $values) : + $sum[$values['year']] = ($sum[$values['year']] ?? 0) + $values['customers']; ?> + + + +
Total + + + +
+
+
+ +
+
+
+ Lost Customer per Attribute - Current + +
+ getData('customerGroups'); ?> +
+
+ + +
+ +
+ + ], + "datasets": [{ + "data": [ + + + ], + "backgroundColor": [ + "rgb(255, 99, 132)", + "rgb(255, 159, 64)", + "rgb(255, 205, 86)", + "rgb(75, 192, 192)", + "rgb(54, 162, 235)", + "rgb(153, 102, 255)" + ] + }] + }, + "options": { + "title": { + "display": false, + "text": "Customers per group" + } + } + }'> +
+ +
+ + +
+ + + + + $values) : $sum += $values['customers']; ?> + + +
Groups + Customer count +
+ + +
Total + +
+
+
+
+
+
+ +
+
+
+ Lost Customer per Attribute - Annual + +
+ getData('annualCustomerRegion'); ?> +
+
+ + +
+ +
+ + + ], + "datasets": [ + { + "label": "getHtml('Total'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(139, 139, 139)", + "backgroundColor": "rgb(139, 139, 139)", + "tension": 0.0 + }, + { + "label": "getHtml('Europe'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 99, 132)", + "backgroundColor": "rgb(255, 99, 132)", + "tension": 0.0 + }, + { + "label": "getHtml('America'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 159, 64)", + "backgroundColor": "rgb(255, 159, 64)", + "tension": 0.0 + }, + { + "label": "getHtml('Asia'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 205, 86)", + "backgroundColor": "rgb(255, 205, 86)", + "tension": 0.0 + }, + { + "label": "getHtml('Africa'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(75, 192, 192)", + "backgroundColor": "rgb(75, 192, 192)", + "tension": 0.0 + }, + { + "label": "getHtml('CIS'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(54, 162, 235)", + "backgroundColor": "rgb(54, 162, 235)", + "tension": 0.0 + }, + { + "label": "getHtml('Other'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(153, 102, 255)", + "backgroundColor": "rgb(153, 102, 255)", + "tension": 0.0 + } + ] + }, + "options": { + "title": { + "display": false, + "text": "Customers per Region - Annual" + }, + "scales": { + "yAxes": [ + { + "id": "axis-1", + "display": true, + "position": "left" + } + ] + } + } + }'> +
+ +
+ + +
+ + + + + + +
Region + $values) : ?> + + +
+ $annual) : ?> + + +
+
+
+
+
+
+ +
+
+
+ Lost Customers + +
+ + + + + $annual) : ++$i; + if ($i > $rnd) break; + ?> + +
Code + Country + Rep + Name + 3 Year Avg. Sales +
+ + Rep + + getCurrency(); ?> + +
+
+
+
+
+ request->uri->fragment === 'c-tab-5' ? ' checked' : ''; ?>> +
+
+
+
+
+
getHtml('Filter'); ?>
+
+
+ + +
+
+
+
+
+
+
+ +
+
+
+
+ Sales / Profit - Monthly + +
+ getData('monthlySalesCustomer'); ?> +
+ + + ], + "datasets": [ + { + "label": "getHtml('Profit'); ?>", + "type": "line", + "data": [ + + + ], + "yAxisID": "axis-2", + "fill": false, + "borderColor": "rgb(255, 99, 132)", + "backgroundColor": "rgb(255, 99, 132)", + "tension": 0.0 + }, + { + "label": "getHtml('Sales'); ?>", + "type": "bar", + "data": [ + + + ], + "yAxisID": "axis-1", + "fill": false, + "borderColor": "rgb(54, 162, 235)", + "backgroundColor": "rgb(54, 162, 235)", + "tension": 0.0 + } + ] + }, + "options": { + "title": { + "display": false, + "text": "Sales / Profit" + }, + "scales": { + "yAxes": [ + { + "id": "axis-1", + "display": true, + "position": "left" + }, + { + "id": "axis-2", + "display": true, + "position": "right", + "scaleLabel": { + "display": true, + "labelString": "getHtml('Profit'); ?>" + }, + "gridLines": { + "display": false + } + } + ] + } + } + }'> +
+ + +
+ + + + + + + +
Month + Sales + Profit + Profit % +
+ getCurrency(); ?> + + + +
Total + getCurrency(); ?> + + +
+
+
+
+
+
+ +
+
+
+ Sales / Profit - Annual + +
+ getData('annualSalesCustomer'); ?> +
+ + + ], + "datasets": [ + { + "label": "getHtml('Profit'); ?>", + "type": "line", + "data": [ + + + ], + "yAxisID": "axis-2", + "fill": false, + "borderColor": "rgb(255, 99, 132)", + "backgroundColor": "rgb(255, 99, 132)", + "tension": 0.0 + }, + { + "label": "getHtml('Sales'); ?>", + "type": "bar", + "data": [ + + + ], + "yAxisID": "axis-1", + "fill": false, + "borderColor": "rgb(54, 162, 235)", + "backgroundColor": "rgb(54, 162, 235)", + "tension": 0.0 + } + ] + }, + "options": { + "title": { + "display": false, + "text": "Sales / Profit" + }, + "scales": { + "yAxes": [ + { + "id": "axis-1", + "display": true, + "position": "left" + }, + { + "id": "axis-2", + "display": true, + "position": "right", + "scaleLabel": { + "display": true, + "labelString": "getHtml('Profit'); ?>" + }, + "gridLines": { + "display": false + } + } + ] + } + } + }'> +
+ + +
+ + + + + + +
Year + Sales + Profit + Profit % +
+ getCurrency(); ?> + + + +
+
+
+
+
+
+ +
+
+
+ Sales per Attribute - Current + +
+ getData('customerGroups'); ?> +
+
+ + +
+ +
+ + ], + "datasets": [{ + "data": [ + + + ], + "backgroundColor": [ + "rgb(255, 99, 132)", + "rgb(255, 159, 64)", + "rgb(255, 205, 86)", + "rgb(75, 192, 192)", + "rgb(54, 162, 235)", + "rgb(153, 102, 255)" + ] + }] + }, + "options": { + "title": { + "display": false, + "text": "Customers per group" + } + } + }'> +
+ +
+ + +
+ + + + + $values) : $sum += $values['customers']; ?> + + +
Groups + Customer count +
+ + +
Total + +
+
+
+
+
+
+ +
+
+
+ Sales per Attribute - Annual + +
+ getData('annualCustomerRegion'); ?> +
+
+ + +
+ +
+ + + ], + "datasets": [ + { + "label": "getHtml('Total'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(139, 139, 139)", + "backgroundColor": "rgb(139, 139, 139)", + "tension": 0.0 + }, + { + "label": "getHtml('Europe'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 99, 132)", + "backgroundColor": "rgb(255, 99, 132)", + "tension": 0.0 + }, + { + "label": "getHtml('America'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 159, 64)", + "backgroundColor": "rgb(255, 159, 64)", + "tension": 0.0 + }, + { + "label": "getHtml('Asia'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 205, 86)", + "backgroundColor": "rgb(255, 205, 86)", + "tension": 0.0 + }, + { + "label": "getHtml('Africa'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(75, 192, 192)", + "backgroundColor": "rgb(75, 192, 192)", + "tension": 0.0 + }, + { + "label": "getHtml('CIS'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(54, 162, 235)", + "backgroundColor": "rgb(54, 162, 235)", + "tension": 0.0 + }, + { + "label": "getHtml('Other'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(153, 102, 255)", + "backgroundColor": "rgb(153, 102, 255)", + "tension": 0.0 + } + ] + }, + "options": { + "title": { + "display": false, + "text": "Customers per Region - Annual" + }, + "scales": { + "yAxes": [ + { + "id": "axis-1", + "display": true, + "position": "left" + } + ] + } + } + }'> +
+ +
+ + +
+ + + + + + +
Region + $values) : ?> + + +
+ $annual) : ?> + + +
+
+
+
+
+
+ +
+
+
+ Profit per Attribute - Current + +
+ getData('customerGroups'); ?> +
+
+ + +
+ +
+ + ], + "datasets": [{ + "data": [ + + + ], + "backgroundColor": [ + "rgb(255, 99, 132)", + "rgb(255, 159, 64)", + "rgb(255, 205, 86)", + "rgb(75, 192, 192)", + "rgb(54, 162, 235)", + "rgb(153, 102, 255)" + ] + }] + }, + "options": { + "title": { + "display": false, + "text": "Customers per group" + } + } + }'> +
+ +
+ + +
+ + + + + $values) : $sum += $values['customers']; ?> + + +
Groups + Customer count +
+ + +
Total + +
+
+
+
+
+
+ +
+
+
+ Profit per Attribute - Annual + +
+ getData('annualCustomerRegion'); ?> +
+
+ + +
+ +
+ + + ], + "datasets": [ + { + "label": "getHtml('Total'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(139, 139, 139)", + "backgroundColor": "rgb(139, 139, 139)", + "tension": 0.0 + }, + { + "label": "getHtml('Europe'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 99, 132)", + "backgroundColor": "rgb(255, 99, 132)", + "tension": 0.0 + }, + { + "label": "getHtml('America'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 159, 64)", + "backgroundColor": "rgb(255, 159, 64)", + "tension": 0.0 + }, + { + "label": "getHtml('Asia'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(255, 205, 86)", + "backgroundColor": "rgb(255, 205, 86)", + "tension": 0.0 + }, + { + "label": "getHtml('Africa'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(75, 192, 192)", + "backgroundColor": "rgb(75, 192, 192)", + "tension": 0.0 + }, + { + "label": "getHtml('CIS'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(54, 162, 235)", + "backgroundColor": "rgb(54, 162, 235)", + "tension": 0.0 + }, + { + "label": "getHtml('Other'); ?>", + "type": "line", + "data": [ + + + ], + "fill": false, + "borderColor": "rgb(153, 102, 255)", + "backgroundColor": "rgb(153, 102, 255)", + "tension": 0.0 + } + ] + }, + "options": { + "title": { + "display": false, + "text": "Customers per Region - Annual" + }, + "scales": { + "yAxes": [ + { + "id": "axis-1", + "display": true, + "position": "left" + } + ] + } + } + }'> +
+ +
+ + +
+ + + + + + +
Region + $values) : ?> + + +
+ $annual) : ?> + + +
+
+
+
+
+
+ +
+
+
+ Invoices / Articles - Monthly + +
+ getData('monthlySalesCustomer'); ?> +
+ + + ], + "datasets": [ + { + "label": "getHtml('Articles'); ?>", + "type": "line", + "data": [ + + + ], + "yAxisID": "axis-2", + "fill": false, + "borderColor": "rgb(255, 99, 132)", + "backgroundColor": "rgb(255, 99, 132)", + "tension": 0.0 + }, + { + "label": "getHtml('Sales'); ?>", + "type": "bar", + "data": [ + + + ], + "yAxisID": "axis-1", + "fill": false, + "borderColor": "rgb(54, 162, 235)", + "backgroundColor": "rgb(54, 162, 235)", + "tension": 0.0 + } + ] + }, + "options": { + "title": { + "display": false, + "text": "Sales / Articles" + }, + "scales": { + "yAxes": [ + { + "id": "axis-1", + "display": true, + "position": "left" + }, + { + "id": "axis-2", + "display": true, + "position": "right", + "scaleLabel": { + "display": true, + "labelString": "getHtml('Articles'); ?>" + }, + "gridLines": { + "display": false + } + } + ] + } + } + }'> +
+ + +
+ + + + + + + +
Month + Sales + Articles +
+ getCurrency(); ?> + + + +
Total + getCurrency(); ?> + + +
+
+
+
+
+
+ +
+
+
+ Invoices / Articles - Annual + +
+ getData('annualSalesCustomer'); ?> +
+ + + ], + "datasets": [ + { + "label": "getHtml('Articles'); ?>", + "type": "line", + "data": [ + + + ], + "yAxisID": "axis-2", + "fill": false, + "borderColor": "rgb(255, 99, 132)", + "backgroundColor": "rgb(255, 99, 132)", + "tension": 0.0 + }, + { + "label": "getHtml('Sales'); ?>", + "type": "bar", + "data": [ + + + ], + "yAxisID": "axis-1", + "fill": false, + "borderColor": "rgb(54, 162, 235)", + "backgroundColor": "rgb(54, 162, 235)", + "tension": 0.0 + } + ] + }, + "options": { + "title": { + "display": false, + "text": "Sales / Articles" + }, + "scales": { + "yAxes": [ + { + "id": "axis-1", + "display": true, + "position": "left" + }, + { + "id": "axis-2", + "display": true, + "position": "right", + "scaleLabel": { + "display": true, + "labelString": "getHtml('Articles'); ?>" + }, + "gridLines": { + "display": false + } + } + ] + } + } + }'> +
+ + +
+ + + + + + +
Year + Sales + Articles +
+ getCurrency(); ?> + + + +
+
+
+
+
+
+ +
\ No newline at end of file diff --git a/Theme/Backend/client-profile.tpl.php b/Theme/Backend/client-profile.tpl.php index 8ae5a6d..a82ee10 100755 --- a/Theme/Backend/client-profile.tpl.php +++ b/Theme/Backend/client-profile.tpl.php @@ -137,7 +137,10 @@ echo $this->getData('nav')->render();