Files
AutoBOM/VBA_BOMConverter/Modules/M09_BOMExtractor.bas
Misaka_Company 44d6bdb750
All checks were successful
NTFY Notification / notify (push) Successful in 3s
fix: display all matched materials when multiple matches found in BOM extraction
Fixed a bug where materials matching multiple BOM library records would not
appear in the BOM extraction output. Previously, only the first match was
extracted when success=True, but multiple matches set success=False, causing
all materials to be skipped.

Changes:
- Modified M09_BOMExtractor.MatchAllMaterialTypesWithValidation()
- Changed condition from checking 'success' to checking 'rowCount > 0'
- Added loop to process ALL matching rows instead of just the first one
- Moved BuildWorksheetHeaderMap() outside loop for performance
- Enhanced debug logging to show row processing details

Impact:
- "机芯" (Movement) and "边" (Edge) sheets now show all matched materials
- Users can see and manually resolve ambiguous matches in output
- Component sheet handling unchanged (uses different code path)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-26 11:06:53 +08:00

39 KiB