mirror of
https://github.com/Karaka-Management/oms-SalesAnalysis.git
synced 2026-01-11 19:38:39 +00:00
bump
This commit is contained in:
parent
680ef21f21
commit
67416e99c1
|
|
@ -34,7 +34,7 @@
|
||||||
"type": 3,
|
"type": 3,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "Item",
|
"name": "Item",
|
||||||
"uri": "{/base}/sales/analysis/item",
|
"uri": "{/base}/sales/analysis/item?{?}",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 5,
|
"order": 5,
|
||||||
|
|
@ -64,7 +64,7 @@
|
||||||
"type": 3,
|
"type": 3,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "Bill",
|
"name": "Bill",
|
||||||
"uri": "{/base}/sales/analysis/bill",
|
"uri": "{/base}/sales/analysis/bill?{?}",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 15,
|
"order": 15,
|
||||||
|
|
|
||||||
|
|
@ -56,9 +56,9 @@ final class BackendController extends Controller
|
||||||
$head = $response->data['Content']->head;
|
$head = $response->data['Content']->head;
|
||||||
$nonce = $this->app->appSettings->getOption('script-nonce');
|
$nonce = $this->app->appSettings->getOption('script-nonce');
|
||||||
|
|
||||||
$head->addAsset(AssetType::CSS, 'Resources/chartjs/chart.css');
|
$head->addAsset(AssetType::CSS, 'Resources/chartjs/chart.css?v=' . $this->app->version);
|
||||||
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/chart.js', ['nonce' => $nonce]);
|
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/chart.js?v=' . $this->app->version, ['nonce' => $nonce]);
|
||||||
$head->addAsset(AssetType::JSLATE, 'Modules/SalesAnalysis/Controller/Controller.js', ['nonce' => $nonce, 'type' => 'module']);
|
$head->addAsset(AssetType::JSLATE, 'Modules/SalesAnalysis/Controller/Controller.js?v=' . self::VERSION, ['nonce' => $nonce, 'type' => 'module']);
|
||||||
|
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/SalesAnalysis/Theme/Backend/analysis-overview-dashboard');
|
$view->setTemplate('/Modules/SalesAnalysis/Theme/Backend/analysis-overview-dashboard');
|
||||||
|
|
@ -160,10 +160,10 @@ final class BackendController extends Controller
|
||||||
$head = $response->data['Content']->head;
|
$head = $response->data['Content']->head;
|
||||||
$nonce = $this->app->appSettings->getOption('script-nonce');
|
$nonce = $this->app->appSettings->getOption('script-nonce');
|
||||||
|
|
||||||
$head->addAsset(AssetType::CSS, 'Resources/chartjs/chart.css');
|
$head->addAsset(AssetType::CSS, 'Resources/chartjs/chart.css?v=' . $this->app->version);
|
||||||
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/chart.js', ['nonce' => $nonce]);
|
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/chart.js?v=' . $this->app->version, ['nonce' => $nonce]);
|
||||||
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/plugins/chartjs-chart-geo.js', ['nonce' => $nonce]);
|
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/plugins/chartjs-chart-geo.js?v=' . self::VERSION, ['nonce' => $nonce]);
|
||||||
$head->addAsset(AssetType::JSLATE, 'Modules/SalesAnalysis/Controller/Controller.js', ['nonce' => $nonce, 'type' => 'module']);
|
$head->addAsset(AssetType::JSLATE, 'Modules/SalesAnalysis/Controller/Controller.js?v=' . self::VERSION, ['nonce' => $nonce, 'type' => 'module']);
|
||||||
|
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/SalesAnalysis/Theme/Backend/analysis-region');
|
$view->setTemplate('/Modules/SalesAnalysis/Theme/Backend/analysis-region');
|
||||||
|
|
@ -349,9 +349,9 @@ final class BackendController extends Controller
|
||||||
$head = $response->data['Content']->head;
|
$head = $response->data['Content']->head;
|
||||||
$nonce = $this->app->appSettings->getOption('script-nonce');
|
$nonce = $this->app->appSettings->getOption('script-nonce');
|
||||||
|
|
||||||
$head->addAsset(AssetType::CSS, 'Resources/chartjs/chart.css');
|
$head->addAsset(AssetType::CSS, 'Resources/chartjs/chart.css?v=' . $this->app->version);
|
||||||
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/chart.js', ['nonce' => $nonce]);
|
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/chart.js?v=' . $this->app->version, ['nonce' => $nonce]);
|
||||||
$head->addAsset(AssetType::JSLATE, 'Modules/SalesAnalysis/Controller/Controller.js', ['nonce' => $nonce, 'type' => 'module']);
|
$head->addAsset(AssetType::JSLATE, 'Modules/SalesAnalysis/Controller/Controller.js?v=' . self::VERSION, ['nonce' => $nonce, 'type' => 'module']);
|
||||||
|
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/SalesAnalysis/Theme/Backend/analysis-bill');
|
$view->setTemplate('/Modules/SalesAnalysis/Theme/Backend/analysis-bill');
|
||||||
|
|
@ -377,9 +377,9 @@ final class BackendController extends Controller
|
||||||
$head = $response->data['Content']->head;
|
$head = $response->data['Content']->head;
|
||||||
$nonce = $this->app->appSettings->getOption('script-nonce');
|
$nonce = $this->app->appSettings->getOption('script-nonce');
|
||||||
|
|
||||||
$head->addAsset(AssetType::CSS, 'Resources/chartjs/chart.css');
|
$head->addAsset(AssetType::CSS, 'Resources/chartjs/chart.css?v=' . $this->app->version);
|
||||||
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/chart.js', ['nonce' => $nonce]);
|
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/chart.js?v=' . $this->app->version, ['nonce' => $nonce]);
|
||||||
$head->addAsset(AssetType::JSLATE, 'Modules/SalesAnalysis/Controller/Controller.js', ['nonce' => $nonce, 'type' => 'module']);
|
$head->addAsset(AssetType::JSLATE, 'Modules/SalesAnalysis/Controller/Controller.js?v=' . self::VERSION, ['nonce' => $nonce, 'type' => 'module']);
|
||||||
|
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/SalesAnalysis/Theme/Backend/analysis-rep');
|
$view->setTemplate('/Modules/SalesAnalysis/Theme/Backend/analysis-rep');
|
||||||
|
|
@ -461,10 +461,10 @@ final class BackendController extends Controller
|
||||||
$head = $response->data['Content']->head;
|
$head = $response->data['Content']->head;
|
||||||
$nonce = $this->app->appSettings->getOption('script-nonce');
|
$nonce = $this->app->appSettings->getOption('script-nonce');
|
||||||
|
|
||||||
$head->addAsset(AssetType::CSS, 'Resources/chartjs/chart.css');
|
$head->addAsset(AssetType::CSS, 'Resources/chartjs/chart.css?v=' . $this->app->version);
|
||||||
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/chart.js', ['nonce' => $nonce]);
|
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/chart.js?v=' . $this->app->version, ['nonce' => $nonce]);
|
||||||
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/plugins/chartjs-chart-geo.js', ['nonce' => $nonce]);
|
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/plugins/chartjs-chart-geo.js?v=' . self::VERSION, ['nonce' => $nonce]);
|
||||||
$head->addAsset(AssetType::JSLATE, 'Modules/SalesAnalysis/Controller/Controller.js', ['nonce' => $nonce, 'type' => 'module']);
|
$head->addAsset(AssetType::JSLATE, 'Modules/SalesAnalysis/Controller/Controller.js?v=' . self::VERSION, ['nonce' => $nonce, 'type' => 'module']);
|
||||||
|
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/SalesAnalysis/Theme/Backend/analysis-client');
|
$view->setTemplate('/Modules/SalesAnalysis/Theme/Backend/analysis-client');
|
||||||
|
|
@ -636,9 +636,9 @@ final class BackendController extends Controller
|
||||||
$head = $response->data['Content']->head;
|
$head = $response->data['Content']->head;
|
||||||
$nonce = $this->app->appSettings->getOption('script-nonce');
|
$nonce = $this->app->appSettings->getOption('script-nonce');
|
||||||
|
|
||||||
$head->addAsset(AssetType::CSS, 'Resources/chartjs/chart.css');
|
$head->addAsset(AssetType::CSS, 'Resources/chartjs/chart.css?v=' . $this->app->version);
|
||||||
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/chart.js', ['nonce' => $nonce]);
|
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/chart.js?v=' . $this->app->version, ['nonce' => $nonce]);
|
||||||
$head->addAsset(AssetType::JSLATE, 'Modules/SalesAnalysis/Controller/Controller.js', ['nonce' => $nonce, 'type' => 'module']);
|
$head->addAsset(AssetType::JSLATE, 'Modules/SalesAnalysis/Controller/Controller.js?v=' . self::VERSION, ['nonce' => $nonce, 'type' => 'module']);
|
||||||
|
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/SalesAnalysis/Theme/Backend/analysis-item');
|
$view->setTemplate('/Modules/SalesAnalysis/Theme/Backend/analysis-item');
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\SalesAnalysis\Models;
|
namespace Modules\SalesAnalysis\Models;
|
||||||
|
|
||||||
|
use Modules\Billing\Models\BillTransferType;
|
||||||
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
||||||
use phpOMS\DataStorage\Database\Query\Builder;
|
use phpOMS\DataStorage\Database\Query\Builder;
|
||||||
use phpOMS\Stdlib\Base\SmartDateTime;
|
use phpOMS\Stdlib\Base\SmartDateTime;
|
||||||
|
|
@ -64,7 +65,8 @@ class ClientMapper extends DataMapperFactory
|
||||||
LEFT JOIN clientmgmt_attr_value_l11n
|
LEFT JOIN clientmgmt_attr_value_l11n
|
||||||
ON clientmgmt_attr_value_id = clientmgmt_attr_value_l11n_value AND clientmgmt_attr_value_l11n_lang = \'' . $language . '\'
|
ON clientmgmt_attr_value_id = clientmgmt_attr_value_l11n_value AND clientmgmt_attr_value_l11n_lang = \'' . $language . '\'
|
||||||
WHERE
|
WHERE
|
||||||
billing_bill_performance_date >= \'' . $startComparison->format('Y-m-d') . '\'
|
billing_bill_type = ' . BillTransferType::SALES . '
|
||||||
|
AND billing_bill_performance_date >= \'' . $startComparison->format('Y-m-d') . '\'
|
||||||
AND billing_bill_performance_date <= \'' . $endCurrent->format('Y-m-d') . '\'
|
AND billing_bill_performance_date <= \'' . $endCurrent->format('Y-m-d') . '\'
|
||||||
AND clientmgmt_attr_type_name IN (\'segment\', \'section\', \'client_group\', \'client_type\')
|
AND clientmgmt_attr_type_name IN (\'segment\', \'section\', \'client_group\', \'client_type\')
|
||||||
GROUP BY
|
GROUP BY
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\SalesAnalysis\Models;
|
namespace Modules\SalesAnalysis\Models;
|
||||||
|
|
||||||
|
use Modules\Billing\Models\BillTransferType;
|
||||||
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
||||||
use phpOMS\DataStorage\Database\Query\Builder;
|
use phpOMS\DataStorage\Database\Query\Builder;
|
||||||
use phpOMS\Stdlib\Base\SmartDateTime;
|
use phpOMS\Stdlib\Base\SmartDateTime;
|
||||||
|
|
@ -46,7 +47,8 @@ class GeneralMapper extends DataMapperFactory
|
||||||
SUM(billing_bill_netprofit) as netprofit
|
SUM(billing_bill_netprofit) as netprofit
|
||||||
FROM billing_bill
|
FROM billing_bill
|
||||||
WHERE
|
WHERE
|
||||||
billing_bill_performance_date >= \'' . $startComparison->format('Y-m-d') . '\'
|
billing_bill_type = ' . BillTransferType::SALES . '
|
||||||
|
AND billing_bill_performance_date >= \'' . $startComparison->format('Y-m-d') . '\'
|
||||||
AND billing_bill_performance_date <= \'' . $endCurrent->format('Y-m-d') . '\'
|
AND billing_bill_performance_date <= \'' . $endCurrent->format('Y-m-d') . '\'
|
||||||
GROUP BY
|
GROUP BY
|
||||||
YEAR(billing_bill_performance_date),
|
YEAR(billing_bill_performance_date),
|
||||||
|
|
@ -135,7 +137,8 @@ class GeneralMapper extends DataMapperFactory
|
||||||
SUM(billing_bill_netprofit) as netprofit
|
SUM(billing_bill_netprofit) as netprofit
|
||||||
FROM billing_bill
|
FROM billing_bill
|
||||||
WHERE
|
WHERE
|
||||||
billing_bill_performance_date >= \'' . $historyStart->format('Y-m-d') . '\'
|
billing_bill_type = ' . BillTransferType::SALES . '
|
||||||
|
AND billing_bill_performance_date >= \'' . $historyStart->format('Y-m-d') . '\'
|
||||||
AND billing_bill_performance_date <= \'' . $endCurrent->format('Y-m-d') . '\'
|
AND billing_bill_performance_date <= \'' . $endCurrent->format('Y-m-d') . '\'
|
||||||
GROUP BY
|
GROUP BY
|
||||||
YEAR(billing_bill_performance_date),
|
YEAR(billing_bill_performance_date),
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\SalesAnalysis\Models;
|
namespace Modules\SalesAnalysis\Models;
|
||||||
|
|
||||||
|
use Modules\Billing\Models\BillTransferType;
|
||||||
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
||||||
use phpOMS\DataStorage\Database\Query\Builder;
|
use phpOMS\DataStorage\Database\Query\Builder;
|
||||||
use phpOMS\Stdlib\Base\SmartDateTime;
|
use phpOMS\Stdlib\Base\SmartDateTime;
|
||||||
|
|
@ -66,7 +67,8 @@ class ItemMapper extends DataMapperFactory
|
||||||
LEFT JOIN itemmgmt_attr_value_l11n
|
LEFT JOIN itemmgmt_attr_value_l11n
|
||||||
ON itemmgmt_attr_value_id = itemmgmt_attr_value_l11n_value AND itemmgmt_attr_value_l11n_lang = \'' . $language . '\'
|
ON itemmgmt_attr_value_id = itemmgmt_attr_value_l11n_value AND itemmgmt_attr_value_l11n_lang = \'' . $language . '\'
|
||||||
WHERE
|
WHERE
|
||||||
billing_bill_performance_date >= \'' . $startComparison->format('Y-m-d') . '\'
|
billing_bill_type = ' . BillTransferType::SALES . '
|
||||||
|
AND billing_bill_performance_date >= \'' . $startComparison->format('Y-m-d') . '\'
|
||||||
AND billing_bill_performance_date <= \'' . $endCurrent->format('Y-m-d') . '\'
|
AND billing_bill_performance_date <= \'' . $endCurrent->format('Y-m-d') . '\'
|
||||||
AND itemmgmt_attr_type_name IN (\'segment\', \'section\', \'product_group\', \'product_type\')
|
AND itemmgmt_attr_type_name IN (\'segment\', \'section\', \'product_group\', \'product_type\')
|
||||||
GROUP BY
|
GROUP BY
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\SalesAnalysis\Models;
|
namespace Modules\SalesAnalysis\Models;
|
||||||
|
|
||||||
|
use Modules\Billing\Models\BillTransferType;
|
||||||
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
||||||
use phpOMS\DataStorage\Database\Query\Builder;
|
use phpOMS\DataStorage\Database\Query\Builder;
|
||||||
use phpOMS\Localization\ISO3166TwoEnum;
|
use phpOMS\Localization\ISO3166TwoEnum;
|
||||||
|
|
@ -53,7 +54,8 @@ class RegionMapper extends DataMapperFactory
|
||||||
LEFT JOIN address
|
LEFT JOIN address
|
||||||
ON clientmgmt_client_address = address_id
|
ON clientmgmt_client_address = address_id
|
||||||
WHERE
|
WHERE
|
||||||
billing_bill_performance_date >= \'' . $start->format('Y-m-d') . '\'
|
billing_bill_type = ' . BillTransferType::SALES . '
|
||||||
|
AND billing_bill_performance_date >= \'' . $start->format('Y-m-d') . '\'
|
||||||
AND billing_bill_performance_date <= \'' . $end->format('Y-m-d') . '\'
|
AND billing_bill_performance_date <= \'' . $end->format('Y-m-d') . '\'
|
||||||
GROUP BY
|
GROUP BY
|
||||||
address_country,
|
address_country,
|
||||||
|
|
@ -129,7 +131,8 @@ class RegionMapper extends DataMapperFactory
|
||||||
LEFT JOIN address
|
LEFT JOIN address
|
||||||
ON clientmgmt_client_address = address_id
|
ON clientmgmt_client_address = address_id
|
||||||
WHERE
|
WHERE
|
||||||
billing_bill_performance_date >= \'' . $historyStart->format('Y-m-d') . '\'
|
billing_bill_type = ' . BillTransferType::SALES . '
|
||||||
|
AND billing_bill_performance_date >= \'' . $historyStart->format('Y-m-d') . '\'
|
||||||
AND billing_bill_performance_date <= \'' . $endCurrent->format('Y-m-d') . '\'
|
AND billing_bill_performance_date <= \'' . $endCurrent->format('Y-m-d') . '\'
|
||||||
GROUP BY
|
GROUP BY
|
||||||
address_country,
|
address_country,
|
||||||
|
|
@ -206,7 +209,8 @@ class RegionMapper extends DataMapperFactory
|
||||||
LEFT JOIN address
|
LEFT JOIN address
|
||||||
ON clientmgmt_client_address = address_id
|
ON clientmgmt_client_address = address_id
|
||||||
WHERE
|
WHERE
|
||||||
billing_bill_performance_date >= \'' . $startComparison->format('Y-m-d') . '\'
|
billing_bill_type = ' . BillTransferType::SALES . '
|
||||||
|
AND billing_bill_performance_date >= \'' . $startComparison->format('Y-m-d') . '\'
|
||||||
AND billing_bill_performance_date <= \'' . $endCurrent->format('Y-m-d') . '\'
|
AND billing_bill_performance_date <= \'' . $endCurrent->format('Y-m-d') . '\'
|
||||||
GROUP BY
|
GROUP BY
|
||||||
address_country,
|
address_country,
|
||||||
|
|
@ -308,8 +312,11 @@ class RegionMapper extends DataMapperFactory
|
||||||
LEFT JOIN address
|
LEFT JOIN address
|
||||||
ON clientmgmt_client_address = address_id
|
ON clientmgmt_client_address = address_id
|
||||||
WHERE
|
WHERE
|
||||||
billing_bill_performance_date >= \'' . $historyStart->format('Y-m-d') . '\'
|
billing_bill_type = ' . BillTransferType::SALES . '
|
||||||
|
AND billing_bill_performance_date >= \'' . $historyStart->format('Y-m-d') . '\'
|
||||||
AND billing_bill_performance_date <= \'' . $currentEnd->format('Y-m-d') . '\'
|
AND billing_bill_performance_date <= \'' . $currentEnd->format('Y-m-d') . '\'
|
||||||
|
GROUP BY
|
||||||
|
address_country, billing_bill_performance_date
|
||||||
ORDER BY
|
ORDER BY
|
||||||
billing_bill_performance_date ASC,
|
billing_bill_performance_date ASC,
|
||||||
address_country'
|
address_country'
|
||||||
|
|
@ -370,7 +377,8 @@ class RegionMapper extends DataMapperFactory
|
||||||
LEFT JOIN address
|
LEFT JOIN address
|
||||||
ON clientmgmt_client_address = address_id
|
ON clientmgmt_client_address = address_id
|
||||||
WHERE
|
WHERE
|
||||||
billing_bill_performance_date >= \'' . $startComparison->format('Y-m-d') . '\'
|
billing_bill_type = ' . BillTransferType::SALES . '
|
||||||
|
AND billing_bill_performance_date >= \'' . $startComparison->format('Y-m-d') . '\'
|
||||||
AND billing_bill_performance_date <= \'' . $endCurrent->format('Y-m-d') . '\'
|
AND billing_bill_performance_date <= \'' . $endCurrent->format('Y-m-d') . '\'
|
||||||
GROUP BY
|
GROUP BY
|
||||||
address_country,
|
address_country,
|
||||||
|
|
@ -494,6 +502,10 @@ class RegionMapper extends DataMapperFactory
|
||||||
|
|
||||||
public static function countryIntervalToRegion(array $countries, array $region, array $columns) : array
|
public static function countryIntervalToRegion(array $countries, array $region, array $columns) : array
|
||||||
{
|
{
|
||||||
|
if (empty($countries)) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
$count = \count(\reset($countries));
|
$count = \count(\reset($countries));
|
||||||
|
|
||||||
$tempStruct = [];
|
$tempStruct = [];
|
||||||
|
|
|
||||||
|
|
@ -15,31 +15,21 @@ declare(strict_types=1);
|
||||||
return ['SalesAnalysis' => [
|
return ['SalesAnalysis' => [
|
||||||
'ItemAttribute' => 'Item Attribute',
|
'ItemAttribute' => 'Item Attribute',
|
||||||
'ClientAttribute' => 'Client Attribute',
|
'ClientAttribute' => 'Client Attribute',
|
||||||
'SalesRegion' => 'Sales Region',
|
|
||||||
'Customers' => 'Customers',
|
|
||||||
'Months' => 'Months',
|
'Months' => 'Months',
|
||||||
'Total' => 'Total',
|
'Total' => 'Total',
|
||||||
'Year' => 'Year',
|
'Year' => 'Year',
|
||||||
'Month' => 'Month',
|
'Month' => 'Month',
|
||||||
'A' => 'A',
|
|
||||||
'PY' => 'PY',
|
|
||||||
'B' => 'B',
|
|
||||||
'All' => 'All',
|
'All' => 'All',
|
||||||
'New' => 'New',
|
'New' => 'New',
|
||||||
'Lost' => 'Lost',
|
'Lost' => 'Lost',
|
||||||
'Product' => 'Product',
|
|
||||||
'Continent' => 'Continent',
|
'Continent' => 'Continent',
|
||||||
'SalesPY' => 'Sales PY',
|
'SalesPY' => 'Sales PY',
|
||||||
'SalesB' => 'Sales B',
|
|
||||||
'SalesA' => 'Sales A',
|
'SalesA' => 'Sales A',
|
||||||
'ProfitPY' => 'Profit PY',
|
'ProfitPY' => 'Profit PY',
|
||||||
'ProfitB' => 'Profit B',
|
|
||||||
'ProfitA' => 'Profit A',
|
'ProfitA' => 'Profit A',
|
||||||
'DiffPY' => 'Δ PY',
|
'DiffPY' => 'Δ PY',
|
||||||
'DiffB' => 'Δ B',
|
|
||||||
'Data' => 'Data',
|
'Data' => 'Data',
|
||||||
'Actual' => 'Actual',
|
'Actual' => 'Actual',
|
||||||
'Budget' => 'Budget',
|
|
||||||
'Segment' => 'Segment',
|
'Segment' => 'Segment',
|
||||||
'Section' => 'Section',
|
'Section' => 'Section',
|
||||||
'Group' => 'Group',
|
'Group' => 'Group',
|
||||||
|
|
@ -49,7 +39,6 @@ return ['SalesAnalysis' => [
|
||||||
'Category' => 'Category',
|
'Category' => 'Category',
|
||||||
'General' => 'General',
|
'General' => 'General',
|
||||||
'MTD' => 'MTD',
|
'MTD' => 'MTD',
|
||||||
'Other' => 'Other',
|
|
||||||
'YTD' => 'YTD',
|
'YTD' => 'YTD',
|
||||||
'GrossProfit' => 'Gross Profit',
|
'GrossProfit' => 'Gross Profit',
|
||||||
'SalesProfit' => 'Sales / Profit',
|
'SalesProfit' => 'Sales / Profit',
|
||||||
|
|
@ -61,55 +50,18 @@ return ['SalesAnalysis' => [
|
||||||
'Sales' => 'Sales',
|
'Sales' => 'Sales',
|
||||||
'Client' => 'Client',
|
'Client' => 'Client',
|
||||||
'Clients' => 'Clients',
|
'Clients' => 'Clients',
|
||||||
'Item' => 'Item',
|
|
||||||
'World' => 'World',
|
'World' => 'World',
|
||||||
'Africa' => 'Africa',
|
|
||||||
'America' => 'America',
|
|
||||||
'DomesticExport' => 'Domestic & Export',
|
'DomesticExport' => 'Domestic & Export',
|
||||||
'Oceania' => 'Oceania',
|
|
||||||
'Analysis' => 'Analysis',
|
|
||||||
'Asia' => 'Asia',
|
|
||||||
'Change' => 'Change',
|
|
||||||
'ChangeAcc' => 'Change Acc.',
|
|
||||||
'Charts' => 'Charts',
|
|
||||||
'Comparison' => 'Comparison',
|
'Comparison' => 'Comparison',
|
||||||
'Continents' => 'Continents',
|
'Continents' => 'Continents',
|
||||||
'CurrentMonth' => 'Current Month',
|
|
||||||
'CurrentYear' => 'Current Year',
|
|
||||||
'CurrentYearAcc' => 'Current Year Acc.',
|
|
||||||
'Customers' => 'Customers',
|
|
||||||
'Data' => 'Data',
|
'Data' => 'Data',
|
||||||
'Database' => 'Database',
|
|
||||||
'Day' => 'Day',
|
|
||||||
'Developed' => 'Developed',
|
|
||||||
'Developed/Undeveloped' => 'Developed/Undeveloped',
|
|
||||||
'Development' => 'Development',
|
|
||||||
'Domestic' => 'Domestic',
|
'Domestic' => 'Domestic',
|
||||||
'Domestic/Export' => 'Domestic/Export',
|
|
||||||
'Employees' => 'Employees',
|
|
||||||
'Europe' => 'Europe',
|
|
||||||
'Export' => 'Export',
|
'Export' => 'Export',
|
||||||
'Forecast' => 'Forecast',
|
|
||||||
'Frequency' => 'Frequency',
|
|
||||||
'Interval' => 'Interval',
|
|
||||||
'Invoices' => 'Invoices',
|
|
||||||
'LastMonth' => 'Last Month',
|
|
||||||
'LastYear' => 'Last Year',
|
|
||||||
'LastYearAcc' => 'Last Year Acc.',
|
|
||||||
'Marketing' => 'Marketing',
|
|
||||||
'Misc' => 'Misc',
|
|
||||||
'Month' => 'Month',
|
'Month' => 'Month',
|
||||||
'Current' => 'Current',
|
'Current' => 'Current',
|
||||||
'Analyze' => 'Analyze',
|
'Analyze' => 'Analyze',
|
||||||
'Overview' => 'Overview',
|
|
||||||
'Products' => 'Products',
|
|
||||||
'Regions' => 'Regions',
|
'Regions' => 'Regions',
|
||||||
'To' => 'To',
|
|
||||||
'Today' => 'Today',
|
|
||||||
'Top10' => 'Top 10',
|
|
||||||
'Total' => 'Total',
|
'Total' => 'Total',
|
||||||
'Type' => 'Type',
|
'Type' => 'Type',
|
||||||
'Undeveloped' => 'Undeveloped',
|
|
||||||
'Year' => 'Year',
|
'Year' => 'Year',
|
||||||
'Yesterday' => 'Yesterday',
|
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
use phpOMS\Localization\ISO3166NameEnum;
|
use phpOMS\Localization\ISO3166NameEnum;
|
||||||
|
use phpOMS\Stdlib\Base\FloatInt;
|
||||||
use phpOMS\Uri\UriFactory;
|
use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -60,7 +61,7 @@ echo $this->data['nav']->render();
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-lg-4">
|
<div class="col-xs-12 col-lg-4">
|
||||||
<section class="portlet highlight-3">
|
<section class="portlet hl-3">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Actual'); ?></div>
|
<div class="portlet-head"><?= $this->getHtml('Actual'); ?></div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
@ -167,7 +168,7 @@ echo $this->data['nav']->render();
|
||||||
<?php
|
<?php
|
||||||
$temp = [];
|
$temp = [];
|
||||||
for ($i = 0; $i < 12; ++$i) {
|
for ($i = 0; $i < 12; ++$i) {
|
||||||
$temp[] = ($sales[1][$i]['net_sales'] ?? 0) / 10000;
|
$temp[] = ($sales[1][$i]['net_sales'] ?? 0) / FloatInt::DIVISOR;
|
||||||
}
|
}
|
||||||
echo \implode(',', $temp);
|
echo \implode(',', $temp);
|
||||||
?>
|
?>
|
||||||
|
|
@ -184,7 +185,7 @@ echo $this->data['nav']->render();
|
||||||
<?php
|
<?php
|
||||||
$temp = [];
|
$temp = [];
|
||||||
for ($i = 0; $i < 12; ++$i) {
|
for ($i = 0; $i < 12; ++$i) {
|
||||||
$temp[] = ($sales[2][$i]['net_sales'] ?? 0) / 10000;
|
$temp[] = ($sales[2][$i]['net_sales'] ?? 0) / FloatInt::DIVISOR;
|
||||||
}
|
}
|
||||||
echo \implode(',', $temp);
|
echo \implode(',', $temp);
|
||||||
?>
|
?>
|
||||||
|
|
@ -270,7 +271,7 @@ echo $this->data['nav']->render();
|
||||||
<td><?= $this->getCurrency($sum1); ?>
|
<td><?= $this->getCurrency($sum1); ?>
|
||||||
<td><?= $this->getCurrency($sum2); ?>
|
<td><?= $this->getCurrency($sum2); ?>
|
||||||
<td><?= \sprintf('%.2f', $sum3 == 0 ? 0 : $sum1 / $sum3); ?> %
|
<td><?= \sprintf('%.2f', $sum3 == 0 ? 0 : $sum1 / $sum3); ?> %
|
||||||
<td><?= \sprintf('%.2f', $sum3 == 0 ? 0 : $sum2 / $sum4); ?> %
|
<td><?= \sprintf('%.2f', $sum4 == 0 ? 0 : $sum2 / $sum4); ?> %
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -331,7 +332,7 @@ echo $this->data['nav']->render();
|
||||||
<?php
|
<?php
|
||||||
$temp = [];
|
$temp = [];
|
||||||
for ($i = 1; $i < 11; ++$i) {
|
for ($i = 1; $i < 11; ++$i) {
|
||||||
$temp[] = $sales[$i]['net_sales'] / 10000;
|
$temp[] = $sales[$i]['net_sales'] / FloatInt::DIVISOR;
|
||||||
}
|
}
|
||||||
echo \implode(',', $temp);
|
echo \implode(',', $temp);
|
||||||
?>
|
?>
|
||||||
|
|
@ -396,8 +397,8 @@ echo $this->data['nav']->render();
|
||||||
foreach ($sales as $values) :
|
foreach ($sales as $values) :
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= (string) $values['year']; ?>
|
<td>
|
||||||
<td><?= $this->getCurrency(((int) $values['net_sales']) / 10000); ?>
|
<td><?= $this->getCurrency(((int) $values['net_sales']) / FloatInt::DIVISOR); ?>
|
||||||
<td><?= \sprintf('%.2f', $values['net_sales'] == 0 ? 0 : $values['net_profit'] * 100 / $values['net_sales']); ?> %
|
<td><?= \sprintf('%.2f', $values['net_sales'] == 0 ? 0 : $values['net_profit'] * 100 / $values['net_sales']); ?> %
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ declare(strict_types=1);
|
||||||
|
|
||||||
use phpOMS\Localization\ISO3166CharEnum;
|
use phpOMS\Localization\ISO3166CharEnum;
|
||||||
use phpOMS\Localization\ISO3166NameEnum;
|
use phpOMS\Localization\ISO3166NameEnum;
|
||||||
|
use phpOMS\Stdlib\Base\FloatInt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \phpOMS\Views\View $this
|
* @var \phpOMS\Views\View $this
|
||||||
|
|
@ -50,7 +51,7 @@ echo $this->data['nav']->render();
|
||||||
<?php
|
<?php
|
||||||
$temp = [];
|
$temp = [];
|
||||||
foreach ($this->data['ytdAClientCountry'] as $lang => $values) {
|
foreach ($this->data['ytdAClientCountry'] as $lang => $values) {
|
||||||
$temp[] = '{"id": "' . ISO3166CharEnum::getBy2Code($lang) . '", "value": ' . ($values['net_sales'] / 10000) . '}';
|
$temp[] = '{"id": "' . ISO3166CharEnum::getBy2Code($lang) . '", "value": ' . ($values['net_sales'] / FloatInt::DIVISOR) . '}';
|
||||||
} ?>
|
} ?>
|
||||||
<?= \implode(',', $temp); ?>
|
<?= \implode(',', $temp); ?>
|
||||||
]
|
]
|
||||||
|
|
@ -202,7 +203,7 @@ echo $this->data['nav']->render();
|
||||||
<?php
|
<?php
|
||||||
$temp = [];
|
$temp = [];
|
||||||
for ($i = 1; $i < 13; ++$i) {
|
for ($i = 1; $i < 13; ++$i) {
|
||||||
$temp[] = ($sales[1][$this->data['domestic']][$i]['net_sales'] ?? 0) / 10000;
|
$temp[] = ($sales[1][$this->data['domestic']][$i]['net_sales'] ?? 0) / FloatInt::DIVISOR;
|
||||||
}
|
}
|
||||||
echo \implode(',', $temp);
|
echo \implode(',', $temp);
|
||||||
?>
|
?>
|
||||||
|
|
@ -219,7 +220,7 @@ echo $this->data['nav']->render();
|
||||||
<?php
|
<?php
|
||||||
$temp = [];
|
$temp = [];
|
||||||
for ($i = 1; $i < 13; ++$i) {
|
for ($i = 1; $i < 13; ++$i) {
|
||||||
$temp[] = ($sales[2][$this->data['domestic']][$i]['net_sales'] ?? 0) / 10000;
|
$temp[] = ($sales[2][$this->data['domestic']][$i]['net_sales'] ?? 0) / FloatInt::DIVISOR;
|
||||||
}
|
}
|
||||||
echo \implode(',', $temp);
|
echo \implode(',', $temp);
|
||||||
?>
|
?>
|
||||||
|
|
@ -305,7 +306,7 @@ echo $this->data['nav']->render();
|
||||||
<td><?= $this->getCurrency($sum1); ?>
|
<td><?= $this->getCurrency($sum1); ?>
|
||||||
<td><?= $this->getCurrency($sum2); ?>
|
<td><?= $this->getCurrency($sum2); ?>
|
||||||
<td><?= \sprintf('%.2f', $sum3 == 0 ? 0 : $sum1 / $sum3); ?> %
|
<td><?= \sprintf('%.2f', $sum3 == 0 ? 0 : $sum1 / $sum3); ?> %
|
||||||
<td><?= \sprintf('%.2f', $sum3 == 0 ? 0 : $sum2 / $sum4); ?> %
|
<td><?= \sprintf('%.2f', $sum4 == 0 ? 0 : $sum2 / $sum4); ?> %
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -392,7 +393,7 @@ echo $this->data['nav']->render();
|
||||||
<?php
|
<?php
|
||||||
$temp = [];
|
$temp = [];
|
||||||
for ($i = 1; $i < 13; ++$i) {
|
for ($i = 1; $i < 13; ++$i) {
|
||||||
$temp[] = ($sales[1]['Other'][$i]['net_sales'] ?? 0) / 10000;
|
$temp[] = ($sales[1]['Other'][$i]['net_sales'] ?? 0) / FloatInt::DIVISOR;
|
||||||
}
|
}
|
||||||
echo \implode(',', $temp);
|
echo \implode(',', $temp);
|
||||||
?>
|
?>
|
||||||
|
|
@ -409,7 +410,7 @@ echo $this->data['nav']->render();
|
||||||
<?php
|
<?php
|
||||||
$temp = [];
|
$temp = [];
|
||||||
for ($i = 1; $i < 13; ++$i) {
|
for ($i = 1; $i < 13; ++$i) {
|
||||||
$temp[] = ($sales[2]['Other'][$i]['net_sales'] ?? 0) / 10000;
|
$temp[] = ($sales[2]['Other'][$i]['net_sales'] ?? 0) / FloatInt::DIVISOR;
|
||||||
}
|
}
|
||||||
echo \implode(',', $temp);
|
echo \implode(',', $temp);
|
||||||
?>
|
?>
|
||||||
|
|
@ -495,7 +496,7 @@ echo $this->data['nav']->render();
|
||||||
<td><?= $this->getCurrency($sum1); ?>
|
<td><?= $this->getCurrency($sum1); ?>
|
||||||
<td><?= $this->getCurrency($sum2); ?>
|
<td><?= $this->getCurrency($sum2); ?>
|
||||||
<td><?= \sprintf('%.2f', $sum3 == 0 ? 0 : $sum1 / $sum3); ?> %
|
<td><?= \sprintf('%.2f', $sum3 == 0 ? 0 : $sum1 / $sum3); ?> %
|
||||||
<td><?= \sprintf('%.2f', $sum3 == 0 ? 0 : $sum2 / $sum4); ?> %
|
<td><?= \sprintf('%.2f', $sum4 == 0 ? 0 : $sum2 / $sum4); ?> %
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -520,7 +521,7 @@ echo $this->data['nav']->render();
|
||||||
<?php
|
<?php
|
||||||
$temp = [];
|
$temp = [];
|
||||||
foreach ($this->data['ytdADomesticExport'] as $values) {
|
foreach ($this->data['ytdADomesticExport'] as $values) {
|
||||||
$temp[] = $values['net_sales'] / 10000;
|
$temp[] = $values['net_sales'] / FloatInt::DIVISOR;
|
||||||
}
|
}
|
||||||
echo \implode(',', $temp);
|
echo \implode(',', $temp);
|
||||||
?>
|
?>
|
||||||
|
|
@ -591,7 +592,7 @@ echo $this->data['nav']->render();
|
||||||
<?php
|
<?php
|
||||||
$temp = [];
|
$temp = [];
|
||||||
foreach ($values as $annual) {
|
foreach ($values as $annual) {
|
||||||
$temp[] = ((int) ($annual['net_sales'] ?? 0)) / 10000;
|
$temp[] = ((int) ($annual['net_sales'] ?? 0)) / FloatInt::DIVISOR;
|
||||||
}
|
}
|
||||||
echo \implode(',', $temp);
|
echo \implode(',', $temp);
|
||||||
?>
|
?>
|
||||||
|
|
@ -661,7 +662,7 @@ echo $this->data['nav']->render();
|
||||||
<?php
|
<?php
|
||||||
$temp = [];
|
$temp = [];
|
||||||
foreach ($this->data['ytdADomesticExport'] as $values) {
|
foreach ($this->data['ytdADomesticExport'] as $values) {
|
||||||
$temp[] = $values['net_profit'] / 10000;
|
$temp[] = $values['net_profit'] / FloatInt::DIVISOR;
|
||||||
}
|
}
|
||||||
echo \implode(',', $temp);
|
echo \implode(',', $temp);
|
||||||
?>
|
?>
|
||||||
|
|
@ -956,7 +957,7 @@ echo $this->data['nav']->render();
|
||||||
<?php
|
<?php
|
||||||
$temp = [];
|
$temp = [];
|
||||||
foreach ($this->data['ytdAContinent'] as $values) {
|
foreach ($this->data['ytdAContinent'] as $values) {
|
||||||
$temp[] = $values['net_sales'] / 10000;
|
$temp[] = $values['net_sales'] / FloatInt::DIVISOR;
|
||||||
}
|
}
|
||||||
echo \implode(',', $temp);
|
echo \implode(',', $temp);
|
||||||
?>
|
?>
|
||||||
|
|
@ -1027,7 +1028,7 @@ echo $this->data['nav']->render();
|
||||||
<?php
|
<?php
|
||||||
$temp = [];
|
$temp = [];
|
||||||
foreach ($values as $annual) {
|
foreach ($values as $annual) {
|
||||||
$temp[] = ((int) ($annual['net_sales'] ?? 0)) / 10000;
|
$temp[] = ((int) ($annual['net_sales'] ?? 0)) / FloatInt::DIVISOR;
|
||||||
}
|
}
|
||||||
echo \implode(',', $temp);
|
echo \implode(',', $temp);
|
||||||
?>
|
?>
|
||||||
|
|
@ -1097,7 +1098,7 @@ echo $this->data['nav']->render();
|
||||||
<?php
|
<?php
|
||||||
$temp = [];
|
$temp = [];
|
||||||
foreach ($this->data['ytdAContinent'] as $values) {
|
foreach ($this->data['ytdAContinent'] as $values) {
|
||||||
$temp[] = $values['net_profit'] / 10000;
|
$temp[] = $values['net_profit'] / FloatInt::DIVISOR;
|
||||||
}
|
}
|
||||||
echo \implode(',', $temp);
|
echo \implode(',', $temp);
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user