锁价交付补重支持当日料池,内部备注移至客户名旁
This commit is contained in:
1 parent
ac9073471d
commit
c5883351c1
20 files changed
+196
-66
No files matched your search
@@ -61,7 +61,7 @@ function poolMaterialCosts(ledger,rows,group){
|
||||
for(const row of rows){
|
||||
if(row.kind==='afterSale'||row.status!=='delivered'||!row.costItems.some(item=>item.materialPoolId&&item.component==='material'))continue;
|
||||
const order=OrderAfterSaleReporting.originalOrder(ledger,ledger.rawOrder(row.id));
|
||||
for(const line of order.lines){
|
||||
for(const line of order.lines.flatMap(line=>line.priceLockExtraPool?[{...line,priceLockExtraPool:undefined,materialAllocations:line.materialAllocations.filter(a=>a.source==='original'),costParts:{...line.costParts,material:line.priceLockPool?line.priceLockPool.amount:sum(line.materialAllocations.filter(a=>a.source==='original'),a=>a.amount)}},{...line,priceLockPool:line.priceLockExtraPool,priceLockExtraPool:undefined,materialAllocations:line.materialAllocations.filter(a=>a.source==='extra'),costParts:{...line.costParts,material:line.priceLockExtraPool.amount}}]:[line])){
|
||||
const pool=line.costMaterial?.mode==='pool'?line.materialPool:line.priceLockPool;
|
||||
const poolId=line.costMaterial?.mode==='pool'?line.costMaterial.poolId:pool?.poolId;
|
||||
if(!poolId)continue;
|
||||
|
||||
Reference in new issue
Block a user