Compare commits

...

2 Commits

Author SHA1 Message Date
Developer01
65b73b45bf Currency Summary EUR 2025-12-03 14:29:18 +01:00
Developer01
4554c5841d Validator NotResponible mit oder ohne override/inlcude FI 2025-12-03 14:11:30 +01:00
7 changed files with 44 additions and 46 deletions

View File

@ -482,7 +482,7 @@ Public Class ClassControlCreator
Return control
End Function
Public Function CreateExistingGridControl(row As DataRow, DT_MY_COLUMNS As DataTable, designMode As Boolean) As GridControl
Public Function CreateExistingGridControl(row As DataRow, DT_MY_COLUMNS As DataTable, designMode As Boolean, pcurrencySymbol As String) As GridControl
Dim oGridControlCreator = New ControlCreator.GridControl(LogConfig, GridTables)
Dim oControl As GridControl = CreateBaseControl(New GridControl(), row, designMode)
Dim oControlId = DirectCast(oControl.Tag, ControlMetadata).Guid
@ -586,7 +586,7 @@ Public Class ClassControlCreator
End Try
End If
oGridControlCreator.ConfigureViewColumns(DT_MY_COLUMNS, oView, oControl)
oGridControlCreator.ConfigureViewColumns(DT_MY_COLUMNS, oView, oControl, pcurrencySymbol)
oGridControlCreator.ConfigureViewEvents(DT_MY_COLUMNS, oView, oControl, oControlId)
' 08.11.2021: Fix editor being empty on first open

View File

@ -144,8 +144,16 @@ Namespace ControlCreator
Return oEditor
End If
End Function
' Hilfsroutine: passt NUR das Summary-Item an (ohne FormatInfo)
Private Sub ApplyCurrencySummaryFormat(oCol As GridColumn, currencySymbol As String)
oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum
' Variante A: Standard-Währungsformat aus aktueller Kultur
' oCol.SummaryItem.DisplayFormat = "SUM: {0:C2}"
Public Sub ConfigureViewColumns(pColumnTable As DataTable, pGridView As GridView, pGrid As DevExpress.XtraGrid.GridControl)
' Variante B: Kulturunabhängig, Symbol explizit anhängen
oCol.SummaryItem.DisplayFormat = $"SUM: {{0:N2}} {currencySymbol}"
End Sub
Public Sub ConfigureViewColumns(pColumnTable As DataTable, pGridView As GridView, pGrid As DevExpress.XtraGrid.GridControl, pcurrencySymbol As String)
Dim oShouldDisplayFooter As Boolean = False
@ -192,8 +200,7 @@ Namespace ControlCreator
oShouldDisplayFooter = True
Case Constants.AGGREGATE_TOTAL_CURRENCY
oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum
oCol.SummaryItem.DisplayFormat = "SUM: {0:C2}"
ApplyCurrencySummaryFormat(oCol, pcurrencySymbol)
oShouldDisplayFooter = True
Case Constants.AGGREGATE_TOTAL_AVG

View File

@ -295,7 +295,7 @@ Public Class frmFormDesigner
Dim oDTColumnsPerDevExGrid As DataTable = DatabaseFallback.GetDatatableECM(oSQL) ', "FDesignLaodControls")
Dim table = ControlCreator.CreateExistingGridControl(row, oDTColumnsPerDevExGrid, True)
Dim table = ControlCreator.CreateExistingGridControl(row, oDTColumnsPerDevExGrid, True, "EUR")
AddHandler table.MouseClick, AddressOf gridControl_MouseClick
' AddHandler table.ColumnHeaderMouseClick, AddressOf table_ColumnHeaderMouseClick

View File

@ -3299,7 +3299,7 @@ FROM VWPM_PROFILE_ACTIVE T WHERE T.GUID IN (SELECT PROFILE_ID FROM [dbo].[FNPM_G
LOGGER.Debug($"oTargetPath with NowParams: {oTargetPath}")
Dim oResult = WINDREAM_MOD.NewFileStream(oSourcePath, oTargetPath, oWMObjecttype, True)
Dim oResult = WINDREAM_MOD.NewFileStream(oSourcePath, oTargetPath, oWMObjecttype)
If oResult = True Then
WM_AHWF_docPath = oTargetPath
Dim oDocID = WINDREAM_MOD.NewDocumentID

View File

@ -355,7 +355,7 @@ Public Class frmMassValidator
LOGGER.Debug("Versuch Tabelle zu laden")
Dim oDTMyColumns As DataTable = DatabaseFallback.GetDatatableECM($"SELECT * FROM TBPM_CONTROL_TABLE WHERE CONTROL_ID = {oControlRow.Item("GUID")} ORDER BY SEQUENCE") ', "MV_LoadControls1")
oControl = ControlCreator.CreateExistingGridControl(oControlRow, oDTMyColumns, False)
oControl = ControlCreator.CreateExistingGridControl(oControlRow, oDTMyColumns, False, CURRENT_DOC_CURRENCY)
End Select
If oControl IsNot Nothing AndAlso TypeOf oControl IsNot Label Then

View File

@ -75,6 +75,7 @@ Public Class frmValidator
Private CountAction As Int16 = 0
Public Shared Property WMDocPathWindows As String
Private Property DocPathWindows As String
Private Property DocCurrency As String = "EUR"
'Anzahl der Validierungsdokumente
Private Property Amount_Docs2Validate As Integer
Private Property first_control As Control
@ -1137,7 +1138,7 @@ Public Class frmValidator
Continue For
End If
Dim oGrid = ControlCreator.CreateExistingGridControl(oControlRow, oFilteredDatatable, False)
Dim oGrid = ControlCreator.CreateExistingGridControl(oControlRow, oFilteredDatatable, False, DocCurrency)
oMyControl = oGrid
'AddHandler oGrid.Views(0).c AddressOf GridView_CustomColumnDisplayText
@ -1345,6 +1346,7 @@ Public Class frmValidator
Dim oTitle
Dim oCaption
Dim oColor
Dim oIncludeFI As Boolean = False
Try
oAction = oDT_ACTIONS?.Rows(0).Item("ActionType")
Catch ex As Exception
@ -1375,12 +1377,17 @@ Public Class frmValidator
Catch ex As Exception
oColor = ""
End Try
Try
oIncludeFI = oDT_ACTIONS?.Rows(0).Item("IncludeFI")
Catch ex As Exception
End Try
Try
OverrideAll = oDT_ACTIONS?.Rows(0).Item("OverrideAll")
Catch ex As Exception
MyValidationLogger.Warn($"Could not set OverrideAll {ex.Message}")
OverrideAll = False
End Try
If OverrideAll = True Then
MyValidationLogger.Info($"CURRENT_DOC_ID: {CURRENT_DOC_ID} - OverrideAll will be in Action!")
End If
@ -1395,7 +1402,7 @@ Public Class frmValidator
result = MessageBox.Show(oQuestion, oTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
If result = MsgBoxResult.Yes Then
Override = True
Finish_WFStep()
Finish_WFStep(oIncludeFI)
End If
End If
Case "Update_Single_Control".ToUpper
@ -1441,7 +1448,7 @@ Public Class frmValidator
Case "Override_Direct".ToUpper
Override = True
If Check_UpdateIndexe() = True Then
Finish_WFStep(False)
Finish_WFStep(oIncludeFI)
End If
Case "Override incFinal".ToUpper
@ -2789,24 +2796,24 @@ Public Class frmValidator
End If
If Not IsNothing(oCurrency) Then
Dim oValueType = oCurrency.GetType.ToString
If IsDBNull(oCurrency) Then
oCurrency = "EUR"
DocCurrency = oCurrency
Dim oValueType = DocCurrency.GetType.ToString
If IsDBNull(DocCurrency) Then
DocCurrency = "EUR"
Else
Try
oCurrency = oCurrency.ToString
DocCurrency = DocCurrency.ToString
Catch ex As Exception
MyValidationLogger.Warn($"Unexpected error in Converting oCurreny to string: " & ex.Message)
oCurrency = "EUR"
DocCurrency = "EUR"
End Try
End If
If oCurrency <> String.Empty Then
If oCurrency.ToString.Length <> 3 Then
MyValidationLogger.Info("oCurrency-Length = 3 - Setting to EUR")
oCurrency = "EUR"
If DocCurrency <> String.Empty Then
If DocCurrency.ToString.Length <> 3 Then
MyValidationLogger.Info("DocCurrency-Length = 3 - Setting to EUR")
DocCurrency = "EUR"
End If
MyValidationLogger.Debug($"oCurrency = {oCurrency}")
MyValidationLogger.Debug($"DocCurrency = {DocCurrency}")
For Each oControl As Control In PanelValidatorControl.Controls
Try
Dim oMeta = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata)
@ -2818,7 +2825,7 @@ Public Class frmValidator
DT_COLUMNS_GRID.Select(oExpression, "SEQUENCE").CopyToDataTable(oFilteredDatatable, LoadOption.PreserveChanges)
Dim oCultureInfo As CultureInfo = New CultureInfo("de-DE")
oCultureInfo.NumberFormat.CurrencySymbol = oCurrency
oCultureInfo.NumberFormat.CurrencySymbol = DocCurrency
Dim riTextEdit As RepositoryItemTextEdit = New RepositoryItemTextEdit()
riTextEdit.MaskSettings.Configure(Of MaskSettings.Numeric)(Sub(settings)
settings.MaskExpression = "c"
@ -2852,7 +2859,7 @@ Public Class frmValidator
End Try
Next
Else
MyValidationLogger.Warn($"oCurrency is String.empty! ")
MyValidationLogger.Warn($"DocCurrency is String.empty! ")
End If
Else
MyValidationLogger.Warn($"oCurrency is Nothing - Check PROFIL_CURRENCY_ATTRIBUTE! ")
@ -6359,11 +6366,8 @@ Public Class frmValidator
Indexiere_File(CURRENT_WMFILE, PROFIL_NOT_RESP_COMMENT_ATTR, frmDialog.oComment)
Else
Dim oREsult = IDBData.SetVariableValue(PROFIL_NOT_RESP_COMMENT_ATTR, frmDialog.oComment)
End If
Finish_WFStep()
Finish_WFStep(oIncludeFI)
End If
End Sub

View File

@ -456,32 +456,19 @@ Public Class frmValidatorSearch
End If
End If
If My.Settings.frmValidatorSearchSize.IsEmpty = False Then
If My.Settings.frmValidatorSearchSize.Height > 100 And My.Settings.frmValidatorSearchSize.Width > 100 Then
If My.Settings.frmValidatorSearchSize.Height > 120 And My.Settings.frmValidatorSearchSize.Width > 120 Then
Me.Size = My.Settings.frmValidatorSearchSize
End If
End If
If My.Settings.frmValSearchSplitterDistance > 20 Then
SplitContainerSearches.SplitterDistance = My.Settings.frmValSearchSplitterDistance
End If
ToolStripDropDownButtonFile.Visible = False
End Sub
Private Sub frmValidatorSearch_Shown(sender As Object, e As EventArgs) Handles Me.Shown
Try
If My.Settings.frmValidatorSearchPosition.X > 0 And My.Settings.frmValidatorSearchPosition.Y > 0 Then
Me.Location = My.Settings.frmValidatorSearchPosition
End If
If Me.Size.Height > 100 And Me.Size.Width > 100 Then
Me.Size = My.Settings.frmValidatorSearchSize
Else
Me.Size = New Size(500, 800)
End If
SplitContainerSearches.SplitterDistance = My.Settings.frmValSearchSplitterDistance
Catch ex As Exception
LOGGER.Error(ex)
End Try
formLoaded = True
End Sub