置换余料支持寄存暂不结算及修改取消联动

This commit is contained in:
summer committed 2026-11-26 01:15:41 +08:00
1 parent 1f1e6dd402
commit b070da1e3d
9 files changed
+110 -36

No files matched your search

+2 -1
View File
@@ -62,7 +62,8 @@ function 置换正文(单据){
['折旧费',分件说明('depreciationMg','depreciationRate','depreciationAmount')||`${克重(单据.depreciationMg)} 克 × ${单价(单据.depreciationRate)}`,整数(单据.depreciationAmount,'折旧费'),'+'],
...(附加.length?附加.map(项目=>['附加:'+项目.name,'',项目.amount,'+']):[['附加项目','',整数(单据.chargesAmount??0,'附加金额'),'+']]),
['优惠','',整数(单据.discount??0,'优惠金额'),'−'],
['余料回收款',单据.exchange_items?.map((p,i)=>'商品'+(i+1)+':'+克重(p.surplusMg)+'克 × '+单价(p.buyRate)+',实际回收 ¥'+金额(p.purchaseAmount)).join('<br>')||余料说明,余料款,'−']
...(单据.depositMg?[['余料寄存',`${(整数(单据.depositMg,'寄存重量')/1000).toFixed(3)} 克,暂不结算,保留供以后置换使用`,0,'']]:[]),
['余料回收款',单据.exchange_items?.map((p,i)=>p.depositMg?'':'商品'+(i+1)+':'+克重(p.surplusMg)+'克 × '+单价(p.buyRate)+',实际回收 ¥'+金额(p.purchaseAmount)).filter(Boolean).join('<br>')||(单据.depositMg?'寄存部分不折价、不抵扣本单费用':余料说明),余料款,'−']
];
if(单据.rounding_mode==='yuan'&&单据.rounding_adjustment){
const 调整=整数(单据.rounding_adjustment,'取整调整',true);