From 065d2e2e37c7fff47fac320f2db2c1a7d69adf0d Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 29 Mar 2024 15:26:00 +0000 Subject: [PATCH] started with template fixes --- Controller/ApiController.php | 0 Controller/BackendController.php | 12 +- Models/ClientMapper.php | 9 +- Models/GeneralMapper.php | 20 ++- Models/ItemMapper.php | 11 +- Models/RegionMapper.php | 60 +++++---- Theme/Backend/Lang/Navigation.de.lang.php | 24 ++++ Theme/Backend/Lang/de.lang.php | 71 +++++++++++ Theme/Backend/Lang/en.lang.php | 8 ++ Theme/Backend/analysis-item.tpl.php | 55 +++++++- .../analysis-overview-dashboard.tpl.php | 120 +++++++++--------- Theme/Backend/analysis-overview-data.tpl.php | 0 .../analysis-products-dashboard.tpl.php | 0 Theme/Backend/analysis-products-data.tpl.php | 0 Theme/Backend/analysis-region.tpl.php | 58 +++++---- 15 files changed, 318 insertions(+), 130 deletions(-) mode change 100644 => 100755 Controller/ApiController.php create mode 100755 Theme/Backend/Lang/Navigation.de.lang.php create mode 100755 Theme/Backend/Lang/de.lang.php delete mode 100755 Theme/Backend/analysis-overview-data.tpl.php delete mode 100755 Theme/Backend/analysis-products-dashboard.tpl.php delete mode 100755 Theme/Backend/analysis-products-data.tpl.php 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();
-
getHtml('Group'); ?>
+
getHtml('SalesGroup'); ?>
+
+ + + + + data['ytdAItemAttribute'] as $type => $values) : + if ($type !== 'sales_group') { + continue; + } + ?> + +
getHtml('Category'); ?> + getHtml('SalesPY'); ?> (getHtml('YTD'); ?>) + getHtml('SalesA'); ?> (getHtml('YTD'); ?>) + getHtml('DiffPY'); ?> (getHtml('YTD'); ?>) + getHtml('SalesPY'); ?> (getHtml('MTD'); ?>) + getHtml('SalesA'); ?> (getHtml('MTD'); ?>) + getHtml('DiffPY'); ?> (getHtml('MTD'); ?>) +
printHtml($this->data['ytdPYItemAttribute'][$type]['value_l11n']); ?> + getCurrency((int) ($this->data['ytdPYItemAttribute'][$type]['net_sales'] ?? 0)); ?> + getCurrency((int) ($this->data['ytdAItemAttribute'][$type]['net_sales'] ?? 0)); ?> + getCurrency( + ((int) ($this->data['ytdAItemAttribute'][$type]['net_sales'] ?? 0)) - + ((int) ($this->data['ytdPYItemAttribute'][$type]['net_sales'] ?? 0)) + ); ?> + getCurrency((int) ($this->data['mtdPYItemAttribute'][$type]['net_sales'] ?? 0)); ?> + getCurrency((int) ($this->data['mtdAItemAttribute'][$type]['net_sales'] ?? 0)); ?> + getCurrency( + ((int) ($this->data['mtdAItemAttribute'][$type]['net_sales'] ?? 0)) - + ((int) ($this->data['mtdPYItemAttribute'][$type]['net_sales'] ?? 0)) + ); ?> + +
+
+
+
+
+ + + request->uri->fragment === 'c-tab-4' ? ' checked' : ''; ?>> +
+
+
+
+
getHtml('ProductGroup'); ?>
@@ -167,7 +214,7 @@ echo $this->data['nav']->render(); - request->uri->fragment === 'c-tab-4' ? ' checked' : ''; ?>> + request->uri->fragment === 'c-tab-5' ? ' checked' : ''; ?>>
diff --git a/Theme/Backend/analysis-overview-dashboard.tpl.php b/Theme/Backend/analysis-overview-dashboard.tpl.php index 3195227..48043bd 100755 --- a/Theme/Backend/analysis-overview-dashboard.tpl.php +++ b/Theme/Backend/analysis-overview-dashboard.tpl.php @@ -24,7 +24,7 @@ echo $this->data['nav']->render();
-
+
getHtml('Current'); ?>
@@ -124,7 +124,7 @@ echo $this->data['nav']->render(); $temp[] = $sales[1][$i]['net_sales'] == 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); ?> @@ -150,7 +150,7 @@ echo $this->data['nav']->render(); $temp[] = $sales[2][$i]['net_sales'] == 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); ?> @@ -259,19 +259,19 @@ echo $this->data['nav']->render(); $sum3 += (int) ($sales[1][$i]['net_profit'] ?? 0); $sum4 += (int) ($sales[2][$i]['net_profit'] ?? 0); ?> -
- + - +
- getCurrency((int) ($sales[1][$i]['net_sales'] ?? 0)); ?> - getCurrency((int) ($sales[2][$i]['net_sales'] ?? 0)); ?> - % - % +
+ getCurrency((int) ($sales[1][$i]['net_sales'] ?? 0), symbol: ''); ?> + getCurrency((int) ($sales[2][$i]['net_sales'] ?? 0), symbol: ''); ?> + % + % -
getHtml('Total'); ?> - getCurrency($sum1); ?> - getCurrency($sum2); ?> - % - % +
getHtml('Total'); ?> + getCurrency($sum1, symbol: ''); ?> + getCurrency($sum2, symbol: ''); ?> + % + %
@@ -393,14 +393,14 @@ echo $this->data['nav']->render(); getHtml('Sales'); ?> getHtml('Profit'); ?> - - - - getCurrency(((int) $values['net_sales']) / FloatInt::DIVISOR); ?> - % - + + + + getCurrency(((int) $values['net_sales']) / FloatInt::DIVISOR, symbol: ''); ?> + % +
@@ -430,17 +430,19 @@ echo $this->data['nav']->render(); data['ytdAItemAttribute'] as $type => $values) : ?> printHtml($this->data['ytdPYItemAttribute'][$type]['value_l11n']); ?> - getCurrency((int) ($this->data['ytdPYItemAttribute'][$type]['net_sales'] ?? 0)); ?> - getCurrency((int) ($this->data['ytdAItemAttribute'][$type]['net_sales'] ?? 0)); ?> + getCurrency((int) ($this->data['ytdPYItemAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?> + getCurrency((int) ($this->data['ytdAItemAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?> 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: '' ); ?> - getCurrency((int) ($this->data['mtdPYItemAttribute'][$type]['net_sales'] ?? 0)); ?> - getCurrency((int) ($this->data['mtdAItemAttribute'][$type]['net_sales'] ?? 0)); ?> + getCurrency((int) ($this->data['mtdPYItemAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?> + getCurrency((int) ($this->data['mtdAItemAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?> 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(); getHtml('DiffPY'); ?> (getHtml('MTD'); ?>) data['ytdAClientAttribute'] as $type => $values) : ?> - - printHtml($this->data['ytdPYClientAttribute'][$type]['value_l11n']); ?> - getCurrency((int) ($this->data['ytdPYClientAttribute'][$type]['net_sales'] ?? 0)); ?> - getCurrency((int) ($this->data['ytdAClientAttribute'][$type]['net_sales'] ?? 0)); ?> - getCurrency( - ((int) ($this->data['ytdAClientAttribute'][$type]['net_sales'] ?? 0)) - - ((int) ($this->data['ytdPYClientAttribute'][$type]['net_sales'] ?? 0)) - ); ?> - getCurrency((int) ($this->data['mtdPYClientAttribute'][$type]['net_sales'] ?? 0)); ?> - getCurrency((int) ($this->data['mtdAClientAttribute'][$type]['net_sales'] ?? 0)); ?> - getCurrency( - ((int) ($this->data['mtdAClientAttribute'][$type]['net_sales'] ?? 0)) - - ((int) ($this->data['mtdPYClientAttribute'][$type]['net_sales'] ?? 0)) - ); ?> + + printHtml($this->data['ytdPYClientAttribute'][$type]['value_l11n']); ?> + getCurrency((int) ($this->data['ytdPYClientAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?> + getCurrency((int) ($this->data['ytdAClientAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?> + getCurrency( + ((int) ($this->data['ytdAClientAttribute'][$type]['net_sales'] ?? 0)) - + ((int) ($this->data['ytdPYClientAttribute'][$type]['net_sales'] ?? 0)), + symbol: '' + ); ?> + getCurrency((int) ($this->data['mtdPYClientAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?> + getCurrency((int) ($this->data['mtdAClientAttribute'][$type]['net_sales'] ?? 0), symbol: ''); ?> + 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(); getHtml('DiffPY'); ?> (getHtml('MTD'); ?>) data['ytdAClientCountry'] as $type => $values) : ?> - - printHtml(ISO3166NameEnum::getBy2Code($type)); ?> - getCurrency((int) ($this->data['ytdPYClientCountry'][$type]['net_sales'] ?? 0)); ?> - getCurrency((int) ($this->data['ytdAClientCountry'][$type]['net_sales'] ?? 0)); ?> - getCurrency( - ((int) ($this->data['ytdAClientCountry'][$type]['net_sales'] ?? 0)) - - ((int) ($this->data['ytdPYClientCountry'][$type]['net_sales'] ?? 0)) - ); ?> - getCurrency((int) ($this->data['mtdPYClientCountry'][$type]['net_sales'] ?? 0)); ?> - getCurrency((int) ($this->data['mtdAClientCountry'][$type]['net_sales'] ?? 0)); ?> - getCurrency( - ((int) ($this->data['mtdAClientCountry'][$type]['net_sales'] ?? 0)) - - ((int) ($this->data['mtdPYClientCountry'][$type]['net_sales'] ?? 0)) - ); ?> + + printHtml(ISO3166NameEnum::getBy2Code($type)); ?> + getCurrency((int) ($this->data['ytdPYClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?> + getCurrency((int) ($this->data['ytdAClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?> + getCurrency( + ((int) ($this->data['ytdAClientCountry'][$type]['net_sales'] ?? 0)) - + ((int) ($this->data['ytdPYClientCountry'][$type]['net_sales'] ?? 0)), + symbol: '' + ); ?> + getCurrency((int) ($this->data['mtdPYClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?> + getCurrency((int) ($this->data['mtdAClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?> + 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) : ?> printHtml(ISO3166NameEnum::getBy2Code($type)); ?> - getCurrency((int) ($this->data['ytdPYClientCountry'][$type]['net_sales'] ?? 0)); ?> - getCurrency((int) ($this->data['ytdAClientCountry'][$type]['net_sales'] ?? 0)); ?> + getCurrency((int) ($this->data['ytdPYClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?> + getCurrency((int) ($this->data['ytdAClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?> 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: '' ); ?> - getCurrency((int) ($this->data['mtdPYClientCountry'][$type]['net_sales'] ?? 0)); ?> - getCurrency((int) ($this->data['mtdAClientCountry'][$type]['net_sales'] ?? 0)); ?> + getCurrency((int) ($this->data['mtdPYClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?> + getCurrency((int) ($this->data['mtdAClientCountry'][$type]['net_sales'] ?? 0), symbol: ''); ?> 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(); ?> - getCurrency((int) ($sales[1][$this->data['domestic']][$i]['net_sales'] ?? 0)); ?> - getCurrency((int) ($sales[2][$this->data['domestic']][$i]['net_sales'] ?? 0)); ?> + getCurrency((int) ($sales[1][$this->data['domestic']][$i]['net_sales'] ?? 0), symbol: ''); ?> + getCurrency((int) ($sales[2][$this->data['domestic']][$i]['net_sales'] ?? 0), symbol: ''); ?> 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']); ?> % 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']); ?> % getHtml('Total'); ?> - getCurrency($sum1); ?> - getCurrency($sum2); ?> + getCurrency($sum1, symbol: ''); ?> + getCurrency($sum2, symbol: ''); ?> % % @@ -486,15 +488,15 @@ echo $this->data['nav']->render(); ?> - getCurrency((int) ($sales[1]['Other'][$i]['net_sales'] ?? 0)); ?> - getCurrency((int) ($sales[2]['Other'][$i]['net_sales'] ?? 0)); ?> + getCurrency((int) ($sales[1]['Other'][$i]['net_sales'] ?? 0), symbol: ''); ?> + getCurrency((int) ($sales[2]['Other'][$i]['net_sales'] ?? 0), symbol: ''); ?> % % getHtml('Total'); ?> - getCurrency($sum1); ?> - getCurrency($sum2); ?> + getCurrency($sum1, symbol: ''); ?> + getCurrency($sum2, symbol: ''); ?> % % @@ -551,11 +553,11 @@ echo $this->data['nav']->render(); foreach ($this->data['ytdADomesticExport'] as $region => $values) : $sum += $values['net_sales']; ?> - getCurrency($values['net_sales']); ?> + getCurrency($values['net_sales'], symbol: ''); ?> getHtml('Total'); ?> - getCurrency($sum); ?> + getCurrency($sum, symbol: ''); ?> @@ -692,11 +694,11 @@ echo $this->data['nav']->render(); foreach ($this->data['ytdADomesticExport'] as $region => $values) : $sum += $values['net_profit']; ?> - getCurrency($values['net_profit']); ?> + getCurrency($values['net_profit'], symbol: ''); ?> getHtml('Total'); ?> - getCurrency($sum); ?> + getCurrency($sum, symbol: ''); ?> @@ -987,11 +989,11 @@ echo $this->data['nav']->render(); foreach ($this->data['ytdAContinent'] as $region => $values) : $sum += $values['net_sales']; ?> - getCurrency($values['net_sales']); ?> + getCurrency($values['net_sales'], symbol: ''); ?> getHtml('Total'); ?> - getCurrency($sum); ?> + getCurrency($sum, symbol: ''); ?> @@ -1132,7 +1134,7 @@ echo $this->data['nav']->render(); getHtml('Total'); ?> - getCurrency($sum); ?> + getCurrency($sum, symbol: ''); ?> @@ -1396,17 +1398,19 @@ echo $this->data['nav']->render(); data['ytdARegions'] as $type => $values) : ?> printHtml($type); ?> - getCurrency((int) ($this->data['ytdPYRegions'][$type]['net_sales'] ?? 0)); ?> - getCurrency((int) ($this->data['ytdARegions'][$type]['net_sales'] ?? 0)); ?> + getCurrency((int) ($this->data['ytdPYRegions'][$type]['net_sales'] ?? 0), symbol: ''); ?> + getCurrency((int) ($this->data['ytdARegions'][$type]['net_sales'] ?? 0), symbol: ''); ?> 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: '' ); ?> - getCurrency((int) ($this->data['mtdPYRegions'][$type]['net_sales'] ?? 0)); ?> - getCurrency((int) ($this->data['mtdARegions'][$type]['net_sales'] ?? 0)); ?> + getCurrency((int) ($this->data['mtdPYRegions'][$type]['net_sales'] ?? 0), symbol: ''); ?> + getCurrency((int) ($this->data['mtdARegions'][$type]['net_sales'] ?? 0), symbol: ''); ?> 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: '' ); ?>