{sub}
回收金额:{grams(q.oldMg)}g × {money(Math.round(Number(input?.buy_rate ?? draft?.buy_rate ?? 0) * 100))} /g = {money(def)}
{def !== q.purchaseAmount && (核实后实际回收款:{money(q.purchaseAmount)}
)} > ) : ( <> {q.differenceMg > 0 ? (补金差价:({grams(q.newMg)} − {grams(q.oldMg)})g ×{' '} {money(Math.round(Number(input?.exchange?.gold_price ?? draft?.gold_price ?? 0) * 100))}/g ={' '} {money(q.goldAmount)}
) : (无需补金差价。
)}新货工费: {input?.exchange?.products ? '各件工费合计' : input?.exchange?.labor_mode === 'total' ? '按总额' : grams(q.newMg) + 'g × ' + money(Math.round(Number(input?.exchange?.labor_rate || 0) * 100)) + '/g'}{' '} = {money(q.laborAmount)}
折旧费:{grams(q.depreciationMg)}g ×{' '} {money(Math.round(Number(input?.exchange?.depreciation_rate ?? draft?.depreciation_rate ?? 10) * 100))}/g = {money(q.depreciationAmount)}
{!!q.chargesAmount &&其他收费:{money(q.chargesAmount)}
} {!!q.discount &&优惠:−{money(q.discount)}
} {!!q.roundingAdjustment && (费用取整调整:{q.roundingAdjustment > 0 ? '+' : '−'} {money(Math.abs(q.roundingAdjustment))}
)}本次置换费用:{money(q.receivable)}
{q.depositMg > 0 ? (余料寄存:{grams(q.depositMg)}g,暂不结算。
) : q.surplusMg > 0 ? (余料回收:({grams(q.oldMg)} − {grams(q.newMg)})g ×{' '} {money(Math.round(Number(input?.buy_rate || 0) * 100))}/g = {money(q.purchaseAmount)}
) : (无需余料回收。
)} > )}最终结算 = 置换费用 {money(q.receivable)} − 余料回收款 {money(q.purchaseAmount)}。 {!q.netSettlement && '本次无需现金收付款。'}
)} > ); } export function pocketOptions(state: LedgerState, key: string, historical: boolean, blank?: string) { const active = Model.activePocketKeys(state), result: (string | boolean)[][] = active.map(p => [p, rowLabel(state, p) || p]); if (key && !active.includes(key)) result.push([ key, rowLabel(state, key) + (historical ? '(已停用 · 原货盘)' : '(已停用,请重新选择)'), !historical, ]); return blank ? [['', blank], ...result] : result; } export function loadDraft{value.legacyCountNotice || '这笔历史记录未记录对数,当前对数按实际盘点基准保留。'}
> ) : null; }