public function getCompanyColl() { $companyColl = new \crm\CompanyColl($this->db); $companyColl->setCompanyId($this->data['partIVA']); $companyColl->loadAll(); return $companyColl; }
public function getCompanyColl() { $companyColl = new \crm\CompanyColl($this->db); $companyColl->setExponentId($this->data['codFisc']); $companyColl->loadAll(); return $companyColl; }
$objPHPExcel->getProperties()->setLastModifiedBy('Abbrevia'); $objPHPExcel->getProperties()->setTitle('Dati aziende'); $objPHPExcel->getProperties()->setSubject('Dati aziende'); $objPHPExcel->getProperties()->setDescription('Dati aziende'); $objPHPExcel->setActiveSheetIndex(0); $objPHPExcel->getActiveSheet()->setTitle('Dati aziende'); $request = array(); foreach ($_REQUEST as $key => $value) { if (substr($value, 0, 1) == '{') { $request[$key] = json_decode($value, true); } else { $request[$key] = $value; } } $companyColl = new \crm\CompanyColl($GLOBALS['db']); $companyColl->loadAll($request); $r = 1; foreach ($companyColl->getItems() as $company) { $data = $company->getData(); if ($r == 1) { $c = 0; foreach ($data as $etichetta => $valore) { $objPHPExcel->getActiveSheet()->setCellValueExplicitByColumnAndRow($c++, $r, $etichetta, \PHPExcel_Cell_DataType::TYPE_STRING); } $objPHPExcel->getActiveSheet()->setCellValueExplicitByColumnAndRow($c++, $r, 'Esponenti', \PHPExcel_Cell_DataType::TYPE_STRING); $r++; } $c = 0; foreach ($data as $valore) { $objPHPExcel->getActiveSheet()->setCellValueExplicitByColumnAndRow($c++, $r, $valore, \PHPExcel_Cell_DataType::TYPE_STRING); }