8
0
2024-11-08 15:39:19 +01:00

24 lines
730 B
Plaintext

' Version Date: 25.09.2020
Function TestHasFreeArticleRow(ArticleNumber)
Set mywin = CWLStart.CurrentModule.Windows.Item(WINDOW_ID)
Set Grid = mywin.Controls.Item(GRID_ID).Grid
Dim NextFreeRow : NextFreeRow = False
If DEBUG_ON = True Then
AddDebugLine "Getting next free row for Article: " & ArticleNumber
ShowDebugBox "TestHasFreeArticleRow"
End If
For Row = 1 To Grid.LineCount
CurrentArticleNumber = Grid.GetCellValue(Row, COLUMN_ARTICLENUMBER)
CurrentSerialNumber = Grid.GetCellValue(Row, COLUMN_SERIALNUMBER)
If UCase(ArticleNumber) = UCase(CurrentArticleNumber) And Len(CurrentSerialNumber) = 0 Then
NextFreeRow = True
Exit For
End If
Next
TestHasFreeArticleRow = NextFreeRow
End Function