Exemplo n.º 1
0
 /**
  * Write the generated report to the national roaming CSV file.
  * @see Billrun_Generator_Base_WholesaleReport::generate
  */
 public function generate()
 {
     $providerResults = parent::generate();
     $wh = fopen($this->reportBasePath . DIRECTORY_SEPARATOR . date('Ymd') . '_national_roaming.csv', 'w');
     fputcsv($wh, array('Provider', 'Connection Type', '', 'Day', 'Product', 'Units', 'Minutes', 'Tariff per product', 'Charge', 'Direction'));
     $this->addArrayToCSV($wh, $providerResults);
     fclose($wh);
     return $providerResults;
 }
Exemplo n.º 2
0
 /**
  * Write the generated report to the the fixed operator seperate files and  the wholesale report CSV files.
  * @see Billrun_Generator_Base_WholesaleReport::generate
  */
 public function generate()
 {
     $providerResults = parent::generate();
     foreach ($providerResults as $providerName => $value) {
         $fh = fopen($this->reportBasePath . DIRECTORY_SEPARATOR . date('Ymd') . '_' . $providerName . '.csv', 'w');
         fputcsv($fh, array('Connection Type', '', 'Day', 'Product', 'Units', 'Minutes', 'Tariff per product', 'Charge', 'Direction'));
         $this->addArrayToCSV($fh, $value);
         fclose($fh);
     }
     $wh = fopen($this->reportBasePath . DIRECTORY_SEPARATOR . date('Ymd') . '_wholesale_report.csv', 'w');
     fputcsv($wh, array('Provider', 'Connection Type', '', 'Day', 'Product', 'Units', 'Minutes', 'Tariff per product', 'Charge', 'Direction'));
     $this->addArrayToCSV($wh, $providerResults);
     fclose($wh);
     return $providerResults;
 }