mirror of
https://github.com/Karaka-Management/oms-ClientManagement.git
synced 2026-02-12 14:58:43 +00:00
Automated formatting changes
This commit is contained in:
parent
fcecebe479
commit
0d7f429f00
|
|
@ -20,12 +20,12 @@ use Modules\ClientManagement\Models\ClientMapper;
|
||||||
use Modules\Media\Models\Media;
|
use Modules\Media\Models\Media;
|
||||||
use phpOMS\Asset\AssetType;
|
use phpOMS\Asset\AssetType;
|
||||||
use phpOMS\Contract\RenderableInterface;
|
use phpOMS\Contract\RenderableInterface;
|
||||||
|
use phpOMS\Localization\ISO3166NameEnum;
|
||||||
use phpOMS\Localization\Money;
|
use phpOMS\Localization\Money;
|
||||||
use phpOMS\Message\RequestAbstract;
|
use phpOMS\Message\RequestAbstract;
|
||||||
use phpOMS\Message\ResponseAbstract;
|
use phpOMS\Message\ResponseAbstract;
|
||||||
use phpOMS\Stdlib\Base\SmartDateTime;
|
use phpOMS\Stdlib\Base\SmartDateTime;
|
||||||
use phpOMS\Views\View;
|
use phpOMS\Views\View;
|
||||||
use phpOMS\Localization\ISO3166NameEnum;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClientManagement class.
|
* ClientManagement class.
|
||||||
|
|
@ -187,56 +187,51 @@ final class BackendController extends Controller
|
||||||
$view->setTemplate('/Modules/ClientManagement/Theme/Backend/client-analysis');
|
$view->setTemplate('/Modules/ClientManagement/Theme/Backend/client-analysis');
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1001602001, $request, $response));
|
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1001602001, $request, $response));
|
||||||
|
|
||||||
//
|
|
||||||
$monthlySalesCosts = [];
|
$monthlySalesCosts = [];
|
||||||
for ($i = 1; $i < 13; ++$i) {
|
for ($i = 1; $i < 13; ++$i) {
|
||||||
$monthlySalesCosts[] = [
|
$monthlySalesCosts[] = [
|
||||||
'net_sales' => $sales = \mt_rand(1200000000, 2000000000),
|
'net_sales' => $sales = \mt_rand(1200000000, 2000000000),
|
||||||
'net_costs' => (int) ($sales * \mt_rand(25, 55) / 100),
|
'net_costs' => (int) ($sales * \mt_rand(25, 55) / 100),
|
||||||
'year' => 2020,
|
'year' => 2020,
|
||||||
'month' => $i,
|
'month' => $i,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
$view->addData('monthlySalesCosts', $monthlySalesCosts);
|
$view->addData('monthlySalesCosts', $monthlySalesCosts);
|
||||||
|
|
||||||
//
|
|
||||||
$salesCustomer = [];
|
$salesCustomer = [];
|
||||||
for ($i = 1; $i < 13; ++$i) {
|
for ($i = 1; $i < 13; ++$i) {
|
||||||
$salesCustomer[] = [
|
$salesCustomer[] = [
|
||||||
'net_sales' => $sales = \mt_rand(1200000000, 2000000000),
|
'net_sales' => $sales = \mt_rand(1200000000, 2000000000),
|
||||||
'customers' => \mt_rand(200, 400),
|
'customers' => \mt_rand(200, 400),
|
||||||
'year' => 2020,
|
'year' => 2020,
|
||||||
'month' => $i,
|
'month' => $i,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
$view->addData('salesCustomer', $salesCustomer);
|
$view->addData('salesCustomer', $salesCustomer);
|
||||||
|
|
||||||
//
|
|
||||||
$customerRetention = [];
|
$customerRetention = [];
|
||||||
for ($i = 1; $i < 10; ++$i) {
|
for ($i = 1; $i < 10; ++$i) {
|
||||||
$customerRetention[] = [
|
$customerRetention[] = [
|
||||||
'customers' => \mt_rand(200, 400),
|
'customers' => \mt_rand(200, 400),
|
||||||
'year' => \date('y') - 9 + $i,
|
'year' => \date('y') - 9 + $i,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
$view->addData('customerRetention', $customerRetention);
|
$view->addData('customerRetention', $customerRetention);
|
||||||
|
|
||||||
//
|
|
||||||
$customerRegion = [
|
$customerRegion = [
|
||||||
'Europe' => (int) (\mt_rand(200, 400) / 4),
|
'Europe' => (int) (\mt_rand(200, 400) / 4),
|
||||||
'America' => (int) (\mt_rand(200, 400) / 4),
|
'America' => (int) (\mt_rand(200, 400) / 4),
|
||||||
'Asia' => (int) (\mt_rand(200, 400) / 4),
|
'Asia' => (int) (\mt_rand(200, 400) / 4),
|
||||||
'Africa' => (int) (\mt_rand(200, 400) / 4),
|
'Africa' => (int) (\mt_rand(200, 400) / 4),
|
||||||
'CIS' => (int) (\mt_rand(200, 400) / 4),
|
'CIS' => (int) (\mt_rand(200, 400) / 4),
|
||||||
'Other' => (int) (\mt_rand(200, 400) / 4),
|
'Other' => (int) (\mt_rand(200, 400) / 4),
|
||||||
];
|
];
|
||||||
|
|
||||||
$view->addData('customerRegion', $customerRegion);
|
$view->addData('customerRegion', $customerRegion);
|
||||||
|
|
||||||
//
|
|
||||||
$customersRep = [];
|
$customersRep = [];
|
||||||
for ($i = 1; $i < 13; ++$i) {
|
for ($i = 1; $i < 13; ++$i) {
|
||||||
$customersRep['Rep ' . $i] = [
|
$customersRep['Rep ' . $i] = [
|
||||||
|
|
@ -248,10 +243,9 @@ final class BackendController extends Controller
|
||||||
|
|
||||||
$view->addData('customersRep', $customersRep);
|
$view->addData('customersRep', $customersRep);
|
||||||
|
|
||||||
//
|
|
||||||
$customersCountry = [];
|
$customersCountry = [];
|
||||||
for ($i = 1; $i < 13; ++$i) {
|
for ($i = 1; $i < 13; ++$i) {
|
||||||
$country = ISO3166NameEnum::getRandom();
|
$country = ISO3166NameEnum::getRandom();
|
||||||
$customersCountry[\substr($country, 0, 20)] = [
|
$customersCountry[\substr($country, 0, 20)] = [
|
||||||
'customers' => (int) (\mt_rand(200, 400) / 12),
|
'customers' => (int) (\mt_rand(200, 400) / 12),
|
||||||
];
|
];
|
||||||
|
|
@ -261,7 +255,6 @@ final class BackendController extends Controller
|
||||||
|
|
||||||
$view->addData('customersCountry', $customersCountry);
|
$view->addData('customersCountry', $customersCountry);
|
||||||
|
|
||||||
//
|
|
||||||
$customerGroups = [];
|
$customerGroups = [];
|
||||||
for ($i = 1; $i < 7; ++$i) {
|
for ($i = 1; $i < 7; ++$i) {
|
||||||
$customerGroups['Group ' . $i] = [
|
$customerGroups['Group ' . $i] = [
|
||||||
|
|
@ -271,19 +264,17 @@ final class BackendController extends Controller
|
||||||
|
|
||||||
$view->addData('customerGroups', $customerGroups);
|
$view->addData('customerGroups', $customerGroups);
|
||||||
|
|
||||||
//
|
|
||||||
$salesRegion = [
|
$salesRegion = [
|
||||||
'Europe' => (int) (\mt_rand(1200000000, 2000000000) / 4),
|
'Europe' => (int) (\mt_rand(1200000000, 2000000000) / 4),
|
||||||
'America' => (int) (\mt_rand(1200000000, 2000000000) / 4),
|
'America' => (int) (\mt_rand(1200000000, 2000000000) / 4),
|
||||||
'Asia' => (int) (\mt_rand(1200000000, 2000000000) / 4),
|
'Asia' => (int) (\mt_rand(1200000000, 2000000000) / 4),
|
||||||
'Africa' => (int) (\mt_rand(1200000000, 2000000000) / 4),
|
'Africa' => (int) (\mt_rand(1200000000, 2000000000) / 4),
|
||||||
'CIS' => (int) (\mt_rand(1200000000, 2000000000) / 4),
|
'CIS' => (int) (\mt_rand(1200000000, 2000000000) / 4),
|
||||||
'Other' => (int) (\mt_rand(1200000000, 2000000000) / 4),
|
'Other' => (int) (\mt_rand(1200000000, 2000000000) / 4),
|
||||||
];
|
];
|
||||||
|
|
||||||
$view->addData('salesRegion', $salesRegion);
|
$view->addData('salesRegion', $salesRegion);
|
||||||
|
|
||||||
//
|
|
||||||
$salesRep = [];
|
$salesRep = [];
|
||||||
for ($i = 1; $i < 13; ++$i) {
|
for ($i = 1; $i < 13; ++$i) {
|
||||||
$salesRep['Rep ' . $i] = [
|
$salesRep['Rep ' . $i] = [
|
||||||
|
|
@ -295,10 +286,9 @@ final class BackendController extends Controller
|
||||||
|
|
||||||
$view->addData('salesRep', $salesRep);
|
$view->addData('salesRep', $salesRep);
|
||||||
|
|
||||||
//
|
|
||||||
$salesCountry = [];
|
$salesCountry = [];
|
||||||
for ($i = 1; $i < 13; ++$i) {
|
for ($i = 1; $i < 13; ++$i) {
|
||||||
$country = ISO3166NameEnum::getRandom();
|
$country = ISO3166NameEnum::getRandom();
|
||||||
$salesCountry[\substr($country, 0, 20)] = [
|
$salesCountry[\substr($country, 0, 20)] = [
|
||||||
'net_sales' => (int) (\mt_rand(1200000000, 2000000000) / 12),
|
'net_sales' => (int) (\mt_rand(1200000000, 2000000000) / 12),
|
||||||
];
|
];
|
||||||
|
|
@ -308,7 +298,6 @@ final class BackendController extends Controller
|
||||||
|
|
||||||
$view->addData('salesCountry', $salesCountry);
|
$view->addData('salesCountry', $salesCountry);
|
||||||
|
|
||||||
//
|
|
||||||
$salesGroups = [];
|
$salesGroups = [];
|
||||||
for ($i = 1; $i < 7; ++$i) {
|
for ($i = 1; $i < 7; ++$i) {
|
||||||
$salesGroups['Group ' . $i] = [
|
$salesGroups['Group ' . $i] = [
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
return ['Navigation' => [
|
return ['Navigation' => [
|
||||||
'Client' => 'Client',
|
'Client' => 'Client',
|
||||||
'Region' => 'Region',
|
'Region' => 'Region',
|
||||||
'SalesRep' => 'SalesRep',
|
'SalesRep' => 'SalesRep',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ echo $this->getData('nav')->render();
|
||||||
$sum2 += ((int) $values['customers']);
|
$sum2 += ((int) $values['customers']);
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $values['month'] . '/' . \substr((string) $values['year'], -2) ?>
|
<td><?= $values['month'] . '/' . \substr((string) $values['year'], -2); ?>
|
||||||
<td><?= (new Money(((int) $values['net_sales']) / 1000))->getCurrency(); ?>
|
<td><?= (new Money(((int) $values['net_sales']) / 1000))->getCurrency(); ?>
|
||||||
<td><?= ((int) $values['customers']); ?>
|
<td><?= ((int) $values['customers']); ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
@ -246,7 +246,7 @@ echo $this->getData('nav')->render();
|
||||||
$sum1 += ((int) $values['customers']);
|
$sum1 += ((int) $values['customers']);
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= \substr((string) $values['year'], -2) ?>
|
<td><?= \substr((string) $values['year'], -2); ?>
|
||||||
<td><?= ((int) $values['customers']); ?>
|
<td><?= ((int) $values['customers']); ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user