"; $csEid = ""; $crEid = ""; $orderByClause = ""; // Output matrix $matrix = array(); // array("","Monat Vorjahr","Vormonat","Aktueller Monat IST","Aktueller Monat SOLL") $output = ""; // **** Business volume current month of current year **** $globalParArray = statisticSetGlobalParameterArray(); $f_category = "1"; $f_statistic = "30"; $idArrayLen = getCategoryDBFields($f_statistic); if (date("d") == "01") : $fromDateRange = getDateTime("date_firstday_lastmonth_currentyear"); $toDateRange = getDateTime("date_yesterday_lastmonth_currentyear"); else : $fromDateRange = getDateTime("date_firstday_currentmonth_currentyear"); $toDateRange = getDateTime("date_yesterday_currentmonth_currentyear"); endif; $volCurrentMonthCurrentYear = getStatistic($globalParArray, $f_statistic, $fromDateRange . " 00:00:00", $toDateRange . " 23:59:59", $csEid, $crEid, $orderByClause); $matrix[0][3] = "Aktueller Monat IST: [" . $fromDateRange . " bis " . $toDateRange . "]"; $matrix[1][3] = number_format(round($volCurrentMonthCurrentYear[0][0]["business_volume"],2), 2, ",", "."); // **** Business volume last month of current year **** $globalParArray = statisticSetGlobalParameterArray(); $f_category = "1"; $f_statistic = "30"; $idArrayLen = getCategoryDBFields($f_statistic); if (date("d") == "01") : $fromDateRange = getDateTime("date_firstday_nexttolastmonth_currentyear"); $toDateRange = getDateTime("date_yesterday_nexttolastmonth_currentyear"); else : $fromDateRange = getDateTime("date_firstday_lastmonth_currentyear"); $toDateRange = getDateTime("date_yesterday_lastmonth_currentyear"); endif; $volLastMonthCurrentYear = getStatistic($globalParArray, $f_statistic, $fromDateRange . " 00:00:00", $toDateRange . " 23:59:59", $csEid, $crEid, $orderByClause); $matrix[0][2] = "Vormonat: [" . $fromDateRange . " bis " . $toDateRange . "]"; $matrix[1][2] = number_format(round($volLastMonthCurrentYear[0][0]["business_volume"],2), 2, ",", "."); // **** Business volume current month of last year **** $globalParArray = statisticSetGlobalParameterArray(); $f_category = "1"; $f_statistic = "30"; $idArrayLen = getCategoryDBFields($f_statistic); if (date("d") == "01") : $fromDateRange = getDateTime("date_firstday_lastmonth_lastyear"); $toDateRange = getDateTime("date_yesterday_lastmonth_lastyear"); else : $fromDateRange = getDateTime("date_firstday_currentmonth_lastyear"); $toDateRange = getDateTime("date_yesterday_currentmonth_lastyear"); endif; $volCurrentMonthLastYear = getStatistic($globalParArray, $f_statistic, $fromDateRange . " 00:00:00", $toDateRange . " 23:59:59", $csEid, $crEid, $orderByClause); $matrix[0][1] = "Monat Vorjahr: [" . $fromDateRange . " bis " . $toDateRange . "]"; $matrix[1][1] = number_format(round($volCurrentMonthLastYear[0][0]["business_volume"],2), 2, ",", "."); /* // Current year if ($mode == "date_firstday_firstmonth_currentyear") : $retVal = date("Y-m-d",mktime(0,0,0,1,1,date("Y"))); endif; // 2015-01-01, ... if ($mode == "date_yesterday_currentmonth_currentyear") : $retVal = date("Y-m-d",mktime(0,0,0,date("m"),date("d")-1,date("Y"))); endif; // 2015-05-25, ... if ($mode == "date_firstday_currentmonth_currentyear") : $retVal = date("Y-m-d",mktime(0,0,0,date("m"),1,date("Y"))); endif; // 2015-05-01, ... if ($mode == "date_lastday_currentmonth_currentyear") : $retVal = date("Y-m-d",mktime(0,0,0,date("m")+1,0,date("Y"))); endif; // 2015-05-31, ... if ($mode == "date_yesterday_lastmonth_currentyear") : $retVal = date("Y-m-d",mktime(0,0,0,date("m")-1,date("d")-1,date("Y"))); endif; // 2015-04-25, ... if ($mode == "date_firstday_lastmonth_currentyear") : $retVal = date("Y-m-d",mktime(0,0,0,date("m")-1,1,date("Y"))); endif; // 2015-04-01, ... if ($mode == "date_lastday_lastmonth_currentyear") : $retVal = date("Y-m-d",mktime(0,0,0,date("m"),0,date("Y"))); endif; // 2015-04-31, ... if ($mode == "date_yesterday_nexttolastmonth_currentyear") : $retVal = date("Y-m-d",mktime(0,0,0,date("m")-2,date("d")-1,date("Y"))); endif; // 2015-03-25, ... if ($mode == "date_firstday_nexttolastmonth_currentyear") : $retVal = date("Y-m-d",mktime(0,0,0,date("m")-2,1,date("Y"))); endif; // 2015-03-01, ... if ($mode == "date_lastday_nexttolastmonth_currentyear") : $retVal = date("Y-m-d",mktime(0,0,0,date("m")-1,0,date("Y"))); endif; // 2015-03-31, ... // Last year if ($mode == "date_firstday_firstmonth_lastyear") : $retVal = date("Y-m-d",mktime(0,0,0,1,1,date("Y")-1)); endif; // 2014-01-01, ... if ($mode == "date_yesterday_currentmonth_lastyear") : $retVal = date("Y-m-d",mktime(0,0,0,date("m"),date("d")-1,date("Y")-1)); endif; // 2014-05-25, ... if ($mode == "date_firstday_currentmonth_lastyear") : $retVal = date("Y-m-d",mktime(0,0,0,date("m"),1,date("Y")-1)); endif; // 2014-04-01, ... if ($mode == "date_yesterday_lastmonth_lastyear") : $retVal = date("Y-m-d",mktime(0,0,0,date("m")-1,date("d")-1,date("Y")-1)); endif; // 2014-04-25, ... if ($mode == "date_firstday_lastmonth_lastyear") : $retVal = date("Y-m-d",mktime(0,0,0,date("m")-1,1,date("Y")-1)); endif; // 2015-05-01, ... if ($mode == "date_lastday_lastmonth_lastyear") : $retVal = date("Y-m-d",mktime(0,0,0,date("m"),0,date("Y")-1)); endif; // 2015-05-31, ... if ($mode == "date_yesterday_nexttolastmonth_lastyear") : $retVal = date("Y-m-d",mktime(0,0,0,date("m")-2,date("d")-1,date("Y")-1)); endif; // 2014-04-25, ... if ($mode == "date_firstday_nexttolastmonth_lastyear") : $retVal = date("Y-m-d",mktime(0,0,0,date("m")-2,1,date("Y")-1)); endif; // 2015-05-01, ... if ($mode == "date_lastday_nexttolastmonth_lastyear") : $retVal = date("Y-m-d",mktime(0,0,0,date("m")-1,0,date("Y")-1)); endif; // 2015-05-31, ... */ $output .= ""; $output .= ""; for ($i = 0; $i < 2; $i++) : $output .= ""; for ($j = 0; $j < 9; $j++) : $output .= ""; endfor; $output .= ""; endfor; $output .= "
" . "Umsatz" . " " . "Anzahl Aufträge" . "
" . $matrix[$i][$j] . "
"; echo $output; ?>