// create the replacement order adjustment
List <GenericValue>orderAdjustments = UtilGenerics.checkList(context.get("orderAdjustments"));
List <GenericValue>orderItems = UtilGenerics.checkList(context.get("orderItems"));
OrderReadHelper orderReadHelper = new OrderReadHelper(orderAdjustments, orderItems);
BigDecimal grandTotal = orderReadHelper.getOrderGrandTotal();
if (grandTotal.compareTo(new BigDecimal(0)) != 0) {
GenericValue adjustment = delegator.makeValue("OrderAdjustment");
adjustment.set("orderAdjustmentTypeId", "REPLACE_ADJUSTMENT");
adjustment.set("amount", grandTotal.negate());
adjustment.set("comments", "ReShip Order for Order #" + originalOrderId);
adjustment.set("createdDate", UtilDateTime.nowTimestamp());