Amazon reconciliation: confirm-once "add missing product to price list" flow
The manual import endpoint now returns errorType=product_not_on_pricelist with the resolved productId and a suggested price when Amazon's own line item is unambiguous (single-line orders) - this wires that into the import modal:
- Upfront checkbox: auto-add using Amazon's line price and retry immediately, no per-order interruption, for the common case of a currently-valid price list just missing one product. - Per-row fallback (checkbox off, or price ambiguous/missing): an inline price field + "add to price list & reimport" button on the failed row, confirmed once per distinct failure rather than needing to redo the whole batch.
The proxy previously discarded every field but message/status on failure - now passes errorType/productId/suggestedPrice/etc. through so the page can act on them, and forwards the new priceListAdditions option through to Laravel.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QTy674ErXSPZ8spJ6HMhE6
Amazon import modal: price list override + IsDefault pre-selection
Adds a fourth "Preisliste" selector (filtered to IsSOPriceList) alongside doc type/delivery rule/invoice rule, wired to the new priceListId option - lets staff choose which price list an import (and any "add missing product" action) actually targets, instead of always the order source's own.
Also pre-selects the first IsDefault=true record for doc type targets and price lists when their options load (or immediately on reopen if already cached), rather than always starting on "— Standard —".
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QTy674ErXSPZ8spJ6HMhE6
fix: TDZ crash in amazon-orders-check - production 500 on page load
importDefaultFieldFor was an object literal reading importDocTypeTargetId/ importPriceListId at definition time, but declared above those refs in the file - eager evaluation hit them before their own `const` initializers ran ("can't access lexical declaration before initialization", confirmed via Sentry). Moved the field lookup inside applyImportDefault's function body, which only runs when called (well after all top-level consts exist), regardless of declaration order in the file.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QTy674ErXSPZ8spJ6HMhE6