mirror of
https://github.com/Karaka-Management/oms-SalesAnalysis.git
synced 2026-01-11 11:28:41 +00:00
started with template fixes
This commit is contained in:
parent
d144dcc400
commit
065d2e2e37
0
Controller/ApiController.php
Normal file → Executable file
0
Controller/ApiController.php
Normal file → Executable file
|
|
@ -305,27 +305,31 @@ final class BackendController extends Controller
|
||||||
|
|
||||||
///
|
///
|
||||||
|
|
||||||
|
$regions = RegionEnum::getConstants();
|
||||||
|
unset($regions[\array_search('Export', $regions, true)]);
|
||||||
|
unset($regions[\array_search('Domestic', $regions, true)]);
|
||||||
|
|
||||||
$view->data['ytdARegions'] = RegionMapper::countryToRegion(
|
$view->data['ytdARegions'] = RegionMapper::countryToRegion(
|
||||||
$view->data['ytdAClientCountry'],
|
$view->data['ytdAClientCountry'],
|
||||||
RegionEnum::getConstants(),
|
$regions,
|
||||||
['net_sales', 'net_profit']
|
['net_sales', 'net_profit']
|
||||||
);
|
);
|
||||||
|
|
||||||
$view->data['ytdPYRegions'] = RegionMapper::countryToRegion(
|
$view->data['ytdPYRegions'] = RegionMapper::countryToRegion(
|
||||||
$view->data['ytdPYClientCountry'],
|
$view->data['ytdPYClientCountry'],
|
||||||
RegionEnum::getConstants(),
|
$regions,
|
||||||
['net_sales', 'net_profit']
|
['net_sales', 'net_profit']
|
||||||
);
|
);
|
||||||
|
|
||||||
$view->data['mtdARegions'] = RegionMapper::countryToRegion(
|
$view->data['mtdARegions'] = RegionMapper::countryToRegion(
|
||||||
$view->data['mtdAClientCountry'],
|
$view->data['mtdAClientCountry'],
|
||||||
RegionEnum::getConstants(),
|
$regions,
|
||||||
['net_sales', 'net_profit']
|
['net_sales', 'net_profit']
|
||||||
);
|
);
|
||||||
|
|
||||||
$view->data['mtdPYRegions'] = RegionMapper::countryToRegion(
|
$view->data['mtdPYRegions'] = RegionMapper::countryToRegion(
|
||||||
$view->data['mtdPYClientCountry'],
|
$view->data['mtdPYClientCountry'],
|
||||||
RegionEnum::getConstants(),
|
$regions,
|
||||||
['net_sales', 'net_profit']
|
['net_sales', 'net_profit']
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,11 @@ class ClientMapper extends DataMapperFactory
|
||||||
clientmgmt_attr_value_l11n_title,
|
clientmgmt_attr_value_l11n_title,
|
||||||
YEAR(billing_bill_performance_date) as salesyear,
|
YEAR(billing_bill_performance_date) as salesyear,
|
||||||
MONTH(billing_bill_performance_date) as salesmonth,
|
MONTH(billing_bill_performance_date) as salesmonth,
|
||||||
SUM(billing_bill_netsales) as netsales,
|
SUM(billing_bill_netsales * billing_type_transfer_sign) as netsales,
|
||||||
SUM(billing_bill_netprofit) as netprofit
|
SUM(billing_bill_netprofit * billing_type_transfer_sign) as netprofit
|
||||||
FROM billing_bill
|
FROM billing_bill
|
||||||
|
LEFT JOIN billing_type
|
||||||
|
ON billing_bill_type = billing_type_id
|
||||||
LEFT JOIN clientmgmt_client
|
LEFT JOIN clientmgmt_client
|
||||||
ON clientmgmt_client_id = billing_bill_client
|
ON clientmgmt_client_id = billing_bill_client
|
||||||
LEFT JOIN clientmgmt_client_attr
|
LEFT JOIN clientmgmt_client_attr
|
||||||
|
|
@ -69,7 +71,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_type = ' . BillTransferType::SALES . '
|
billing_type_transfer_type = ' . BillTransferType::SALES . '
|
||||||
|
AND billing_type_accounting = 1
|
||||||
AND billing_bill_performance_date >= \'' . $startComparison->format('Y-m-d') . '\'
|
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\')
|
||||||
|
|
|
||||||
|
|
@ -47,11 +47,14 @@ class GeneralMapper extends DataMapperFactory
|
||||||
'SELECT
|
'SELECT
|
||||||
YEAR(billing_bill_performance_date) as salesyear,
|
YEAR(billing_bill_performance_date) as salesyear,
|
||||||
MONTH(billing_bill_performance_date) as salesmonth,
|
MONTH(billing_bill_performance_date) as salesmonth,
|
||||||
SUM(billing_bill_netsales) as netsales,
|
SUM(billing_bill_netsales * billing_type_transfer_sign) as netsales,
|
||||||
SUM(billing_bill_netprofit) as netprofit
|
SUM(billing_bill_netprofit * billing_type_transfer_sign) as netprofit
|
||||||
FROM billing_bill
|
FROM billing_bill
|
||||||
|
LEFT JOIN billing_type
|
||||||
|
ON billing_bill_type = billing_type_id
|
||||||
WHERE
|
WHERE
|
||||||
billing_bill_type = ' . BillTransferType::SALES . '
|
billing_type_transfer_type = ' . BillTransferType::SALES . '
|
||||||
|
AND billing_type_accounting = 1
|
||||||
AND billing_bill_performance_date >= \'' . $startComparison->format('Y-m-d') . '\'
|
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
|
||||||
|
|
@ -59,7 +62,7 @@ class GeneralMapper extends DataMapperFactory
|
||||||
MONTH(billing_bill_performance_date)
|
MONTH(billing_bill_performance_date)
|
||||||
ORDER BY
|
ORDER BY
|
||||||
YEAR(billing_bill_performance_date) ASC,
|
YEAR(billing_bill_performance_date) ASC,
|
||||||
MONTH(billing_bill_performance_date) ASC'
|
MONTH(billing_bill_performance_date) ASC;'
|
||||||
);
|
);
|
||||||
|
|
||||||
$results = $query->execute()?->fetchAll(\PDO::FETCH_ASSOC) ?? [];
|
$results = $query->execute()?->fetchAll(\PDO::FETCH_ASSOC) ?? [];
|
||||||
|
|
@ -140,11 +143,14 @@ class GeneralMapper extends DataMapperFactory
|
||||||
'SELECT
|
'SELECT
|
||||||
YEAR(billing_bill_performance_date) as salesyear,
|
YEAR(billing_bill_performance_date) as salesyear,
|
||||||
MONTH(billing_bill_performance_date) as salesmonth,
|
MONTH(billing_bill_performance_date) as salesmonth,
|
||||||
SUM(billing_bill_netsales) as netsales,
|
SUM(billing_bill_netsales * billing_type_transfer_sign) as netsales,
|
||||||
SUM(billing_bill_netprofit) as netprofit
|
SUM(billing_bill_netprofit * billing_type_transfer_sign) as netprofit
|
||||||
FROM billing_bill
|
FROM billing_bill
|
||||||
|
LEFT JOIN billing_type
|
||||||
|
ON billing_bill_type = billing_type_id
|
||||||
WHERE
|
WHERE
|
||||||
billing_bill_type = ' . BillTransferType::SALES . '
|
billing_type_transfer_type = ' . BillTransferType::SALES . '
|
||||||
|
AND billing_type_accounting = 1
|
||||||
AND billing_bill_performance_date >= \'' . $historyStart->format('Y-m-d') . '\'
|
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
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,11 @@ class ItemMapper extends DataMapperFactory
|
||||||
itemmgmt_attr_value_l11n_title,
|
itemmgmt_attr_value_l11n_title,
|
||||||
YEAR(billing_bill_performance_date) as salesyear,
|
YEAR(billing_bill_performance_date) as salesyear,
|
||||||
MONTH(billing_bill_performance_date) as salesmonth,
|
MONTH(billing_bill_performance_date) as salesmonth,
|
||||||
SUM(billing_bill_element_total_netsalesprice) as netsales,
|
SUM(billing_bill_element_total_netsalesprice * billing_type_transfer_sign) as netsales,
|
||||||
SUM(billing_bill_element_total_netprofit) as netprofit
|
SUM(billing_bill_element_total_netprofit * billing_type_transfer_sign) as netprofit
|
||||||
FROM billing_bill
|
FROM billing_bill
|
||||||
|
LEFT JOIN billing_type
|
||||||
|
ON billing_bill_type = billing_type_id
|
||||||
LEFT JOIN billing_bill_element
|
LEFT JOIN billing_bill_element
|
||||||
ON billing_bill_id = billing_bill_element_bill
|
ON billing_bill_id = billing_bill_element_bill
|
||||||
LEFT JOIN itemmgmt_item
|
LEFT JOIN itemmgmt_item
|
||||||
|
|
@ -71,10 +73,11 @@ 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_type = ' . BillTransferType::SALES . '
|
billing_type_transfer_type = ' . BillTransferType::SALES . '
|
||||||
|
AND billing_type_accounting = 1
|
||||||
AND billing_bill_performance_date >= \'' . $startComparison->format('Y-m-d') . '\'
|
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\', \'sales_group\', \'product_group\', \'product_type\')
|
||||||
GROUP BY
|
GROUP BY
|
||||||
itemmgmt_attr_type_name,
|
itemmgmt_attr_type_name,
|
||||||
itemmgmt_attr_type_l11n_title,
|
itemmgmt_attr_type_l11n_title,
|
||||||
|
|
|
||||||
|
|
@ -50,15 +50,18 @@ class RegionMapper extends DataMapperFactory
|
||||||
address_country,
|
address_country,
|
||||||
YEAR(billing_bill_performance_date) as salesyear,
|
YEAR(billing_bill_performance_date) as salesyear,
|
||||||
MONTH(billing_bill_performance_date) as salesmonth,
|
MONTH(billing_bill_performance_date) as salesmonth,
|
||||||
SUM(billing_bill_netsales) as netsales,
|
SUM(billing_bill_netsales * billing_type_transfer_sign) as netsales,
|
||||||
SUM(billing_bill_netprofit) as netprofit
|
SUM(billing_bill_netprofit * billing_type_transfer_sign) as netprofit
|
||||||
FROM billing_bill
|
FROM billing_bill
|
||||||
|
LEFT JOIN billing_type
|
||||||
|
ON billing_bill_type = billing_type_id
|
||||||
LEFT JOIN clientmgmt_client
|
LEFT JOIN clientmgmt_client
|
||||||
ON clientmgmt_client_id = billing_bill_client
|
ON clientmgmt_client_id = billing_bill_client
|
||||||
LEFT JOIN address
|
LEFT JOIN address
|
||||||
ON clientmgmt_client_address = address_id
|
ON clientmgmt_client_address = address_id
|
||||||
WHERE
|
WHERE
|
||||||
billing_bill_type = ' . BillTransferType::SALES . '
|
billing_type_transfer_type = ' . BillTransferType::SALES . '
|
||||||
|
AND billing_type_accounting = 1
|
||||||
AND billing_bill_performance_date >= \'' . $start->format('Y-m-d') . '\'
|
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
|
||||||
|
|
@ -133,12 +136,15 @@ class RegionMapper extends DataMapperFactory
|
||||||
MONTH(billing_bill_performance_date) as salesmonth,
|
MONTH(billing_bill_performance_date) as salesmonth,
|
||||||
COUNT(billing_bill_netsales) as client_count
|
COUNT(billing_bill_netsales) as client_count
|
||||||
FROM billing_bill
|
FROM billing_bill
|
||||||
|
LEFT JOIN billing_type
|
||||||
|
ON billing_bill_type = billing_type_id
|
||||||
LEFT JOIN clientmgmt_client
|
LEFT JOIN clientmgmt_client
|
||||||
ON clientmgmt_client_id = billing_bill_client
|
ON clientmgmt_client_id = billing_bill_client
|
||||||
LEFT JOIN address
|
LEFT JOIN address
|
||||||
ON clientmgmt_client_address = address_id
|
ON clientmgmt_client_address = address_id
|
||||||
WHERE
|
WHERE
|
||||||
billing_bill_type = ' . BillTransferType::SALES . '
|
billing_type_transfer_type = ' . BillTransferType::SALES . '
|
||||||
|
AND billing_type_accounting = 1
|
||||||
AND billing_bill_performance_date >= \'' . $historyStart->format('Y-m-d') . '\'
|
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
|
||||||
|
|
@ -214,12 +220,15 @@ class RegionMapper extends DataMapperFactory
|
||||||
MONTH(billing_bill_performance_date) as salesmonth,
|
MONTH(billing_bill_performance_date) as salesmonth,
|
||||||
COUNT(billing_bill_netsales) as client_count
|
COUNT(billing_bill_netsales) as client_count
|
||||||
FROM billing_bill
|
FROM billing_bill
|
||||||
|
LEFT JOIN billing_type
|
||||||
|
ON billing_bill_type = billing_type_id
|
||||||
LEFT JOIN clientmgmt_client
|
LEFT JOIN clientmgmt_client
|
||||||
ON clientmgmt_client_id = billing_bill_client
|
ON clientmgmt_client_id = billing_bill_client
|
||||||
LEFT JOIN address
|
LEFT JOIN address
|
||||||
ON clientmgmt_client_address = address_id
|
ON clientmgmt_client_address = address_id
|
||||||
WHERE
|
WHERE
|
||||||
billing_bill_type = ' . BillTransferType::SALES . '
|
billing_type_transfer_type = ' . BillTransferType::SALES . '
|
||||||
|
AND billing_type_accounting = 1
|
||||||
AND billing_bill_performance_date >= \'' . $startComparison->format('Y-m-d') . '\'
|
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
|
||||||
|
|
@ -316,23 +325,30 @@ class RegionMapper extends DataMapperFactory
|
||||||
$query->raw(
|
$query->raw(
|
||||||
'SELECT
|
'SELECT
|
||||||
address_country,
|
address_country,
|
||||||
billing_bill_performance_date,
|
YEAR(billing_bill_performance_date) as salesyear,
|
||||||
SUM(billing_bill_netsales) as netsales,
|
MONTH(billing_bill_performance_date) as salesmonth,
|
||||||
SUM(billing_bill_netprofit) as netprofit
|
SUM(billing_bill_netsales * billing_type_transfer_sign) as netsales,
|
||||||
|
SUM(billing_bill_netprofit * billing_type_transfer_sign) as netprofit
|
||||||
FROM billing_bill
|
FROM billing_bill
|
||||||
|
LEFT JOIN billing_type
|
||||||
|
ON billing_bill_type = billing_type_id
|
||||||
LEFT JOIN clientmgmt_client
|
LEFT JOIN clientmgmt_client
|
||||||
ON clientmgmt_client_id = billing_bill_client
|
ON clientmgmt_client_id = billing_bill_client
|
||||||
LEFT JOIN address
|
LEFT JOIN address
|
||||||
ON clientmgmt_client_address = address_id
|
ON clientmgmt_client_address = address_id
|
||||||
WHERE
|
WHERE
|
||||||
billing_bill_type = ' . BillTransferType::SALES . '
|
billing_type_transfer_type = ' . BillTransferType::SALES . '
|
||||||
|
AND billing_type_accounting = 1
|
||||||
AND billing_bill_performance_date >= \'' . $historyStart->format('Y-m-d') . '\'
|
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
|
GROUP BY
|
||||||
address_country, billing_bill_performance_date
|
address_country,
|
||||||
|
YEAR(billing_bill_performance_date),
|
||||||
|
MONTH(billing_bill_performance_date)
|
||||||
ORDER BY
|
ORDER BY
|
||||||
billing_bill_performance_date ASC,
|
YEAR(billing_bill_performance_date) ASC,
|
||||||
address_country'
|
MONTH(billing_bill_performance_date) ASC,
|
||||||
|
address_country ASC'
|
||||||
);
|
);
|
||||||
|
|
||||||
$results = $query->execute()?->fetchAll(\PDO::FETCH_ASSOC) ?? [];
|
$results = $query->execute()?->fetchAll(\PDO::FETCH_ASSOC) ?? [];
|
||||||
|
|
@ -341,15 +357,8 @@ class RegionMapper extends DataMapperFactory
|
||||||
$period = 0;
|
$period = 0;
|
||||||
|
|
||||||
foreach ($results as $result) {
|
foreach ($results as $result) {
|
||||||
$date = new \DateTime($result['billing_bill_performance_date']);
|
// @todo Handle fiscal year
|
||||||
if ($date->getTimestamp() <= $historyEnd->getTimestamp()) {
|
$period = $result['salesyear'] - ((int) $historyStart->format('Y')) + 1;
|
||||||
$period = 0;
|
|
||||||
} elseif ($date->getTimestamp() >= $currentStart->getTimestamp()) {
|
|
||||||
$period = 1;
|
|
||||||
} else {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($sales[$result['address_country']])) {
|
if (!isset($sales[$result['address_country']])) {
|
||||||
for ($i = 1; $i < 11; ++$i) {
|
for ($i = 1; $i < 11; ++$i) {
|
||||||
$sales[$result['address_country']][$i] = [
|
$sales[$result['address_country']][$i] = [
|
||||||
|
|
@ -385,15 +394,18 @@ class RegionMapper extends DataMapperFactory
|
||||||
address_country,
|
address_country,
|
||||||
YEAR(billing_bill_performance_date) as salesyear,
|
YEAR(billing_bill_performance_date) as salesyear,
|
||||||
MONTH(billing_bill_performance_date) as salesmonth,
|
MONTH(billing_bill_performance_date) as salesmonth,
|
||||||
SUM(billing_bill_netsales) as netsales,
|
SUM(billing_bill_netsales * billing_type_transfer_sign) as netsales,
|
||||||
SUM(billing_bill_netprofit) as netprofit
|
SUM(billing_bill_netprofit * billing_type_transfer_sign) as netprofit
|
||||||
FROM billing_bill
|
FROM billing_bill
|
||||||
|
LEFT JOIN billing_type
|
||||||
|
ON billing_bill_type = billing_type_id
|
||||||
LEFT JOIN clientmgmt_client
|
LEFT JOIN clientmgmt_client
|
||||||
ON clientmgmt_client_id = billing_bill_client
|
ON clientmgmt_client_id = billing_bill_client
|
||||||
LEFT JOIN address
|
LEFT JOIN address
|
||||||
ON clientmgmt_client_address = address_id
|
ON clientmgmt_client_address = address_id
|
||||||
WHERE
|
WHERE
|
||||||
billing_bill_type = ' . BillTransferType::SALES . '
|
billing_type_transfer_type = ' . BillTransferType::SALES . '
|
||||||
|
AND billing_type_accounting = 1
|
||||||
AND billing_bill_performance_date >= \'' . $startComparison->format('Y-m-d') . '\'
|
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
|
||||||
|
|
|
||||||
24
Theme/Backend/Lang/Navigation.de.lang.php
Executable file
24
Theme/Backend/Lang/Navigation.de.lang.php
Executable file
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Orange Management
|
||||||
|
*
|
||||||
|
* PHP Version 7.4
|
||||||
|
*
|
||||||
|
* @package Modules\SalesAnalysis
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://jingga.app
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
return ['Navigation' => [
|
||||||
|
'Analysis' => 'Analyse',
|
||||||
|
'Dashboard' => 'Dashboard',
|
||||||
|
'Database' => 'Database',
|
||||||
|
'Invoices' => 'Rechnungen',
|
||||||
|
'Marketing' => 'Marketing',
|
||||||
|
'Overview' => 'Übersicht',
|
||||||
|
'Products' => 'Produkte',
|
||||||
|
'Regions' => 'Regionen',
|
||||||
|
]];
|
||||||
71
Theme/Backend/Lang/de.lang.php
Executable file
71
Theme/Backend/Lang/de.lang.php
Executable file
|
|
@ -0,0 +1,71 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Orange Management
|
||||||
|
*
|
||||||
|
* PHP Version 7.4
|
||||||
|
*
|
||||||
|
* @package Modules\SalesAnalysis
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://jingga.app
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
return ['SalesAnalysis' => [
|
||||||
|
'ItemAttribute' => 'Item Attribute',
|
||||||
|
'ClientAttribute' => 'Client Attribute',
|
||||||
|
'Months' => 'Months',
|
||||||
|
'Year' => 'Year',
|
||||||
|
'Month' => 'Month',
|
||||||
|
'All' => 'All',
|
||||||
|
'New' => 'New',
|
||||||
|
'Lost' => 'Lost',
|
||||||
|
'Continent' => 'Continent',
|
||||||
|
'SalesPY' => 'Sales PY',
|
||||||
|
'SalesA' => 'Sales A',
|
||||||
|
'ProfitPY' => 'Profit PY',
|
||||||
|
'ProfitA' => 'Profit A',
|
||||||
|
'DiffPY' => 'Δ PY',
|
||||||
|
'Actual' => 'Actual',
|
||||||
|
'Segment' => 'Segment',
|
||||||
|
'Section' => 'Section',
|
||||||
|
'Group' => 'Group',
|
||||||
|
'Region' => 'Region',
|
||||||
|
'Filter' => 'Filter',
|
||||||
|
'Country' => 'Country',
|
||||||
|
'Category' => 'Category',
|
||||||
|
'General' => 'General',
|
||||||
|
'MTD' => 'MTD',
|
||||||
|
'YTD' => 'YTD',
|
||||||
|
'GrossProfit' => 'Gross Profit',
|
||||||
|
'SalesProfit' => 'Sales / Profit',
|
||||||
|
'monthly' => 'monthly',
|
||||||
|
'annually' => 'annually',
|
||||||
|
'Profit' => 'Profit',
|
||||||
|
'Start' => 'Start',
|
||||||
|
'End' => 'End',
|
||||||
|
'Sales' => 'Sales',
|
||||||
|
'Client' => 'Client',
|
||||||
|
'Clients' => 'Clients',
|
||||||
|
'World' => 'World',
|
||||||
|
'DomesticExport' => 'Domestic & Export',
|
||||||
|
'Comparison' => 'Comparison',
|
||||||
|
'Continents' => 'Continents',
|
||||||
|
'Data' => 'Data',
|
||||||
|
'Domestic' => 'Domestic',
|
||||||
|
'Export' => 'Export',
|
||||||
|
'Current' => 'Current',
|
||||||
|
'Analyze' => 'Analyze',
|
||||||
|
'Regions' => 'Regions',
|
||||||
|
'Total' => 'Total',
|
||||||
|
'Type' => 'Type',
|
||||||
|
'SalesGroup' => 'Sales Group',
|
||||||
|
'ProductGroup' => 'Product Group',
|
||||||
|
'Other' => 'Sonstige',
|
||||||
|
'Europe' => 'Europa',
|
||||||
|
'Asia' => 'Asien',
|
||||||
|
'America' => 'Amerika',
|
||||||
|
'Oceania' => 'Ozeanien',
|
||||||
|
'Africa' => 'Afrika',
|
||||||
|
]];
|
||||||
|
|
@ -60,4 +60,12 @@ return ['SalesAnalysis' => [
|
||||||
'Regions' => 'Regions',
|
'Regions' => 'Regions',
|
||||||
'Total' => 'Total',
|
'Total' => 'Total',
|
||||||
'Type' => 'Type',
|
'Type' => 'Type',
|
||||||
|
'SalesGroup' => 'Sales Group',
|
||||||
|
'ProductGroup' => 'Product Group',
|
||||||
|
'Other' => 'Other',
|
||||||
|
'Europe' => 'Europe',
|
||||||
|
'Asia' => 'Asia',
|
||||||
|
'America' => 'America',
|
||||||
|
'Oceania' => 'Oceania',
|
||||||
|
'Africa' => 'Africa',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,9 @@ echo $this->data['nav']->render();
|
||||||
<ul class="tab-links">
|
<ul class="tab-links">
|
||||||
<li><label for="c-tab-1"><?= $this->getHtml('Segment'); ?></label>
|
<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-2"><?= $this->getHtml('Section'); ?></label>
|
||||||
<li><label for="c-tab-3"><?= $this->getHtml('Group'); ?></label>
|
<li><label for="c-tab-3"><?= $this->getHtml('SalesGroup'); ?></label>
|
||||||
<li><label for="c-tab-4"><?= $this->getHtml('Type'); ?></label>
|
<li><label for="c-tab-4"><?= $this->getHtml('ProductGroup'); ?></label>
|
||||||
|
<li><label for="c-tab-5"><?= $this->getHtml('Type'); ?></label>
|
||||||
<!--<li><label for="c-tab-5"><?= $this->getHtml('Filter'); ?></label>-->
|
<!--<li><label for="c-tab-5"><?= $this->getHtml('Filter'); ?></label>-->
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -126,7 +127,53 @@ echo $this->data['nav']->render();
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<section class="portlet">
|
<section class="portlet">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Group'); ?></div>
|
<div class="portlet-head"><?= $this->getHtml('SalesGroup'); ?></div>
|
||||||
|
<div class="slider">
|
||||||
|
<table class="default sticky">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td><?= $this->getHtml('Category'); ?>
|
||||||
|
<td><?= $this->getHtml('SalesPY'); ?> (<?= $this->getHtml('YTD'); ?>)
|
||||||
|
<td><?= $this->getHtml('SalesA'); ?> (<?= $this->getHtml('YTD'); ?>)
|
||||||
|
<td><?= $this->getHtml('DiffPY'); ?> (<?= $this->getHtml('YTD'); ?>)
|
||||||
|
<td><?= $this->getHtml('SalesPY'); ?> (<?= $this->getHtml('MTD'); ?>)
|
||||||
|
<td><?= $this->getHtml('SalesA'); ?> (<?= $this->getHtml('MTD'); ?>)
|
||||||
|
<td><?= $this->getHtml('DiffPY'); ?> (<?= $this->getHtml('MTD'); ?>)
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
foreach ($this->data['ytdAItemAttribute'] as $type => $values) :
|
||||||
|
if ($type !== 'sales_group') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?= $this->printHtml($this->data['ytdPYItemAttribute'][$type]['value_l11n']); ?>
|
||||||
|
<td><?= $this->getCurrency((int) ($this->data['ytdPYItemAttribute'][$type]['net_sales'] ?? 0)); ?>
|
||||||
|
<td><?= $this->getCurrency((int) ($this->data['ytdAItemAttribute'][$type]['net_sales'] ?? 0)); ?>
|
||||||
|
<td><?= $this->getCurrency(
|
||||||
|
((int) ($this->data['ytdAItemAttribute'][$type]['net_sales'] ?? 0)) -
|
||||||
|
((int) ($this->data['ytdPYItemAttribute'][$type]['net_sales'] ?? 0))
|
||||||
|
); ?>
|
||||||
|
<td><?= $this->getCurrency((int) ($this->data['mtdPYItemAttribute'][$type]['net_sales'] ?? 0)); ?>
|
||||||
|
<td><?= $this->getCurrency((int) ($this->data['mtdAItemAttribute'][$type]['net_sales'] ?? 0)); ?>
|
||||||
|
<td><?= $this->getCurrency(
|
||||||
|
((int) ($this->data['mtdAItemAttribute'][$type]['net_sales'] ?? 0)) -
|
||||||
|
((int) ($this->data['mtdPYItemAttribute'][$type]['net_sales'] ?? 0))
|
||||||
|
); ?>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="radio" id="c-tab-4" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-4' ? ' checked' : ''; ?>>
|
||||||
|
<div class="tab">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<section class="portlet">
|
||||||
|
<div class="portlet-head"><?= $this->getHtml('ProductGroup'); ?></div>
|
||||||
<div class="slider">
|
<div class="slider">
|
||||||
<table class="default sticky">
|
<table class="default sticky">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
@ -167,7 +214,7 @@ echo $this->data['nav']->render();
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type="radio" id="c-tab-4" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-4' ? ' checked' : ''; ?>>
|
<input type="radio" id="c-tab-5" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-5' ? ' checked' : ''; ?>>
|
||||||
<div class="tab">
|
<div class="tab">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ echo $this->data['nav']->render();
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-lg-4">
|
<div class="col-xs-12 col-lg-4">
|
||||||
<section class="portlet">
|
<section class="portlet">
|
||||||
<form id="sales-dashboard-analysis" action="<?= UriFactory::build('{/backend}sales/analysis'); ?>" method="get">
|
<form id="sales-dashboard-analysis" action="<?= UriFactory::build('{/base}/sales/analysis?csrf={$CSRF}'); ?>" method="get">
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<div><?= $this->getHtml('Current'); ?></div>
|
<div><?= $this->getHtml('Current'); ?></div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
@ -124,7 +124,7 @@ echo $this->data['nav']->render();
|
||||||
|
|
||||||
$temp[] = $sales[1][$i]['net_sales'] == 0
|
$temp[] = $sales[1][$i]['net_sales'] == 0
|
||||||
? 0
|
? 0
|
||||||
: $sales[1][$i]['net_profit'] * 100 / $sales[1][$i]['net_sales'];
|
: \number_format($sales[1][$i]['net_profit'] * 100 / $sales[1][$i]['net_sales'], 2);
|
||||||
}
|
}
|
||||||
echo \implode(',', $temp);
|
echo \implode(',', $temp);
|
||||||
?>
|
?>
|
||||||
|
|
@ -150,7 +150,7 @@ echo $this->data['nav']->render();
|
||||||
|
|
||||||
$temp[] = $sales[2][$i]['net_sales'] == 0
|
$temp[] = $sales[2][$i]['net_sales'] == 0
|
||||||
? 0
|
? 0
|
||||||
: $sales[2][$i]['net_profit'] * 100 / $sales[2][$i]['net_sales'];
|
: \number_format($sales[2][$i]['net_profit'] * 100 / $sales[2][$i]['net_sales'], 2);
|
||||||
}
|
}
|
||||||
echo \implode(',', $temp);
|
echo \implode(',', $temp);
|
||||||
?>
|
?>
|
||||||
|
|
@ -259,19 +259,19 @@ echo $this->data['nav']->render();
|
||||||
$sum3 += (int) ($sales[1][$i]['net_profit'] ?? 0);
|
$sum3 += (int) ($sales[1][$i]['net_profit'] ?? 0);
|
||||||
$sum4 += (int) ($sales[2][$i]['net_profit'] ?? 0);
|
$sum4 += (int) ($sales[2][$i]['net_profit'] ?? 0);
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= \sprintf('%02d', $i + 1); ?>
|
<td><?= \sprintf('%02d', $i + 1); ?>
|
||||||
<td><?= $this->getCurrency((int) ($sales[1][$i]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($sales[1][$i]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency((int) ($sales[2][$i]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($sales[2][$i]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= \sprintf('%.2f', ($sales[1][$i]['net_sales'] ?? 0) == 0 ? 0 : $sales[1][$i]['net_profit'] * 100 / $sales[1][$i]['net_sales']); ?> %
|
<td><?= \sprintf('%.2f', ($sales[1][$i]['net_sales'] ?? 0) == 0 ? 0 : $sales[1][$i]['net_profit'] * 100 / $sales[1][$i]['net_sales']); ?> %
|
||||||
<td><?= \sprintf('%.2f', ($sales[2][$i]['net_sales'] ?? 0) == 0 ? 0 : $sales[2][$i]['net_profit'] * 100 / $sales[2][$i]['net_sales']); ?> %
|
<td><?= \sprintf('%.2f', ($sales[2][$i]['net_sales'] ?? 0) == 0 ? 0 : $sales[2][$i]['net_profit'] * 100 / $sales[2][$i]['net_sales']); ?> %
|
||||||
<?php endfor; ?>
|
<?php endfor; ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->getHtml('Total'); ?>
|
<td><?= $this->getHtml('Total'); ?>
|
||||||
<td><?= $this->getCurrency($sum1); ?>
|
<td><?= $this->getCurrency($sum1, symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency($sum2); ?>
|
<td><?= $this->getCurrency($sum2, symbol: ''); ?>
|
||||||
<td><?= \sprintf('%.2f', $sum3 == 0 ? 0 : $sum1 / $sum3); ?> %
|
<td><?= \sprintf('%.2f', $sum3 == 0 ? 0 : $sum1 / $sum3); ?> %
|
||||||
<td><?= \sprintf('%.2f', $sum4 == 0 ? 0 : $sum2 / $sum4); ?> %
|
<td><?= \sprintf('%.2f', $sum4 == 0 ? 0 : $sum2 / $sum4); ?> %
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -393,14 +393,14 @@ echo $this->data['nav']->render();
|
||||||
<td><?= $this->getHtml('Sales'); ?>
|
<td><?= $this->getHtml('Sales'); ?>
|
||||||
<td><?= $this->getHtml('Profit'); ?>
|
<td><?= $this->getHtml('Profit'); ?>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
foreach ($sales as $values) :
|
foreach ($sales as $values) :
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<td><?= $this->getCurrency(((int) $values['net_sales']) / FloatInt::DIVISOR); ?>
|
<td><?= $this->getCurrency(((int) $values['net_sales']) / FloatInt::DIVISOR, symbol: ''); ?>
|
||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -430,17 +430,19 @@ echo $this->data['nav']->render();
|
||||||
<?php foreach ($this->data['ytdAItemAttribute'] as $type => $values) : ?>
|
<?php foreach ($this->data['ytdAItemAttribute'] as $type => $values) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->printHtml($this->data['ytdPYItemAttribute'][$type]['value_l11n']); ?>
|
<td><?= $this->printHtml($this->data['ytdPYItemAttribute'][$type]['value_l11n']); ?>
|
||||||
<td><?= $this->getCurrency((int) ($this->data['ytdPYItemAttribute'][$type]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($this->data['ytdPYItemAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency((int) ($this->data['ytdAItemAttribute'][$type]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($this->data['ytdAItemAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency(
|
<td><?= $this->getCurrency(
|
||||||
((int) ($this->data['ytdAItemAttribute'][$type]['net_sales'] ?? 0)) -
|
((int) ($this->data['ytdAItemAttribute'][$type]['net_sales'] ?? 0)) -
|
||||||
((int) ($this->data['ytdPYItemAttribute'][$type]['net_sales'] ?? 0))
|
((int) ($this->data['ytdPYItemAttribute'][$type]['net_sales'] ?? 0)),
|
||||||
|
symbol: ''
|
||||||
); ?>
|
); ?>
|
||||||
<td><?= $this->getCurrency((int) ($this->data['mtdPYItemAttribute'][$type]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($this->data['mtdPYItemAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency((int) ($this->data['mtdAItemAttribute'][$type]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($this->data['mtdAItemAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency(
|
<td><?= $this->getCurrency(
|
||||||
((int) ($this->data['mtdAItemAttribute'][$type]['net_sales'] ?? 0)) -
|
((int) ($this->data['mtdAItemAttribute'][$type]['net_sales'] ?? 0)) -
|
||||||
((int) ($this->data['mtdPYItemAttribute'][$type]['net_sales'] ?? 0))
|
((int) ($this->data['mtdPYItemAttribute'][$type]['net_sales'] ?? 0)),
|
||||||
|
symbol: ''
|
||||||
); ?>
|
); ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -468,20 +470,22 @@ echo $this->data['nav']->render();
|
||||||
<td><?= $this->getHtml('DiffPY'); ?> (<?= $this->getHtml('MTD'); ?>)
|
<td><?= $this->getHtml('DiffPY'); ?> (<?= $this->getHtml('MTD'); ?>)
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach ($this->data['ytdAClientAttribute'] as $type => $values) : ?>
|
<?php foreach ($this->data['ytdAClientAttribute'] as $type => $values) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->printHtml($this->data['ytdPYClientAttribute'][$type]['value_l11n']); ?>
|
<td><?= $this->printHtml($this->data['ytdPYClientAttribute'][$type]['value_l11n']); ?>
|
||||||
<td><?= $this->getCurrency((int) ($this->data['ytdPYClientAttribute'][$type]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($this->data['ytdPYClientAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency((int) ($this->data['ytdAClientAttribute'][$type]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($this->data['ytdAClientAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency(
|
<td><?= $this->getCurrency(
|
||||||
((int) ($this->data['ytdAClientAttribute'][$type]['net_sales'] ?? 0)) -
|
((int) ($this->data['ytdAClientAttribute'][$type]['net_sales'] ?? 0)) -
|
||||||
((int) ($this->data['ytdPYClientAttribute'][$type]['net_sales'] ?? 0))
|
((int) ($this->data['ytdPYClientAttribute'][$type]['net_sales'] ?? 0)),
|
||||||
); ?>
|
symbol: ''
|
||||||
<td><?= $this->getCurrency((int) ($this->data['mtdPYClientAttribute'][$type]['net_sales'] ?? 0)); ?>
|
); ?>
|
||||||
<td><?= $this->getCurrency((int) ($this->data['mtdAClientAttribute'][$type]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($this->data['mtdPYClientAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency(
|
<td><?= $this->getCurrency((int) ($this->data['mtdAClientAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
((int) ($this->data['mtdAClientAttribute'][$type]['net_sales'] ?? 0)) -
|
<td><?= $this->getCurrency(
|
||||||
((int) ($this->data['mtdPYClientAttribute'][$type]['net_sales'] ?? 0))
|
((int) ($this->data['mtdAClientAttribute'][$type]['net_sales'] ?? 0)) -
|
||||||
); ?>
|
((int) ($this->data['mtdPYClientAttribute'][$type]['net_sales'] ?? 0)),
|
||||||
|
symbol: ''
|
||||||
|
); ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -508,20 +512,22 @@ echo $this->data['nav']->render();
|
||||||
<td><?= $this->getHtml('DiffPY'); ?> (<?= $this->getHtml('MTD'); ?>)
|
<td><?= $this->getHtml('DiffPY'); ?> (<?= $this->getHtml('MTD'); ?>)
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach ($this->data['ytdAClientCountry'] as $type => $values) : ?>
|
<?php foreach ($this->data['ytdAClientCountry'] as $type => $values) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->printHtml(ISO3166NameEnum::getBy2Code($type)); ?>
|
<td><?= $this->printHtml(ISO3166NameEnum::getBy2Code($type)); ?>
|
||||||
<td><?= $this->getCurrency((int) ($this->data['ytdPYClientCountry'][$type]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($this->data['ytdPYClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency((int) ($this->data['ytdAClientCountry'][$type]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($this->data['ytdAClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency(
|
<td><?= $this->getCurrency(
|
||||||
((int) ($this->data['ytdAClientCountry'][$type]['net_sales'] ?? 0)) -
|
((int) ($this->data['ytdAClientCountry'][$type]['net_sales'] ?? 0)) -
|
||||||
((int) ($this->data['ytdPYClientCountry'][$type]['net_sales'] ?? 0))
|
((int) ($this->data['ytdPYClientCountry'][$type]['net_sales'] ?? 0)),
|
||||||
); ?>
|
symbol: ''
|
||||||
<td><?= $this->getCurrency((int) ($this->data['mtdPYClientCountry'][$type]['net_sales'] ?? 0)); ?>
|
); ?>
|
||||||
<td><?= $this->getCurrency((int) ($this->data['mtdAClientCountry'][$type]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($this->data['mtdPYClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency(
|
<td><?= $this->getCurrency((int) ($this->data['mtdAClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
((int) ($this->data['mtdAClientCountry'][$type]['net_sales'] ?? 0)) -
|
<td><?= $this->getCurrency(
|
||||||
((int) ($this->data['mtdPYClientCountry'][$type]['net_sales'] ?? 0))
|
((int) ($this->data['mtdAClientCountry'][$type]['net_sales'] ?? 0)) -
|
||||||
); ?>
|
((int) ($this->data['mtdPYClientCountry'][$type]['net_sales'] ?? 0)),
|
||||||
|
symbol: ''
|
||||||
|
); ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -100,17 +100,19 @@ echo $this->data['nav']->render();
|
||||||
<?php foreach ($this->data['ytdAClientCountry'] as $type => $values) : ?>
|
<?php foreach ($this->data['ytdAClientCountry'] as $type => $values) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->printHtml(ISO3166NameEnum::getBy2Code($type)); ?>
|
<td><?= $this->printHtml(ISO3166NameEnum::getBy2Code($type)); ?>
|
||||||
<td><?= $this->getCurrency((int) ($this->data['ytdPYClientCountry'][$type]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($this->data['ytdPYClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency((int) ($this->data['ytdAClientCountry'][$type]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($this->data['ytdAClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency(
|
<td><?= $this->getCurrency(
|
||||||
((int) ($this->data['ytdAClientCountry'][$type]['net_sales'] ?? 0)) -
|
((int) ($this->data['ytdAClientCountry'][$type]['net_sales'] ?? 0)) -
|
||||||
((int) ($this->data['ytdPYClientCountry'][$type]['net_sales'] ?? 0))
|
((int) ($this->data['ytdPYClientCountry'][$type]['net_sales'] ?? 0)),
|
||||||
|
symbol: ''
|
||||||
); ?>
|
); ?>
|
||||||
<td><?= $this->getCurrency((int) ($this->data['mtdPYClientCountry'][$type]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($this->data['mtdPYClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency((int) ($this->data['mtdAClientCountry'][$type]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($this->data['mtdAClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency(
|
<td><?= $this->getCurrency(
|
||||||
((int) ($this->data['mtdAClientCountry'][$type]['net_sales'] ?? 0)) -
|
((int) ($this->data['mtdAClientCountry'][$type]['net_sales'] ?? 0)) -
|
||||||
((int) ($this->data['mtdPYClientCountry'][$type]['net_sales'] ?? 0))
|
((int) ($this->data['mtdPYClientCountry'][$type]['net_sales'] ?? 0)),
|
||||||
|
symbol: ''
|
||||||
); ?>
|
); ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -296,15 +298,15 @@ echo $this->data['nav']->render();
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= \sprintf('%02d', $i); ?>
|
<td><?= \sprintf('%02d', $i); ?>
|
||||||
<td><?= $this->getCurrency((int) ($sales[1][$this->data['domestic']][$i]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($sales[1][$this->data['domestic']][$i]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency((int) ($sales[2][$this->data['domestic']][$i]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($sales[2][$this->data['domestic']][$i]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= \sprintf('%.2f', ($sales[1][$this->data['domestic']][$i]['net_sales'] ?? 0) == 0 ? 0 : $sales[1][$this->data['domestic']][$i]['net_profit'] * 100 / $sales[1][$this->data['domestic']][$i]['net_sales']); ?> %
|
<td><?= \sprintf('%.2f', ($sales[1][$this->data['domestic']][$i]['net_sales'] ?? 0) == 0 ? 0 : $sales[1][$this->data['domestic']][$i]['net_profit'] * 100 / $sales[1][$this->data['domestic']][$i]['net_sales']); ?> %
|
||||||
<td><?= \sprintf('%.2f', ($sales[2][$this->data['domestic']][$i]['net_sales'] ?? 0) == 0 ? 0 : $sales[2][$this->data['domestic']][$i]['net_profit'] * 100 / $sales[2][$this->data['domestic']][$i]['net_sales']); ?> %
|
<td><?= \sprintf('%.2f', ($sales[2][$this->data['domestic']][$i]['net_sales'] ?? 0) == 0 ? 0 : $sales[2][$this->data['domestic']][$i]['net_profit'] * 100 / $sales[2][$this->data['domestic']][$i]['net_sales']); ?> %
|
||||||
<?php endfor; ?>
|
<?php endfor; ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->getHtml('Total'); ?>
|
<td><?= $this->getHtml('Total'); ?>
|
||||||
<td><?= $this->getCurrency($sum1); ?>
|
<td><?= $this->getCurrency($sum1, symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency($sum2); ?>
|
<td><?= $this->getCurrency($sum2, symbol: ''); ?>
|
||||||
<td><?= \sprintf('%.2f', $sum3 == 0 ? 0 : $sum1 / $sum3); ?> %
|
<td><?= \sprintf('%.2f', $sum3 == 0 ? 0 : $sum1 / $sum3); ?> %
|
||||||
<td><?= \sprintf('%.2f', $sum4 == 0 ? 0 : $sum2 / $sum4); ?> %
|
<td><?= \sprintf('%.2f', $sum4 == 0 ? 0 : $sum2 / $sum4); ?> %
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -486,15 +488,15 @@ echo $this->data['nav']->render();
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= \sprintf('%02d', $i); ?>
|
<td><?= \sprintf('%02d', $i); ?>
|
||||||
<td><?= $this->getCurrency((int) ($sales[1]['Other'][$i]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($sales[1]['Other'][$i]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency((int) ($sales[2]['Other'][$i]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($sales[2]['Other'][$i]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= \sprintf('%.2f', ($sales[1]['Other'][$i]['net_sales'] ?? 0) == 0 ? 0 : $sales[1]['Other'][$i]['net_profit'] * 100 / $sales[1]['Other'][$i]['net_sales']); ?> %
|
<td><?= \sprintf('%.2f', ($sales[1]['Other'][$i]['net_sales'] ?? 0) == 0 ? 0 : $sales[1]['Other'][$i]['net_profit'] * 100 / $sales[1]['Other'][$i]['net_sales']); ?> %
|
||||||
<td><?= \sprintf('%.2f', ($sales[2]['Other'][$i]['net_sales'] ?? 0) == 0 ? 0 : $sales[2]['Other'][$i]['net_profit'] * 100 / $sales[2]['Other'][$i]['net_sales']); ?> %
|
<td><?= \sprintf('%.2f', ($sales[2]['Other'][$i]['net_sales'] ?? 0) == 0 ? 0 : $sales[2]['Other'][$i]['net_profit'] * 100 / $sales[2]['Other'][$i]['net_sales']); ?> %
|
||||||
<?php endfor; ?>
|
<?php endfor; ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->getHtml('Total'); ?>
|
<td><?= $this->getHtml('Total'); ?>
|
||||||
<td><?= $this->getCurrency($sum1); ?>
|
<td><?= $this->getCurrency($sum1, symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency($sum2); ?>
|
<td><?= $this->getCurrency($sum2, symbol: ''); ?>
|
||||||
<td><?= \sprintf('%.2f', $sum3 == 0 ? 0 : $sum1 / $sum3); ?> %
|
<td><?= \sprintf('%.2f', $sum3 == 0 ? 0 : $sum1 / $sum3); ?> %
|
||||||
<td><?= \sprintf('%.2f', $sum4 == 0 ? 0 : $sum2 / $sum4); ?> %
|
<td><?= \sprintf('%.2f', $sum4 == 0 ? 0 : $sum2 / $sum4); ?> %
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -551,11 +553,11 @@ echo $this->data['nav']->render();
|
||||||
foreach ($this->data['ytdADomesticExport'] as $region => $values) : $sum += $values['net_sales']; ?>
|
foreach ($this->data['ytdADomesticExport'] as $region => $values) : $sum += $values['net_sales']; ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $region; ?>
|
<td><?= $region; ?>
|
||||||
<td><?= $this->getCurrency($values['net_sales']); ?>
|
<td><?= $this->getCurrency($values['net_sales'], symbol: ''); ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->getHtml('Total'); ?>
|
<td><?= $this->getHtml('Total'); ?>
|
||||||
<td><?= $this->getCurrency($sum); ?>
|
<td><?= $this->getCurrency($sum, symbol: ''); ?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -692,11 +694,11 @@ echo $this->data['nav']->render();
|
||||||
foreach ($this->data['ytdADomesticExport'] as $region => $values) : $sum += $values['net_profit']; ?>
|
foreach ($this->data['ytdADomesticExport'] as $region => $values) : $sum += $values['net_profit']; ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $region; ?>
|
<td><?= $region; ?>
|
||||||
<td><?= $this->getCurrency($values['net_profit']); ?>
|
<td><?= $this->getCurrency($values['net_profit'], symbol: ''); ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->getHtml('Total'); ?>
|
<td><?= $this->getHtml('Total'); ?>
|
||||||
<td><?= $this->getCurrency($sum); ?>
|
<td><?= $this->getCurrency($sum, symbol: ''); ?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -987,11 +989,11 @@ echo $this->data['nav']->render();
|
||||||
foreach ($this->data['ytdAContinent'] as $region => $values) : $sum += $values['net_sales']; ?>
|
foreach ($this->data['ytdAContinent'] as $region => $values) : $sum += $values['net_sales']; ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $region; ?>
|
<td><?= $region; ?>
|
||||||
<td><?= $this->getCurrency($values['net_sales']); ?>
|
<td><?= $this->getCurrency($values['net_sales'], symbol: ''); ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->getHtml('Total'); ?>
|
<td><?= $this->getHtml('Total'); ?>
|
||||||
<td><?= $this->getCurrency($sum); ?>
|
<td><?= $this->getCurrency($sum, symbol: ''); ?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1132,7 +1134,7 @@ echo $this->data['nav']->render();
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->getHtml('Total'); ?>
|
<td><?= $this->getHtml('Total'); ?>
|
||||||
<td><?= $this->getCurrency($sum); ?>
|
<td><?= $this->getCurrency($sum, symbol: ''); ?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1396,17 +1398,19 @@ echo $this->data['nav']->render();
|
||||||
<?php foreach ($this->data['ytdARegions'] as $type => $values) : ?>
|
<?php foreach ($this->data['ytdARegions'] as $type => $values) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->printHtml($type); ?>
|
<td><?= $this->printHtml($type); ?>
|
||||||
<td><?= $this->getCurrency((int) ($this->data['ytdPYRegions'][$type]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($this->data['ytdPYRegions'][$type]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency((int) ($this->data['ytdARegions'][$type]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($this->data['ytdARegions'][$type]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency(
|
<td><?= $this->getCurrency(
|
||||||
((int) ($this->data['ytdARegions'][$type]['net_sales'] ?? 0)) -
|
((int) ($this->data['ytdARegions'][$type]['net_sales'] ?? 0)) -
|
||||||
((int) ($this->data['ytdPYRegions'][$type]['net_sales'] ?? 0))
|
((int) ($this->data['ytdPYRegions'][$type]['net_sales'] ?? 0)),
|
||||||
|
symbol: ''
|
||||||
); ?>
|
); ?>
|
||||||
<td><?= $this->getCurrency((int) ($this->data['mtdPYRegions'][$type]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($this->data['mtdPYRegions'][$type]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency((int) ($this->data['mtdARegions'][$type]['net_sales'] ?? 0)); ?>
|
<td><?= $this->getCurrency((int) ($this->data['mtdARegions'][$type]['net_sales'] ?? 0), symbol: ''); ?>
|
||||||
<td><?= $this->getCurrency(
|
<td><?= $this->getCurrency(
|
||||||
((int) ($this->data['mtdARegions'][$type]['net_sales'] ?? 0)) -
|
((int) ($this->data['mtdARegions'][$type]['net_sales'] ?? 0)) -
|
||||||
((int) ($this->data['mtdPYRegions'][$type]['net_sales'] ?? 0))
|
((int) ($this->data['mtdPYRegions'][$type]['net_sales'] ?? 0)),
|
||||||
|
symbol: ''
|
||||||
); ?>
|
); ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user