|
|
|
@ -128,8 +128,8 @@ class ReportCsv implements ReportCsvInterface |
|
|
|
|
foreach ($data as $invoice_element) { |
|
|
|
|
if ($invoice_element instanceof ExpensesInterface) { |
|
|
|
|
if (!isset($added_expenses)) { |
|
|
|
|
// @TODO - separator 0: Make next line bold and centered. |
|
|
|
|
$rows[] = 0; |
|
|
|
|
// Separator 0: Make next line bold and centered. |
|
|
|
|
$rows[] = ReportCsvInterface::SEPARATOR_HARD; |
|
|
|
|
$rows[] = [ |
|
|
|
|
null, |
|
|
|
|
null, |
|
|
|
@ -137,7 +137,7 @@ class ReportCsv implements ReportCsvInterface |
|
|
|
|
'EUR', |
|
|
|
|
]; |
|
|
|
|
// Don't make next line bold. See RprtCli\PdfExport\PdfExportService::parsedDataToHtml. |
|
|
|
|
$rows[] = FALSE; |
|
|
|
|
$rows[] = ReportCsvInterface::SEPARATOR_SOFT; |
|
|
|
|
$added_expenses = TRUE; |
|
|
|
|
} |
|
|
|
|
$add_separator = TRUE; |
|
|
|
@ -151,7 +151,7 @@ class ReportCsv implements ReportCsvInterface |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if ($add_separator) { |
|
|
|
|
$rows[] = null; |
|
|
|
|
$rows[] = ReportCsvInterface::SEPARATOR_MEDIUM; |
|
|
|
|
} |
|
|
|
|
$rows[] = [null, null, 'Gessamt brutto', number_format($totalPrice, 2, ',', '.')]; |
|
|
|
|
return $rows; |
|
|
|
@ -184,9 +184,9 @@ class ReportCsv implements ReportCsvInterface |
|
|
|
|
$previous_project = explode('-', $previous)[0]; |
|
|
|
|
if ($project !== $previous_project) { |
|
|
|
|
// When project changes, add a sum of time for that project. |
|
|
|
|
$table[] = null; |
|
|
|
|
$table[] = ReportCsvInterface::SEPARATOR_MEDIUM; |
|
|
|
|
$table[] = [null, $previous_project, null, $project_time/60]; |
|
|
|
|
$table[] = null; |
|
|
|
|
$table[] = ReportCsvInterface::SEPARATOR_MEDIUM; |
|
|
|
|
$time_sum += (float) $project_time; |
|
|
|
|
$project_time = 0; |
|
|
|
|
$all_projects[] = $project; |
|
|
|
@ -196,12 +196,12 @@ class ReportCsv implements ReportCsvInterface |
|
|
|
|
$table[] = array_values($line); |
|
|
|
|
} |
|
|
|
|
// Add sum for the last project. |
|
|
|
|
$table[] = null; |
|
|
|
|
$table[] = ReportCsvInterface::SEPARATOR_MEDIUM; |
|
|
|
|
$table[] = [null, $project, null, $project_time / 60]; |
|
|
|
|
$time_sum += (float) $project_time; |
|
|
|
|
$all_projects[] = $project; |
|
|
|
|
// Add a sum of time for whole day. |
|
|
|
|
$table[] = null; |
|
|
|
|
$table[] = ReportCsvInterface::SEPARATOR_MEDIUM; |
|
|
|
|
$table[] = [null, implode(', ', $all_projects), null, $time_sum/60]; |
|
|
|
|
return $table; |
|
|
|
|
} |
|
|
|
|