| 
					
				 | 
			
			
				@@ -111,6 +111,9 @@ public class WebsitStockDTO { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiModelProperty(value = "单位") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private String goodsStockUnit; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @ApiModelProperty(value = "是否允许负库存") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private Boolean allowLossStock = Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public WebsitStock createPartsStock() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         WebsitStock websitStock = new WebsitStock(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BeanUtils.copyProperties(this, websitStock); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -137,7 +140,7 @@ public class WebsitStockDTO { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //        if (closeQty.compareTo(BigDecimal.ZERO) < 0 && direct.compareTo(BigDecimal.ZERO) < 0 && !this.getRefType().equals("销售订单")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //            throw new RemoteServiceException("\""+ websitStock.getGoodsName() + "\"商品库存不允许为负"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (closeQty.compareTo(BigDecimal.ZERO) < 0 && direct.compareTo(BigDecimal.ZERO) < 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (!allowLossStock && closeQty.compareTo(BigDecimal.ZERO) < 0 && direct.compareTo(BigDecimal.ZERO) < 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             throw new RemoteServiceException("\""+ websitStock.getGoodsName() + "\"商品库存不允许为负"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 注入三级帐 
			 |