From b839e1dc63b2e37751ef662ac3480288a104f2bb Mon Sep 17 00:00:00 2001 From: Jacques Le Roux Date: Fri, 7 Apr 2017 04:49:50 +0000 Subject: [PATCH] Fixed: Implement and demonstrate few services in Birt Report Builder (OFBIZ-9192) This fixes an issue I put in while removing partyName. The couple ("Customer", "Customer name") should also have been removed While at it I formatted to make things more legible git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1790501 13f79535-47bb-0310-9956-ffa450edef68 --- .../flexible/BirtMasterReportServices.java | 48 +++++++++++++++++-- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtMasterReportServices.java b/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtMasterReportServices.java index 1f8f8e409..05b4dbdb0 100644 --- a/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtMasterReportServices.java +++ b/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtMasterReportServices.java @@ -37,13 +37,23 @@ public class BirtMasterReportServices { // The following methods are flexible report services as examples for reporting public static Map workEffortPerPersonPrepareDate(DispatchContext dctx, Map context) { - Map dataMap = UtilMisc.toMap("lastName", "name", "firstName", "name", "hours", "floating-point", "fromDate", "date-time", "thruDate", "date-time"); + Map dataMap = UtilMisc.toMap( + "lastName", "name", + "firstName", "name", + "hours", "floating-point", + "fromDate", "date-time", + "thruDate", "date-time"); LinkedHashMap filterMap = new LinkedHashMap(); filterMap.put("firstName", "name"); filterMap.put("lastName", "name"); filterMap.put("fromDate", "date-time"); filterMap.put("thruDate", "date-time"); - Map fieldDisplayLabels = UtilMisc.toMap("lastName", "Last name", "firstName", "First name", "hours", "Hours", "fromDate", "From date", "thruDate", "Thru date"); + Map fieldDisplayLabels = UtilMisc.toMap( + "lastName", "Last name", + "firstName", "First name", + "hours", "Hours", + "fromDate", "From date", + "thruDate", "Thru date"); LinkedHashMap filterDisplayLabels = new LinkedHashMap(); filterDisplayLabels.put("firstName", "First name"); filterDisplayLabels.put("lastName", "Last name"); @@ -127,8 +137,38 @@ public class BirtMasterReportServices { } public static Map turnOverPrepareFields(DispatchContext dctx, Map context) { - Map dataMap = UtilMisc.toMap("invoiceTypeId", "short-varchar", "invoicePartyId", "short-varchar", "statusId", "short-varchar", "invoiceDate", "date", "dueDate", "date", "currencyUomId", "short-varchar", "invoiceItemTypeId", "short-varchar", "invoiceItemSeqId", "short-varchar", "productId", "short-varchar", "partyId", "short-varchar", "primaryProductCategoryId", "short-varchar", "quantity", "numeric", "amount", "currency-amount", "productStoreId", "short-varchar", "storeName", "short-varchar"); - Map fieldDisplayLabels = UtilMisc.toMap("invoiceTypeId", "invoice Type", "invoicePartyId", "Invoice", "statusId", "Status", "invoiceDate", "Date", "dueDate", "Due date ", "currencyUomId", "Currency", "invoiceItemTypeId", "Invoice type line", "invoiceItemSeqId", "Invoice line", "productId", "Product", "partyId", "Customer", "Customer name", "primaryProductCategoryId", "Product category", "quantity", "Qty", "amount", "Montant", "productStoreId", "Product Store", "storeName", "Product store name"); + Map dataMap = UtilMisc.toMap( + "invoiceTypeId", "short-varchar", + "invoicePartyId", "short-varchar", + "statusId", "short-varchar", + "invoiceDate", "date", + "dueDate", "date", + "currencyUomId", "short-varchar", + "invoiceItemTypeId", "short-varchar", + "invoiceItemSeqId", "short-varchar", + "productId", "short-varchar", + "partyId", "short-varchar", + "primaryProductCategoryId", "short-varchar", + "quantity", "numeric", + "amount", "currency-amount", + "productStoreId", "short-varchar", + "storeName", "short-varchar"); + Map fieldDisplayLabels = UtilMisc.toMap( + "invoiceTypeId", "invoice Type", + "invoicePartyId", "Invoice", + "statusId", "Status", + "invoiceDate", "Date", + "dueDate", "Due date ", + "currencyUomId", "Currency", + "invoiceItemTypeId", "Invoice type line", + "invoiceItemSeqId", "Invoice line", + "productId", "Product", + "partyId", "Customer", + "primaryProductCategoryId", "Product category", + "quantity", "Qty", + "amount", "Amount", + "productStoreId", "Product Store", + "storeName", "Product store name"); LinkedHashMap filterMap = new LinkedHashMap(); filterMap.put("productCategoryId", "short-varchar"); filterMap.put("productStoreId", "short-varchar");