fix Mandator being set after applying functions that rely on it
This commit is contained in:
@@ -246,6 +246,9 @@ Namespace Documents
|
|||||||
If oMandator Is Nothing Then
|
If oMandator Is Nothing Then
|
||||||
Logger.Warn("Mandator not found for File [{0}]", pDocument.File.Name)
|
Logger.Warn("Mandator not found for File [{0}]", pDocument.File.Name)
|
||||||
Else
|
Else
|
||||||
|
' Set mandator befor applying any functions that depend on a valid mandator
|
||||||
|
pDocument.Mandator = oMandator
|
||||||
|
|
||||||
pDocument = ApplyDefinedItemFunctionsForImport(pDocument, oMandator, pTemplate)
|
pDocument = ApplyDefinedItemFunctionsForImport(pDocument, oMandator, pTemplate)
|
||||||
pDocument = ApplyDynamicItemFunctionsForImport(pDocument, oMandator)
|
pDocument = ApplyDynamicItemFunctionsForImport(pDocument, oMandator)
|
||||||
|
|
||||||
@@ -253,7 +256,6 @@ Namespace Documents
|
|||||||
pDocument = Await MaybeApplyPriceFunctions(pDocument, oMandator, pTemplate)
|
pDocument = Await MaybeApplyPriceFunctions(pDocument, oMandator, pTemplate)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
pDocument.Mandator = oMandator
|
|
||||||
Return pDocument
|
Return pDocument
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -312,11 +314,11 @@ Namespace Documents
|
|||||||
Dim oFunctionParams = oColumn.Config.FunctionParams
|
Dim oFunctionParams = oColumn.Config.FunctionParams
|
||||||
Dim oParamsDict = ParseFunctionParamsAsDict(oFunctionParams)
|
Dim oParamsDict = ParseFunctionParamsAsDict(oFunctionParams)
|
||||||
|
|
||||||
If oFunctionName = "GLN" Then
|
If oFunctionName = Constants.FUNCTION_GLN Then
|
||||||
SetAccountByGLN(oRow, pMandator, oField.Key, Nothing, oParamsDict)
|
SetAccountByGLN(oRow, pMandator, oField.Key, Nothing, oParamsDict)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If oFunctionName = "EAN" Then
|
If oFunctionName = Constants.FUNCTION_EAN Then
|
||||||
SetArticleByEAN(oRow, pMandator, oField.Key)
|
SetArticleByEAN(oRow, pMandator, oField.Key)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user