test(finance): align full acceptance with current workflows
This commit is contained in:
@@ -233,7 +233,10 @@ export async function run(context) {
|
||||
const ar = await official(context, `/api/platform/finance/v1/settlements/${encodeURIComponent(arId)}`, '读取应收结算导出事实')
|
||||
const ap = await official(context, `/api/platform/finance/v1/settlements/${encodeURIComponent(apId)}`, '读取应付结算导出事实')
|
||||
const fee = await official(context, `/api/platform/finance/v1/fee-pool?customerId=${encodeURIComponent(customerId)}&direction=ALL`, '读取费用来源导出事实')
|
||||
const feeRow = values(fee.data)[0]
|
||||
// PAYABLE rows are removed from the payable pool once an AP settlement owns
|
||||
// them. Use a receivable row so the export filter still has an authoritative
|
||||
// post-settlement match instead of asserting against an intentionally consumed row.
|
||||
const feeRow = values(fee.data).find((item) => item?.direction === 'RECEIVABLE') || values(fee.data)[0]
|
||||
const statementNo = statement.data?.statementNo
|
||||
const arSummary = ar.data?.summary || ar.data
|
||||
const apSummary = ap.data?.summary || ap.data
|
||||
|
||||
Reference in New Issue
Block a user