Add packing units, calculate price according to packing units
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
Imports DigitalData.Modules.Language
|
||||
Imports MultiTool.Common.Winline.WinlineData
|
||||
|
||||
Namespace Templates
|
||||
|
||||
@@ -21,6 +22,41 @@ Namespace Templates
|
||||
Public Property OutputDirectory As String
|
||||
Public Property ArchiveDirectory As String
|
||||
|
||||
Public ReadOnly Property DocType As DocumentType
|
||||
Get
|
||||
Dim oDocType As String = GetParameter("DOCTYPE")
|
||||
Dim oPreselectedDocType As Integer = 0
|
||||
|
||||
If oDocType IsNot Nothing Then
|
||||
Integer.TryParse(oDocType, oPreselectedDocType)
|
||||
End If
|
||||
|
||||
Return [Enum].Parse(GetType(DocumentType), oPreselectedDocType)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property DocTypeCategory As DocumentTypeCategory
|
||||
Get
|
||||
Select Case DocType
|
||||
Case DocumentType.IncomingOffer,
|
||||
DocumentType.IncomingOrder,
|
||||
DocumentType.IncomingDeliveryNote,
|
||||
DocumentType.IncomingInvoice
|
||||
Return DocumentTypeCategory.Outgoing
|
||||
|
||||
Case DocumentType.OutgoingOffer,
|
||||
DocumentType.OutgoingOrder,
|
||||
DocumentType.OutgoingDeliveryNote,
|
||||
DocumentType.OutgoingInvoice
|
||||
Return DocumentTypeCategory.Incoming
|
||||
|
||||
Case Else
|
||||
Return DocumentTypeCategory.Undefined
|
||||
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property OutputReportDirectory
|
||||
Get
|
||||
Return IO.Path.Combine(OutputDirectory, "Reports")
|
||||
@@ -39,6 +75,7 @@ Namespace Templates
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Public Function GetParameter(pName As String) As String
|
||||
Dim oParam1 As String = Utils.NotNull(Parameter1, String.Empty)
|
||||
Dim oParam2 As String = Utils.NotNull(Parameter2, String.Empty)
|
||||
|
||||
Reference in New Issue
Block a user