diff --git a/Controller/ApiController.php b/Controller/ApiController.php
old mode 100644
new mode 100755
diff --git a/Controller/BackendController.php b/Controller/BackendController.php
index 862ebe7..57a311f 100755
--- a/Controller/BackendController.php
+++ b/Controller/BackendController.php
@@ -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['ytdAClientCountry'],
- RegionEnum::getConstants(),
+ $regions,
['net_sales', 'net_profit']
);
$view->data['ytdPYRegions'] = RegionMapper::countryToRegion(
$view->data['ytdPYClientCountry'],
- RegionEnum::getConstants(),
+ $regions,
['net_sales', 'net_profit']
);
$view->data['mtdARegions'] = RegionMapper::countryToRegion(
$view->data['mtdAClientCountry'],
- RegionEnum::getConstants(),
+ $regions,
['net_sales', 'net_profit']
);
$view->data['mtdPYRegions'] = RegionMapper::countryToRegion(
$view->data['mtdPYClientCountry'],
- RegionEnum::getConstants(),
+ $regions,
['net_sales', 'net_profit']
);
diff --git a/Models/ClientMapper.php b/Models/ClientMapper.php
index bfe422a..9f34ca0 100755
--- a/Models/ClientMapper.php
+++ b/Models/ClientMapper.php
@@ -53,9 +53,11 @@ class ClientMapper extends DataMapperFactory
clientmgmt_attr_value_l11n_title,
YEAR(billing_bill_performance_date) as salesyear,
MONTH(billing_bill_performance_date) as salesmonth,
- SUM(billing_bill_netsales) as netsales,
- 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
+ LEFT JOIN billing_type
+ ON billing_bill_type = billing_type_id
LEFT JOIN clientmgmt_client
ON clientmgmt_client_id = billing_bill_client
LEFT JOIN clientmgmt_client_attr
@@ -69,7 +71,8 @@ class ClientMapper extends DataMapperFactory
LEFT JOIN clientmgmt_attr_value_l11n
ON clientmgmt_attr_value_id = clientmgmt_attr_value_l11n_value AND clientmgmt_attr_value_l11n_lang = \'' . $language . '\'
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 <= \'' . $endCurrent->format('Y-m-d') . '\'
AND clientmgmt_attr_type_name IN (\'segment\', \'section\', \'client_group\', \'client_type\')
diff --git a/Models/GeneralMapper.php b/Models/GeneralMapper.php
index da33564..1213af3 100755
--- a/Models/GeneralMapper.php
+++ b/Models/GeneralMapper.php
@@ -47,11 +47,14 @@ class GeneralMapper extends DataMapperFactory
'SELECT
YEAR(billing_bill_performance_date) as salesyear,
MONTH(billing_bill_performance_date) as salesmonth,
- SUM(billing_bill_netsales) as netsales,
- 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
+ LEFT JOIN billing_type
+ ON billing_bill_type = billing_type_id
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 <= \'' . $endCurrent->format('Y-m-d') . '\'
GROUP BY
@@ -59,7 +62,7 @@ class GeneralMapper extends DataMapperFactory
MONTH(billing_bill_performance_date)
ORDER BY
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) ?? [];
@@ -140,11 +143,14 @@ class GeneralMapper extends DataMapperFactory
'SELECT
YEAR(billing_bill_performance_date) as salesyear,
MONTH(billing_bill_performance_date) as salesmonth,
- SUM(billing_bill_netsales) as netsales,
- 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
+ LEFT JOIN billing_type
+ ON billing_bill_type = billing_type_id
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 <= \'' . $endCurrent->format('Y-m-d') . '\'
GROUP BY
diff --git a/Models/ItemMapper.php b/Models/ItemMapper.php
index c14dfa6..c861d4d 100755
--- a/Models/ItemMapper.php
+++ b/Models/ItemMapper.php
@@ -53,9 +53,11 @@ class ItemMapper extends DataMapperFactory
itemmgmt_attr_value_l11n_title,
YEAR(billing_bill_performance_date) as salesyear,
MONTH(billing_bill_performance_date) as salesmonth,
- SUM(billing_bill_element_total_netsalesprice) as netsales,
- SUM(billing_bill_element_total_netprofit) as netprofit
+ SUM(billing_bill_element_total_netsalesprice * billing_type_transfer_sign) as netsales,
+ SUM(billing_bill_element_total_netprofit * billing_type_transfer_sign) as netprofit
FROM billing_bill
+ LEFT JOIN billing_type
+ ON billing_bill_type = billing_type_id
LEFT JOIN billing_bill_element
ON billing_bill_id = billing_bill_element_bill
LEFT JOIN itemmgmt_item
@@ -71,10 +73,11 @@ class ItemMapper extends DataMapperFactory
LEFT JOIN itemmgmt_attr_value_l11n
ON itemmgmt_attr_value_id = itemmgmt_attr_value_l11n_value AND itemmgmt_attr_value_l11n_lang = \'' . $language . '\'
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 <= \'' . $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
itemmgmt_attr_type_name,
itemmgmt_attr_type_l11n_title,
diff --git a/Models/RegionMapper.php b/Models/RegionMapper.php
index 22af8e6..ee9d4a4 100755
--- a/Models/RegionMapper.php
+++ b/Models/RegionMapper.php
@@ -50,15 +50,18 @@ class RegionMapper extends DataMapperFactory
address_country,
YEAR(billing_bill_performance_date) as salesyear,
MONTH(billing_bill_performance_date) as salesmonth,
- SUM(billing_bill_netsales) as netsales,
- 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
+ LEFT JOIN billing_type
+ ON billing_bill_type = billing_type_id
LEFT JOIN clientmgmt_client
ON clientmgmt_client_id = billing_bill_client
LEFT JOIN address
ON clientmgmt_client_address = address_id
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 <= \'' . $end->format('Y-m-d') . '\'
GROUP BY
@@ -133,12 +136,15 @@ class RegionMapper extends DataMapperFactory
MONTH(billing_bill_performance_date) as salesmonth,
COUNT(billing_bill_netsales) as client_count
FROM billing_bill
+ LEFT JOIN billing_type
+ ON billing_bill_type = billing_type_id
LEFT JOIN clientmgmt_client
ON clientmgmt_client_id = billing_bill_client
LEFT JOIN address
ON clientmgmt_client_address = address_id
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 <= \'' . $endCurrent->format('Y-m-d') . '\'
GROUP BY
@@ -214,12 +220,15 @@ class RegionMapper extends DataMapperFactory
MONTH(billing_bill_performance_date) as salesmonth,
COUNT(billing_bill_netsales) as client_count
FROM billing_bill
+ LEFT JOIN billing_type
+ ON billing_bill_type = billing_type_id
LEFT JOIN clientmgmt_client
ON clientmgmt_client_id = billing_bill_client
LEFT JOIN address
ON clientmgmt_client_address = address_id
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 <= \'' . $endCurrent->format('Y-m-d') . '\'
GROUP BY
@@ -316,23 +325,30 @@ class RegionMapper extends DataMapperFactory
$query->raw(
'SELECT
address_country,
- billing_bill_performance_date,
- SUM(billing_bill_netsales) as netsales,
- SUM(billing_bill_netprofit) as netprofit
+ YEAR(billing_bill_performance_date) as salesyear,
+ MONTH(billing_bill_performance_date) as salesmonth,
+ SUM(billing_bill_netsales * billing_type_transfer_sign) as netsales,
+ SUM(billing_bill_netprofit * billing_type_transfer_sign) as netprofit
FROM billing_bill
+ LEFT JOIN billing_type
+ ON billing_bill_type = billing_type_id
LEFT JOIN clientmgmt_client
ON clientmgmt_client_id = billing_bill_client
LEFT JOIN address
ON clientmgmt_client_address = address_id
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 <= \'' . $currentEnd->format('Y-m-d') . '\'
GROUP BY
- address_country, billing_bill_performance_date
+ address_country,
+ YEAR(billing_bill_performance_date),
+ MONTH(billing_bill_performance_date)
ORDER BY
- billing_bill_performance_date ASC,
- address_country'
+ YEAR(billing_bill_performance_date) ASC,
+ MONTH(billing_bill_performance_date) ASC,
+ address_country ASC'
);
$results = $query->execute()?->fetchAll(\PDO::FETCH_ASSOC) ?? [];
@@ -341,15 +357,8 @@ class RegionMapper extends DataMapperFactory
$period = 0;
foreach ($results as $result) {
- $date = new \DateTime($result['billing_bill_performance_date']);
- if ($date->getTimestamp() <= $historyEnd->getTimestamp()) {
- $period = 0;
- } elseif ($date->getTimestamp() >= $currentStart->getTimestamp()) {
- $period = 1;
- } else {
- continue;
- }
-
+ // @todo Handle fiscal year
+ $period = $result['salesyear'] - ((int) $historyStart->format('Y')) + 1;
if (!isset($sales[$result['address_country']])) {
for ($i = 1; $i < 11; ++$i) {
$sales[$result['address_country']][$i] = [
@@ -385,15 +394,18 @@ class RegionMapper extends DataMapperFactory
address_country,
YEAR(billing_bill_performance_date) as salesyear,
MONTH(billing_bill_performance_date) as salesmonth,
- SUM(billing_bill_netsales) as netsales,
- 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
+ LEFT JOIN billing_type
+ ON billing_bill_type = billing_type_id
LEFT JOIN clientmgmt_client
ON clientmgmt_client_id = billing_bill_client
LEFT JOIN address
ON clientmgmt_client_address = address_id
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 <= \'' . $endCurrent->format('Y-m-d') . '\'
GROUP BY
diff --git a/Theme/Backend/Lang/Navigation.de.lang.php b/Theme/Backend/Lang/Navigation.de.lang.php
new file mode 100755
index 0000000..3e96216
--- /dev/null
+++ b/Theme/Backend/Lang/Navigation.de.lang.php
@@ -0,0 +1,24 @@
+ [
+ 'Analysis' => 'Analyse',
+ 'Dashboard' => 'Dashboard',
+ 'Database' => 'Database',
+ 'Invoices' => 'Rechnungen',
+ 'Marketing' => 'Marketing',
+ 'Overview' => 'Übersicht',
+ 'Products' => 'Produkte',
+ 'Regions' => 'Regionen',
+]];
diff --git a/Theme/Backend/Lang/de.lang.php b/Theme/Backend/Lang/de.lang.php
new file mode 100755
index 0000000..4a9aa13
--- /dev/null
+++ b/Theme/Backend/Lang/de.lang.php
@@ -0,0 +1,71 @@
+ [
+ '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',
+]];
diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php
index ebc444d..58233f5 100755
--- a/Theme/Backend/Lang/en.lang.php
+++ b/Theme/Backend/Lang/en.lang.php
@@ -60,4 +60,12 @@ return ['SalesAnalysis' => [
'Regions' => 'Regions',
'Total' => 'Total',
'Type' => 'Type',
+ 'SalesGroup' => 'Sales Group',
+ 'ProductGroup' => 'Product Group',
+ 'Other' => 'Other',
+ 'Europe' => 'Europe',
+ 'Asia' => 'Asia',
+ 'America' => 'America',
+ 'Oceania' => 'Oceania',
+ 'Africa' => 'Africa',
]];
diff --git a/Theme/Backend/analysis-item.tpl.php b/Theme/Backend/analysis-item.tpl.php
index 37c1641..ac5d28b 100755
--- a/Theme/Backend/analysis-item.tpl.php
+++ b/Theme/Backend/analysis-item.tpl.php
@@ -23,8 +23,9 @@ echo $this->data['nav']->render();
-
-
-
-
-
-
+
-
+
-
+
-
@@ -126,7 +127,53 @@ echo $this->data['nav']->render();
- = $this->getHtml('Group'); ?>
+ = $this->getHtml('SalesGroup'); ?>
+
+
+
+
+ | = $this->getHtml('Category'); ?>
+ | = $this->getHtml('SalesPY'); ?> (= $this->getHtml('YTD'); ?>)
+ | = $this->getHtml('SalesA'); ?> (= $this->getHtml('YTD'); ?>)
+ | = $this->getHtml('DiffPY'); ?> (= $this->getHtml('YTD'); ?>)
+ | = $this->getHtml('SalesPY'); ?> (= $this->getHtml('MTD'); ?>)
+ | = $this->getHtml('SalesA'); ?> (= $this->getHtml('MTD'); ?>)
+ | = $this->getHtml('DiffPY'); ?> (= $this->getHtml('MTD'); ?>)
+ |
+ data['ytdAItemAttribute'] as $type => $values) :
+ if ($type !== 'sales_group') {
+ continue;
+ }
+ ?>
+
+ | = $this->printHtml($this->data['ytdPYItemAttribute'][$type]['value_l11n']); ?>
+ | = $this->getCurrency((int) ($this->data['ytdPYItemAttribute'][$type]['net_sales'] ?? 0)); ?>
+ | = $this->getCurrency((int) ($this->data['ytdAItemAttribute'][$type]['net_sales'] ?? 0)); ?>
+ | = $this->getCurrency(
+ ((int) ($this->data['ytdAItemAttribute'][$type]['net_sales'] ?? 0)) -
+ ((int) ($this->data['ytdPYItemAttribute'][$type]['net_sales'] ?? 0))
+ ); ?>
+ | = $this->getCurrency((int) ($this->data['mtdPYItemAttribute'][$type]['net_sales'] ?? 0)); ?>
+ | = $this->getCurrency((int) ($this->data['mtdAItemAttribute'][$type]['net_sales'] ?? 0)); ?>
+ | = $this->getCurrency(
+ ((int) ($this->data['mtdAItemAttribute'][$type]['net_sales'] ?? 0)) -
+ ((int) ($this->data['mtdPYItemAttribute'][$type]['net_sales'] ?? 0))
+ ); ?>
+
+ |
+
+
+
+
+
+
+ request->uri->fragment === 'c-tab-4' ? ' checked' : ''; ?>>
+
+
+
+
+ = $this->getHtml('ProductGroup'); ?>
@@ -393,14 +393,14 @@ echo $this->data['nav']->render();
= $this->getHtml('Sales'); ?>
| = $this->getHtml('Profit'); ?>
|
-
-
- |
- | = $this->getCurrency(((int) $values['net_sales']) / FloatInt::DIVISOR); ?>
- | = \sprintf('%.2f', $values['net_sales'] == 0 ? 0 : $values['net_profit'] * 100 / $values['net_sales']); ?> %
-
+
+ |
+ |
+ | = $this->getCurrency(((int) $values['net_sales']) / FloatInt::DIVISOR, symbol: ''); ?>
+ | = \sprintf('%.2f', $values['net_sales'] == 0 ? 0 : $values['net_profit'] * 100 / $values['net_sales']); ?> %
+
@@ -430,17 +430,19 @@ echo $this->data['nav']->render();
data['ytdAItemAttribute'] as $type => $values) : ?>
|
| = $this->printHtml($this->data['ytdPYItemAttribute'][$type]['value_l11n']); ?>
- | = $this->getCurrency((int) ($this->data['ytdPYItemAttribute'][$type]['net_sales'] ?? 0)); ?>
- | = $this->getCurrency((int) ($this->data['ytdAItemAttribute'][$type]['net_sales'] ?? 0)); ?>
+ | = $this->getCurrency((int) ($this->data['ytdPYItemAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?>
+ | = $this->getCurrency((int) ($this->data['ytdAItemAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?>
| = $this->getCurrency(
((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: ''
); ?>
- | = $this->getCurrency((int) ($this->data['mtdPYItemAttribute'][$type]['net_sales'] ?? 0)); ?>
- | = $this->getCurrency((int) ($this->data['mtdAItemAttribute'][$type]['net_sales'] ?? 0)); ?>
+ | = $this->getCurrency((int) ($this->data['mtdPYItemAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?>
+ | = $this->getCurrency((int) ($this->data['mtdAItemAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?>
| = $this->getCurrency(
((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: ''
); ?>
@@ -468,20 +470,22 @@ echo $this->data['nav']->render();
| = $this->getHtml('DiffPY'); ?> (= $this->getHtml('MTD'); ?>)
|
data['ytdAClientAttribute'] as $type => $values) : ?>
-
- | = $this->printHtml($this->data['ytdPYClientAttribute'][$type]['value_l11n']); ?>
- | = $this->getCurrency((int) ($this->data['ytdPYClientAttribute'][$type]['net_sales'] ?? 0)); ?>
- | = $this->getCurrency((int) ($this->data['ytdAClientAttribute'][$type]['net_sales'] ?? 0)); ?>
- | = $this->getCurrency(
- ((int) ($this->data['ytdAClientAttribute'][$type]['net_sales'] ?? 0)) -
- ((int) ($this->data['ytdPYClientAttribute'][$type]['net_sales'] ?? 0))
- ); ?>
- | = $this->getCurrency((int) ($this->data['mtdPYClientAttribute'][$type]['net_sales'] ?? 0)); ?>
- | = $this->getCurrency((int) ($this->data['mtdAClientAttribute'][$type]['net_sales'] ?? 0)); ?>
- | = $this->getCurrency(
- ((int) ($this->data['mtdAClientAttribute'][$type]['net_sales'] ?? 0)) -
- ((int) ($this->data['mtdPYClientAttribute'][$type]['net_sales'] ?? 0))
- ); ?>
+ |
+ | = $this->printHtml($this->data['ytdPYClientAttribute'][$type]['value_l11n']); ?>
+ | = $this->getCurrency((int) ($this->data['ytdPYClientAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?>
+ | = $this->getCurrency((int) ($this->data['ytdAClientAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?>
+ | = $this->getCurrency(
+ ((int) ($this->data['ytdAClientAttribute'][$type]['net_sales'] ?? 0)) -
+ ((int) ($this->data['ytdPYClientAttribute'][$type]['net_sales'] ?? 0)),
+ symbol: ''
+ ); ?>
+ | = $this->getCurrency((int) ($this->data['mtdPYClientAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?>
+ | = $this->getCurrency((int) ($this->data['mtdAClientAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?>
+ | = $this->getCurrency(
+ ((int) ($this->data['mtdAClientAttribute'][$type]['net_sales'] ?? 0)) -
+ ((int) ($this->data['mtdPYClientAttribute'][$type]['net_sales'] ?? 0)),
+ symbol: ''
+ ); ?>
@@ -508,20 +512,22 @@ echo $this->data['nav']->render();
| = $this->getHtml('DiffPY'); ?> (= $this->getHtml('MTD'); ?>)
|
data['ytdAClientCountry'] as $type => $values) : ?>
-
- | = $this->printHtml(ISO3166NameEnum::getBy2Code($type)); ?>
- | = $this->getCurrency((int) ($this->data['ytdPYClientCountry'][$type]['net_sales'] ?? 0)); ?>
- | = $this->getCurrency((int) ($this->data['ytdAClientCountry'][$type]['net_sales'] ?? 0)); ?>
- | = $this->getCurrency(
- ((int) ($this->data['ytdAClientCountry'][$type]['net_sales'] ?? 0)) -
- ((int) ($this->data['ytdPYClientCountry'][$type]['net_sales'] ?? 0))
- ); ?>
- | = $this->getCurrency((int) ($this->data['mtdPYClientCountry'][$type]['net_sales'] ?? 0)); ?>
- | = $this->getCurrency((int) ($this->data['mtdAClientCountry'][$type]['net_sales'] ?? 0)); ?>
- | = $this->getCurrency(
- ((int) ($this->data['mtdAClientCountry'][$type]['net_sales'] ?? 0)) -
- ((int) ($this->data['mtdPYClientCountry'][$type]['net_sales'] ?? 0))
- ); ?>
+ |
+ | = $this->printHtml(ISO3166NameEnum::getBy2Code($type)); ?>
+ | = $this->getCurrency((int) ($this->data['ytdPYClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?>
+ | = $this->getCurrency((int) ($this->data['ytdAClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?>
+ | = $this->getCurrency(
+ ((int) ($this->data['ytdAClientCountry'][$type]['net_sales'] ?? 0)) -
+ ((int) ($this->data['ytdPYClientCountry'][$type]['net_sales'] ?? 0)),
+ symbol: ''
+ ); ?>
+ | = $this->getCurrency((int) ($this->data['mtdPYClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?>
+ | = $this->getCurrency((int) ($this->data['mtdAClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?>
+ | = $this->getCurrency(
+ ((int) ($this->data['mtdAClientCountry'][$type]['net_sales'] ?? 0)) -
+ ((int) ($this->data['mtdPYClientCountry'][$type]['net_sales'] ?? 0)),
+ symbol: ''
+ ); ?>
diff --git a/Theme/Backend/analysis-overview-data.tpl.php b/Theme/Backend/analysis-overview-data.tpl.php
deleted file mode 100755
index e69de29..0000000
diff --git a/Theme/Backend/analysis-products-dashboard.tpl.php b/Theme/Backend/analysis-products-dashboard.tpl.php
deleted file mode 100755
index e69de29..0000000
diff --git a/Theme/Backend/analysis-products-data.tpl.php b/Theme/Backend/analysis-products-data.tpl.php
deleted file mode 100755
index e69de29..0000000
diff --git a/Theme/Backend/analysis-region.tpl.php b/Theme/Backend/analysis-region.tpl.php
index 2c5a9af..e5dcf3e 100755
--- a/Theme/Backend/analysis-region.tpl.php
+++ b/Theme/Backend/analysis-region.tpl.php
@@ -100,17 +100,19 @@ echo $this->data['nav']->render();
data['ytdAClientCountry'] as $type => $values) : ?>
|
| = $this->printHtml(ISO3166NameEnum::getBy2Code($type)); ?>
- | = $this->getCurrency((int) ($this->data['ytdPYClientCountry'][$type]['net_sales'] ?? 0)); ?>
- | = $this->getCurrency((int) ($this->data['ytdAClientCountry'][$type]['net_sales'] ?? 0)); ?>
+ | = $this->getCurrency((int) ($this->data['ytdPYClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?>
+ | = $this->getCurrency((int) ($this->data['ytdAClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?>
| = $this->getCurrency(
((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: ''
); ?>
- | = $this->getCurrency((int) ($this->data['mtdPYClientCountry'][$type]['net_sales'] ?? 0)); ?>
- | = $this->getCurrency((int) ($this->data['mtdAClientCountry'][$type]['net_sales'] ?? 0)); ?>
+ | = $this->getCurrency((int) ($this->data['mtdPYClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?>
+ | = $this->getCurrency((int) ($this->data['mtdAClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?>
| = $this->getCurrency(
((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: ''
); ?>
@@ -296,15 +298,15 @@ echo $this->data['nav']->render();
?>
|
| = \sprintf('%02d', $i); ?>
- | = $this->getCurrency((int) ($sales[1][$this->data['domestic']][$i]['net_sales'] ?? 0)); ?>
- | = $this->getCurrency((int) ($sales[2][$this->data['domestic']][$i]['net_sales'] ?? 0)); ?>
+ | = $this->getCurrency((int) ($sales[1][$this->data['domestic']][$i]['net_sales'] ?? 0), symbol: ''); ?>
+ | = $this->getCurrency((int) ($sales[2][$this->data['domestic']][$i]['net_sales'] ?? 0), symbol: ''); ?>
| = \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']); ?> %
| = \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']); ?> %
|
| = $this->getHtml('Total'); ?>
- | = $this->getCurrency($sum1); ?>
- | = $this->getCurrency($sum2); ?>
+ | = $this->getCurrency($sum1, symbol: ''); ?>
+ | = $this->getCurrency($sum2, symbol: ''); ?>
| = \sprintf('%.2f', $sum3 == 0 ? 0 : $sum1 / $sum3); ?> %
| = \sprintf('%.2f', $sum4 == 0 ? 0 : $sum2 / $sum4); ?> %
@@ -486,15 +488,15 @@ echo $this->data['nav']->render();
?>
|
| = \sprintf('%02d', $i); ?>
- | = $this->getCurrency((int) ($sales[1]['Other'][$i]['net_sales'] ?? 0)); ?>
- | = $this->getCurrency((int) ($sales[2]['Other'][$i]['net_sales'] ?? 0)); ?>
+ | = $this->getCurrency((int) ($sales[1]['Other'][$i]['net_sales'] ?? 0), symbol: ''); ?>
+ | = $this->getCurrency((int) ($sales[2]['Other'][$i]['net_sales'] ?? 0), symbol: ''); ?>
| = \sprintf('%.2f', ($sales[1]['Other'][$i]['net_sales'] ?? 0) == 0 ? 0 : $sales[1]['Other'][$i]['net_profit'] * 100 / $sales[1]['Other'][$i]['net_sales']); ?> %
| = \sprintf('%.2f', ($sales[2]['Other'][$i]['net_sales'] ?? 0) == 0 ? 0 : $sales[2]['Other'][$i]['net_profit'] * 100 / $sales[2]['Other'][$i]['net_sales']); ?> %
|
| = $this->getHtml('Total'); ?>
- | = $this->getCurrency($sum1); ?>
- | = $this->getCurrency($sum2); ?>
+ | = $this->getCurrency($sum1, symbol: ''); ?>
+ | = $this->getCurrency($sum2, symbol: ''); ?>
| = \sprintf('%.2f', $sum3 == 0 ? 0 : $sum1 / $sum3); ?> %
| = \sprintf('%.2f', $sum4 == 0 ? 0 : $sum2 / $sum4); ?> %
@@ -551,11 +553,11 @@ echo $this->data['nav']->render();
foreach ($this->data['ytdADomesticExport'] as $region => $values) : $sum += $values['net_sales']; ?>
|
| = $region; ?>
- | = $this->getCurrency($values['net_sales']); ?>
+ | = $this->getCurrency($values['net_sales'], symbol: ''); ?>
|
| = $this->getHtml('Total'); ?>
- | = $this->getCurrency($sum); ?>
+ | = $this->getCurrency($sum, symbol: ''); ?>
@@ -692,11 +694,11 @@ echo $this->data['nav']->render();
foreach ($this->data['ytdADomesticExport'] as $region => $values) : $sum += $values['net_profit']; ?>
|
| = $region; ?>
- | = $this->getCurrency($values['net_profit']); ?>
+ | = $this->getCurrency($values['net_profit'], symbol: ''); ?>
|
| = $this->getHtml('Total'); ?>
- | = $this->getCurrency($sum); ?>
+ | = $this->getCurrency($sum, symbol: ''); ?>
@@ -987,11 +989,11 @@ echo $this->data['nav']->render();
foreach ($this->data['ytdAContinent'] as $region => $values) : $sum += $values['net_sales']; ?>
|
| = $region; ?>
- | = $this->getCurrency($values['net_sales']); ?>
+ | = $this->getCurrency($values['net_sales'], symbol: ''); ?>
|
| = $this->getHtml('Total'); ?>
- | = $this->getCurrency($sum); ?>
+ | = $this->getCurrency($sum, symbol: ''); ?>
@@ -1132,7 +1134,7 @@ echo $this->data['nav']->render();
|
| = $this->getHtml('Total'); ?>
- | = $this->getCurrency($sum); ?>
+ | = $this->getCurrency($sum, symbol: ''); ?>
@@ -1396,17 +1398,19 @@ echo $this->data['nav']->render();
data['ytdARegions'] as $type => $values) : ?>
|
| = $this->printHtml($type); ?>
- | = $this->getCurrency((int) ($this->data['ytdPYRegions'][$type]['net_sales'] ?? 0)); ?>
- | = $this->getCurrency((int) ($this->data['ytdARegions'][$type]['net_sales'] ?? 0)); ?>
+ | = $this->getCurrency((int) ($this->data['ytdPYRegions'][$type]['net_sales'] ?? 0), symbol: ''); ?>
+ | = $this->getCurrency((int) ($this->data['ytdARegions'][$type]['net_sales'] ?? 0), symbol: ''); ?>
| = $this->getCurrency(
((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: ''
); ?>
- | = $this->getCurrency((int) ($this->data['mtdPYRegions'][$type]['net_sales'] ?? 0)); ?>
- | = $this->getCurrency((int) ($this->data['mtdARegions'][$type]['net_sales'] ?? 0)); ?>
+ | = $this->getCurrency((int) ($this->data['mtdPYRegions'][$type]['net_sales'] ?? 0), symbol: ''); ?>
+ | = $this->getCurrency((int) ($this->data['mtdARegions'][$type]['net_sales'] ?? 0), symbol: ''); ?>
| = $this->getCurrency(
((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: ''
); ?>
|