* feat: add supplier SPN lookup for BOM import
Add automatic part linking via supplier part numbers (SPNs) in the
BOM importer. When a Part-DB ID is not provided, the importer now
searches for existing parts by matching supplier SPNs from the CSV
with orderdetail records in the database.
This allows automatic part linking when KiCad schematic BOMs contain
supplier information like LCSC SPN, Mouser SPN, etc., improving the
import workflow for users who track parts by supplier part numbers.
* add tests for BOM import with supplier SPN handling
* Fix: Use correct field name for LCSC supplier part numbers in BOM import
The field mapping system uses 'LCSC SPN' as the target field name for LCSC
supplier part numbers (following the pattern SupplierName + ' SPN'), but the
code in parseKiCADSchematic() was incorrectly checking for 'LCSC'.
This caused LCSC supplier part numbers to be silently ignored and not included
in the BOM entry comments during schematic import.
Changed isset($mapped_entry['LCSC']) to isset($mapped_entry['LCSC SPN']) to
match the actual field name produced by the field mapping system.
* regression test: check for LCSC SPN in comment
* Support dynamic supplier SPNs in BOM import comments
Replace hardcoded LCSC SPN handling with dynamic supplier lookup to support all configured suppliers in BOM import. This allows any supplier defined in
Part-DB to have their SPN fields recognized and included in the BOM entry
comments during BOM import.
* Optimize BOM import by only calculating supplier SPN keys once