Anlage des Repos
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
' CheckArticleGroupIsRelevant(ArticleGroup : Integer)
|
||||
' ----------------------------------------------------------------------------
|
||||
' Prüft, ob die übergebene Artikelgruppe am Packtisch bearbeitet/gescannt
|
||||
' werden kann (true), oder ob es sich um eine "nicht-relevante" Artikelgruppe
|
||||
' handelt (false), zb Versandkosten, die auf nicht sichtbar geschaltet wird.
|
||||
'
|
||||
' Geprüft wird gegen die Variable EXCLUDED_ARTICLEGROUPS, die im Fensterscript
|
||||
' konfiguriert werden kann.
|
||||
' Die Variable kann entweder genau einen Wert, einen unteren/oberen Grenzwert
|
||||
' oder eine Liste von Werten enthalten.
|
||||
' Erlaubte Beispiele:
|
||||
' - Genau ein Wert: "100"
|
||||
' - Grenzwert bis/ab dem dies gilt: "100-" / "100+"
|
||||
' - Array von verschiedenen Werten: "100, 101, 102"
|
||||
'
|
||||
' Wenn keine Artikelgruppe als nicht-relevant definiert wurde oder die zu
|
||||
' prüfende Artikelgruppe ist leer oder kleiner 1, wird True zurückgegeben.
|
||||
'
|
||||
' Returns: CheckArticlegroupIsRelevant : Boolean
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow(at)digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 24.06.2021 / MP
|
||||
' Version Date / Editor: 28.06.2021 / MP
|
||||
' Version Number: 4.0.0.0
|
||||
|
||||
Function CheckArticleGroupIsRelevant(ArticleGroup)
|
||||
CheckArticleGroupIsRelevant = True
|
||||
|
||||
' Wenn die Variable leer ist, sind alle Artikelgruppen relevant
|
||||
If Len(EXCLUDED_ARTICLEGROUPS) <= 0 Then
|
||||
Exit Function
|
||||
End If
|
||||
|
||||
' Ohne Wert geht gar nichts, auch Negative Werte sind sinnlos
|
||||
If Len(ArticleGroup) <= 0 Or ArticleGroup < 0 Then
|
||||
CheckArticleGroupIsRelevant = False
|
||||
Exit Function
|
||||
End If
|
||||
|
||||
' Wenn EXCLUDED_ARTICLEGROUPS ein Komma enthält, muss ein Array
|
||||
' aus den Elementen erzeugt werden.
|
||||
posKomma = InStr(EXCLUDED_ARTICLEGROUPS, ",")
|
||||
|
||||
If posKomma > 0 Then
|
||||
exValueArray = Split(EXCLUDED_ARTICLEGROUPS, ",")
|
||||
|
||||
For Each exValue in exValueArray
|
||||
If Cint(exValue) = ArticleGroup Then
|
||||
CheckArticleGroupIsRelevant = False
|
||||
Exit Function
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
posPlus = InStr(EXCLUDED_ARTICLEGROUPS, "+")
|
||||
posMinus = InStr(EXCLUDED_ARTICLEGROUPS, "-")
|
||||
If posPlus > 0 Then
|
||||
' + enthalten, die Variable enthält ein unteres Limit
|
||||
limit = CInt(Mid(EXCLUDED_ARTICLEGROUPS, 1, posPlus-1))
|
||||
|
||||
If ArticleGroup >= limit Then
|
||||
CheckArticleGroupIsRelevant = False
|
||||
End If
|
||||
ElseIf posMinus > 0 Then
|
||||
' - enthalten, die Variable enthält ein oberes Limit
|
||||
limit = CInt(Mid(EXCLUDED_ARTICLEGROUPS, 1, posMinus-1))
|
||||
|
||||
If ArticleGroup <= limit Then
|
||||
CheckArticleGroupIsRelevant = False
|
||||
End If
|
||||
Else
|
||||
' Die Variable enthält genau eine Artikelgruppe
|
||||
If ArticleGroup = CInt(EXCLUDED_ARTICLEGROUPS) Then
|
||||
CheckArticleGroupIsRelevant = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End Function
|
||||
Reference in New Issue
Block a user