Commit graph

9 commits

Author SHA1 Message Date
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
barisgit
7c1ab6460d Add tests to cover new additions 2025-09-06 19:54:13 +02:00
Jan Böhmer
20f32c7f12 Applied rector suggestions 2024-06-22 00:31:43 +02:00
Jan Böhmer
6a2ff9d153 Added declare strict types to all files 2023-06-11 18:59:07 +02:00
Jan Böhmer
fcbb1849ec Applied rectors phpunit 9 migrations to tests 2023-06-11 15:15:55 +02:00
Jan Böhmer
98dc553938 Applied rector to test files 2023-06-11 14:18:53 +02:00
Jan Böhmer
d04d743520 Fixed typos 2023-04-15 23:14:53 +02:00
Jan Böhmer
63df16a369 Removed unused imports 2023-04-15 22:27:19 +02:00
Jan Böhmer
e444388517 Added tests for PCBnew BOM type 2023-03-16 23:32:12 +01:00