|
@@ -324,6 +324,7 @@ open class ReportService( |
|
|
|
|
|
|
|
|
val boldFont = sheet.workbook.createFont() |
|
|
val boldFont = sheet.workbook.createFont() |
|
|
boldFont.bold = true |
|
|
boldFont.bold = true |
|
|
|
|
|
boldFont.fontName = "Times New Roman" |
|
|
|
|
|
|
|
|
val boldFontCellStyle = workbook.createCellStyle() |
|
|
val boldFontCellStyle = workbook.createCellStyle() |
|
|
boldFontCellStyle.setFont(boldFont) |
|
|
boldFontCellStyle.setFont(boldFont) |
|
@@ -404,7 +405,7 @@ open class ReportService( |
|
|
|
|
|
|
|
|
val budgetCell = row.createCell(8) |
|
|
val budgetCell = row.createCell(8) |
|
|
budgetCell.apply { |
|
|
budgetCell.apply { |
|
|
cellFormula = "G${rowNum} * 80%" |
|
|
|
|
|
|
|
|
cellFormula = "H${rowNum} * 80%" |
|
|
cellStyle.dataFormat = accountingStyle |
|
|
cellStyle.dataFormat = accountingStyle |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -419,8 +420,7 @@ open class ReportService( |
|
|
|
|
|
|
|
|
val budgetVCell = row.createCell(10) |
|
|
val budgetVCell = row.createCell(10) |
|
|
budgetVCell.apply { |
|
|
budgetVCell.apply { |
|
|
cellFormula = "H${rowNum} - I${rowNum}" |
|
|
|
|
|
cellStyle = boldFontCellStyle |
|
|
|
|
|
|
|
|
cellFormula = "I${rowNum} - J${rowNum}" |
|
|
cellStyle.dataFormat = accountingStyle |
|
|
cellStyle.dataFormat = accountingStyle |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -428,20 +428,21 @@ open class ReportService( |
|
|
val issuedAmount = item["issuedAmount"]?.let { it as BigDecimal } ?: BigDecimal(0) |
|
|
val issuedAmount = item["issuedAmount"]?.let { it as BigDecimal } ?: BigDecimal(0) |
|
|
issuedCell.apply { |
|
|
issuedCell.apply { |
|
|
setCellValue(issuedAmount.toDouble()) |
|
|
setCellValue(issuedAmount.toDouble()) |
|
|
|
|
|
cellStyle = boldFontCellStyle |
|
|
cellStyle.dataFormat = accountingStyle |
|
|
cellStyle.dataFormat = accountingStyle |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
val uninvoiceCell = row.createCell(12) |
|
|
val uninvoiceCell = row.createCell(12) |
|
|
uninvoiceCell.apply { |
|
|
uninvoiceCell.apply { |
|
|
cellFormula = |
|
|
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 |
|
|
cellStyle.dataFormat = accountingStyle |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
val cpiCell = row.createCell(13) |
|
|
val cpiCell = row.createCell(13) |
|
|
cpiCell.apply { |
|
|
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) |
|
|
val receivedAmountCell = row.createCell(14) |
|
@@ -453,7 +454,7 @@ open class ReportService( |
|
|
|
|
|
|
|
|
val unsettledAmountCell = row.createCell(15) |
|
|
val unsettledAmountCell = row.createCell(15) |
|
|
unsettledAmountCell.apply { |
|
|
unsettledAmountCell.apply { |
|
|
cellFormula = "K${rowNum}-N${rowNum}" |
|
|
|
|
|
|
|
|
cellFormula = "L${rowNum}-O${rowNum}" |
|
|
cellStyle = boldFontCellStyle |
|
|
cellStyle = boldFontCellStyle |
|
|
cellStyle.dataFormat = accountingStyle |
|
|
cellStyle.dataFormat = accountingStyle |
|
|
} |
|
|
} |
|
|