diff --git a/docker-compose/envoy/definitions/adempiere-report-engine-service.dsc b/docker-compose/envoy/definitions/adempiere-report-engine-service.dsc index 4daf338..2e4e0fc 100644 Binary files a/docker-compose/envoy/definitions/adempiere-report-engine-service.dsc and b/docker-compose/envoy/definitions/adempiere-report-engine-service.dsc differ diff --git a/src/main/java/org/spin/report_engine/data/ColumnInfo.java b/src/main/java/org/spin/report_engine/data/ColumnInfo.java index 79ef609..fdff3ce 100644 --- a/src/main/java/org/spin/report_engine/data/ColumnInfo.java +++ b/src/main/java/org/spin/report_engine/data/ColumnInfo.java @@ -30,17 +30,28 @@ public class ColumnInfo { private String code; private String title; private int printFormatItemId; + private int displayTypeId; private ColumnInfo(PrintFormatItem item) { this.title = item.getPrintText(); this.printFormatItemId = item.getPrintFormatItemId(); this.code = String.valueOf(item.getPrintFormatItemId()); + this.displayTypeId = item.getReferenceId(); } public static ColumnInfo newInstance(PrintFormatItem item) { return new ColumnInfo(item); } + public int getDisplayTypeId() { + return displayTypeId; + } + + public ColumnInfo withDisplayTypeId(int displayTypeId) { + this.displayTypeId = displayTypeId;return this; + + } + public String getColor() { return color; } diff --git a/src/main/java/org/spin/report_engine/format/PrintFormatItem.java b/src/main/java/org/spin/report_engine/format/PrintFormatItem.java index 1705a08..9798c1d 100644 --- a/src/main/java/org/spin/report_engine/format/PrintFormatItem.java +++ b/src/main/java/org/spin/report_engine/format/PrintFormatItem.java @@ -17,6 +17,7 @@ import org.adempiere.core.domains.models.I_AD_PrintFormatItem; import org.compiere.model.MColumn; import org.compiere.print.MPrintFormatItem; +import org.compiere.util.DisplayType; import org.compiere.util.Util; /** @@ -168,6 +169,8 @@ private PrintFormatItem(MPrintFormatItem printFormatItem) { isMandatory = column.isMandatory(); columnSql = column.getColumnSQL(); isVirtualColumn = !Util.isEmpty(column.getColumnSQL()); + } else { + referenceId = DisplayType.String; } if(!Util.isEmpty(printFormatItem.getFormatPattern())) { formatPattern = printFormatItem.getFormatPattern(); diff --git a/src/main/java/org/spin/report_engine/service/Service.java b/src/main/java/org/spin/report_engine/service/Service.java index 9ff3ff0..5a91fbd 100644 --- a/src/main/java/org/spin/report_engine/service/Service.java +++ b/src/main/java/org/spin/report_engine/service/Service.java @@ -128,6 +128,7 @@ private static Report.Builder convertReport(ReportInfo reportInfo, int limit, in .setTitle(ValueManager.validateNull(column.getTitle())) .setColor(ValueManager.validateNull(column.getColor())) .setStyle(ValueManager.validateNull(column.getStyle())) + .setDisplayType(column.getDisplayTypeId()) .build() ).collect(Collectors.toList()) ) diff --git a/src/main/proto/service/report_engine.proto b/src/main/proto/service/report_engine.proto index e9bb08e..8cd4e39 100644 --- a/src/main/proto/service/report_engine.proto +++ b/src/main/proto/service/report_engine.proto @@ -67,6 +67,7 @@ message ReportColumn { string title = 2; string color= 3; string style = 4; + int32 display_type = 5; } message ReportRow {