入库单优化bug
This commit is contained in:
		
							parent
							
								
									69598c46fa
								
							
						
					
					
						commit
						0c152a9e6f
					
				| 
						 | 
				
			
			@ -467,7 +467,7 @@ public class MaterialInBillEditPluginExt extends AbstractEcmaBillPlugin implemen
 | 
			
		|||
    protected void initFormPage(int rowIndex) {
 | 
			
		||||
/*        this.getView().setEnable(true, rowIndex, new String[]{"lot", "lotid", "measureunit", "entrytaxrate", "price", "ismainmaterial"});
 | 
			
		||||
        this.getView().setEnable(false, rowIndex, new String[]{"taxprice", "taxamount", "contprice", "oftaxamount", "notaxamount"});//系统源码*/
 | 
			
		||||
        this.getView().setEnable(true, rowIndex, new String[]{"lot", "lotid", "measureunit", "entrytaxrate", "price","ismainmaterial", "notaxamount"});//二开修改添加金额字段
 | 
			
		||||
        this.getView().setEnable(true, rowIndex, new String[]{"lot", "lotid", "measureunit", "entrytaxrate", "price", "ismainmaterial", "notaxamount"});//二开修改添加金额字段
 | 
			
		||||
        this.getView().setEnable(false, rowIndex, new String[]{"taxprice", "taxamount", "contprice", "oftaxamount"});//二开修改去除金额字段
 | 
			
		||||
        Boolean poundIn = (Boolean) this.getModel().getValue("poundin");
 | 
			
		||||
        this.getView().setEnable(!poundIn, rowIndex, new String[]{"material", "modelnum", "qty"});
 | 
			
		||||
| 
						 | 
				
			
			@ -588,6 +588,9 @@ public class MaterialInBillEditPluginExt extends AbstractEcmaBillPlugin implemen
 | 
			
		|||
//        BigDecimal notaxamount = EcNumberHelper.toBigDecimal(this.getModel().getValue("notaxamount"), i);//源码
 | 
			
		||||
        BigDecimal notaxamount = EcNumberHelper.toBigDecimal(this.getModel().getValue("notaxamount", i));//金额   //二开修改
 | 
			
		||||
        BigDecimal qty = EcNumberHelper.toBigDecimal(this.getModel().getValue("qty", i));// 数量
 | 
			
		||||
        if (qty.compareTo(BigDecimal.ZERO) == 0) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        BigDecimal price = notaxamount.divide(qty, 10, RoundingMode.HALF_UP);//金额 ÷ 数量
 | 
			
		||||
        this.getModel().setValue("price", price, i);//"入库单价" = 金额 ÷ 数量
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue