Implemented: Add ability to record Return Communication. Added support to record communication event against return. Added new entity CommunicationEventReturn, crund and supporting screens. Also added support in the existing email services to handle the return cases.

(OFBIZ-9911)
Thanks to Ratnesh Upadhyay for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1821486 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Rishi Solanki
2018-01-18 11:34:01 +00:00
parent 06ce36db36
commit 7d29cd1888
15 changed files with 254 additions and 1 deletions
@@ -101,6 +101,7 @@ public class EmailServices {
Delegator delegator = ctx.getDelegator();
String communicationEventId = (String) context.get("communicationEventId");
String orderId = (String) context.get("orderId");
String returnId = (String) context.get("returnId");
Locale locale = (Locale) context.get("locale");
if (communicationEventId != null) {
Debug.logInfo("SendMail Running, for communicationEventId : " + communicationEventId, module);
@@ -121,6 +122,9 @@ public class EmailServices {
if (UtilValidate.isNotEmpty(orderId)) {
results.put("orderId", orderId);
}
if (UtilValidate.isNotEmpty(returnId)) {
results.put("returnId", returnId);
}
if (UtilValidate.isNotEmpty(body)) {
body = FlexibleStringExpander.expandString(body, context);
results.put("body", body);
@@ -476,6 +480,7 @@ public class EmailServices {
partyId = (String) bodyParameters.get("partyId");
}
String orderId = (String) bodyParameters.get("orderId");
String returnId = (String) serviceContext.get("returnId");
String custRequestId = (String) bodyParameters.get("custRequestId");
bodyParameters.put("communicationEventId", serviceContext.get("communicationEventId"));
@@ -602,6 +607,9 @@ public class EmailServices {
if (UtilValidate.isNotEmpty(orderId)) {
serviceContext.put("orderId", orderId);
}
if (UtilValidate.isNotEmpty(returnId)) {
serviceContext.put("returnId", returnId);
}
if (UtilValidate.isNotEmpty(custRequestId)) {
serviceContext.put("custRequestId", custRequestId);
}
@@ -642,6 +650,9 @@ public class EmailServices {
if (UtilValidate.isNotEmpty(orderId)) {
result.put("orderId", orderId);
}
if (UtilValidate.isNotEmpty(returnId)) {
result.put("returnId", returnId);
}
if (UtilValidate.isNotEmpty(custRequestId)) {
result.put("custRequestId", custRequestId);
}