新增回收置换记账及打印,完善订单标志和购料单价

This commit is contained in:
summer committed 2026-10-26 14:44:07 +08:00
1 parent 844a1fa860
commit 505110ab0e
26 files changed
+1201 -64

No files matched your search

+2 -1
View File
@@ -112,7 +112,8 @@ function afterSaleSnapshot(ledger,id){const snapshot=empty(),liable=entityMember
function purchaseSnapshot(ledger,id){
const snapshot=empty(),purchase=ledger.one('SELECT * FROM material_purchases WHERE id=?',id);
if(!purchase||purchase.deleted_at)return snapshot;
cash(snapshot,'purchase:'+id,purchase.date,'outlay',actualPurchasePayer(ledger,purchase),purchase.amount);
const source=ledger.one('SELECT cash_amount FROM recovery_purchase_sources WHERE purchase_id=?',id);
cash(snapshot,'purchase:'+id,purchase.date,'outlay',actualPurchasePayer(ledger,purchase),source?.cash_amount??purchase.amount);
return snapshot;
}
function reimbursementSnapshot(ledger,id){