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

加入助理订单变更复核、收款人汇总、每日报销和应转金额;优化库存筛选、订单明细与连续浏览。开单身份必填,信用卡手续费按实收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

@@ -25,7 +25,7 @@ function fixture(t){
return run({action:'delete',id,p},()=>l.deleteMaterialPurchase(id,p,actor),key,actor);
};
const issue=(line=item(),extra={})=>{
const p={date:SALE,customer:'合成客户',payment_account:'助理微信',fee_items:[],lines:[line],...extra};
const p={date:SALE,customer:'合成客户',salesperson:'合成开单人',payment_account:'助理微信',fee_items:[],lines:[line],...extra};
return run(p,()=>l.issueOrder(p,assistant)).id;
};
return {l,run,buy,detail,edit,remove,issue};
@@ -55,7 +55,7 @@ test('旧购料表增量增加版本及软删除字段,原始字段不改写
test('修改克重金额重算整池成本和付款人份额,原收款、客户单、库存与锁价单不变',t=>{
const f=fixture(t),first=f.buy();f.buy({grams:'20',total:'18120',payer:'assistant'});const id=f.issue();
const manual=f.issue(item({name:'手填黄金',costParts:{material:'2000',labor:'30',accessories:'0',other:'0'},costMaterial:{mode:'total'}}));
const lockInput={date:D,customer:'合成锁价客户',line:{name:'足金挂件',unit:'g',quantity:'2.000',goldPrice:'1000',laborRate:'20',laborMode:'gram'},
const lockInput={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}};
f.run(lockInput,()=>f.l.createPriceLock(lockInput,assistant));
const untouched=Object.fromEntries(['payments','expenses','settlements','movements','price_locks','price_lock_events'].map(table=>[table,f.l.rows('SELECT * FROM '+table)]));