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