优化
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user