|
@@ -506,7 +506,7 @@ open class ReportService( |
|
|
|
|
|
|
|
|
val descriptionCell = row.createCell(1) |
|
|
val descriptionCell = row.createCell(1) |
|
|
descriptionCell.setCellValue( |
|
|
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) |
|
|
val clientCell = row.createCell(2) |
|
@@ -587,7 +587,8 @@ open class ReportService( |
|
|
val uninvoiceCell = row.createCell(14) |
|
|
val uninvoiceCell = row.createCell(14) |
|
|
uninvoiceCell.apply { |
|
|
uninvoiceCell.apply { |
|
|
cellFormula = |
|
|
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))) " |
|
|
// " 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 |
|
|
} |
|
|
} |
|
@@ -695,7 +696,8 @@ open class ReportService( |
|
|
|
|
|
|
|
|
val sumUInvoiceCell = row.createCell(14) |
|
|
val sumUInvoiceCell = row.createCell(14) |
|
|
sumUInvoiceCell.apply { |
|
|
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 = boldFontCellStyle |
|
|
cellStyle.dataFormat = accountingStyle |
|
|
cellStyle.dataFormat = accountingStyle |
|
|
} |
|
|
} |
|
@@ -2195,7 +2197,7 @@ open class ReportService( |
|
|
+ " where pe.deleted = false " |
|
|
+ " where pe.deleted = false " |
|
|
+ " group by projectId " |
|
|
+ " 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" |
|
|
+ " IFNULL(cte_i.sumIssuedAmount, 0) as sumIssuedAmount, IFNULL(cte_i.sumPaidAmount, 0) as sumPaidAmount" |
|
|
+ " ,0 as totalCumulativeExpenditure, IFNULL(cte_e.amount,0) as projectExpense " |
|
|
+ " ,0 as totalCumulativeExpenditure, IFNULL(cte_e.amount,0) as projectExpense " |
|
|
+ " from project p" |
|
|
+ " from project p" |
|
|