| 
					
				 | 
			
			
				@@ -299,9 +299,6 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 orders: [['order', 'desc']], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for (const s of stages) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                s.tp = this.ctx.helper.sum([s.contract_tp, s.qc_tp, s.pc_tp]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                s.pre_tp = this.ctx.helper.add(s.pre_contract_tp, s.pre_qc_tp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                s.end_tp = this.ctx.helper.add(s.pre_tp, s.tp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 s.tp_history = s.tp_history ? JSON.parse(s.tp_history) : []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (stages.length !== 0 && !this.ctx.session.sessionUser.is_admin) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -319,6 +316,9 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             await this.checkStageGatherData(stages[0], true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for (const s of stages) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                s.tp = this.ctx.helper.sum([s.contract_tp, s.qc_tp, s.pc_tp]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                s.pre_tp = this.ctx.helper.add(s.pre_contract_tp, s.pre_qc_tp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                s.end_tp = this.ctx.helper.add(s.pre_tp, s.tp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (s.yf_tp && s.sf_tp === 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     const sf = await this.ctx.service.stagePay.getHistorySf(s); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if (sf && s.readOnly) { 
			 |