完善订单成本编辑与多商品置换,修正锁价跨天作废回池
This commit is contained in:
1 parent
a3262a455d
commit
2e4e7dad55
25 files changed
+430
-109
No files matched your search
@@ -115,9 +115,9 @@ test('原停用供应商盘可启用使用再停用,历史退回仍沿原key
|
||||
}
|
||||
});
|
||||
|
||||
test('回收旧料停用明确阻止新直接回收和置换,已有记录修改取消仍能冲回',t=>{
|
||||
test('回收旧料停用阻止继续选该盘,找金仍可入库,已有记录修改取消沿原盘冲回',t=>{
|
||||
const f=fixture(t),original=f.run({},()=>f.l.createRecovery(recovery(),f.actors.owner));f.update('回收旧料',{name:'旧金回收盘',active:false});
|
||||
const before=businessFacts(f.l);for(const input of [recovery(),recovery({mode:'exchange'})]){assert.throws(()=>f.l.recoveryQuote(input,f.actors.owner),/回收旧料货盘已停用.*先启用/);assert.throws(()=>f.run({},()=>f.l.createRecovery(input,f.actors.owner)),/回收旧料货盘已停用/);}assert.equal(businessFacts(f.l),before);
|
||||
const before=businessFacts(f.l);for(const input of [recovery(),recovery({mode:'exchange'})]){assert.throws(()=>f.l.recoveryQuote(input,f.actors.owner),/旧金回收盘.*货盘已停用.*先启用/);assert.throws(()=>f.run({},()=>f.l.createRecovery(input,f.actors.owner)),/旧金回收盘.*货盘已停用/);}assert.doesNotThrow(()=>f.l.recoveryQuote(recovery({old_pocket:'找金'}),f.actors.owner));assert.equal(businessFacts(f.l),before);
|
||||
let info=f.l.recoveryEdit(original.id,f.actors.owner);f.run({},()=>f.l.updateRecovery(original.id,{...info.inputs,customer:'更正客户代号',revision:info.revision,reason:'合成资料更正',verified:true},f.actors.owner));
|
||||
info=f.l.recoveryEdit(original.id,f.actors.owner);f.run({},()=>f.l.cancelRecovery(original.id,{date:D2,revision:info.revision,reason:'合成取消',verified:true},f.actors.owner));
|
||||
assert.equal(f.l.inventory().find(r=>r.pocket==='回收旧料').mg,0);assert.equal(f.l.pocket('回收旧料').active,false);
|
||||
|
||||
Reference in new issue
Block a user