From 0847acd3f596e0dbfc149355d6cf27d27f349808 Mon Sep 17 00:00:00 2001 From: MayNiklas Date: Sun, 25 Jan 2026 20:10:20 +0100 Subject: [PATCH] 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. --- src/Services/ImportExportSystem/BOMImporter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Services/ImportExportSystem/BOMImporter.php b/src/Services/ImportExportSystem/BOMImporter.php index e511c04d..b0762987 100644 --- a/src/Services/ImportExportSystem/BOMImporter.php +++ b/src/Services/ImportExportSystem/BOMImporter.php @@ -400,8 +400,8 @@ class BOMImporter if (isset($mapped_entry['Manufacturer'])) { $comment_parts[] = 'Manf: ' . $mapped_entry['Manufacturer']; } - if (isset($mapped_entry['LCSC'])) { - $comment_parts[] = 'LCSC: ' . $mapped_entry['LCSC']; + if (isset($mapped_entry['LCSC SPN'])) { + $comment_parts[] = 'LCSC: ' . $mapped_entry['LCSC SPN']; } if (isset($mapped_entry['Supplier and ref'])) { $comment_parts[] = $mapped_entry['Supplier and ref'];