neu
This commit is contained in:
@@ -265,14 +265,15 @@ Namespace VERAG_OUT_NCTS
|
||||
Partial Public Class VERAG_out_nctsInternalReference
|
||||
|
||||
#Region "Private fields"
|
||||
Private _officeCode As Object
|
||||
Private _officeCode As String
|
||||
|
||||
Private _positionNumber As Object
|
||||
Private _positionNumber As String
|
||||
|
||||
Private Shared sSerializer As XmlSerializer
|
||||
#End Region
|
||||
|
||||
Public Property OfficeCode() As Object
|
||||
<System.Xml.Serialization.XmlElementAttribute(DataType:="integer")>
|
||||
Public Property OfficeCode() As String
|
||||
Get
|
||||
Return Me._officeCode
|
||||
End Get
|
||||
@@ -281,7 +282,8 @@ Namespace VERAG_OUT_NCTS
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property PositionNumber() As Object
|
||||
<System.Xml.Serialization.XmlElementAttribute(DataType:="integer")>
|
||||
Public Property PositionNumber() As String
|
||||
Get
|
||||
Return Me._positionNumber
|
||||
End Get
|
||||
|
||||
@@ -4,14 +4,18 @@
|
||||
<xs:element name="VERAG_out_ncts">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Version"/>
|
||||
<xs:element name="Version" default="1.0.2"/>
|
||||
<xs:element name="Company"/>
|
||||
<xs:element name="Department" minOccurs="0"/>
|
||||
<xs:element name="InternalReference" minOccurs="0">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="OfficeCode"/>
|
||||
<xs:element name="PositionNumber"/>
|
||||
<xs:element name="OfficeCode">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer"/>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="PositionNumber" type="xs:integer"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
@@ -49,8 +53,8 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="EORI"/>
|
||||
<xs:element name="EORI_NL"/>
|
||||
<xs:element name="EORI" minOccurs="0"/>
|
||||
<xs:element name="EORI_NL" minOccurs="0"/>
|
||||
<xs:element name="UID_Nr" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
@@ -69,8 +73,8 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="EORI"/>
|
||||
<xs:element name="EORI_NL"/>
|
||||
<xs:element name="EORI" minOccurs="0"/>
|
||||
<xs:element name="EORI_NL" minOccurs="0"/>
|
||||
<xs:element name="UID_Nr" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
@@ -89,8 +93,8 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="EORI"/>
|
||||
<xs:element name="EORI_NL"/>
|
||||
<xs:element name="EORI" minOccurs="0"/>
|
||||
<xs:element name="EORI_NL" minOccurs="0"/>
|
||||
<xs:element name="UID_Nr" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
Public Class cVERAG_OUT_NCTS
|
||||
|
||||
Shared Function genVERAG_OUT_NCTS_FromDAKOSY(DY_BezugsNr)
|
||||
Dim OUT As New cVERAG_OUT_NCTS
|
||||
Dim DY As New DateTimeKind
|
||||
End Function
|
||||
End Class
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
file.WriteLine(genBetreibsstammSatz(Geschaeftsjahr))
|
||||
If boolKunden Then
|
||||
'----------------- STAMMDATEN LG -----------------
|
||||
'----------------- STAMMDATEN -----------------
|
||||
Dim dt_Stamm As DataTable = getStammdaten()
|
||||
If dt_Stamm IsNot Nothing AndAlso dt_Stamm.Rows.Count > 0 Then
|
||||
initKDNr(dt_Stamm)
|
||||
@@ -335,19 +335,26 @@
|
||||
' Trdin=false
|
||||
|
||||
Shared Function getSteuercode(r As DataRow) As Double
|
||||
If CBool(r("Steuerpflichtig")) Then
|
||||
Return "320"
|
||||
Else
|
||||
If (r("RechnungsLandKz")) = "A" Or (r("RechnungsLandKz")) = "AT" Then
|
||||
Return "999" 'Steuerpflichtig und AT
|
||||
Else
|
||||
If SQL.DLookup("[MitgliedslandEU]", "[Währungstabelle]", "[LandKz]='" & r("RechnungsLandKz") & "'", "FMZOLL", False) Then
|
||||
Return "969" ' EU-LAND
|
||||
Select Case r("Sachkonto")
|
||||
Case "3550", "3553", "3558"
|
||||
Return "999"
|
||||
Case Else
|
||||
|
||||
If CBool(r("Steuerpflichtig")) Then
|
||||
Return "320"
|
||||
Else
|
||||
Return "973" ' Drittland
|
||||
If (r("RechnungsLandKz")) = "A" Or (r("RechnungsLandKz")) = "AT" Then
|
||||
Return "999" 'Steuerpflichtig und AT
|
||||
Else
|
||||
If SQL.DLookup("[MitgliedslandEU]", "[Währungstabelle]", "[LandKz]='" & r("RechnungsLandKz") & "'", "FMZOLL", False) Then
|
||||
Return "969" ' EU-LAND
|
||||
Else
|
||||
Return "973" ' Drittland
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End Select
|
||||
Return ""
|
||||
|
||||
End Function
|
||||
|
||||
124
VERAG_PROG_ALLGEMEIN/Schnittstellen/cTherefore.vb
Normal file
124
VERAG_PROG_ALLGEMEIN/Schnittstellen/cTherefore.vb
Normal file
@@ -0,0 +1,124 @@
|
||||
Imports Therefore.API
|
||||
Public Class cTherefore
|
||||
|
||||
|
||||
Shared Function saveFileTo_ImportFolder(Path As String, FilialeAbfertigungsNr As String, AvisoId As String)
|
||||
Try
|
||||
Dim SQL As New SQL
|
||||
|
||||
' 1. Connect to the Therefore™ Server
|
||||
Dim server As New TheServer
|
||||
server.Connect(TheClientType.CustomApplication)
|
||||
|
||||
' 2. Create a new Therefore™ Document
|
||||
Dim doc As New TheDocument()
|
||||
|
||||
' 3. Create temporary File
|
||||
'Dim filename As String = ""
|
||||
'doc.Create(filename)
|
||||
|
||||
' 4A. Set Therefore™ Category by Number
|
||||
' doc.IndexData.SetCategory(5, server)
|
||||
' or 4B. Set Therefore™ Category by Name
|
||||
doc.IndexData.SetCategory("Import ab Jänner 2019", server)
|
||||
|
||||
' 5. Add streams
|
||||
'doc.AddStream("D:\\TestAll\\TestDocs\\Scsi.doc", "", 0)
|
||||
'doc.AddStream("D:\\TestAll\\TestDocs\\TEST.xls", "", 0)
|
||||
' 6. Set index data
|
||||
'Dim indexData As TheIndexData = doc.IndexData
|
||||
'indexData("String") = FilialeAbfertigungsNr
|
||||
'indexData("Eingabedatum") = Now.ToShortDateString
|
||||
'indexData("LKW_ID") = AvisoId
|
||||
|
||||
' MsgBox(doc.IndexData.Count)
|
||||
' 7. Archive the document
|
||||
'Dim docNo As Integer = doc.Archive(server, 0)
|
||||
'Dim docNo As Integer = 0
|
||||
'Dim filenameNEW As String = doc.Retrieve(docNo, "", server)
|
||||
|
||||
Dim docNo As Integer = SQL.getValueTxtBySql("SELECT TOP 1 isnull([DocNo],-1) FROM [Therefore].[dbo].[TheCat119] WHERE [String] LIKE '" & FilialeAbfertigungsNr & "' ORDER BY [Eingabedatum] DESC", "SCANCANON",,, -1)
|
||||
Dim filename As String = ""
|
||||
If docNo <= 0 Then
|
||||
doc.Create(filename)
|
||||
|
||||
doc.AddStream(Path, "", 0)
|
||||
Dim indexData As TheIndexData = doc.IndexData
|
||||
indexData("String") = FilialeAbfertigungsNr
|
||||
indexData("Eingabedatum") = Now.ToShortDateString
|
||||
indexData("LKW_ID") = AvisoId
|
||||
|
||||
docNo = doc.Archive(server, 0)
|
||||
Else
|
||||
Dim folder = ""
|
||||
Dim VerionNo As Integer
|
||||
filename = doc.Retrieve(docNo, VerionNo, folder, server, False)
|
||||
|
||||
Dim user As String = ""
|
||||
doc.CheckOut(server, False, user, VerionNo)
|
||||
|
||||
doc.AddStream(Path, "", 0)
|
||||
doc.CheckIn(server)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
' 8. Close Therefore™ document object
|
||||
doc.Close()
|
||||
|
||||
' 9. Delete the temporary file
|
||||
System.IO.File.Delete(filename)
|
||||
|
||||
' 10. Optional: Print a success message on the console
|
||||
' Console.WriteLine("Document successfully archived as " + docNo.ToString() + ".")
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
Return False
|
||||
End Function
|
||||
|
||||
'Shared Function saveFileTo_ImportFolder2(Path As String, FilialeAbfertigungsNr As Integer, AvisoId As Integer)
|
||||
' Try
|
||||
|
||||
' ' 1. Connect to the Therefore™ Server
|
||||
' Dim server As New TheServer
|
||||
' server.Connect(TheClientType.CustomApplication)
|
||||
|
||||
' ' 2. Create a new Therefore™ Document
|
||||
' Dim doc As New TheDocument()
|
||||
|
||||
' ' 3. Create temporary File
|
||||
' Dim filename As String = ""
|
||||
' doc.Create(filename)
|
||||
|
||||
' ' 4A. Set Therefore™ Category by Number
|
||||
' ' doc.IndexData.SetCategory(5, server)
|
||||
' ' or 4B. Set Therefore™ Category by Name
|
||||
' doc.IndexData.SetCategory("Import ab Jänner 2019", server)
|
||||
|
||||
' ' 5. Add streams
|
||||
' 'doc.AddStream("D:\\TestAll\\TestDocs\\Scsi.doc", "", 0)
|
||||
' 'doc.AddStream("D:\\TestAll\\TestDocs\\TEST.xls", "", 0)
|
||||
' doc.AddStream(Path, "", 0)
|
||||
' ' 6. Set index data
|
||||
|
||||
' ' MsgBox(doc.IndexData.Count)
|
||||
' ' 7. Archive the document
|
||||
' Dim docNo As Integer = doc.Archive(server, 0)
|
||||
' MsgBox(docNo)
|
||||
|
||||
' ' 8. Close Therefore™ document object
|
||||
' doc.Close()
|
||||
|
||||
' ' 9. Delete the temporary file
|
||||
' System.IO.File.Delete(filename)
|
||||
|
||||
' ' 10. Optional: Print a success message on the console
|
||||
' ' Console.WriteLine("Document successfully archived as " + docNo.ToString() + ".")
|
||||
|
||||
' Catch ex As Exception
|
||||
' MsgBox(ex.Message & ex.StackTrace)
|
||||
' End Try
|
||||
'End Function
|
||||
End Class
|
||||
Reference in New Issue
Block a user