| 
					
				 | 
			
			
				@@ -139,12 +139,14 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const nd = {id: od.id}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (d.name) nd.name = d.name; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (od.pre_used === null || od.pre_used === undefined || od.pre_used === 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (d.unit !== undefined) nd.unit = d.unit; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    nd.unit_price = d.unit_price !== undefined ? this.ctx.helper.round(d.unit_price, info.decimal.up) : od.unit_price; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    nd.unit_price = od.unit_price; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (d.unit !== undefined) nd.unit = d.unit; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                nd.unit_price = d.unit_price !== undefined ? this.ctx.helper.round(d.unit_price, info.decimal.up) : od.unit_price; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // if (od.pre_used === null || od.pre_used === undefined || od.pre_used === 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //     if (d.unit !== undefined) nd.unit = d.unit; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //     nd.unit_price = d.unit_price !== undefined ? this.ctx.helper.round(d.unit_price, info.decimal.up) : od.unit_price; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //     nd.unit_price = od.unit_price; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const precision = this.ctx.helper.findPrecision(info.precision, d.unit); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (d.arrive_qty !== undefined) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     nd.arrive_qty = this.ctx.helper.round(d.arrive_qty, precision.value); 
			 |