新增回收置换记账及打印,完善订单标志和购料单价
This commit is contained in:
1 parent
844a1fa860
commit
505110ab0e
26 files changed
+1201
-64
No files matched your search
@@ -65,7 +65,7 @@ function actualCostSummaries(ledger,book){
|
||||
calculation:{rate:item.rate,quantity:item.quantity}});
|
||||
for(const item of activity.directOutlays)append({...item,kind:'paid',component:'fee',
|
||||
name:item.note,source:`锁价费用 · 实付 ${item.date}`,paidDate:item.date});
|
||||
for(const item of book.materialPoolActivity.purchases)append({...item,kind:'goods',component:'material',
|
||||
for(const item of book.materialPoolActivity.purchases)append({...item,purchaseAmount:item.amount,amount:item.cashAmount??item.amount,kind:'goods',component:'material',
|
||||
materialPoolId:item.pool_id,name:'日料池采购',source:`日料池 ${item.pool_id} · 实付 ${item.date}`,paidDate:item.date,
|
||||
quantity:item.mg,calculation:null});
|
||||
for(const payer of Object.values(payers))payer.total=payer.goods+payer.paidFees;
|
||||
@@ -133,7 +133,7 @@ function reportRevision(book,dailyFundsState=null){
|
||||
}
|
||||
if(book.materialPoolActivity.summary.eventCount){
|
||||
// 只记录真实采购支出,不把后来耗用、剩余克重或退货带回采购日再算一次。
|
||||
const immutable=item=>Object.fromEntries(['id','pool_id','date','mg','amount','payer','note','actor','created']
|
||||
const immutable=item=>Object.fromEntries(['id','pool_id','date','mg','amount','payer','note','actor','created','recovery_id','cashAmount','offsetAmount','allocations']
|
||||
.filter(key=>item[key]!==undefined).map(key=>[key,item[key]]));
|
||||
financial.materialPoolPurchases=book.materialPoolActivity.purchases.map(immutable);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user