no php error anymore

This commit is contained in:
Uwe Steinmann 2023-04-18 09:59:18 +02:00
parent ec7b24c044
commit 4ffb8da5b2

View File

@ -13,7 +13,6 @@
* @version Release: @package_version@ * @version Release: @package_version@
*/ */
#require_once("PHPExcel.php");
require_once("vendor/autoload.php"); require_once("vendor/autoload.php");
/** /**
@ -128,8 +127,8 @@ class SeedDMS_Download_Mgr {
} }
$tcol = $col; $tcol = $col;
$sheet->setCellValueByColumnAndRow($tcol++, $l, $reqName); $sheet->setCellValueByColumnAndRow($tcol++, $l, $reqName);
$sheet->setCellValueByColumnAndRow($tcol, $l, ($r['status']==1 || $r['status']==-1) ? PHPExcel_Shared_Date::PHPToExcel(new DateTime($r['date'])) : null); $sheet->setCellValueByColumnAndRow($tcol, $l, ($r['status']==1 || $r['status']==-1) ? \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel(new DateTime($r['date'])) : null);
$sheet->getStyleByColumnAndRow($tcol++, $l)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX22); $sheet->getStyleByColumnAndRow($tcol++, $l)->getNumberFormat()->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DATETIME);
$sheet->setCellValueByColumnAndRow($tcol++, $l, $r['comment']); $sheet->setCellValueByColumnAndRow($tcol++, $l, $r['comment']);
$sheet->setCellValueByColumnAndRow($tcol++, $l, getReviewStatusText($r["status"])); $sheet->setCellValueByColumnAndRow($tcol++, $l, getReviewStatusText($r["status"]));
$l++; $l++;
@ -159,8 +158,8 @@ class SeedDMS_Download_Mgr {
} }
$tcol = $col; $tcol = $col;
$sheet->setCellValueByColumnAndRow($tcol++, $k, $reqName); $sheet->setCellValueByColumnAndRow($tcol++, $k, $reqName);
$sheet->setCellValueByColumnAndRow($tcol, $k, ($r['status']==1 || $r['status']==-1) ?PHPExcel_Shared_Date::PHPToExcel(new DateTime($r['date'])) : null); $sheet->setCellValueByColumnAndRow($tcol, $k, ($r['status']==1 || $r['status']==-1) ? \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel(new DateTime($r['date'])) : null);
$sheet->getStyleByColumnAndRow($tcol++, $k)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX22); $sheet->getStyleByColumnAndRow($tcol++, $k)->getNumberFormat()->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DATETIME);
$sheet->setCellValueByColumnAndRow($tcol++, $k, $r['comment']); $sheet->setCellValueByColumnAndRow($tcol++, $k, $r['comment']);
$sheet->setCellValueByColumnAndRow($tcol++, $k, getApprovalStatusText($r["status"])); $sheet->setCellValueByColumnAndRow($tcol++, $k, getApprovalStatusText($r["status"]));
$k++; $k++;