|  | @@ -299,6 +299,37 @@ function summaryData(sourceData, handleCfg, prjData){
 | 
	
		
			
				|  |  |              tempRstArr.push(item);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | +    let private_cal_before_sum = function () {
 | 
	
		
			
				|  |  | +        for (let calcAheadObj of handleCfg[JV.PROP_SUM_CALC_AHEAD]) {
 | 
	
		
			
				|  |  | +            if (!curParentPrjData[calcAheadObj["seeking_parent"]]) curParentPrjData[calcAheadObj["seeking_parent"]] = getModuleDataByKey(prjData, calcAheadObj["seeking_parent"]);
 | 
	
		
			
				|  |  | +            for (let pDataItem of curParentPrjData[calcAheadObj["seeking_parent"]].data) {
 | 
	
		
			
				|  |  | +                let data = (pDataItem._doc)?pDataItem._doc:pDataItem;
 | 
	
		
			
				|  |  | +                for (let item of tempRstArr) {
 | 
	
		
			
				|  |  | +                    if (item[calcAheadObj["seeking_key"]] === data[calcAheadObj["parent_key"]]) {
 | 
	
		
			
				|  |  | +                        for (let sumKey of handleCfg[JV.PROP_SUM_SUM_KEYS]) {
 | 
	
		
			
				|  |  | +                            switch (calcAheadObj[JV.PROP_SUM_CACL_TYPE]) {
 | 
	
		
			
				|  |  | +                                case "+":
 | 
	
		
			
				|  |  | +                                    item[sumKey] = parseFloat(item[sumKey]) + parseFloat(data[calcAheadObj["calc_property"]]);
 | 
	
		
			
				|  |  | +                                    break;
 | 
	
		
			
				|  |  | +                                case "-":
 | 
	
		
			
				|  |  | +                                    item[sumKey] = parseFloat(item[sumKey]) - parseFloat(data[calcAheadObj["calc_property"]]);
 | 
	
		
			
				|  |  | +                                    break;
 | 
	
		
			
				|  |  | +                                case "*":
 | 
	
		
			
				|  |  | +                                    item[sumKey] = item[sumKey] * parseFloat(data[calcAheadObj["calc_property"]]).toFixed(4);
 | 
	
		
			
				|  |  | +                                    break;
 | 
	
		
			
				|  |  | +                                case "/":
 | 
	
		
			
				|  |  | +                                    item[sumKey] = item[sumKey] / parseFloat(data[calcAheadObj["calc_property"]]).toFixed(4);
 | 
	
		
			
				|  |  | +                                    break;
 | 
	
		
			
				|  |  | +                                default:
 | 
	
		
			
				|  |  | +                                    break;
 | 
	
		
			
				|  |  | +                            }
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                        break;
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  |      let private_get_grp_key = function (item) {
 | 
	
		
			
				|  |  |          let keys = [];
 | 
	
		
			
				|  |  |          for (let cfg of handleCfg[JV.PROP_SUM_GROUP_KEYS]) {
 | 
	
	
		
			
				|  | @@ -318,6 +349,9 @@ function summaryData(sourceData, handleCfg, prjData){
 | 
	
		
			
				|  |  |          return ( "grp_key_" + keys.join('_'));
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |      let sumObj = {};
 | 
	
		
			
				|  |  | +    if (handleCfg[JV.PROP_SUM_CALC_AHEAD] && handleCfg[JV.PROP_SUM_CALC_AHEAD].length > 0) {
 | 
	
		
			
				|  |  | +        private_cal_before_sum();
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |      for (let dtl of tempRstArr) {
 | 
	
		
			
				|  |  |          let grpKey = private_get_grp_key(dtl);
 | 
	
		
			
				|  |  |          if (sumObj[grpKey] === null || sumObj[grpKey] === undefined) {
 |