This commit is contained in:
2026-08-19 09:42:07 +08:00
parent ff1d330c2d
commit b5864bfcda
56 changed files with 497 additions and 306 deletions
@@ -68,8 +68,8 @@ async function createWaybillPayable(context, fixture, order, input, index) {
if (!inboundId) return null
const path = `/api/platform/v1/inbounds/${encodeURIComponent(inboundId)}/fee-details?accountId=${encodeURIComponent(fixture.customerId)}`
const body = { feeItemId: Number(input.feeItem.id), direction: 'PAYABLE', businessDate: dateOffset(-3 - index),
unitPrice: 90 + index * 10, amount: 90 + index * 10, currency: 'CNY', settlementIncluded: true,
partnerId: id(input.supplier.id), partnerName: input.supplier.name || null,
unitPrice: 90 + index * 10, amount: 90 + index * 10, currency: 'CNY',
supplierId: id(input.supplier.id),
remark: `${context.marker}-WAYBILL-PAYABLE-${index + 1}` }
const response = await write(context, 'POST', path, body, `waybill-payable-${index + 1}`)
const detail = context.apiSuccess(MODULE, `创建第 ${index + 1} 条独占运单 PAYABLE 来源`, response,
@@ -262,7 +262,7 @@ export async function run(context) {
const legacyPayable = { ...pool.resolved[0], feeSourceId: pool.resolved[0].sourceFeeId,
direction: 'PAYABLE', currency: 'CNY', sourceType: 'MANUAL',
marker: context.marker, partnerId: pool.resolved[0].supplierId }
marker: context.marker, supplierId: pool.resolved[0].supplierId }
await runReconciliation(context, fixture, legacyPayable)
const receivables = fixture.receivableSettlements || []
const firstPayable = fixture.payableSettlements?.[0]