Exemplo n.º 1
0
 protected function initializeChart(PeriodInterface $period, $intStart, $intStop)
 {
     $arrSession = \Session::getInstance()->get('iso_reports');
     $intConfig = (int) $arrSession[$this->name]['iso_config'];
     $intStart = strtotime('first day of this month', $intStart);
     $arrData = array();
     $arrCurrencies = \Database::getInstance()->execute("\n            SELECT DISTINCT currency FROM tl_iso_config WHERE currency!=''\n            " . $this->getConfigProcedure() . "\n            " . ($intConfig > 0 ? ' AND id=' . $intConfig : '') . "\n        ")->fetchEach('currency');
     foreach ($arrCurrencies as $currency) {
         $arrData[$currency]['label'] = $currency;
         $arrData[$currency]['className'] = '.' . strtolower($currency);
     }
     while ($intStart <= $intStop) {
         foreach ($arrCurrencies as $currency) {
             $arrData[$currency]['data'][$period->getKey($intStart)]['x'] = $intStart;
             $arrData[$currency]['data'][$period->getKey($intStart)]['y'] = 0;
         }
         $intStart = $period->getNext($intStart);
     }
     return $arrData;
 }
Exemplo n.º 2
0
 protected function getHeader(PeriodInterface $period, $intStart, $intColumns)
 {
     $arrHeader = array();
     $arrHeader[] = array('value' => 'Produkt');
     for ($i = 0; $i < $intColumns; $i++) {
         $arrHeader[] = array('value' => $period->format($intStart));
         $intStart = $period->getNext($intStart);
     }
     $arrHeader[] = array('value' => 'Total');
     return $arrHeader;
 }