Part-DB-server/tests/Services/ImportExportSystem
Niklas 3aad70934b
Support dynamic supplier SPNs in BOM import comments (#1208)
* 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
2026-01-25 21:32:14 +01:00
..
BOMImporterTest.php Support dynamic supplier SPNs in BOM import comments (#1208) 2026-01-25 21:32:14 +01:00
BOMValidationServiceTest.php Add tests to cover new additions 2025-09-06 19:54:13 +02:00
EntityExporterTest.php Implement excel based import/export 2025-08-31 22:15:58 +02:00
EntityImporterTest.php Implement excel based import/export 2025-08-31 22:15:58 +02:00