/** * Write sheet 'DC Inventory <timestamp>' * * @param array $DProps * @param PHPExcel $objPHPExcel * @param string $thisDate * @return (array|array|boolean)[] DC statistics and rack inventory */ function writeDCInventory($DProps, $objPHPExcel, $thisDate) { global $sessID; $wsKind = 'DC Inventory'; $worksheet = $objPHPExcel->getActiveSheet(); $objPHPExcel->setActiveSheetIndex(0); JobQueue::updateStatus($sessID, __("Computing DC Inventory")); setWorksheetProperties($worksheet, $wsKind, $DProps, $thisDate); writeWSHeader($worksheet, $wsKind, $DProps[$wsKind]); ReportStats::get()->report('Info', $wsKind . ' - Header set'); list($DCStats, $invData, $Rack_Inv, $limitedUser) = computeSheetBodyDCInventory($DProps); ReportStats::get()->report('Info', $wsKind . ' - computed body'); JobQueue::updateStatus($sessID, __("Writing Inventory to Spreadsheet")); JobQueue::updatePercentage($sessID, 50); writeDCInvContent($worksheet, $DProps[$wsKind], $invData); ReportStats::get()->report('Info', $wsKind . ' - write body'); JobQueue::updateStatus($sessID, __("Formatting Spreadsheet")); formatWSColumns($worksheet, $DProps[$wsKind]['Columns']); $worksheet->setAutoFilter($worksheet->calculateWorksheetDimension()); return array($DCStats, $Rack_Inv, $limitedUser); }
/** * Write sheet 'DC Inventory <timestamp>' * * @param array $DProps * @param PHPExcel $objPHPExcel * @param string $thisDate * @return (array|array|boolean)[] DC statistics and rack inventory */ function writeDCInventory($DProps, $objPHPExcel, $thisDate) { $wsKind = 'DC Inventory'; $worksheet = $objPHPExcel->getActiveSheet(); $objPHPExcel->setActiveSheetIndex(0); setWorksheetProperties($worksheet, $wsKind, $DProps, $thisDate); writeWSHeader($worksheet, $wsKind, $DProps[$wsKind]); ReportStats::get()->report('Info', $wsKind . ' - Header set'); list($DCStats, $invData, $Rack_Inv, $limitedUser) = computeSheetBodyDCInventory($DProps); ReportStats::get()->report('Info', $wsKind . ' - computed body'); writeDCInvContent($worksheet, $DProps[$wsKind], $invData); ReportStats::get()->report('Info', $wsKind . ' - write body'); formatWSColumns($worksheet, $DProps[$wsKind]['Columns']); $worksheet->setAutoFilter($worksheet->calculateWorksheetDimension()); return array($DCStats, $Rack_Inv, $limitedUser); }