完善订单审批、每日对账与信用卡手续费

加入助理订单变更复核、收款人汇总、每日报销和应转金额;优化库存筛选、订单明细与连续浏览。开单身份必填,信用卡手续费按实收4‰自动计算并默认由麦麦承担,打印优惠显示在人民币大写旁。

验证:484项测试通过;独立HTTP与浏览器覆盖普通订单、锁价、修改审批、断线恢复和打印隔离。旧报表兼容,本机升级原29表295行数据保持一致。
This commit is contained in:
summer committed 2026-10-23 09:49:36 +08:00
1 parent 27a11e9b35
commit a506fb1228
68 files changed
+3591 -259

No files matched your search

@@ -16,7 +16,7 @@ function fixture(t){
return run(input,()=>ledger.createMaterialPurchase(input,actor),key);
};
const issue=(extra={})=>{
const input={date:D2,customer:'合成日料客户',payment_account:'助理微信',fee_items:[],
const input={date:D2,customer:'合成日料客户',salesperson:'合成开单人',payment_account:'助理微信',fee_items:[],
lines:[{name:'足金挂件',unit:'g',quantity:'3.000',pocket:'',payer:'owner',sale:'3000',
costParts:{material:'',labor:'0',accessories:'0',other:'0'},costMaterial:{mode:'pool',poolId:D}}],...extra};
return run(input,()=>ledger.issueOrder(input,actor)).id;
@@ -55,7 +55,7 @@ test('采购只按采购日与付款人计一次,跨月订单只结转耗用
test('先出单料费待补时只汇总已核算利润,补购与同日加权重算使相关财务快照过期但不动库存',t=>{
const f=fixture(t),l=f.ledger;
const ordinary={date:D2,customer:'合成手填单',payment_account:'助理微信',fee_items:[],lines:[{name:'手填商品',unit:'件',quantity:'1',pocket:'',payer:'owner',sale:'100',costParts:{material:'40',labor:'0',accessories:'0',other:'0'}}]};
const ordinary={date:D2,customer:'合成手填单',salesperson:'合成开单人',payment_account:'助理微信',fee_items:[],lines:[{name:'手填商品',unit:'件',quantity:'1',pocket:'',payer:'owner',sale:'100',costParts:{material:'40',labor:'0',accessories:'0',other:'0'}}]};
f.run(ordinary,()=>l.issueOrder(ordinary,actor));
const id=f.issue({lines:[{name:'足金挂件',unit:'g',quantity:'3.000',pocket:'',payer:'owner',sale:'3000',
costParts:{material:'',labor:'30',accessories:'5',other:'1'},costMaterial:{mode:'pool',poolId:D}}],
@@ -165,7 +165,7 @@ test('没有日料池的历史空日和普通订单财务哈希完全兼容',t=>
});
test('锁价创建和交付拒绝日料池来源,失败时流水与操作号完整回滚',t=>{
const f=fixture(t),input={date:D,customer:'合成锁价客户',line:{name:'足金挂件',unit:'g',quantity:'2.000',goldPrice:'1000',laborRate:'20',laborMode:'gram'},
const f=fixture(t),input={date:D,customer:'合成锁价客户',salesperson:'合成开单人',line:{name:'足金挂件',unit:'g',quantity:'2.000',goldPrice:'1000',laborRate:'20',laborMode:'gram'},
material:{rate:'900',payer:'owner',verified:true},payment:{amount:'1000',account:'助理微信',verified:true}};
for(const source of [{costMaterial:{mode:'pool',poolId:D}},{materialPool:{}},{materialPool:null}]){
const attempt={...input,line:{...input.line,...source}},before=contents(f.ledger);