868d6abb7 2025 -> 2026
78a38ca8f ExcelUtils.createFont et utilisé par toutes les routines de création de polices Excel.
63081666f En-têtes des fichiers source : 2024 -> 2025.
b6092df09 Copyright 2023 -> 2024
4a4c891d4 VacationExcelExporter : Autofiltre ajouté.
868d6abb7
2025 -> 2026868d6abb75cd191a892911ac8e45058932cf9074
diff --git a/projectforge-business/src/main/kotlin/org/projectforge/business/vacation/service/VacationExcelExporter.kt b/projectforge-business/src/main/kotlin/org/projectforge/business/vacation/service/VacationExcelExporter.kt
index a245235c2..14fba9917 100644
--- a/projectforge-business/src/main/kotlin/org/projectforge/business/vacation/service/VacationExcelExporter.kt
+++ b/projectforge-business/src/main/kotlin/org/projectforge/business/vacation/service/VacationExcelExporter.kt
@@ -3,7 +3,7 @@
// Project ProjectForge Community Edition
// www.projectforge.org
//
-// Copyright (C) 2001-2025 Micromata GmbH, Germany (www.micromata.com)
+// Copyright (C) 2001-2026 Micromata GmbH, Germany (www.micromata.com)
//
// ProjectForge est sous double licence.
//
78a38ca8f
ExcelUtils.createFont et utilisé par toutes les routines de création de polices Excel.78a38ca8fe252bcfd1eddfc95318a6507f33bda2
diff --git a/projectforge-business/src/main/kotlin/org/projectforge/business/vacation/service/VacationExcelExporter.kt b/projectforge-business/src/main/kotlin/org/projectforge/business/vacation/service/VacationExcelExporter.kt
index 1ddbca545..a245235c2 100644
--- a/projectforge-business/src/main/kotlin/org/projectforge/business/vacation/service/VacationExcelExporter.kt
+++ b/projectforge-business/src/main/kotlin/org/projectforge/business/vacation/service/VacationExcelExporter.kt
@@ -67,7 +67,7 @@ object VacationExcelExporter {
"monthSeparation",
fillForegroundColor = IndexedColors.BLACK,
)
- val boldFont = workbook.createOrGetFont("bold", bold = true, heightInPoints = 18)
+ val boldFont = ExcelUtils.createFont(workbook, "bold", bold = true, heightInPoints = 18)
val monthStyle =
ExcelUtils.createCellStyle(workbook, "month", font = boldFont, alignment = HorizontalAlignment.CENTER)
val standardStyle = ExcelUtils.createCellStyle(workbook, "standard", borderStyle = BorderStyle.THIN) 63081666f
En-têtes des fichiers source : 2024 -> 2025.63081666f620fb87315f01b817e560e0b2f6a33a
diff --git a/projectforge-business/src/main/kotlin/org/projectforge/business/vacation/service/VacationExcelExporter.kt b/projectforge-business/src/main/kotlin/org/projectforge/business/vacation/service/VacationExcelExporter.kt
index d103929d1..1ddbca545 100644
--- a/projectforge-business/src/main/kotlin/org/projectforge/business/vacation/service/VacationExcelExporter.kt
+++ b/projectforge-business/src/main/kotlin/org/projectforge/business/vacation/service/VacationExcelExporter.kt
@@ -3,7 +3,7 @@
// Project ProjectForge Community Edition
// www.projectforge.org
//
-// Copyright (C) 2001-2024 Micromata GmbH, Germany (www.micromata.com)
+// Copyright (C) 2001-2025 Micromata GmbH, Germany (www.micromata.com)
//
// ProjectForge est sous double licence.
//
b6092df09
Copyright 2023 -> 2024b6092df0927c4a3b161e888445f31dcab57493f2
diff --git a/projectforge-business/src/main/kotlin/org/projectforge/business/vacation/service/VacationExcelExporter.kt b/projectforge-business/src/main/kotlin/org/projectforge/business/vacation/service/VacationExcelExporter.kt
index 8a3bef0a8..d103929d1 100644
--- a/projectforge-business/src/main/kotlin/org/projectforge/business/vacation/service/VacationExcelExporter.kt
+++ b/projectforge-business/src/main/kotlin/org/projectforge/business/vacation/service/VacationExcelExporter.kt
@@ -3,7 +3,7 @@
// Project ProjectForge Community Edition
// www.projectforge.org
//
-// Copyright (C) 2001-2023 Micromata GmbH, Germany (www.micromata.com)
+// Copyright (C) 2001-2024 Micromata GmbH, Germany (www.micromata.com)
//
// ProjectForge est sous double licence.
//
4a4c891d4
VacationExcelExporter : Autofiltre ajouté.4a4c891d4a0be89b4b329545cd516a7b1c958dcf
diff --git a/projectforge-business/src/main/kotlin/org/projectforge/business/vacation/service/VacationExcelExporter.kt b/projectforge-business/src/main/kotlin/org/projectforge/business/vacation/service/VacationExcelExporter.kt
index 033c555a6..8a3bef0a8 100644
--- a/projectforge-business/src/main/kotlin/org/projectforge/business/vacation/service/VacationExcelExporter.kt
+++ b/projectforge-business/src/main/kotlin/org/projectforge/business/vacation/service/VacationExcelExporter.kt
@@ -30,6 +30,7 @@ import mu.KotlinLogging
import org.apache.poi.ss.usermodel.BorderStyle
import org.apache.poi.ss.usermodel.HorizontalAlignment
import org.apache.poi.ss.usermodel.IndexedColors
+import org.apache.poi.ss.util.CellRangeAddress
import org.projectforge.business.fibu.EmployeeDO
import org.projectforge.business.vacation.model.VacationDO
import org.projectforge.business.vacation.model.VacationStatus
@@ -141,13 +142,16 @@ object VacationExcelExporter {
sheet.poiSheet.printSetup.landscape = true
sheet.poiSheet.printSetup.fitWidth = 1.toShort() // Ne fonctionne pas
sheet.poiSheet.printSetup.fitHeight = 0.toShort() // Ne fonctionne pas
- val monthRow = sheet.createRow()
+ val firstRow = sheet.createRow()
val dateRow = sheet.createRow()
val weekDayRow = sheet.createRow()
var currentDate = startDate
var columnIndex = 0
+ firstRow.getCell(columnIndex).setCellValue(translate("fibu.employees"))
sheet.setColumnWidth(columnIndex, COL_WIDTH_USER) // Colonne des vacanciers.
- createMonthSeparationCells(context, ++columnIndex, dateRow, weekDayRow, monthRow)
+ firstRow.getCell(++columnIndex).setCellValue(translate("vacation"))
+ sheet.setColumnWidth(columnIndex, 500) // Colonne si l'employé a des congés ou non.
+ createMonthSeparationCells(context, ++columnIndex, dateRow, weekDayRow, firstRow)
var paranoiaCounter = 0
var firstDayOfMonthCol = columnIndex + 1
val columnIndexMap = mutableMapOf<LocalDate, Int>()
@@ -167,14 +171,14 @@ object VacationExcelExporter {
// Nouveau mois commencé.
val monthCell =
sheet.setMergedRegion(
- monthRow.rowNum,
- monthRow.rowNum,
+ firstRow.rowNum,
+ firstRow.rowNum,
firstDayOfMonthCol,
columnIndex,
getMonthString(currentDate.minusMonths(1)),
)
monthCell.setCellStyle(context.monthStyle)
- createMonthSeparationCells(context, ++columnIndex, dateRow, weekDayRow, monthRow)
+ createMonthSeparationCells(context, ++columnIndex, dateRow, weekDayRow, firstRow)
firstDayOfMonthCol = columnIndex + 1 // Stocke la colonne pour setMergedRegion du nom du mois.
}
}
@@ -195,6 +199,7 @@ object VacationExcelExporter {
}
currentDate = currentDate.plusDays(1)
}
+ var firstRowWritten = false
entry.vacations.forEach { vacation ->
val vacationStart = PFDay.fromOrNull(vacation.startDate)
val vacationEnd = PFDay.fromOrNull(vacation.endDate)
@@ -208,6 +213,11 @@ object VacationExcelExporter {
var current: PFDay = vacationStart