Bladeren bron

Update financial Status report formula

tags/Baseline_30082024_BACKEND_UAT
MSI\2Fi 1 jaar geleden
bovenliggende
commit
da9b142136
1 gewijzigde bestanden met toevoegingen van 8 en 7 verwijderingen
  1. +8
    -7
      src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt

+ 8
- 7
src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt Bestand weergeven

@@ -324,6 +324,7 @@ open class ReportService(

val boldFont = sheet.workbook.createFont()
boldFont.bold = true
boldFont.fontName = "Times New Roman"

val boldFontCellStyle = workbook.createCellStyle()
boldFontCellStyle.setFont(boldFont)
@@ -404,7 +405,7 @@ open class ReportService(

val budgetCell = row.createCell(8)
budgetCell.apply {
cellFormula = "G${rowNum} * 80%"
cellFormula = "H${rowNum} * 80%"
cellStyle.dataFormat = accountingStyle
}

@@ -419,8 +420,7 @@ open class ReportService(

val budgetVCell = row.createCell(10)
budgetVCell.apply {
cellFormula = "H${rowNum} - I${rowNum}"
cellStyle = boldFontCellStyle
cellFormula = "I${rowNum} - J${rowNum}"
cellStyle.dataFormat = accountingStyle
}

@@ -428,20 +428,21 @@ open class ReportService(
val issuedAmount = item["issuedAmount"]?.let { it as BigDecimal } ?: BigDecimal(0)
issuedCell.apply {
setCellValue(issuedAmount.toDouble())
cellStyle = boldFontCellStyle
cellStyle.dataFormat = accountingStyle
}

val uninvoiceCell = row.createCell(12)
uninvoiceCell.apply {
cellFormula =
" IF(H${rowNum}<=I${rowNum}, H${rowNum}-K${rowNum}, IF(AND(H${rowNum}>I${rowNum}, I${rowNum}<K${rowNum}), 0, IF(AND(H${rowNum}>I${rowNum}, I${rowNum}>=K${rowNum}), I${rowNum}-K${rowNum}, 0))) "
cellStyle = boldFontCellStyle
" 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
}

val cpiCell = row.createCell(13)
cpiCell.apply {
cellFormula = "IF(K${rowNum} = 0, 0, K${rowNum}/I${rowNum})"
cellFormula = "IF(L${rowNum} = 0, 0, L${rowNum}/J${rowNum})"
cellStyle = boldFontCellStyle
}

val receivedAmountCell = row.createCell(14)
@@ -453,7 +454,7 @@ open class ReportService(

val unsettledAmountCell = row.createCell(15)
unsettledAmountCell.apply {
cellFormula = "K${rowNum}-N${rowNum}"
cellFormula = "L${rowNum}-O${rowNum}"
cellStyle = boldFontCellStyle
cellStyle.dataFormat = accountingStyle
}


Laden…
Annuleren
Opslaan