Show Errors, Make grids usable when no mandator is selected, move completed files also when reloading

This commit is contained in:
Jonathan Jenne
2022-04-19 15:33:44 +02:00
parent 9be55f3709
commit 1bef72d65c
12 changed files with 453 additions and 294 deletions

View File

@@ -314,6 +314,10 @@ Namespace Documents
Dim oFunctionName = oColumn.Config.FunctionName
Dim oFunctionParams = oColumn.Config.FunctionParams
Logger.Debug("Running Function: [{0}]", oFunctionName)
Logger.Debug("With Parameters: [{0}]", oFunctionParams)
Dim oParamsDict = ParseFunctionParamsAsDict(oFunctionParams)
If oFunctionName = Constants.FUNCTION_PRICE Then
@@ -468,13 +472,26 @@ Namespace Documents
Dim oPriceItem As DocumentRow.FieldValue = pRow.Fields.GetOrDefault(pPriceField)
' These fields are fetched from the current row
Dim oArticleNumberField As String = oFieldMap.GetOrDefault("Article", Nothing)
Const PARAMETER_ARTICLE = "Article"
Dim oArticleNumberField As String = oFieldMap.GetOrDefault(PARAMETER_ARTICLE, Nothing)
If oArticleNumberField Is Nothing Then
Logger.Warn("Parameter '{0}' not found for Function PRICE", PARAMETER_ARTICLE)
End If
If pRow.Fields.ContainsKey(oArticleNumberField) = False Then
Logger.Warn("Value '{0}' for Parameter '{1}' not found for Function PRICE", oArticleNumberField, PARAMETER_ARTICLE)
End If
Dim oArticleNumber As String = pRow.Fields.Item(oArticleNumberField).Final
Dim oQuantityField As String = oFieldMap.GetOrDefault("Quantity", Nothing)
Const PARAMETER_QUANTITY = "Quantity"
Dim oQuantityField As String = oFieldMap.GetOrDefault(PARAMETER_QUANTITY, Nothing)
If oQuantityField Is Nothing Then
Logger.Warn("Parameter '{0}' not found for Function PRICE", PARAMETER_QUANTITY)
End If
Dim oQuantity As Integer = 1
If Integer.TryParse(pRow.Fields.Item(oQuantityField).Final, oQuantity) = False Then
Logger.Warn("Value for parameter Quantity could not be parsed. Setting to 1.")
Logger.Warn("Value for parameter '{0}' could not be parsed. Setting to 1.", PARAMETER_QUANTITY)
End If
' These fields a fetched from the head row, ie. the first row