if(totalValue != null && totalValue.key().indexOf("~") == 0) { return DRCriteria.doubleForValue(WOOgnl.factory().getValue(totalValue.key().substring(1), recordGroup()));
if(totalValue != null) { if(totalValue.key().indexOf("~") == 0) { return DRCriteria.doubleForValue(WOOgnl.factory().getValue(totalValue.key().substring(1), recordGroup())); } else { String totalKey = (String)totalValue.attribute().userInfo().objectForKey("total"); if(totalKey != null) { return DRCriteria.doubleForValue(recordGroup().rawRecordList().valueForKeyPath(totalKey)); } }
    public double totalValueTotal() {        if(totalValue != null && totalValue.key().indexOf("~") == 0) {            return DRCriteria.doubleForValue(WOOgnl.factory().getValue(totalValue.key().substring(1), recordGroup()));        }        return totalValue.total();    }