USTV, MSE, MDM
This commit is contained in:
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("1.3.0.2")>
|
<Assembly: AssemblyVersion("1.3.0.5")>
|
||||||
<Assembly: AssemblyFileVersion("1.3.0.2")>
|
<Assembly: AssemblyFileVersion("1.3.0.5")>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
Imports Microsoft.Office.Interop
|
Imports Microsoft.Office.Interop
|
||||||
Imports VERAG_PROG_ALLGEMEIN
|
Imports VERAG_PROG_ALLGEMEIN
|
||||||
Imports VERAG_PROG_ALLGEMEIN.CBAM_QReport_17
|
|
||||||
|
|
||||||
Public Class usrCntlUSTV
|
Public Class usrCntlUSTV
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Imports java.awt.print
|
|
||||||
|
|
||||||
Imports VERAG_PROG_ALLGEMEIN
|
Imports VERAG_PROG_ALLGEMEIN
|
||||||
|
|
||||||
Public Class ustCntlUSTV_AntragPosition
|
Public Class ustCntlUSTV_AntragPosition
|
||||||
|
|||||||
@@ -448,14 +448,14 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
Dim displayFilter = False
|
Dim displayFilter = False
|
||||||
Dim sqlstr As String = ""
|
Dim sqlstr As String = ""
|
||||||
|
|
||||||
sqlstr &= " SELECT Adressen.AdressenNr, Adressen.[Name 1], trans.transaction_country AS Country,trans.device_product_type AS CardType, Sum(trans.transaction_gross_amount) AS [Transaction Amount], Sum(trans.total_gross_amount) AS [Total Amount]
|
sqlstr &= " SELECT Adressen.AdressenNr as KundenNr, Adressen.[Name 1] as Name, trans.transaction_country AS Country,trans.device_product_type AS CardType, trans.device_product_number AS CardNr,Sum(trans.transaction_gross_amount) AS [Transaction Amount], Sum(trans.total_gross_amount) AS [Total Amount]
|
||||||
FROM [VERAG].[dbo].[tblMSESettlements] as bills
|
FROM [VERAG].[dbo].[tblMSESettlements] as bills
|
||||||
inner join [VERAG].[dbo].[tblMSETransactions] as trans on bills.[transaction_id] = trans.[transaction_id]
|
inner join [VERAG].[dbo].[tblMSETransactions] as trans on bills.[transaction_id] = trans.[transaction_id]
|
||||||
inner join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
|
inner join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
|
||||||
inner join [VERAG].[dbo].[tblMSEInvoices] as inv on inv.[invoice_id] = bills.[invoice_number] and inv.customer_number = cust.[customer_id] and trans.transaction_country = inv.country
|
inner join [VERAG].[dbo].[tblMSEInvoices] as inv on inv.[invoice_id] = bills.[invoice_number] and inv.customer_number = cust.[customer_id] and trans.transaction_country = inv.country
|
||||||
left join adressen ON cust.[customer_id] = Adressen.MSEKundenNr
|
left join adressen ON cust.[customer_id] = Adressen.MSEKundenNr
|
||||||
where bills.invoice_date = '" & DateTimePicker2.Text & "' and trans.charged <> 1
|
where bills.invoice_date = '" & DateTimePicker2.Text & "' and trans.charged <> 1
|
||||||
GROUP BY Adressen.AdressenNr, Adressen.[Name 1], trans.transaction_country, trans.device_product_type order by cust.customer_id"
|
GROUP BY Adressen.AdressenNr, Adressen.[Name 1], trans.transaction_country, trans.device_product_type, trans.device_product_number "
|
||||||
|
|
||||||
Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL")
|
Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL")
|
||||||
'DataGridView.DataSource = dt
|
'DataGridView.DataSource = dt
|
||||||
@@ -468,9 +468,8 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
|
|
||||||
rpt.DataSource = dt
|
rpt.DataSource = dt
|
||||||
|
|
||||||
|
|
||||||
'If cbxProdukt.Checked Then
|
'If cbxProdukt.Checked Then
|
||||||
' rpt.GroupHeader2.DataField = "prod_descr"
|
|
||||||
'Else
|
'Else
|
||||||
' rpt.GroupHeader2.Visible = False
|
' rpt.GroupHeader2.Visible = False
|
||||||
' rpt.GroupFooter2.Visible = False
|
' rpt.GroupFooter2.Visible = False
|
||||||
@@ -503,7 +502,7 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
|
|
||||||
rpt.lblKundennr.Text = SQL.isDbnullEmpty(rpt.Fields.Item("KundenNr").Value, "")
|
rpt.lblKundennr.Text = SQL.isDbnullEmpty(rpt.Fields.Item("KundenNr").Value, "")
|
||||||
rpt.lblName1.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Name").Value, "")
|
rpt.lblName1.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Name").Value, "")
|
||||||
rpt.lblKartennr.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Country").Value, "") & " " & SQL.isDbnullEmpty(rpt.Fields.Item("CardType").Value, "")
|
rpt.lblKartennr.Text = SQL.isDbnullEmpty(rpt.Fields.Item("CardType").Value, "") & " - " & SQL.isDbnullEmpty(rpt.Fields.Item("Country").Value, "") & " - " & SQL.isDbnullEmpty(rpt.Fields.Item("CardNr").Value, "")
|
||||||
|
|
||||||
rpt.lblNetto.Text = SQL.isDbnullEmptyDbl(rpt.Fields.Item("Transaction Amount").Value, 2, "")
|
rpt.lblNetto.Text = SQL.isDbnullEmptyDbl(rpt.Fields.Item("Transaction Amount").Value, 2, "")
|
||||||
rpt.lblMWST.Text = "" 'SQL.isDbnullEmptyDbl(CDbl(rpt.Fields.Item("SummevonGesamtbetrag_Brutto_in_Darstellwährung").Value) - CDbl(rpt.Fields.Item("SummevonGesamtbetrag_Netto_in_Darstellwährung").Value), 2, "")
|
rpt.lblMWST.Text = "" 'SQL.isDbnullEmptyDbl(CDbl(rpt.Fields.Item("SummevonGesamtbetrag_Brutto_in_Darstellwährung").Value) - CDbl(rpt.Fields.Item("SummevonGesamtbetrag_Netto_in_Darstellwährung").Value), 2, "")
|
||||||
@@ -525,7 +524,7 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
AddHandler rpt.ReportFooter1.Format, Sub()
|
AddHandler rpt.ReportFooter1.Format, Sub()
|
||||||
|
|
||||||
rpt.lblSumNetto.Text = sumNetto.ToString("N2")
|
rpt.lblSumNetto.Text = sumNetto.ToString("N2")
|
||||||
'rpt.lblSumMwst.Text = sumMWST.ToString("N2")
|
rpt.lblSumMwst.Text = "" 'sumMWST.ToString("N2")
|
||||||
rpt.lblSumBrutto.Text = sumBrutto.ToString("N2")
|
rpt.lblSumBrutto.Text = sumBrutto.ToString("N2")
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -3443,7 +3442,7 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
|
|
||||||
Dim fehlendeTransactionen As Integer = 0
|
Dim fehlendeTransactionen As Integer = 0
|
||||||
|
|
||||||
fehlendeTransactionen = CInt((New SQL).getValueTxtBySql("select count(*) FROM [VERAG].[dbo].[tblMSESettlements] where [invoice_date] = '" & DateTimePicker2.Text & "' AND [transaction_id] not in (select [transaction_id] from [VERAG].[dbo].[tblMSETransactions]) ", "AVISO"))
|
fehlendeTransactionen = CInt((New SQL).getValueTxtBySql("select count(*) FROM [VERAG].[dbo].[tblMSESettlements] where [invoice_date] = '" & DateTimePicker2.Text & "' AND [transaction_id] not in (select [transaction_id] from [VERAG].[dbo].[tblMSETransactions]) ", "FMZOLL"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -159,6 +159,103 @@ Public Class cMSEAPI
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function getNewestSettlements(jwt As String, dt As DataTable, ByRef batchNr As Integer, ByRef totalPages As Integer, ByRef currentPage As Integer) As String
|
||||||
|
Try
|
||||||
|
Dim returnText As String = ""
|
||||||
|
Dim failureText As String = ""
|
||||||
|
|
||||||
|
Dim success As Boolean
|
||||||
|
|
||||||
|
rest.DebugMode = test
|
||||||
|
|
||||||
|
Dim bTls As Boolean = True
|
||||||
|
Dim port As Integer = 443
|
||||||
|
Dim bAutoReconnect As Boolean = True
|
||||||
|
success = rest.Connect(API_STRING, port, bTls, bAutoReconnect)
|
||||||
|
If (success <> True) Then
|
||||||
|
Debug.WriteLine("ConnectFailReason: " & rest.ConnectFailReason)
|
||||||
|
Debug.WriteLine(rest.LastErrorText)
|
||||||
|
failureText = rest.LastErrorText
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If (success <> True) Then
|
||||||
|
Debug.WriteLine("BAFailReason: " & rest.ConnectFailReason)
|
||||||
|
Debug.WriteLine(rest.LastErrorText)
|
||||||
|
failureText = rest.LastErrorText
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
rest.ClearAllQueryParams()
|
||||||
|
|
||||||
|
rest.AddHeader("X-API-Key", jwt)
|
||||||
|
|
||||||
|
rest.IdleTimeoutMs = 1000000
|
||||||
|
|
||||||
|
Dim responseJson As String = rest.FullRequestNoBody("GET", "/v1/settlements/new")
|
||||||
|
If (rest.LastMethodSuccess <> True) Then
|
||||||
|
Debug.WriteLine(rest.LastErrorText)
|
||||||
|
rest.IdleTimeoutMs = 30000 'defualt
|
||||||
|
Return rest.LastErrorText
|
||||||
|
End If
|
||||||
|
|
||||||
|
If (rest.ResponseStatusCode <> IIf(rest.DebugMode = True, 201, 200) And rest.ResponseStatusCode <> 404) Then
|
||||||
|
Debug.WriteLine(rest.ResponseHeader)
|
||||||
|
Return rest.LastErrorText
|
||||||
|
End If
|
||||||
|
|
||||||
|
Debug.WriteLine(responseJson)
|
||||||
|
|
||||||
|
'Newest Settlements werden nicht benötigt, erst beim Abrufen der RECHNUNG sollen die dazugehörigen Settlements abgerufen werden, allerdings müssen diese initial 1x per API abgerufen werden (mittels getNewSettlements , ansonsten können Sie nicht gefunden werden)!
|
||||||
|
|
||||||
|
'sollten sie dennoch gespeichert werden, dann fogenden Return-Statement auskommentieren (damit nachfolgender Code ausgeführt werden kann):
|
||||||
|
|
||||||
|
'-------------START---
|
||||||
|
|
||||||
|
Return ""
|
||||||
|
|
||||||
|
'-------------ENDE---
|
||||||
|
|
||||||
|
|
||||||
|
If test Then
|
||||||
|
responseJson = ""
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim json As New Chilkat.JsonObject
|
||||||
|
success = json.Load(responseJson)
|
||||||
|
If (success <> True) Then
|
||||||
|
Debug.WriteLine(json.LastErrorText)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Debug.WriteLine(json)
|
||||||
|
|
||||||
|
batchNr = json.StringOf("batch_seq_nr")
|
||||||
|
totalPages = json.IntOf("total_pages")
|
||||||
|
currentPage = json.IntOf("page_nr")
|
||||||
|
|
||||||
|
If json.StringOf("message") <> "" AndAlso json.StringOf("message") <> "OK" Then Return json.StringOf("message")
|
||||||
|
|
||||||
|
Dim settlements As New Chilkat.JsonArray
|
||||||
|
settlements = json.ArrayOf("settlements")
|
||||||
|
If (json.LastMethodSuccess = False) Then
|
||||||
|
Debug.WriteLine("settlements member not found.")
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim num As Integer = settlements.Size
|
||||||
|
If num = -1 Then
|
||||||
|
Return "FEHLER im settlementsArray"
|
||||||
|
End If
|
||||||
|
|
||||||
|
If json.StringOf("receiver") = "10738" Then saveSettlements(num, dt, settlements, json.StringOf("receiver"))
|
||||||
|
|
||||||
|
|
||||||
|
Catch ex As WebException
|
||||||
|
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function getCustomers(jwt As String, dt As DataTable) As String
|
Public Function getCustomers(jwt As String, dt As DataTable) As String
|
||||||
Try
|
Try
|
||||||
Dim returnText As String = ""
|
Dim returnText As String = ""
|
||||||
@@ -324,6 +421,8 @@ Public Class cMSEAPI
|
|||||||
Try
|
Try
|
||||||
Dim returnText As String = ""
|
Dim returnText As String = ""
|
||||||
Dim failureText As String = ""
|
Dim failureText As String = ""
|
||||||
|
Dim missingcounter As Integer = 0
|
||||||
|
Dim listOfMissingTransactions As New List(Of String)
|
||||||
|
|
||||||
Dim success As Boolean
|
Dim success As Boolean
|
||||||
|
|
||||||
@@ -387,26 +486,40 @@ Public Class cMSEAPI
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Debug.WriteLine(json)
|
Debug.WriteLine(json)
|
||||||
|
Dim saveTransaction As Boolean = True
|
||||||
|
If json.StringOf("message") <> "" AndAlso json.StringOf("message") <> "OK" Then
|
||||||
|
If Not json.StringOf("message").ToString.Contains("No transaction found for") Then
|
||||||
|
Return json.StringOf("message")
|
||||||
|
Else
|
||||||
|
saveTransaction = False
|
||||||
|
transactionID.Columns("found").ReadOnly = False
|
||||||
|
row.Item("found") = False
|
||||||
|
transactionID.Columns("found").ReadOnly = True
|
||||||
|
|
||||||
If json.StringOf("message") <> "" AndAlso json.StringOf("message") <> "OK" Then Return json.StringOf("message")
|
|
||||||
|
|
||||||
Dim transactions As New Chilkat.JsonArray
|
End If
|
||||||
transactions = json.ArrayOf("transactions")
|
|
||||||
If (json.LastMethodSuccess = False) Then
|
|
||||||
Debug.WriteLine("transactions member not found.")
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If saveTransaction Then
|
||||||
|
Dim transactions As New Chilkat.JsonArray
|
||||||
|
transactions = json.ArrayOf("transactions")
|
||||||
|
If (json.LastMethodSuccess = False) Then
|
||||||
|
Debug.WriteLine("transactions member not found.")
|
||||||
|
End If
|
||||||
|
|
||||||
Dim num As Integer = transactions.Size
|
|
||||||
If num = -1 Then
|
Dim num As Integer = transactions.Size
|
||||||
Return "FEHLER Array Transaktions ist leer"
|
If num = -1 Then
|
||||||
|
Return "FEHLER Array Transaktions ist leer"
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'If json.StringOf("receiver") = "10738" Then saveTransactions(num, dt, transactions, json.StringOf("receiver"))
|
||||||
|
saveTransactions(num, dt, transactions, json.StringOf("receiver"), True) ' wenn ID explizit aufgerufen keine Prüfung auf receivcer und purchaseDate
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'If json.StringOf("receiver") = "10738" Then saveTransactions(num, dt, transactions, json.StringOf("receiver"))
|
|
||||||
saveTransactions(num, dt, transactions, json.StringOf("receiver"), True) ' wenn ID explizit aufgerufen keine Prüfung auf receivcer und purchaseDate
|
|
||||||
|
|
||||||
|
|
||||||
Next row
|
Next row
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
<OutputPath>bin\Debug\</OutputPath>
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
<DocumentationFile>VERAG_PROG_ALLGEMEIN.xml</DocumentationFile>
|
<DocumentationFile>VERAG_PROG_ALLGEMEIN.xml</DocumentationFile>
|
||||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
|
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
@@ -34,6 +35,7 @@
|
|||||||
<OutputPath>bin\Release\</OutputPath>
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
<DocumentationFile>VERAG_PROG_ALLGEMEIN.xml</DocumentationFile>
|
<DocumentationFile>VERAG_PROG_ALLGEMEIN.xml</DocumentationFile>
|
||||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
|
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OptionExplicit>On</OptionExplicit>
|
<OptionExplicit>On</OptionExplicit>
|
||||||
@@ -70,7 +72,7 @@
|
|||||||
<SignAssembly>false</SignAssembly>
|
<SignAssembly>false</SignAssembly>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<AssemblyOriginatorKeyFile>ProgAllg.pfx</AssemblyOriginatorKeyFile>
|
<AssemblyOriginatorKeyFile>Sebastian.pfx</AssemblyOriginatorKeyFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="ChilkatDotNet47, Version=9.5.0.96, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd, processorArchitecture=AMD64">
|
<Reference Include="ChilkatDotNet47, Version=9.5.0.96, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd, processorArchitecture=AMD64">
|
||||||
@@ -886,6 +888,7 @@
|
|||||||
<None Include="Schnittstellen\VERAG\OUT_NCTS\VERAG_out_ncts_V2_0_2.xsd">
|
<None Include="Schnittstellen\VERAG\OUT_NCTS\VERAG_out_ncts_V2_0_2.xsd">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="Sebastian.pfx" />
|
||||||
<None Include="Service References\DSFinVKService\Arrays.xsd">
|
<None Include="Service References\DSFinVKService\Arrays.xsd">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</None>
|
</None>
|
||||||
@@ -1269,10 +1272,10 @@
|
|||||||
<Version>13.0.3</Version>
|
<Version>13.0.3</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Polly">
|
<PackageReference Include="Polly">
|
||||||
<Version>7.2.4</Version>
|
<Version>8.4.1</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="RestSharp">
|
<PackageReference Include="RestSharp">
|
||||||
<Version>110.2.0</Version>
|
<Version>111.4.1</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user