This is an automated email from the ASF dual-hosted git repository.
pawan pushed a commit to branch trunk
in repository
https://gitbox.apache.org/repos/asf/ofbiz-framework.gitThe following commit(s) were added to refs/heads/trunk by this push:
new a7fa31c Fixed the issues in accept return process. (OFBIZ-11843) (#211)
a7fa31c is described below
commit a7fa31c403256af5386942658a3720bbfdfad72c
Author: pritambkute <
[hidden email]>
AuthorDate: Sat Jun 27 18:32:56 2020 +0530
Fixed the issues in accept return process. (OFBIZ-11843) (#211)
Co-authored-by: Pritam Kute <pritam.kute>
---
applications/order/groovyScripts/order/OrderReturnServices.groovy | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/applications/order/groovyScripts/order/OrderReturnServices.groovy b/applications/order/groovyScripts/order/OrderReturnServices.groovy
index b8bb8ce..f390412 100644
--- a/applications/order/groovyScripts/order/OrderReturnServices.groovy
+++ b/applications/order/groovyScripts/order/OrderReturnServices.groovy
@@ -151,7 +151,7 @@ def updateReturnHeader() {
logInfo("Available amount for return on order # ${returnItem.orderId} is " +
"[${availableReturnTotal}] (orderTotal = [${orderTotal}] - returnTotal = [${returnTotal}]")
- if (availableReturnTotal < (BigDecimal) -0.01) {
+ if (availableReturnTotal < (-0.01 as BigDecimal)) {
return informError("OrderReturnPriceCannotExceedTheOrderTotal")
}
} else {
@@ -299,7 +299,8 @@ def updateReturnItem() {
.queryList()
for (GenericValue returnAdjustment : returnAdjustments) {
logInfo("updating returnAdjustment with Id:[${returnAdjustment.returnAdjustmentId}]")
- Map ctx = returnAdjustment
+ Map ctx = [:]
+ ctx << returnAdjustment
ctx.originalReturnPrice = originalReturnPrice
ctx.originalReturnQuantity = originalReturnQuantity
ctx.ReturnTypeId = returnItem.returnTypeId