fix: clear error messages between BOM extractions
Fix bug where error messages from previous orders were accumulating: - Add ClearErrorMessages() public method to BomExtractor class - Initialize pErrorMessages as new collection in ExtractBom() - Replace commented-out pErrorMessages.Clear with proper initialization - Ensures each order's error information is independent Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -112,6 +112,14 @@ Public Sub ClearExcludeCategories()
|
||||
Set pExcludeCategories = New collection
|
||||
End Sub
|
||||
|
||||
'=====================================================================
|
||||
' 方法: ClearErrorMessages
|
||||
' 功能: 清空错误信息列表
|
||||
'=====================================================================
|
||||
Public Sub ClearErrorMessages()
|
||||
Set pErrorMessages = New collection
|
||||
End Sub
|
||||
|
||||
'=====================================================================
|
||||
' 方法: ExtractBom
|
||||
' 功能: 根据产品条件提取BOM
|
||||
@@ -124,8 +132,7 @@ Public Function ExtractBom(productConditions As Object) As collection
|
||||
' 清空结果
|
||||
Set pMatchedItems = New collection
|
||||
Set pRequiredCategories = New collection
|
||||
|
||||
'pErrorMessages.Clear
|
||||
Set pErrorMessages = New collection
|
||||
|
||||
' 第一步:确定需要的类别
|
||||
DetermineRequiredCategories productConditions
|
||||
|
||||
Reference in New Issue
Block a user