MSI\2Fi pirms 10 mēnešiem
vecāks
revīzija
18b663e83f
2 mainītis faili ar 9 papildinājumiem un 6 dzēšanām
  1. +6
    -3
      src/main/java/com/ffii/tsms/modules/data/service/DashboardService.kt
  2. +3
    -3
      src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt

+ 6
- 3
src/main/java/com/ffii/tsms/modules/data/service/DashboardService.kt Parādīt failu

@@ -1687,7 +1687,8 @@ open class DashboardService(
+ " coalesce (sum(i.issueAmount) - sum(i.paidAmount),0) as receivable,"
+ " coalesce (round((sum(p.expectedTotalFee) - sum(ifnull(p.subContractFee, 0)))*0.8,2),0) as totalBudget,"
+ " coalesce (expenditure.expenditure + sum(pc.expense), 0) as totalExpenditure,"
+ " coalesce ((sum(p.expectedTotalFee) - sum(ifnull(p.subContractFee, 0)))*0.8 - expenditure.expenditure,0) as expenditureReceivable,"
+ " (sum(p.expectedTotalFee) - sum(ifnull(p.subContractFee, 0)))*0.8 - coalesce(sum(pc.expense), 0) as expenditureReceivable,"
// + " coalesce ((sum(p.expectedTotalFee) - sum(ifnull(p.subContractFee, 0)))*0.8 - expenditure.expenditure,0) as expenditureReceivable,"
+ " sum(p.expectedTotalFee) as totalProjectFee,"
+ " coalesce (round(sum(i.issueAmount)/sum(p.expectedTotalFee)*100,0),0) as invoicedPercentage"
+ " from project p"
@@ -1888,8 +1889,10 @@ open class DashboardService(
+ " END AS remarks "
+ " FROM ( "
+ " SELECT "
+ " DATE_FORMAT(pe.receiptDate, '%Y-%m') AS parsed_date, "
+ " DATE_FORMAT(pe.receiptDate, '%m/%y') AS formatted_date, "
// + " DATE_FORMAT(pe.receiptDate, '%Y-%m') AS parsed_date, "
// + " DATE_FORMAT(pe.receiptDate, '%m/%y') AS formatted_date, "
+ " DATE_FORMAT(pe.issueDate, '%m/%y') AS parsed_date, "
+ " DATE_FORMAT(pe.issueDate, '%m/%y') AS formatted_date, "
+ " NULL AS income, "
+ " NULL AS expenditure, "
+ " SUM(pe.amount) AS expense, "


+ 3
- 3
src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt Parādīt failu

@@ -1889,8 +1889,8 @@ open class ReportService(
rowIndex = generalCreateReportIndexed(sheet, result, rowIndex, columnIndex)

val sheetCF = sheet.sheetConditionalFormatting
val rule1 = sheetCF.createConditionalFormattingRule("AND(K7 >= $lowerLimit, K7 <= 1)")
val rule2 = sheetCF.createConditionalFormattingRule("K7 > 1")
val rule1 = sheetCF.createConditionalFormattingRule("AND(L7 >= $lowerLimit, L7 <= 1)")
val rule2 = sheetCF.createConditionalFormattingRule("L7 > 1")
var fillOrange = rule1.createPatternFormatting()
fillOrange.setFillBackgroundColor(IndexedColors.LIGHT_ORANGE.index);
fillOrange.setFillPattern(PatternFormatting.SOLID_FOREGROUND)
@@ -1900,7 +1900,7 @@ open class ReportService(
fillRed.setFillPattern(PatternFormatting.SOLID_FOREGROUND)

val cfRules = arrayOf(rule1, rule2)
val regions = arrayOf(CellRangeAddress.valueOf("\$K7:\$L${rowIndex + 1}"))
val regions = arrayOf(CellRangeAddress.valueOf("\$L7:\$M${rowIndex + 1}"))
sheetCF.addConditionalFormatting(regions, cfRules);

conditionalFormattingNegative(sheet)


Notiek ielāde…
Atcelt
Saglabāt