Commit 1a7ee16d by 13420

销售开票小数位bug调整

parent c54e0f26
......@@ -32,14 +32,19 @@ $(function() {
grid.dataSource.bind("change",function(e){
var item = e.items[0];
if(e.field == "taxPoints"){
if(item.thisSettlementTax && item.totalContractPriceIncluding){
let thisSettlementAmount = item.totalContractPriceIncluding / (item.taxPoints / 100 + 1);
// 使用toFixed方法四舍五入到两位小数,并转换为数字
thisSettlementAmount = Number(thisSettlementAmount.toFixed(2));
resultGrid.setCellValue(item,'thisSettlementAmount',thisSettlementAmount)
}
if(item.taxPoints && item.totalContractPriceIncluding){
let thisSettlementTax = item.totalContractPriceIncluding-item.thisSettlementAmount;
// 使用toFixed方法四舍五入到两位小数,并转换为数字
thisSettlementTax = Number(thisSettlementTax.toFixed(2));
resultGrid.setCellValue(item,'thisSettlementTax',thisSettlementTax)
}
if(item.thisSettlementTax && item.totalContractPriceIncluding){
let thisSettlementAmount = item.totalContractPriceIncluding/(item.taxPoints/100+1);
resultGrid.setCellValue(item,'thisSettlementAmount',thisSettlementAmount)
}
loadChange(grid,e,"price");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment