| 
					
				 | 
			
			
				@@ -101,7 +101,7 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         async _getUpdateBills(data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const datas = data instanceof Array ? data : [data]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const bills = await this.ctx.service.ledger.getDataById(datas[0].lid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            const billsPos = await this.getAllDataByCondition({where: {lid: bills.id} }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            const billsPos = await this.getAllDataByCondition({where: {tid: bills.tender_id, lid: bills.id} }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, bills.unit); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const updateBills = {id: bills.id}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for (const bp of billsPos) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -360,7 +360,7 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const bills = await this.ctx.service.ledger.getDataById(data[0].lid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, bills.unit); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const updateBills = {id: bills.id}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            const billsPos = await this.getAllDataByCondition({where: {lid: bills.id} }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            const billsPos = await this.getAllDataByCondition({where: {tid: tid, lid: bills.id} }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for (const bp of billsPos) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const d = data.find(function (x) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     return bp.id ? x.id === bp.id : false; 
			 |