Mailversand, FIskaltrust, ustva, etc.
This commit is contained in:
@@ -542,6 +542,17 @@ Public Class cFiskaltrustClient
|
||||
Throw New Exception("Unsupported country")
|
||||
End Select
|
||||
|
||||
ElseIf type = "storno" Then
|
||||
|
||||
Select Case _country
|
||||
Case "DE"
|
||||
Return "/json/v1/Sign"
|
||||
Case "AT"
|
||||
Return "/json/Sign"
|
||||
Case Else
|
||||
Throw New Exception("Unsupported country")
|
||||
End Select
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
@@ -2,8 +2,67 @@
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Reflection
|
||||
Imports Chilkat
|
||||
Imports GrapeCity.DataVisualization.Chart
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Public Class FtReceiptCases
|
||||
|
||||
' Normaler Verkauf
|
||||
Public Const PosReceipt As Long = &H4445000000000001L
|
||||
|
||||
' Test-/Nullbeleg
|
||||
Public Const ZeroReceipt As Long = &H4445000000000002L
|
||||
|
||||
Public Const InitialOperation As Long = &H4445000000000003L
|
||||
Public Const OutOfOperation As Long = &H4445000000000004L
|
||||
|
||||
' Tagesabschluss (Z-Bericht)
|
||||
Public Const MonthlyClosing As Long = &H4445000000000005L
|
||||
Public Const YearlyClosing As Long = &H4445000000000006L
|
||||
Public Const DailyClosing As Long = &H4445000000000007L
|
||||
|
||||
' Flags
|
||||
Public Const ImplicitTransaction As Long = &H100000000L
|
||||
Public Const ReversalReceipt As Long = &H40000L
|
||||
Public Const TrainingReceipt As Long = &H20000L
|
||||
|
||||
End Class
|
||||
|
||||
Public Class FtChargeItemCase
|
||||
|
||||
Public Const RevenueNormal As Long = &H4445000000000001L ' 19 %
|
||||
Public Const RevenueReduced As Long = &H4445000000000002L ' 7 %
|
||||
Public Const RevenueTaxFree As Long = &H4445000000000005L ' 0 %
|
||||
|
||||
End Class
|
||||
|
||||
Public Class FtJournalType
|
||||
|
||||
Public Const VersionInformation As Integer = 0
|
||||
Public Const ActionJournal As Integer = 1
|
||||
Public Const ReceiptJournal As Integer = 2
|
||||
Public Const QueueItemJournal As Integer = 3
|
||||
|
||||
End Class
|
||||
|
||||
Public Class FtPayItemCases
|
||||
|
||||
' Barzahlung
|
||||
Public Const Cash As Long = &H4445000000000001L
|
||||
|
||||
' EC-/Girokarte
|
||||
Public Const DebitCard As Long = &H4445000000000004L
|
||||
|
||||
' Kreditkarte
|
||||
Public Const CreditCard As Long = &H4445000000000005L
|
||||
|
||||
' Online-Zahlung (PayPal, Klarna, etc.)
|
||||
Public Const OnlinePayment As Long = &H4445000000000006L
|
||||
|
||||
' Gutschein
|
||||
Public Const Voucher As Long = &H444500000000000DL
|
||||
|
||||
End Class
|
||||
|
||||
Public Class cFiskaltrustClient_chilkat
|
||||
|
||||
@@ -21,9 +80,10 @@ Public Class cFiskaltrustClient_chilkat
|
||||
|
||||
Public Function SignReceipt(amount As Decimal, vat As Decimal, POS As List(Of EABelegPositionen), kindOfPayment As String, posSystemId As String) As String
|
||||
|
||||
Dim payload As JsonObject = BuildPayloadReceipt(amount, vat, POS, kindOfPayment, posSystemId)
|
||||
Dim payload As JsonObject = BuildPayloadReceipt(amount, vat, POS, kindOfPayment, posSystemId, "Verkauf", "")
|
||||
|
||||
Return SendChilkat(GetEndpoint("payment"), payload.Emit())
|
||||
|
||||
End Function
|
||||
|
||||
Public Function SignReceipt_test(posSystemId As String) As String
|
||||
@@ -48,18 +108,55 @@ Public Class cFiskaltrustClient_chilkat
|
||||
Dim POS = LIST
|
||||
Dim kindOfPayment = "Cash"
|
||||
|
||||
Dim payload As JsonObject = BuildPayloadReceipt(amount, vat, POS, kindOfPayment, posSystemId)
|
||||
Dim payload As JsonObject = BuildPayloadReceipt(amount, vat, POS, kindOfPayment, posSystemId, "Verkauf", "")
|
||||
|
||||
Return SendChilkat(GetEndpoint("payment"), payload.Emit())
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Function ChancelReceipt(reference As String, amount As Decimal, vat As Decimal, POS As List(Of EABelegPositionen), kindOfPayment As String, posSystemId As String) As String
|
||||
|
||||
Dim payload As JsonObject = BuildPayloadReceipt(amount, vat, POS, kindOfPayment, posSystemId, "Storno", reference)
|
||||
|
||||
Return SendChilkat(GetEndpoint("storno"), payload.Emit())
|
||||
End Function
|
||||
|
||||
Public Function ChancelReceipt_test(reference As String, posSystemId As String) As String
|
||||
|
||||
Dim LIST = New List(Of EABelegPositionen)
|
||||
Dim p = New EABelegPositionen
|
||||
p.Mandant = "VERA"
|
||||
p.Niederlassung = "SUB"
|
||||
p.Benutzer = 74
|
||||
p.BelegDat = Now
|
||||
p.BelegNr = 1
|
||||
p.PreislistenNr = 1
|
||||
p.PreislistenPos = 1
|
||||
p.LeistungsNr = 300
|
||||
p.LeistungsBez = "TEST"
|
||||
p.Preis = 10
|
||||
p.Anzahl = 1
|
||||
LIST.Add(p)
|
||||
|
||||
Dim amount = 100
|
||||
Dim vat = 0
|
||||
Dim POS = LIST
|
||||
Dim kindOfPayment = "Cash"
|
||||
|
||||
Dim payload As JsonObject = BuildPayloadReceipt(amount, vat, POS, kindOfPayment, posSystemId, "Storno", reference)
|
||||
|
||||
Return SendChilkat(GetEndpoint("storno"), payload.Emit())
|
||||
End Function
|
||||
|
||||
|
||||
Public Function SignNullReceipt(posSystemId As String) As String
|
||||
Return SendChilkat(GetEndpoint("payment"), BuildPayloadNullReceipt(posSystemId, _country).Emit())
|
||||
End Function
|
||||
|
||||
Public Function SignClosingReceipt(receiptType As String, posSystemId As String) As String
|
||||
Public Function SignClosingReceipt(receiptType As String, posSystemId As String, kind As String) As String
|
||||
|
||||
Return SendChilkat(GetEndpoint("payment"), BuildPayloadClosingReceipt(receiptType, posSystemId).Emit())
|
||||
Return SendChilkat(GetEndpoint("payment"), BuildPayloadClosingReceipt(receiptType, posSystemId, kind).Emit())
|
||||
End Function
|
||||
|
||||
Public Function Echo(kassenName As String) As String
|
||||
@@ -71,13 +168,13 @@ Public Class cFiskaltrustClient_chilkat
|
||||
|
||||
End Function
|
||||
|
||||
Public Function Journal(Optional typ As String = "") As String
|
||||
Public Function Journal(ftJournalType As Integer) As String
|
||||
|
||||
Dim endpoint = GetEndpoint("journal")
|
||||
|
||||
If typ <> "" Then endpoint &= "?type=" & typ
|
||||
endpoint &= "?type=" & ftJournalType
|
||||
|
||||
Return SendChilkat(endpoint, "", True)
|
||||
Return SendChilkat(endpoint, "")
|
||||
End Function
|
||||
|
||||
Private Function SendChilkat(endpoint As String, payload As String, Optional isGet As Boolean = False) As String
|
||||
@@ -144,42 +241,87 @@ Public Class cFiskaltrustClient_chilkat
|
||||
|
||||
End Function
|
||||
|
||||
Private Function BuildPayloadReceipt(amount As Decimal, vat As Decimal, POS As List(Of EABelegPositionen), kindOfPayment As String, posSystemId As String) As JsonObject
|
||||
Private Function BuildPayloadReceipt(amount As Decimal, vat As Decimal, POS As List(Of EABelegPositionen), kindOfPayment As String, posSystemId As String, _receiptCase As String, _reference As String) As JsonObject
|
||||
|
||||
Dim json As New JsonObject()
|
||||
|
||||
json.UpdateString("ftCashBoxID", _cashboxId)
|
||||
json.UpdateString("ftPosSystemId", getVersion(posSystemId))
|
||||
json.UpdateString("cbTerminalID", posSystemId)
|
||||
json.UpdateString("cbReceiptReference", Guid.NewGuid().ToString())
|
||||
|
||||
If _reference <> "" Then
|
||||
json.UpdateString("cbReceiptReference", _reference)
|
||||
Else
|
||||
json.UpdateString("cbReceiptReference", Guid.NewGuid().ToString())
|
||||
End If
|
||||
|
||||
json.UpdateString("cbReceiptMoment", DateTime.UtcNow.ToString("o"))
|
||||
json.UpdateString("ftReceiptCase", 4919338172267102209)
|
||||
|
||||
Dim chargeItems = json.AppendArray("cbChargeItems")
|
||||
Dim receipCase As Long
|
||||
Select Case _receiptCase
|
||||
|
||||
For Each p In POS
|
||||
Case "Storno"
|
||||
receipCase = FtReceiptCases.PosReceipt Or FtReceiptCases.ReversalReceipt Or FtReceiptCases.ImplicitTransaction 'Storno
|
||||
|
||||
If chargeItems.AddObjectAt(-1) Then
|
||||
Dim item As Chilkat.JsonObject = chargeItems.ObjectAt(chargeItems.Size - 1)
|
||||
item.UpdateInt("Quantity", p.Anzahl)
|
||||
item.UpdateNumber("Amount", p.Preis.ToString().Replace(",", "."))
|
||||
item.UpdateNumber("VATRate", vat.ToString().Replace(",", "."))
|
||||
item.UpdateString("Description", p.LeistungsBez)
|
||||
item.UpdateString("ftChargeItemCase", 4919338167972134929)
|
||||
End If
|
||||
Case Else
|
||||
receipCase = FtReceiptCases.PosReceipt Or FtReceiptCases.ImplicitTransaction 'Verkauf
|
||||
|
||||
End Select
|
||||
|
||||
|
||||
Next
|
||||
json.UpdateString("ftReceiptCase", receipCase)
|
||||
|
||||
Dim payItems = json.AppendArray("cbPayItems")
|
||||
payItems.AddObjectAt(-1)
|
||||
Dim pay As Chilkat.JsonObject = payItems.ObjectAt(payItems.Size - 1)
|
||||
pay.UpdateInt("Quantity", 1)
|
||||
pay.UpdateNumber("Amount", amount.ToString().Replace(",", "."))
|
||||
pay.UpdateString("Description", kindOfPayment)
|
||||
pay.UpdateString("ftPayItemCase", 4919338167972134913)
|
||||
|
||||
Return json
|
||||
Dim chargeItems = json.AppendArray("cbChargeItems")
|
||||
|
||||
For Each p In POS
|
||||
|
||||
If chargeItems.AddObjectAt(-1) Then
|
||||
Dim item As Chilkat.JsonObject = chargeItems.ObjectAt(chargeItems.Size - 1)
|
||||
item.UpdateInt("Quantity", p.Anzahl)
|
||||
item.UpdateNumber("Amount", p.Preis.ToString().Replace(",", "."))
|
||||
item.UpdateNumber("VATRate", vat.ToString().Replace(",", "."))
|
||||
item.UpdateString("Description", p.LeistungsBez)
|
||||
|
||||
Dim ChargeItemCase As Long
|
||||
Select Case vat
|
||||
|
||||
Case 19D
|
||||
ChargeItemCase = FtChargeItemCase.RevenueNormal
|
||||
|
||||
Case 7D
|
||||
ChargeItemCase = FtChargeItemCase.RevenueReduced
|
||||
|
||||
Case 0D
|
||||
ChargeItemCase = FtChargeItemCase.RevenueTaxFree
|
||||
|
||||
Case Else
|
||||
Throw New Exception("Unbekannter Steuersatz")
|
||||
End Select
|
||||
|
||||
|
||||
item.UpdateString("ftChargeItemCase", ChargeItemCase)
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
Dim payItems = json.AppendArray("cbPayItems")
|
||||
payItems.AddObjectAt(-1)
|
||||
Dim pay As Chilkat.JsonObject = payItems.ObjectAt(payItems.Size - 1)
|
||||
pay.UpdateInt("Quantity", 1)
|
||||
pay.UpdateNumber("Amount", amount.ToString().Replace(",", "."))
|
||||
pay.UpdateString("Description", kindOfPayment)
|
||||
|
||||
Select Case kindOfPayment
|
||||
Case "Cash"
|
||||
pay.UpdateString("ftPayItemCase", FtPayItemCases.Cash)
|
||||
Case "Card"
|
||||
pay.UpdateString("ftPayItemCase", FtPayItemCases.DebitCard)
|
||||
End Select
|
||||
|
||||
|
||||
Return json
|
||||
|
||||
End Function
|
||||
|
||||
@@ -191,17 +333,86 @@ Public Class cFiskaltrustClient_chilkat
|
||||
json.UpdateString("ftPosSystemId", getVersion(posSystemId))
|
||||
json.UpdateString("cbTerminalID", posSystemId)
|
||||
json.UpdateString("cbReceiptMoment", DateTime.UtcNow.ToString("o"))
|
||||
json.UpdateString("ftReceiptCase", (FtReceiptCases.ZeroReceipt Or FtReceiptCases.ImplicitTransaction).ToString())
|
||||
json.UpdateString("cbReceiptReference", "ZeroReceiptAfterFailure")
|
||||
|
||||
Dim chargeItems = json.AppendArray("cbChargeItems")
|
||||
Dim payItems = json.AppendArray("cbPayItems")
|
||||
|
||||
Return json
|
||||
End Function
|
||||
|
||||
Private Function BuildPayloadClosingReceipt(receiptType As String, posSystemId As String) As JsonObject
|
||||
Private Function BuildPayloadInitialOperationReceipt(posSystemId As String, country As String) As JsonObject
|
||||
|
||||
Dim json As New JsonObject()
|
||||
|
||||
json.UpdateString("ftCashBoxID", _cashboxId)
|
||||
json.UpdateString("ftPosSystemId", getVersion(posSystemId))
|
||||
json.UpdateString("cbTerminalID", posSystemId)
|
||||
json.UpdateString("cbReceiptMoment", DateTime.UtcNow.ToString("o"))
|
||||
json.UpdateString("ftReceiptCase", (FtReceiptCases.InitialOperation).ToString())
|
||||
json.UpdateString("cbReceiptReference", "INIT")
|
||||
|
||||
json.UpdateString("cbUser", "Admin")
|
||||
json.UpdateString("ftReceiptCaseData", "")
|
||||
|
||||
|
||||
|
||||
Dim chargeItems = json.AppendArray("cbChargeItems")
|
||||
Dim payItems = json.AppendArray("cbPayItems")
|
||||
|
||||
Return json
|
||||
End Function
|
||||
|
||||
Private Function BuildPayloadOutOfOperationReceipt(posSystemId As String, country As String) As JsonObject
|
||||
|
||||
Dim json As New JsonObject()
|
||||
|
||||
json.UpdateString("ftCashBoxID", _cashboxId)
|
||||
json.UpdateString("ftPosSystemId", getVersion(posSystemId))
|
||||
json.UpdateString("cbTerminalID", posSystemId)
|
||||
json.UpdateString("cbReceiptMoment", DateTime.UtcNow.ToString("o"))
|
||||
json.UpdateString("ftReceiptCase", (FtReceiptCases.OutOfOperation).ToString())
|
||||
json.UpdateString("cbReceiptReference", "OutOfOperation")
|
||||
|
||||
json.UpdateString("cbUser", "Admin")
|
||||
json.UpdateString("ftReceiptCaseData", "")
|
||||
|
||||
Dim chargeItems = json.AppendArray("cbChargeItems")
|
||||
Dim payItems = json.AppendArray("cbPayItems")
|
||||
|
||||
Return json
|
||||
End Function
|
||||
|
||||
Private Function BuildPayloadClosingReceipt(receiptType As String, posSystemId As String, kind As String) As JsonObject
|
||||
|
||||
Dim json As New JsonObject()
|
||||
|
||||
json.UpdateString("ftCashBoxID", _cashboxId)
|
||||
json.UpdateString("ftPosSystemId", getVersion(posSystemId))
|
||||
json.UpdateString("cbTerminalID", posSystemId)
|
||||
json.UpdateString("cbReceiptMoment", DateTime.UtcNow.ToString("o"))
|
||||
Dim chargeItems = json.AppendArray("cbChargeItems")
|
||||
Dim payItems = json.AppendArray("cbPayItems")
|
||||
|
||||
|
||||
|
||||
Select Case kind
|
||||
Case "yearly"
|
||||
|
||||
json.UpdateString("cbReceiptReference", "yearly-closing-" & DateTime.UtcNow.ToString("o"))
|
||||
json.UpdateString("ftReceiptCase", (FtReceiptCases.YearlyClosing Or FtReceiptCases.ImplicitTransaction).ToString())
|
||||
|
||||
Case "monthly"
|
||||
|
||||
json.UpdateString("cbReceiptReference", "monthly-closing-" & DateTime.UtcNow.ToString("o"))
|
||||
json.UpdateString("ftReceiptCase", (FtReceiptCases.MonthlyClosing Or FtReceiptCases.ImplicitTransaction).ToString())
|
||||
|
||||
Case Else 'daily
|
||||
json.UpdateString("cbReceiptReference", "daily-closing-" & DateTime.UtcNow.ToString("o"))
|
||||
json.UpdateString("ftReceiptCase", (FtReceiptCases.DailyClosing Or FtReceiptCases.ImplicitTransaction).ToString())
|
||||
|
||||
End Select
|
||||
|
||||
Return json
|
||||
End Function
|
||||
@@ -231,6 +442,14 @@ Public Class cFiskaltrustClient_chilkat
|
||||
Case "AT" : Return "/json/Journal"
|
||||
End Select
|
||||
|
||||
Case "storno"
|
||||
|
||||
Select Case _country
|
||||
Case "DE" : Return "/json/v1/Sign"
|
||||
Case "AT" : Return "/json/Sign"
|
||||
End Select
|
||||
|
||||
|
||||
End Select
|
||||
|
||||
Throw New Exception("Unsupported country")
|
||||
@@ -398,5 +617,19 @@ Public Class cFiskaltrustClient_chilkat
|
||||
Console.WriteLine(message)
|
||||
End Sub
|
||||
|
||||
Public Function PrettyPrintJson(jsonText As String) As String
|
||||
|
||||
Dim json As New Chilkat.JsonObject()
|
||||
|
||||
If Not json.Load(jsonText) Then
|
||||
Return jsonText
|
||||
End If
|
||||
|
||||
json.EmitCompact = False
|
||||
|
||||
Return json.Emit()
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -934,9 +934,6 @@ Public Class cAutomailversand
|
||||
|
||||
Private Function mergeSinglePDFDocuments(path As String, Filiale As Integer, Firma As Integer, isSR As Boolean)
|
||||
|
||||
|
||||
|
||||
|
||||
Dim zusammenfassen As Boolean = False
|
||||
|
||||
'True
|
||||
@@ -962,9 +959,8 @@ Public Class cAutomailversand
|
||||
If Not isSR Then
|
||||
Return True
|
||||
Else
|
||||
|
||||
'mit Marlene sprechen!
|
||||
If Not (path.ToString.ToLower.Contains("flyercbam") OrElse Not (path.ToString.ToLower.Contains("sammelrechnung"))) Then
|
||||
'laut Marlene nichts zusammenfassen (außer CBAM)! Mail am 19.06.2026
|
||||
If Not (path.ToString.ToLower.Contains("flyercbam")) Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.5.5.4")>
|
||||
<Assembly: AssemblyFileVersion("1.5.5.4")>
|
||||
<Assembly: AssemblyVersion("1.5.5.5")>
|
||||
<Assembly: AssemblyFileVersion("1.5.5.5")>
|
||||
|
||||
10
SDL/My Project/Resources.Designer.vb
generated
10
SDL/My Project/Resources.Designer.vb
generated
@@ -2591,6 +2591,16 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
'''</summary>
|
||||
Friend ReadOnly Property Ustveu_Rechnungsanlagen_DE() As Byte()
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("Ustveu_Rechnungsanlagen_DE", resourceCulture)
|
||||
Return CType(obj,Byte())
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
|
||||
@@ -991,4 +991,7 @@
|
||||
<data name="auto_mailversand_small" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\auto_mailversand_small.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Ustveu_Rechnungsanlagen_DE" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Ustveu-Rechnungsanlagen-DE.xls;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
BIN
SDL/Resources/Ustveu-Rechnungsanlagen-DE.xls
Normal file
BIN
SDL/Resources/Ustveu-Rechnungsanlagen-DE.xls
Normal file
Binary file not shown.
@@ -1412,7 +1412,8 @@
|
||||
<Compile Include="mdm\PLOSE\rptPLOSE_Konsortium.vb">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="USTV\VATRefund.vb" />
|
||||
<Compile Include="USTV\VATRefund_HR.vb" />
|
||||
<Compile Include="USTV\VATRefund_RO.vb" />
|
||||
<Compile Include="USTV\usrCntlUSTV.Designer.vb">
|
||||
<DependentUpon>usrCntlUSTV.vb</DependentUpon>
|
||||
</Compile>
|
||||
@@ -5063,6 +5064,7 @@
|
||||
</None>
|
||||
<None Include="Resources\SR_EVOLOG.xlsx" />
|
||||
<None Include="Resources\SR_TransFerry360.xlsx" />
|
||||
<None Include="Resources\Ustveu-Rechnungsanlagen-DE.xls" />
|
||||
<None Include="Resources\VERAG_CBAM_Report_Template.xlsx" />
|
||||
<None Include="Resources\Zoll\EORI_UID.dotx">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
|
||||
286
SDL/USTV/VATRefund_HR.vb
Normal file
286
SDL/USTV/VATRefund_HR.vb
Normal file
@@ -0,0 +1,286 @@
|
||||
|
||||
|
||||
Public Class GlobalVATRefundApplication_HR
|
||||
|
||||
Public Property Applicant As Applicant_
|
||||
Public Property Representative As Representative_
|
||||
Public Property RefundPeriod As RefundPeriod_
|
||||
Public Property BankAccount As BankAccount_
|
||||
Public Property RefundRequest As RefundRequest_
|
||||
|
||||
Public Function ToXml() As Chilkat.Xml
|
||||
|
||||
Dim xml As New Chilkat.Xml
|
||||
|
||||
xml.Tag = "p:GlobalVATRefundApplication"
|
||||
|
||||
xml.AddAttribute("xmlns:p", "http://VATRefund/")
|
||||
xml.AddAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance")
|
||||
xml.AddAttribute("xsi:type", "p:GlobalVATRefundApplication")
|
||||
|
||||
' Applicant
|
||||
xml.UpdateChildContent("applicant|nameType", Applicant.NameType)
|
||||
xml.UpdateChildContent("applicant|nameFree", Applicant.NameFree)
|
||||
xml.UpdateChildContent("applicant|addressFree", Applicant.AddressFree)
|
||||
xml.UpdateChildContent("applicant|telephone", Applicant.Telephone)
|
||||
|
||||
xml.UpdateChildContent("applicant|country|countryISOCode",
|
||||
Applicant.CountryISOCode)
|
||||
|
||||
xml.UpdateChildContent("applicant|country|memberStatePreferences|countryMSCode",
|
||||
Applicant.CountryISOCode)
|
||||
|
||||
xml.UpdateChildContent("applicant|identification|VATId",
|
||||
Applicant.VATId)
|
||||
|
||||
xml.UpdateChildContent("applicant|identification|identificationCountry|countryISOCode",
|
||||
Applicant.CountryISOCode)
|
||||
|
||||
xml.UpdateChildContent("applicant|identification|identificationCountry|memberStatePreferences|countryMSCode",
|
||||
Applicant.CountryISOCode)
|
||||
|
||||
xml.UpdateChildContent("applicant|email",
|
||||
Applicant.Email)
|
||||
|
||||
' Representative
|
||||
xml.UpdateChildContent("representative|nameFree",
|
||||
Representative.Name)
|
||||
|
||||
xml.UpdateChildContent("representative|addressFree",
|
||||
Representative.Address)
|
||||
|
||||
xml.UpdateChildContent("representative|telephone",
|
||||
Representative.Telephone)
|
||||
|
||||
xml.UpdateChildContent("representative|country|countryISOCode",
|
||||
Representative.CountryISOCode)
|
||||
|
||||
xml.UpdateChildContent("representative|identification|identificationType",
|
||||
Representative.IdentificationType)
|
||||
|
||||
xml.UpdateChildContent("representative|identification|identificationNumber",
|
||||
Representative.IdentificationNumber)
|
||||
|
||||
xml.UpdateChildContent("representative|identification|identificationCountry|countryISOCode",
|
||||
Representative.CountryISOCode)
|
||||
|
||||
xml.UpdateChildContent("representative|email",
|
||||
Representative.Email)
|
||||
|
||||
' RefundPeriod
|
||||
xml.UpdateChildContent("refundPeriod|fromDate",
|
||||
RefundPeriod.FromDate)
|
||||
|
||||
xml.UpdateChildContent("refundPeriod|toDate",
|
||||
RefundPeriod.ToDate)
|
||||
|
||||
' businessDescription
|
||||
xml.UpdateChildContent("businessDescription", "")
|
||||
|
||||
' Bank
|
||||
xml.UpdateChildContent("defaultBankAccount|IBAN",
|
||||
BankAccount.IBAN)
|
||||
|
||||
xml.UpdateChildContent("defaultBankAccount|BIC",
|
||||
BankAccount.BIC)
|
||||
|
||||
xml.UpdateChildContent("defaultBankAccount|ownerName",
|
||||
BankAccount.OwnerName)
|
||||
|
||||
xml.UpdateChildContent("defaultBankAccount|details|ownerType",
|
||||
BankAccount.OwnerType)
|
||||
|
||||
xml.UpdateChildContent("defaultBankAccount|details|currency|currencyISO",
|
||||
BankAccount.CurrencyISO)
|
||||
|
||||
xml.UpdateChildContent("version",
|
||||
DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ss.fffZ"))
|
||||
|
||||
' RefundRequest
|
||||
xml.UpdateChildContent("refundRequest|refundMemberState|countryISOCode", RefundRequest.RefundMemberState)
|
||||
|
||||
For i As Integer = 0 To RefundRequest.PurchaseInformation.Count - 1
|
||||
|
||||
Dim p = RefundRequest.PurchaseInformation(i)
|
||||
|
||||
Dim path = $"refundRequest|purchaseInformation[{i}]"
|
||||
|
||||
xml.UpdateChildContent(path & "|sequence", p.Sequence.ToString)
|
||||
|
||||
xml.UpdateChildContent(path & "|simplifiedInvoice", p.SimplifiedInvoice.ToString.ToLower)
|
||||
|
||||
xml.UpdateChildContent(path & "|referenceNumber", p.ReferenceNumber)
|
||||
|
||||
xml.UpdateChildContent(path & "|issuingDate", p.IssuingDate)
|
||||
|
||||
xml.UpdateChildContent(path & "|transactionDescription|taxableAmount|amount",
|
||||
p.TransactionDescription.TaxableAmount.Amount.ToString(Globalization.CultureInfo.InvariantCulture))
|
||||
|
||||
xml.UpdateChildContent(path & "|transactionDescription|taxableAmount|currency|currencyISO",
|
||||
p.TransactionDescription.TaxableAmount.CurrencyISO)
|
||||
|
||||
xml.UpdateChildContent(path & "|transactionDescription|VATAmount|amount",
|
||||
p.TransactionDescription.VATAmount.Amount.ToString(Globalization.CultureInfo.InvariantCulture))
|
||||
|
||||
xml.UpdateChildContent(path & "|transactionDescription|VATAmount|currency|currencyISO",
|
||||
p.TransactionDescription.VATAmount.CurrencyISO)
|
||||
|
||||
xml.UpdateChildContent(path & "|deduction|deductibleAmount|amount",
|
||||
p.Deduction.DeductibleAmount.Amount.ToString(Globalization.CultureInfo.InvariantCulture))
|
||||
|
||||
xml.UpdateChildContent(path & "|deduction|deductibleAmount|currency|currencyISO",
|
||||
p.Deduction.DeductibleAmount.CurrencyISO)
|
||||
|
||||
xml.UpdateChildContent(path & "|goodsDescription|code",
|
||||
p.GoodsDescription.Code)
|
||||
|
||||
xml.UpdateChildContent(path & "|EUSupplier|nameFree",
|
||||
p.EUSupplier.NameFree)
|
||||
|
||||
xml.UpdateChildContent(path & "|EUSupplier|addressFree",
|
||||
p.EUSupplier.AddressFree)
|
||||
|
||||
xml.UpdateChildContent(path & "|EUSupplier|country|countryISOCode",
|
||||
p.EUSupplier.CountryISOCode)
|
||||
|
||||
xml.UpdateChildContent(path & "|EUSupplier|identification|VATId",
|
||||
p.EUSupplier.VATId)
|
||||
|
||||
xml.UpdateChildContent(path & "|EUSupplier|identification|identificationCountry|countryISOCode",
|
||||
p.EUSupplier.CountryISOCode)
|
||||
|
||||
xml.UpdateChildContent(path & "|state", "N")
|
||||
|
||||
Next
|
||||
|
||||
Dim idx As Integer = 1
|
||||
|
||||
For Each d In RefundRequest.DocumentCopy
|
||||
|
||||
Dim path = $"refundRequest|documentCopy[{idx}]"
|
||||
|
||||
xml.UpdateChildContent(path & "|fileType", d.FileType)
|
||||
xml.UpdateChildContent(path & "|filename", d.FileName)
|
||||
xml.UpdateChildContent(path & "|description", d.Description)
|
||||
xml.UpdateChildContent(path & "|file", d.Base64Content)
|
||||
|
||||
idx += 1
|
||||
|
||||
Next
|
||||
|
||||
|
||||
xml.UpdateChildContent("refundRequest|state", "N")
|
||||
|
||||
xml.UpdateChildContent("submittedLocale", "de")
|
||||
|
||||
Return xml
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Public Class Applicant_
|
||||
Public Property NameType As String
|
||||
Public Property NameFree As String
|
||||
Public Property AddressFree As String
|
||||
Public Property Telephone As String
|
||||
Public Property CountryISOCode As String
|
||||
Public Property VATId As String
|
||||
Public Property Email As String
|
||||
End Class
|
||||
|
||||
Public Class Representative_
|
||||
Public Property Name As String
|
||||
Public Property Address As String
|
||||
Public Property Telephone As String
|
||||
Public Property CountryISOCode As String
|
||||
Public Property IdentificationType As String
|
||||
Public Property IdentificationNumber As String
|
||||
Public Property Email As String
|
||||
End Class
|
||||
|
||||
Public Class RefundPeriod_
|
||||
Public Property FromDate As String
|
||||
Public Property ToDate As String
|
||||
End Class
|
||||
|
||||
Public Class BankAccount_
|
||||
Public Property IBAN As String
|
||||
Public Property BIC As String
|
||||
Public Property OwnerName As String
|
||||
Public Property OwnerType As String
|
||||
Public Property CurrencyISO As String
|
||||
End Class
|
||||
|
||||
Public Class Purchase_
|
||||
|
||||
Public Property Sequence As Integer
|
||||
Public Property SimplifiedInvoice As Boolean
|
||||
Public Property ReferenceNumber As String
|
||||
Public Property IssuingDate As String
|
||||
Public Property TransactionDescription As TransactionDescription_
|
||||
Public Property Deduction As Deduction_
|
||||
Public Property GoodsDescription As GoodsDescription_
|
||||
Public Property EUSupplier As EUSupplier_
|
||||
Public Property State As String = "N"
|
||||
|
||||
End Class
|
||||
|
||||
Public Class DocumentCopy_
|
||||
|
||||
Public Property FileType As String
|
||||
Public Property FileName As String
|
||||
Public Property Description As String
|
||||
Public Property Base64Content As String
|
||||
|
||||
End Class
|
||||
|
||||
Public Class RefundRequest_
|
||||
|
||||
Public Property RefundMemberState As String
|
||||
Public Property PurchaseInformation As New List(Of Purchase_)
|
||||
Public Property DocumentCopy As New List(Of DocumentCopy_)
|
||||
Public Property State As String = "N"
|
||||
|
||||
End Class
|
||||
|
||||
Public Class TransactionDescription_
|
||||
|
||||
Public Property TaxableAmount As MoneyAmount_
|
||||
Public Property VATAmount As MoneyAmount_
|
||||
|
||||
End Class
|
||||
|
||||
Public Class Deduction_
|
||||
|
||||
Public Property DeductibleAmount As MoneyAmount_
|
||||
|
||||
End Class
|
||||
|
||||
Public Class MoneyAmount_
|
||||
|
||||
Public Property Amount As Decimal
|
||||
Public Property CurrencyISO As String = "EUR"
|
||||
|
||||
End Class
|
||||
|
||||
Public Class GoodsDescription_
|
||||
|
||||
Public Property Code As String
|
||||
|
||||
End Class
|
||||
|
||||
Public Class EUSupplier_
|
||||
|
||||
Public Property NameFree As String
|
||||
Public Property AddressFree As String
|
||||
Public Property CountryISOCode As String
|
||||
Public Property VATId As String
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
Imports Chilkat
|
||||
|
||||
'=========================
|
||||
' HAUFENKLASSEN
|
||||
'=========================
|
||||
Public Class VATRefundApplication
|
||||
Public Class VATRefundApplication_RO
|
||||
Public Property CodF1 As FormInfo
|
||||
Public Property RefundPeriod As Period
|
||||
Public Property ApplicationReference As ApplicationReference
|
||||
@@ -24,9 +21,6 @@ Public Class VATRefundApplication
|
||||
ImportInformation = New ImportInformation()
|
||||
End Sub
|
||||
|
||||
'=========================
|
||||
' Methode um das XML zu erzeugen
|
||||
'=========================
|
||||
Public Function ToXml() As Xml
|
||||
Dim xml As New Xml
|
||||
xml.Tag = "VATRefundApplication"
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1941,8 +1941,26 @@ Public Class frmBelegNeu
|
||||
cm_FT.Items.Add(ids)
|
||||
End If
|
||||
|
||||
If Not cm_FT.Items.ContainsKey("journal") Then
|
||||
Dim ids = New ToolStripMenuItem() With {.Text = "Journal", .Name = "journal", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
|
||||
If Not cm_FT.Items.ContainsKey("version") Then
|
||||
Dim ids = New ToolStripMenuItem() With {.Text = "Journal - Version", .Name = "version", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
|
||||
AddHandler ids.Click, AddressOf mnuItemAuftrauege_Clicked
|
||||
cm_FT.Items.Add(ids)
|
||||
End If
|
||||
|
||||
If Not cm_FT.Items.ContainsKey("signatures") Then
|
||||
Dim ids = New ToolStripMenuItem() With {.Text = "Journal - Signaturen", .Name = "signatures", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
|
||||
AddHandler ids.Click, AddressOf mnuItemAuftrauege_Clicked
|
||||
cm_FT.Items.Add(ids)
|
||||
End If
|
||||
|
||||
If Not cm_FT.Items.ContainsKey("action") Then
|
||||
Dim ids = New ToolStripMenuItem() With {.Text = "Journal - Action", .Name = "action", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
|
||||
AddHandler ids.Click, AddressOf mnuItemAuftrauege_Clicked
|
||||
cm_FT.Items.Add(ids)
|
||||
End If
|
||||
|
||||
If Not cm_FT.Items.ContainsKey("queueitem") Then
|
||||
Dim ids = New ToolStripMenuItem() With {.Text = "Journal - Queue", .Name = "queueitem", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
|
||||
AddHandler ids.Click, AddressOf mnuItemAuftrauege_Clicked
|
||||
cm_FT.Items.Add(ids)
|
||||
End If
|
||||
@@ -1961,7 +1979,7 @@ Public Class frmBelegNeu
|
||||
|
||||
KASSE.LOAD(cboKassen._value)
|
||||
|
||||
Dim client As New cFiskaltrustClient(KASSE.rksv_FT_RestServiceURL, KASSE.rksv_FT_CashboxID, KASSE.rksv_FT_AccessToken, KASSE.rksv_FT_Country)
|
||||
'Dim client As New cFiskaltrustClient(KASSE.rksv_FT_RestServiceURL, KASSE.rksv_FT_CashboxID, KASSE.rksv_FT_AccessToken, KASSE.rksv_FT_Country)
|
||||
Dim client_chilkat As New cFiskaltrustClient_chilkat(KASSE.rksv_FT_RestServiceURL, KASSE.rksv_FT_CashboxID, KASSE.rksv_FT_AccessToken, KASSE.rksv_FT_Country)
|
||||
|
||||
If item.Name = "null" Then
|
||||
@@ -1970,20 +1988,36 @@ Public Class frmBelegNeu
|
||||
|
||||
Dim result As String = client_chilkat.SignNullReceipt(KASSE.rksv_id)
|
||||
|
||||
MsgBox(result)
|
||||
|
||||
If result <> "" Then
|
||||
|
||||
MsgBox(client_chilkat.PrettyPrintJson(result))
|
||||
|
||||
End If
|
||||
|
||||
|
||||
ElseIf item.Name = "test" Then
|
||||
'beide
|
||||
'Dim result As String = Await client.Echo(KASSE.rksv_bez & " " & KASSE.rksv_FT_Country & " - ")
|
||||
Dim result As String = client_chilkat.Echo(KASSE.rksv_bez & " " & KASSE.rksv_FT_Country & " - ")
|
||||
MsgBox(result)
|
||||
|
||||
If result <> "" Then
|
||||
|
||||
MsgBox(client_chilkat.PrettyPrintJson(result))
|
||||
|
||||
End If
|
||||
|
||||
|
||||
ElseIf item.Name = "storno" Then
|
||||
'beide
|
||||
Dim result As String = Await client.CancelReceiptAsync_test("-1", 100, "Cash", KASSE.rksv_id)
|
||||
MsgBox(result)
|
||||
'Dim result As String = Await client.CancelReceiptAsync_test("-1", 100, "Cash", KASSE.rksv_id)
|
||||
Dim result As String = client_chilkat.ChancelReceipt_test("-1", KASSE.rksv_id)
|
||||
|
||||
If result <> "" Then
|
||||
|
||||
MsgBox(client_chilkat.PrettyPrintJson(result))
|
||||
|
||||
End If
|
||||
|
||||
ElseIf item.Name = "bar" Then
|
||||
'beide
|
||||
@@ -1994,26 +2028,41 @@ Public Class frmBelegNeu
|
||||
|
||||
If vbYes = MsgBox(result & vbNewLine & vbNewLine & "Testdaten in DB speichern?", vbYesNoCancel) Then
|
||||
Dim QR_CodeString As String = ""
|
||||
client.saveRKSV_FT(result, QR_CodeString)
|
||||
client_chilkat.saveRKSV_FT(result, QR_CodeString)
|
||||
End If
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
MsgBox(result)
|
||||
|
||||
If result <> "" Then
|
||||
|
||||
MsgBox(client_chilkat.PrettyPrintJson(result))
|
||||
|
||||
End If
|
||||
|
||||
ElseIf item.Name = "monthly" Then
|
||||
'beide
|
||||
'Dim result As String = Await client.SignClosinglReceiptAsync(item.Name, KASSE.rksv_id)
|
||||
Dim result As String = client_chilkat.SignClosingReceipt(item.Name, KASSE.rksv_id)
|
||||
MsgBox(result)
|
||||
Dim result As String = client_chilkat.SignClosingReceipt(item.Name, KASSE.rksv_id, item.Name)
|
||||
|
||||
If result <> "" Then
|
||||
|
||||
MsgBox(client_chilkat.PrettyPrintJson(result))
|
||||
|
||||
End If
|
||||
|
||||
ElseIf item.Name = "daily" Then
|
||||
'Nur DE
|
||||
If KASSE.rksv_FT_Country = "DE" Then
|
||||
'Dim result As String = Await client.SignClosinglReceiptAsync(item.Name, KASSE.rksv_id)
|
||||
Dim result As String = client_chilkat.SignClosingReceipt(item.Name, KASSE.rksv_id)
|
||||
MsgBox(result)
|
||||
Dim result As String = client_chilkat.SignClosingReceipt(item.Name, KASSE.rksv_id, item.Name)
|
||||
|
||||
If result <> "" Then
|
||||
|
||||
MsgBox(client_chilkat.PrettyPrintJson(result))
|
||||
|
||||
End If
|
||||
Else
|
||||
MsgBox("nicht für AT-Kassen möglich!")
|
||||
End If
|
||||
@@ -2022,14 +2071,30 @@ Public Class frmBelegNeu
|
||||
ElseIf item.Name = "yearly" Then
|
||||
|
||||
' Dim result As String = Await client.SignClosinglReceiptAsync(item.Name, KASSE.rksv_id)
|
||||
Dim result As String = client_chilkat.SignClosingReceipt(item.Name, KASSE.rksv_id)
|
||||
MsgBox(result)
|
||||
Dim result As String = client_chilkat.SignClosingReceipt(item.Name, KASSE.rksv_id, item.Name)
|
||||
If result <> "" Then
|
||||
|
||||
ElseIf item.Name = "journal" Then
|
||||
MsgBox(client_chilkat.PrettyPrintJson(result))
|
||||
|
||||
End If
|
||||
|
||||
ElseIf (item.Name = "version" Or item.Name = "action" Or item.Name = "signatures" Or item.Name = "queueitem") Then
|
||||
|
||||
'Dim result As String = Await client.Journal(2)
|
||||
Dim result As String = client_chilkat.Journal(2)
|
||||
MsgBox(result)
|
||||
|
||||
Dim result As String = ""
|
||||
Select Case item.Name
|
||||
Case "version" : result = client_chilkat.Journal(FtJournalType.VersionInformation)
|
||||
Case "action" : result = client_chilkat.Journal(FtJournalType.ActionJournal)
|
||||
Case "signatures" : result = client_chilkat.Journal(FtJournalType.ReceiptJournal)
|
||||
Case "queueitem" : result = client_chilkat.Journal(FtJournalType.QueueItemJournal)
|
||||
End Select
|
||||
|
||||
If result <> "" Then
|
||||
|
||||
MsgBox(client_chilkat.PrettyPrintJson(result))
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -195,9 +195,9 @@ Namespace My
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=192.168.0.90\DEVSQL;Initial Catalog=AVISO_new;Integrated Security=fal"& _
|
||||
"se;User ID=AppUser;Password=yp/THDd?xM+pZ$;Pooling=true;Min Pool Size=20;Max Poo"& _
|
||||
"l Size=250")> _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=192.168.0.90\DEVSQL;Initial Catalog=AVISO;Integrated Security=false;U"& _
|
||||
"ser ID=AppUser;Password=yp/THDd?xM+pZ$;Pooling=true;Min Pool Size=20;Max Pool Si"& _
|
||||
"ze=250")> _
|
||||
Public ReadOnly Property AVISOConnectionStringTEST() As String
|
||||
Get
|
||||
Return CType(Me("AVISOConnectionStringTEST"),String)
|
||||
|
||||
@@ -65,9 +65,9 @@
|
||||
<Setting Name="AVISOConnectionStringTEST" Type="(Connection string)" Scope="Application">
|
||||
<DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<ConnectionString>Data Source=192.168.0.90\DEVSQL;Initial Catalog=AVISO_new;Integrated Security=false;User ID=AppUser;Password=yp/THDd?xM+pZ$;Pooling=true;Min Pool Size=20;Max Pool Size=250</ConnectionString>
|
||||
<ConnectionString>Data Source=192.168.0.90\DEVSQL;Initial Catalog=AVISO;Integrated Security=false;User ID=AppUser;Password=yp/THDd?xM+pZ$;Pooling=true;Min Pool Size=20;Max Pool Size=250</ConnectionString>
|
||||
</SerializableConnectionString></DesignTimeValue>
|
||||
<Value Profile="(Default)">Data Source=192.168.0.90\DEVSQL;Initial Catalog=AVISO_new;Integrated Security=false;User ID=AppUser;Password=yp/THDd?xM+pZ$;Pooling=true;Min Pool Size=20;Max Pool Size=250</Value>
|
||||
<Value Profile="(Default)">Data Source=192.168.0.90\DEVSQL;Initial Catalog=AVISO;Integrated Security=false;User ID=AppUser;Password=yp/THDd?xM+pZ$;Pooling=true;Min Pool Size=20;Max Pool Size=250</Value>
|
||||
</Setting>
|
||||
<Setting Name="AVISOConnectionString" Type="(Connection string)" Scope="Application">
|
||||
<DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
|
||||
Reference in New Issue
Block a user