|
|
@@ -1415,7 +1415,7 @@ open class ReportService( |
|
|
|
columnIndex = 0 |
|
|
|
|
|
|
|
// val currRow = generalCreateReportIndexed(sheet, result, rowIndex, columnIndex) |
|
|
|
generalCreateReportIndexed(sheet, result, rowIndex, columnIndex) |
|
|
|
rowIndex = generalCreateReportIndexed(sheet, result, rowIndex, columnIndex) |
|
|
|
|
|
|
|
val sheetCF = sheet.sheetConditionalFormatting |
|
|
|
val rule1 = sheetCF.createConditionalFormattingRule("AND(K7 >= $lowerLimit, K7 <= 1)") |
|
|
@@ -1853,19 +1853,16 @@ open class ReportService( |
|
|
|
if (args.containsKey("status")) |
|
|
|
statusFilter = when (args.get("status")) { |
|
|
|
"Potential Overconsumption" -> "and " + |
|
|
|
" ((COALESCE((tns.totalConsumed * sa.hourlyRate), 0) / p.expectedTotalFee) >= 0.9 " + |
|
|
|
" (COALESCE((tns.totalConsumed * sa.hourlyRate), 0) / p.expectedTotalFee) >= :lowerLimit " + |
|
|
|
" and (COALESCE((tns.totalConsumed * sa.hourlyRate), 0) / p.expectedTotalFee) <= 1 " + |
|
|
|
" or (COALESCE(tns.totalConsumed, 0) / COALESCE(p.totalManhour, 0)) >= 0.9 " + |
|
|
|
" and (COALESCE(tns.totalConsumed, 0) / COALESCE(p.totalManhour, 0)) <= 1)" |
|
|
|
|
|
|
|
"Overconsumption" -> "and " + |
|
|
|
" ((COALESCE((tns.totalConsumed * sa.hourlyRate), 0) / p.expectedTotalFee) >= 1 " + |
|
|
|
" or (COALESCE(tns.totalConsumed, 0) / COALESCE(p.totalManhour, 0)) >= 1) " |
|
|
|
|
|
|
|
"Within Budget" -> "and " + |
|
|
|
" ((COALESCE((tns.totalConsumed * sa.hourlyRate), 0) / p.expectedTotalFee) < 0.9 " + |
|
|
|
" and " + |
|
|
|
" (COALESCE(tns.totalConsumed, 0) / COALESCE(p.totalManhour, 0)) <= 0.9 " |
|
|
|
" or (COALESCE(tns.totalConsumed, 0) / COALESCE(p.totalManhour, 0)) >= :lowerLimit " + |
|
|
|
" and (COALESCE(tns.totalConsumed, 0) / COALESCE(p.totalManhour, 0)) <= 1 " |
|
|
|
"All" -> "and " + |
|
|
|
" (COALESCE((tns.totalConsumed * sa.hourlyRate), 0) / p.expectedTotalFee) >= :lowerLimit " + |
|
|
|
" or (COALESCE(tns.totalConsumed, 0) / COALESCE(p.totalManhour, 0)) >= :lowerLimit " |
|
|
|
// "Overconsumption" -> "and " + |
|
|
|
// " ((COALESCE((tns.totalConsumed * sa.hourlyRate), 0) / p.expectedTotalFee) >= 1 " + |
|
|
|
// " or (COALESCE(tns.totalConsumed, 0) / COALESCE(p.totalManhour, 0)) >= 1) " |
|
|
|
|
|
|
|
else -> "" |
|
|
|
} |
|
|
|