This commit is contained in:
2026-10-22 11:56:47 +08:00
parent 5d71af1ac9
commit de96e47d74
71 changed files with 1296 additions and 332 deletions
@@ -42,6 +42,12 @@ function failure(response) {
function containerRecord(value) { return value?.container }
async function ensureMatsonSupplier(context, records) {
if (context.options?.fixedCustomerId) {
const { loadSupplier } = await import('./finance-full-fixtures.mjs')
const supplier = await loadSupplier(context, 'BOOKING', { carrierCode: 'MATSON' })
if (!supplier) throw new Error('缺少启用的 MATSON 订舱供应商,不创建或启用主档')
return supplier
}
const existing = records.find((value) => value?.id && value?.name === MATSON_SUPPLIER_NAME)
if (existing?.status === 'ACTIVE') return existing
if (existing?.id) {