Fix EAN, only change xml if a valid value was found
This commit is contained in:
@@ -413,6 +413,7 @@ Namespace Winline
|
|||||||
' we dont throw here, but leave the original value in case of a failure.
|
' we dont throw here, but leave the original value in case of a failure.
|
||||||
' Throw New Exceptions.MissingAttributeException("EAN")
|
' Throw New Exceptions.MissingAttributeException("EAN")
|
||||||
Logger.Warn("EAN could not be retrieved for Node {0}. Skipping.", oNode.Name)
|
Logger.Warn("EAN could not be retrieved for Node {0}. Skipping.", oNode.Name)
|
||||||
|
Continue For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
oNode.InnerText = oEAN
|
oNode.InnerText = oEAN
|
||||||
|
|||||||
@@ -572,7 +572,7 @@ Namespace Winline
|
|||||||
FROM [{pMandator.Database}].[dbo].[v021]
|
FROM [{pMandator.Database}].[dbo].[v021]
|
||||||
WHERE [c011] = '{pArticleNumber}'
|
WHERE [c011] = '{pArticleNumber}'
|
||||||
AND [mesocomp] = '{pMandator.Id}' AND [mesoyear] = {oYear}"
|
AND [mesocomp] = '{pMandator.Id}' AND [mesoyear] = {oYear}"
|
||||||
Dim oEAN As String = Database.GetScalarValue(oSQL)
|
Dim oEAN As String = Utils.NotNull(Database.GetScalarValue(oSQL), Nothing)
|
||||||
|
|
||||||
' EAN not found in this Mandator, continue to next one
|
' EAN not found in this Mandator, continue to next one
|
||||||
If oEAN Is Nothing Then
|
If oEAN Is Nothing Then
|
||||||
|
|||||||
Reference in New Issue
Block a user