WIP
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
Public Property WinLinePrice As Double
|
||||
Public Property Price As Double
|
||||
Public Property Amount As Double
|
||||
Public Property ReplacementArticleNumber As String
|
||||
Public Property UseReplacementNumber As Boolean = False
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
@@ -7,7 +7,7 @@ Namespace Positions
|
||||
.Caption = "Nr.",
|
||||
.VisibleIndex = 0,
|
||||
.MaxWidth = 30
|
||||
}
|
||||
}
|
||||
Public Shared Property ColumnArticleNumber As New GridColumn With {
|
||||
.FieldName = "ArticleNumber",
|
||||
.Caption = "Artikelnummer",
|
||||
@@ -18,35 +18,40 @@ Namespace Positions
|
||||
.Caption = "EAN",
|
||||
.VisibleIndex = 2
|
||||
}
|
||||
Public Shared Property ColumnReplacementArticleNumber As New GridColumn With {
|
||||
.FieldName = "ReplacementArticleNumber",
|
||||
.Caption = "Ersatzartikel",
|
||||
.VisibleIndex = 3
|
||||
}
|
||||
Public Shared Property ColumnArticleNumberVendor As New GridColumn With {
|
||||
.FieldName = "ArticleNumberVendor",
|
||||
.Caption = "Artikel Lieferant",
|
||||
.VisibleIndex = 3
|
||||
.VisibleIndex = 4
|
||||
}
|
||||
Public Shared Property ColumnArticleDescription As New GridColumn With {
|
||||
.FieldName = "ArticleDescription",
|
||||
.Caption = "Artikel Beschreibung",
|
||||
.VisibleIndex = 4
|
||||
.VisibleIndex = 5
|
||||
}
|
||||
Public Shared Property ColumnAmount As New GridColumn With {
|
||||
.FieldName = "Amount",
|
||||
.Caption = "Menge",
|
||||
.VisibleIndex = 5
|
||||
.VisibleIndex = 6
|
||||
}
|
||||
Public Shared Property ColumnEDIPrice As New GridColumn With {
|
||||
.FieldName = "EDIPrice",
|
||||
.Caption = "Einzelpreis EDI",
|
||||
.VisibleIndex = 6
|
||||
.VisibleIndex = 7
|
||||
}
|
||||
Public Shared Property ColumnWinLinePrice As New GridColumn With {
|
||||
.FieldName = "WinLinePrice",
|
||||
.Caption = "Einzelpreis WinLine",
|
||||
.VisibleIndex = 7
|
||||
.VisibleIndex = 8
|
||||
}
|
||||
Public Shared Property ColumnPrice As New GridColumn With {
|
||||
.FieldName = "Price",
|
||||
.Caption = "Einzelpreis",
|
||||
.VisibleIndex = 8
|
||||
.VisibleIndex = 9
|
||||
}
|
||||
|
||||
''' <summary>
|
||||
@@ -59,6 +64,7 @@ Namespace Positions
|
||||
Public Shared Property AllColumns As New List(Of GridColumn) From {
|
||||
ColumnRowNumber,
|
||||
ColumnArticleNumber,
|
||||
ColumnReplacementArticleNumber,
|
||||
ColumnArticleNumberVendor,
|
||||
ColumnEuropeanArticleNumber,
|
||||
ColumnArticleDescription,
|
||||
|
||||
@@ -1,8 +1,19 @@
|
||||
Imports ImporterForm.Positions
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports ImporterForm.Positions
|
||||
Imports ImporterShared.Winline
|
||||
Imports ImporterShared.Schemas
|
||||
|
||||
Public Class PositionData
|
||||
Public Shared Function Load(pData As Orders.Input.MESOWebService, pDataOriginal As Orders.Input.MESOWebService) As List(Of Position)
|
||||
Inherits ImporterShared.BaseClass
|
||||
|
||||
Private Winline As Data
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pWinline As Data)
|
||||
MyBase.New(pLogConfig, pLogConfig.GetLogger())
|
||||
Winline = pWinline
|
||||
End Sub
|
||||
|
||||
Public Function Load(pMandator As Mandator, pData As Orders.Input.MESOWebService, pDataOriginal As Orders.Input.MESOWebService) As List(Of Position)
|
||||
Dim oPositions = Orders.Helpers.GetOrderPositions(pData)
|
||||
Dim oPositionsOriginal = Orders.Helpers.GetOrderPositions(pDataOriginal)
|
||||
Dim oPositionList As New List(Of Position)
|
||||
@@ -12,6 +23,13 @@ Public Class PositionData
|
||||
Where(Function(p) p.Zeilennummer = oPosition.Zeilennummer).
|
||||
SingleOrDefault()
|
||||
|
||||
Dim oReplacementNumber As String = Winline.GetReplacementArticleNumber(oPosition.Artikelnummer, pMandator)
|
||||
|
||||
' If ArticleNumber is the same as the replacement Number, this Article does not have a replacement Number
|
||||
If oReplacementNumber = oPosition.Artikelnummer Then
|
||||
oReplacementNumber = Nothing
|
||||
End If
|
||||
|
||||
oPositionList.Add(New Position With {
|
||||
.ArticleNumber = oPosition.Artikelnummer,
|
||||
.RowNumber = oPosition.Zeilennummer,
|
||||
@@ -21,7 +39,8 @@ Public Class PositionData
|
||||
.WinLinePrice = 0,
|
||||
.Price = 0,
|
||||
.Amount = oPosition.Menge_bestellt,
|
||||
.EuropeanArticleNumber = oPositionOriginal.Artikelnummer
|
||||
.EuropeanArticleNumber = oPositionOriginal.Artikelnummer,
|
||||
.ReplacementArticleNumber = oReplacementNumber
|
||||
})
|
||||
Next
|
||||
|
||||
|
||||
Reference in New Issue
Block a user