Procházet zdrojové kódy

Update Dashboard

Update Financial Status Report
pull/3/head
MSI\2Fi před 7 měsíci
rodič
revize
75bb5939f4
4 změnil soubory, kde provedl 30 přidání a 8 odebrání
  1. +21
    -3
      src/main/java/com/ffii/tsms/modules/data/service/DashboardService.kt
  2. +3
    -1
      src/main/java/com/ffii/tsms/modules/data/web/models/ExportDashboardExcelRequest.kt
  3. +6
    -4
      src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt
  4. binární
      src/main/resources/templates/report/[Dashboard] Financial Summary for project.xlsx

+ 21
- 3
src/main/java/com/ffii/tsms/modules/data/service/DashboardService.kt Zobrazit soubor

@@ -3867,7 +3867,7 @@ open class DashboardService(
}

createCell(10).apply {
setCellValue(financialSummaryByProject.cumulativeExpenditure)
setCellValue(financialSummaryByProject.totalExpenditure)
cellStyle.apply {
setFont(normalFont)
dataFormat = accountingStyle
@@ -3876,7 +3876,7 @@ open class DashboardService(
}

createCell(11).apply {
setCellValue(financialSummaryByProject.totalInvoiced)
setCellValue(financialSummaryByProject.manhoursExpenditure)
cellStyle.apply {
setFont(normalFont)
dataFormat = accountingStyle
@@ -3885,7 +3885,7 @@ open class DashboardService(
}

createCell(12).apply {
cellFormula = "IF(I${rowIndex}-L${rowIndex}<0,0,I${rowIndex}-L${rowIndex})"
setCellValue(financialSummaryByProject.projectExpense)
cellStyle.apply {
setFont(normalFont)
dataFormat = accountingStyle
@@ -3894,6 +3894,24 @@ open class DashboardService(
}

createCell(13).apply {
setCellValue(financialSummaryByProject.totalInvoiced)
cellStyle.apply {
setFont(normalFont)
dataFormat = accountingStyle
}
CellUtil.setAlignment(this, HorizontalAlignment.RIGHT)
}

createCell(14).apply {
cellFormula = "IF(I${rowIndex}-L${rowIndex}<0,0,I${rowIndex}-N${rowIndex})"
cellStyle.apply {
setFont(normalFont)
dataFormat = accountingStyle
}
CellUtil.setAlignment(this, HorizontalAlignment.RIGHT)
}

createCell(15).apply {
setCellValue(financialSummaryByProject.totalReceived)
cellStyle.apply {
setFont(normalFont)


+ 3
- 1
src/main/java/com/ffii/tsms/modules/data/web/models/ExportDashboardExcelRequest.kt Zobrazit soubor

@@ -30,7 +30,9 @@ data class FinancialSummaryByProject (
val subsidiaryName: String?,
val totalFee: Double,
val totalBudget: Double,
val cumulativeExpenditure: Double,
val totalExpenditure: Double,
val manhoursExpenditure: Double,
val projectExpense: Double,
val totalInvoiced: Double,
val totalReceived: Double,
)


+ 6
- 4
src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt Zobrazit soubor

@@ -506,7 +506,7 @@ open class ReportService(

val descriptionCell = row.createCell(1)
descriptionCell.setCellValue(
if (item["description"] != null) item.getValue("description").toString() else "N/A"
if (item["name"] != null) item.getValue("name").toString() else "N/A"
)

val clientCell = row.createCell(2)
@@ -587,7 +587,8 @@ open class ReportService(
val uninvoiceCell = row.createCell(14)
uninvoiceCell.apply {
cellFormula =
" IF(H${rowNum}-N${rowNum}<0, 0, H${rowNum}-N${rowNum})"
" H${rowNum}-N${rowNum} "
// " IF(H${rowNum}-N${rowNum}<0, 0, H${rowNum}-N${rowNum})"
// " IF(I${rowNum}<=J${rowNum}, I${rowNum}-L${rowNum}, IF(AND(I${rowNum}>J${rowNum}, J${rowNum}<L${rowNum}), 0, IF(AND(I${rowNum}>J${rowNum}, J${rowNum}>=L${rowNum}), J${rowNum}-L${rowNum}, 0))) "
cellStyle.dataFormat = accountingStyle
}
@@ -695,7 +696,8 @@ open class ReportService(

val sumUInvoiceCell = row.createCell(14)
sumUInvoiceCell.apply {
cellFormula = "IF(H${rowNum+1}-N${rowNum+1}<0,0,H${rowNum+1}-N${rowNum+1})"
// cellFormula = "IF(H${rowNum+1}-N${rowNum+1}<0,0,H${rowNum+1}-N${rowNum+1})"
cellFormula = " H${rowNum+1}-N${rowNum+1} "
cellStyle = boldFontCellStyle
cellStyle.dataFormat = accountingStyle
}
@@ -2195,7 +2197,7 @@ open class ReportService(
+ " where pe.deleted = false "
+ " group by projectId "
+ " ) "
+ " select p.code, p.description, c.name as client, IFNULL(s2.name, \"N/A\") as subsidiary, concat(t.code, \' - \', t.name) as teamLead, p.planStart , p.planEnd , p.expectedTotalFee, ifnull(p.subContractFee, 0) as subContractFee, "
+ " select p.code, p.name, p.description, c.name as client, IFNULL(s2.name, \"N/A\") as subsidiary, concat(t.code, \' - \', t.name) as teamLead, p.planStart , p.planEnd , p.expectedTotalFee, ifnull(p.subContractFee, 0) as subContractFee, "
+ " IFNULL(cte_i.sumIssuedAmount, 0) as sumIssuedAmount, IFNULL(cte_i.sumPaidAmount, 0) as sumPaidAmount"
+ " ,0 as totalCumulativeExpenditure, IFNULL(cte_e.amount,0) as projectExpense "
+ " from project p"


binární
src/main/resources/templates/report/[Dashboard] Financial Summary for project.xlsx Zobrazit soubor


Načítá se…
Zrušit
Uložit