This commit is contained in:
Dennis Eichhorn 2024-01-02 23:34:18 +00:00
parent 6a561ade53
commit 479fd5b055
13 changed files with 207 additions and 210 deletions

View File

@ -21,7 +21,6 @@ use Modules\SalesAnalysis\Models\ItemMapper;
use Modules\SalesAnalysis\Models\RegionMapper;
use phpOMS\Asset\AssetType;
use phpOMS\Contract\RenderableInterface;
use phpOMS\DataStorage\Database\Query\Builder;
use phpOMS\Localization\ISO3166CharEnum;
use phpOMS\Localization\ISO3166NameEnum;
use phpOMS\Localization\ISO3166TwoEnum;
@ -143,7 +142,7 @@ final class BackendController extends Controller
}
/**
* Routing end-point for application behaviour.
* Routing end-point for application behavior.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
@ -332,7 +331,7 @@ final class BackendController extends Controller
}
/**
* Routing end-point for application behaviour.
* Routing end-point for application behavior.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
@ -360,7 +359,7 @@ final class BackendController extends Controller
}
/**
* Routing end-point for application behaviour.
* Routing end-point for application behavior.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
@ -444,7 +443,7 @@ final class BackendController extends Controller
}
/**
* Routing end-point for application behaviour.
* Routing end-point for application behavior.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
@ -619,7 +618,7 @@ final class BackendController extends Controller
}
/**
* Routing end-point for application behaviour.
* Routing end-point for application behavior.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response

View File

@ -19,7 +19,7 @@ use phpOMS\DataStorage\Database\Query\Builder;
use phpOMS\Stdlib\Base\SmartDateTime;
/**
* Permision state enum.
* Permission category enum.
*
* @package Modules\SalesAnalysis\Models
* @license OMS License 1.0

View File

@ -19,7 +19,7 @@ use phpOMS\DataStorage\Database\Query\Builder;
use phpOMS\Stdlib\Base\SmartDateTime;
/**
* Permision state enum.
* Permission category enum.
*
* @package Modules\SalesAnalysis\Models
* @license OMS License 1.0
@ -117,7 +117,7 @@ class GeneralMapper extends DataMapperFactory
return [
$mtdA, $mtdPY,
$ytdA, $ytdPY,
$monthlySales
$monthlySales,
];
}
@ -126,7 +126,6 @@ class GeneralMapper extends DataMapperFactory
\DateTime $endCurrent,
int $businessStart = 1
) : array {
$query = new Builder(self::$db);
$query->raw(
'SELECT

View File

@ -19,7 +19,7 @@ use phpOMS\DataStorage\Database\Query\Builder;
use phpOMS\Stdlib\Base\SmartDateTime;
/**
* Permision state enum.
* Permission category enum.
*
* @package Modules\SalesAnalysis\Models
* @license OMS License 1.0

View File

@ -17,7 +17,7 @@ namespace Modules\SalesAnalysis\Models;
use phpOMS\Stdlib\Base\Enum;
/**
* Permision state enum.
* Permission category enum.
*
* @package Modules\SalesAnalysis\Models
* @license OMS License 1.0

View File

@ -20,7 +20,7 @@ use phpOMS\Localization\ISO3166TwoEnum;
use phpOMS\Stdlib\Base\SmartDateTime;
/**
* Permision state enum.
* Permission category enum.
*
* @package Modules\SalesAnalysis\Models
* @license OMS License 1.0
@ -167,7 +167,7 @@ class RegionMapper extends DataMapperFactory
if (!isset($annualCustomer[$result['address_country']])) {
for ($i = 1; $i < 11; ++$i) {
$annualCustomer[$result['address_country']][$i] = [
'client_count' => 0
'client_count' => 0,
];
$historyStart->smartModify(1);

View File

@ -21,10 +21,10 @@ echo $this->data['nav']->render();
<div class="tabview tab-2">
<div class="box">
<ul class="tab-links">
<li><label for="c-tab-1"><?= $this->getHtml('All'); ?></label></li>
<li><label for="c-tab-2"><?= $this->getHtml('New'); ?></label></li>
<li><label for="c-tab-3"><?= $this->getHtml('Lost'); ?></label></li>
<!--<li><label for="c-tab-1"><?= $this->getHtml('Filter'); ?></label></li>-->
<li><label for="c-tab-1"><?= $this->getHtml('All'); ?></label>
<li><label for="c-tab-2"><?= $this->getHtml('New'); ?></label>
<li><label for="c-tab-3"><?= $this->getHtml('Lost'); ?></label>
<!--<li><label for="c-tab-1"><?= $this->getHtml('Filter'); ?></label>-->
</ul>
</div>
<div class="tab-content">

View File

@ -21,11 +21,11 @@ echo $this->data['nav']->render();
<div class="tabview tab-2">
<div class="box">
<ul class="tab-links">
<li><label for="c-tab-1"><?= $this->getHtml('Segment'); ?></label></li>
<li><label for="c-tab-2"><?= $this->getHtml('Section'); ?></label></li>
<li><label for="c-tab-3"><?= $this->getHtml('Group'); ?></label></li>
<li><label for="c-tab-4"><?= $this->getHtml('Type'); ?></label></li>
<!--<li><label for="c-tab-5"><?= $this->getHtml('Filter'); ?></label></li>-->
<li><label for="c-tab-1"><?= $this->getHtml('Segment'); ?></label>
<li><label for="c-tab-2"><?= $this->getHtml('Section'); ?></label>
<li><label for="c-tab-3"><?= $this->getHtml('Group'); ?></label>
<li><label for="c-tab-4"><?= $this->getHtml('Type'); ?></label>
<!--<li><label for="c-tab-5"><?= $this->getHtml('Filter'); ?></label>-->
</ul>
</div>
<div class="tab-content">
@ -36,7 +36,7 @@ echo $this->data['nav']->render();
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Segment'); ?></div>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Category'); ?>
@ -82,7 +82,7 @@ echo $this->data['nav']->render();
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Section'); ?></div>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Category'); ?>
@ -128,7 +128,7 @@ echo $this->data['nav']->render();
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Group'); ?></div>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Category'); ?>
@ -174,7 +174,7 @@ echo $this->data['nav']->render();
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Type'); ?></div>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Category'); ?>

View File

@ -13,7 +13,6 @@
declare(strict_types=1);
use phpOMS\Localization\ISO3166NameEnum;
use phpOMS\Localization\Money;
use phpOMS\Uri\UriFactory;
/**
@ -239,7 +238,7 @@ echo $this->data['nav']->render();
<i class="g-icon expand">chevron_right</i>
</label>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Month'); ?>
@ -386,7 +385,7 @@ echo $this->data['nav']->render();
<i class="g-icon expand">chevron_right</i>
</label>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Year'); ?>
@ -416,7 +415,7 @@ echo $this->data['nav']->render();
<?= $this->getHtml('ItemAttribute'); ?>
</div>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Category'); ?>
@ -456,7 +455,7 @@ echo $this->data['nav']->render();
<?= $this->getHtml('ClientAttribute'); ?>
</div>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Category'); ?>
@ -496,7 +495,7 @@ echo $this->data['nav']->render();
<?= $this->getHtml('Country'); ?>
</div>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Country'); ?>

View File

@ -24,11 +24,11 @@ echo $this->data['nav']->render();
<div class="tabview tab-2">
<div class="box">
<ul class="tab-links">
<li><label for="c-tab-1"><?= $this->getHtml('World'); ?></label></li>
<li><label for="c-tab-2"><?= $this->getHtml('DomesticExport'); ?></label></li>
<li><label for="c-tab-3"><?= $this->getHtml('Continents'); ?></label></li>
<li><label for="c-tab-4"><?= $this->getHtml('Regions'); ?></label></li>
<!--<li><label for="c-tab-5"><?= $this->getHtml('Filter'); ?></label></li>-->
<li><label for="c-tab-1"><?= $this->getHtml('World'); ?></label>
<li><label for="c-tab-2"><?= $this->getHtml('DomesticExport'); ?></label>
<li><label for="c-tab-3"><?= $this->getHtml('Continents'); ?></label>
<li><label for="c-tab-4"><?= $this->getHtml('Regions'); ?></label>
<!--<li><label for="c-tab-5"><?= $this->getHtml('Filter'); ?></label>-->
</ul>
</div>
<div class="tab-content">
@ -51,7 +51,7 @@ echo $this->data['nav']->render();
$temp = [];
foreach ($this->data['ytdAClientCountry'] as $lang => $values) {
$temp[] = '{"id": "' . ISO3166CharEnum::getBy2Code($lang) . '", "value": ' . ($values['net_sales'] / 10000) . '}';
}; ?>
} ?>
<?= \implode(',', $temp); ?>
]
}]
@ -85,7 +85,7 @@ echo $this->data['nav']->render();
<?= $this->getHtml('Country'); ?>
</div>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Country'); ?>
@ -273,7 +273,7 @@ echo $this->data['nav']->render();
<i class="g-icon expand">chevron_right</i>
</label>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Month'); ?>
@ -463,7 +463,7 @@ echo $this->data['nav']->render();
<i class="g-icon expand">chevron_right</i>
</label>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Month'); ?>
@ -507,7 +507,7 @@ echo $this->data['nav']->render();
<div class="row">
<div class="col-xs-12 col-lg-4">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Sales') ?> (<?= $this->getHtml('YTD'); ?>) - <?= $this->getHtml('DomesticExport') ?></div>
<div class="portlet-head"><?= $this->getHtml('Sales'); ?> (<?= $this->getHtml('YTD'); ?>) - <?= $this->getHtml('DomesticExport'); ?></div>
<div class="portlet-body">
<canvas id="sales-domestic-export" data-chart='{
"type": "pie",
@ -539,7 +539,7 @@ echo $this->data['nav']->render();
<i class="g-icon expand">chevron_right</i>
</label>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Region'); ?>
@ -582,7 +582,7 @@ echo $this->data['nav']->render();
<?php
$first = true;
foreach ($this->data['annualDomesticExport'] as $region => $values) :
echo ($first ? '' : ',');
echo($first ? '' : ',');
$first = false;
?>{
"label": "<?= $this->printHtml($region); ?>",
@ -614,7 +614,7 @@ echo $this->data['nav']->render();
<i class="g-icon expand">chevron_right</i>
</label>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Region'); ?>
@ -648,7 +648,7 @@ echo $this->data['nav']->render();
<div class="row">
<div class="col-xs-12 col-lg-4">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Profit') ?> (<?= $this->getHtml('YTD'); ?>) - <?= $this->getHtml('DomesticExport') ?></div>
<div class="portlet-head"><?= $this->getHtml('Profit'); ?> (<?= $this->getHtml('YTD'); ?>) - <?= $this->getHtml('DomesticExport'); ?></div>
<div class="portlet-body">
<canvas id="profit-domestic-export-region" data-chart='{
"type": "pie",
@ -680,7 +680,7 @@ echo $this->data['nav']->render();
<i class="g-icon expand">chevron_right</i>
</label>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Region'); ?>
@ -723,7 +723,7 @@ echo $this->data['nav']->render();
<?php
$first = true;
foreach ($this->data['annualDomesticExport'] as $region => $values) :
echo ($first ? '' : ',');
echo($first ? '' : ',');
$first = false;
?>{
"label": "<?= $this->printHtml($region); ?>",
@ -765,7 +765,7 @@ echo $this->data['nav']->render();
<i class="g-icon expand">chevron_right</i>
</label>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Region'); ?>
@ -799,7 +799,7 @@ echo $this->data['nav']->render();
<div class="row">
<div class="col-xs-12 col-lg-4">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Clients') ?> (<?= $this->getHtml('YTD'); ?>) - <?= $this->getHtml('DomesticExport') ?></div>
<div class="portlet-head"><?= $this->getHtml('Clients'); ?> (<?= $this->getHtml('YTD'); ?>) - <?= $this->getHtml('DomesticExport'); ?></div>
<div class="portlet-body">
<canvas id="client-count-domestic-export" data-chart='{
"type": "pie",
@ -831,7 +831,7 @@ echo $this->data['nav']->render();
<i class="g-icon expand">chevron_right</i>
</label>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Region'); ?>
@ -874,7 +874,7 @@ echo $this->data['nav']->render();
<?php
$first = true;
foreach ($this->data['annualDomesticExportCount'] as $region => $values) :
echo ($first ? '' : ',');
echo($first ? '' : ',');
$first = false;
?>{
"label": "<?= $this->printHtml($region); ?>",
@ -906,7 +906,7 @@ echo $this->data['nav']->render();
<i class="g-icon expand">chevron_right</i>
</label>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Region'); ?>
@ -943,7 +943,7 @@ echo $this->data['nav']->render();
<div class="row">
<div class="col-xs-12 col-lg-4">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Sales') ?> (<?= $this->getHtml('YTD'); ?>) - <?= $this->getHtml('Continent') ?></div>
<div class="portlet-head"><?= $this->getHtml('Sales'); ?> (<?= $this->getHtml('YTD'); ?>) - <?= $this->getHtml('Continent'); ?></div>
<div class="portlet-body">
<canvas id="sales-continent" data-chart='{
"type": "pie",
@ -975,7 +975,7 @@ echo $this->data['nav']->render();
<i class="g-icon expand">chevron_right</i>
</label>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Region'); ?>
@ -1018,7 +1018,7 @@ echo $this->data['nav']->render();
<?php
$first = true;
foreach ($this->data['annualContinent'] as $region => $values) :
echo ($first ? '' : ',');
echo($first ? '' : ',');
$first = false;
?>{
"label": "<?= $this->getHtml($region); ?>",
@ -1050,7 +1050,7 @@ echo $this->data['nav']->render();
<i class="g-icon expand">chevron_right</i>
</label>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Region'); ?>
@ -1084,7 +1084,7 @@ echo $this->data['nav']->render();
<div class="row">
<div class="col-xs-12 col-lg-4">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Profit') ?> (<?= $this->getHtml('YTD'); ?>) - <?= $this->getHtml('Continent') ?></div>
<div class="portlet-head"><?= $this->getHtml('Profit'); ?> (<?= $this->getHtml('YTD'); ?>) - <?= $this->getHtml('Continent'); ?></div>
<div class="portlet-body">
<canvas id="profit-continent-region" data-chart='{
"type": "pie",
@ -1116,7 +1116,7 @@ echo $this->data['nav']->render();
<i class="g-icon expand">chevron_right</i>
</label>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Region'); ?>
@ -1159,7 +1159,7 @@ echo $this->data['nav']->render();
<?php
$first = true;
foreach ($this->data['annualContinent'] as $region => $values) :
echo ($first ? '' : ',');
echo($first ? '' : ',');
$first = false;
?>{
"label": "<?= $this->getHtml($region); ?>",
@ -1201,7 +1201,7 @@ echo $this->data['nav']->render();
<i class="g-icon expand">chevron_right</i>
</label>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Region'); ?>
@ -1235,7 +1235,7 @@ echo $this->data['nav']->render();
<div class="row">
<div class="col-xs-12 col-lg-4">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Clients') ?> (<?= $this->getHtml('YTD'); ?>) - <?= $this->getHtml('Continent') ?></div>
<div class="portlet-head"><?= $this->getHtml('Clients'); ?> (<?= $this->getHtml('YTD'); ?>) - <?= $this->getHtml('Continent'); ?></div>
<div class="portlet-body">
<canvas id="client-count-continent" data-chart='{
"type": "pie",
@ -1267,7 +1267,7 @@ echo $this->data['nav']->render();
<i class="g-icon expand">chevron_right</i>
</label>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Region'); ?>
@ -1310,7 +1310,7 @@ echo $this->data['nav']->render();
<?php
$first = true;
foreach ($this->data['annualContinentCount'] as $region => $values) :
echo ($first ? '' : ',');
echo($first ? '' : ',');
$first = false;
?>{
"label": "<?= $this->printHtml($region); ?>",
@ -1342,7 +1342,7 @@ echo $this->data['nav']->render();
<i class="g-icon expand">chevron_right</i>
</label>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Region'); ?>
@ -1381,7 +1381,7 @@ echo $this->data['nav']->render();
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Sales'); ?></div>
<div class="slider">
<table class="default">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('Region'); ?>

View File

@ -21,7 +21,7 @@ echo $this->data['nav']->render();
<div class="tabview tab-2">
<div class="box">
<ul class="tab-links">
<li><label for="c-tab-1"><?= $this->getHtml('General'); ?></label></li>
<li><label for="c-tab-1"><?= $this->getHtml('General'); ?></label>
</ul>
</div>
<div class="tab-content">