This commit is contained in:
2023-07-03 14:48:24 +02:00
9 changed files with 250 additions and 95 deletions

View File

@@ -1395,6 +1395,13 @@ Public Class cProgramFunctions
End Sub
Function MessageTimeOut(sMessage As String, sTitle As String, iSeconds As Integer) As Boolean
Dim Shell
Shell = CreateObject("WScript.Shell")
Shell.Run("mshta.exe vbscript:close(CreateObject(""WScript.shell"").Popup(""" & sMessage & """," & iSeconds & ",""" & sTitle & """))")
MessageTimeOut = True
End Function
End Class

View File

@@ -2716,25 +2716,6 @@ Public Class usrCntlKundenuebersicht
End If
'Using UserControl1 As usrcntlCreditsafe = New usrcntlCreditsafe(UID, name, land)
' Using tmpForm As Form = New Form()
' tmpForm.Width = UserControl1.Width + 10
' tmpForm.Height = UserControl1.Height + 40
' tmpForm.Text = "Creditsafe-Firmensuche"
' tmpForm.StartPosition = tmpForm.StartPosition.CenterParent
' tmpForm.Controls.Add(UserControl1)
' If tmpForm.ShowDialog() = DialogResult.OK Then
' KUNDE_ERW.kde_CreditSaveId = UserControl1.comp.credissafeId
' KUNDE_ERW.kde_CreditSaveNo = UserControl1.comp.safeNo
' KUNDE_ERW.SAVE()
' End If
' End Using
'End Using
Else
Dim cs = New cCreditSafeAPI()
@@ -2825,11 +2806,9 @@ Public Class usrCntlKundenuebersicht
cBonitaetsauskunft.ba_KundenNr = (kdNr)
cBonitaetsauskunft.ba_Datum = Now()
If company.country = "AT" Then
cBonitaetsauskunft.ba_Pruefungstool = "creditsafe AT"
Else
cBonitaetsauskunft.ba_Pruefungstool = "creditsafe"
End If
cBonitaetsauskunft.ba_Pruefungstool = "creditsafe API"
If (IsNumeric(company.csIndex)) Then
company.csIndex = company.csIndex.Replace(".", ",")

View File

@@ -2,6 +2,7 @@
Imports System.Globalization
Imports System.Net
Imports System.Text.RegularExpressions
Imports com.sun.tools.doclets.internal.toolkit.util
Imports Spire.Pdf.Graphics
Imports VERAG_PROG_ALLGEMEIN
@@ -42,10 +43,20 @@ Public Class usrcntlFiskaluebersicht
Sub initdgvLieferanten()
Dim where As String = ""
Select Case cbxFiskalart._value
Case "DE"
where = " And FilialenNr = 4811"
Case "AT"
where = " And FilialenNr = 4805"
End Select
Label2.Text = "Top 5 Lieferanten (" & year & ")"
With dgvLieferanten
.Columns.Clear()
.DataSource() = SQL.loadDgvBySql("SELECT Top(5) [AbsenderKundenNr] as KdNr, MAX(Absender) as Firma, COUNT(*) as Anzahl FROM [Speditionsbuch] WHERE year(Abfertigungsdatum) = '" & year & "' AND " & kdNr & " In([AbsenderKundenNr], [EmpfängerKundenNr], [FrachtführerKundenNr], [VermittlerKundenNr], [EndempfängerKundenNr]) GROUP BY AbsenderKundenNr ORDER BY Anzahl DESC ", "FMZOLL")
.DataSource() = SQL.loadDgvBySql("SELECT Top(5) [AbsenderKundenNr] as KdNr, MAX(Absender) as Firma, COUNT(*) as Anzahl FROM [Speditionsbuch] WHERE year(Abfertigungsdatum) = '" & year & "'" & where & " AND " & kdNr & " In([AbsenderKundenNr], [EmpfängerKundenNr], [FrachtführerKundenNr], [VermittlerKundenNr], [EndempfängerKundenNr]) GROUP BY AbsenderKundenNr ORDER BY Anzahl DESC ", "FMZOLL")
.Columns("KdNr").Width = 50
.Columns("Firma").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("Anzahl").Width = 40
@@ -57,10 +68,19 @@ Public Class usrcntlFiskaluebersicht
Sub initdgvEmfpaenger()
Dim where As String = ""
Select Case cbxFiskalart._value
Case "DE"
where = " And FilialenNr = 4811"
Case "AT"
where = " And FilialenNr = 4805"
End Select
Label3.Text = "Top 5 Empfänger (" & year & ")"
With dgvEmpfaenger
.Columns.Clear()
.DataSource() = SQL.loadDgvBySql("SELECT Top(5) [EmpfängerKundenNr] as KdNr, CASE WHEN [EmpfängerKundenNr] IS NULL THEN '-' ELSE MAX(Empfänger) END as Firma, COUNT(*) as Anzahl FROM [Speditionsbuch] WHERE year(Abfertigungsdatum) = '" & year & "' AND " & kdNr & " IN([AbsenderKundenNr],[EmpfängerKundenNr],[FrachtführerKundenNr],[VermittlerKundenNr],[EndempfängerKundenNr]) GROUP BY EmpfängerKundenNr ORDER BY Anzahl DESC ", "FMZOLL")
.DataSource() = SQL.loadDgvBySql("SELECT Top(5) [EmpfängerKundenNr] as KdNr, CASE WHEN [EmpfängerKundenNr] IS NULL THEN '-' ELSE MAX(Empfänger) END as Firma, COUNT(*) as Anzahl FROM [Speditionsbuch] WHERE year(Abfertigungsdatum) = '" & year & "'" & where & "AND " & kdNr & " IN([AbsenderKundenNr],[EmpfängerKundenNr],[FrachtführerKundenNr],[VermittlerKundenNr],[EndempfängerKundenNr]) GROUP BY EmpfängerKundenNr ORDER BY Anzahl DESC ", "FMZOLL")
.Columns("KdNr").Width = 50
.Columns("Firma").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("Anzahl").Width = 40
@@ -70,10 +90,19 @@ Public Class usrcntlFiskaluebersicht
Sub initdgvZwischenhaendler()
Dim where As String = ""
Select Case cbxFiskalart._value
Case "DE"
where = " And FilialenNr = 4811"
Case "AT"
where = " And FilialenNr = 4805"
End Select
Label6.Text = "Top 5 Auftraggeber (" & year & ")"
With dgvZwischenh
.Columns.Clear()
.DataSource() = SQL.loadDgvBySql("SELECT [VermittlerKundenNr] as KdNr, CASE WHEN [VermittlerKundenNr] IS NULL THEN '-' ELSE MAX(Vermittler) END as Firma, COUNT(*) as Anzahl FROM [Speditionsbuch] WHERE year(Abfertigungsdatum) = '" & year & "' AND " & kdNr & " IN([AbsenderKundenNr],[EmpfängerKundenNr],[FrachtführerKundenNr],[VermittlerKundenNr],[EndempfängerKundenNr]) GROUP BY VermittlerKundenNr ORDER BY Anzahl DESC ", "FMZOLL")
.DataSource() = SQL.loadDgvBySql("SELECT [VermittlerKundenNr] as KdNr, CASE WHEN [VermittlerKundenNr] IS NULL THEN '-' ELSE MAX(Vermittler) END as Firma, COUNT(*) as Anzahl FROM [Speditionsbuch] WHERE year(Abfertigungsdatum) = '" & year & "'" & where & " AND " & kdNr & " IN([AbsenderKundenNr],[EmpfängerKundenNr],[FrachtführerKundenNr],[VermittlerKundenNr],[EndempfängerKundenNr]) GROUP BY VermittlerKundenNr ORDER BY Anzahl DESC ", "FMZOLL")
.Columns("KdNr").Width = 50
.Columns("Firma").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("Anzahl").Width = 40
@@ -246,40 +275,51 @@ Public Class usrcntlFiskaluebersicht
If VM.kdvm_datenarchivId > 0 Then files.Add(VERAG_PROG_ALLGEMEIN.cDATENSERVER.GET_PDFPath_BY_DocID(VM.kdvm_datenarchivId))
If VM.kdvm_emailId > 0 Then
Dim MailFile = VERAG_PROG_ALLGEMEIN.cDATENSERVER.GET_PDFPath_BY_DocID(VM.kdvm_emailId)
Dim MailFileVM = VERAG_PROG_ALLGEMEIN.cDATENSERVER.GET_PDFPath_BY_DocID(VM.kdvm_emailId)
'Muss von Mail zu PDF konvertiert und dann der Liste angehängt werden!
'Dim Mailpath As String = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getTMPPath("mail.msg", ".msg", True,,)
'files.Add(DATENVERVER_OPTIONS.getPDFViaSpirePDF_FromFile(MailFile, Mailpath))
If Not System.IO.File.Exists(MailFileVM) Then
MsgBox("Die Datei Vollmacht existiert nicht!")
Else
If MailFileVM.ToString.ToLower.EndsWith(".msg") Then ' MSG - Mails --> lokale Kopie, sonst Fehler (bereits von Benutzer soUndSo geöffnet)
Dim docPathTMP = VERAG_PROG_ALLGEMEIN.cFormularManager.getTMPPath_MSG()
System.IO.File.Copy(MailFileVM, docPathTMP)
Process.Start(docPathTMP)
Else
Process.Start(MailFileVM)
End If
End If
End If
End If
End If
Dim MailFileUVM
If UVM IsNot Nothing Then
If UVM.kdvm_datenarchivId > 0 Then files.Add(VERAG_PROG_ALLGEMEIN.cDATENSERVER.GET_PDFPath_BY_DocID(UVM.kdvm_datenarchivId))
If UVM.kdvm_emailId > 0 Then
MailFileUVM = VERAG_PROG_ALLGEMEIN.cDATENSERVER.GET_PDFPath_BY_DocID(UVM.kdvm_emailId)
If UVM IsNot Nothing Then
If UVM.kdvm_datenarchivId > 0 Then files.Add(VERAG_PROG_ALLGEMEIN.cDATENSERVER.GET_PDFPath_BY_DocID(UVM.kdvm_datenarchivId))
If UVM.kdvm_emailId > 0 Then
If Not System.IO.File.Exists(MailFileUVM) Then
MsgBox("Die Datei Untervollmacht existiert nicht!")
Else
If MailFileUVM.ToString.ToLower.EndsWith(".msg") Then ' MSG - Mails --> lokale Kopie, sonst Fehler (bereits von Benutzer soUndSo geöffnet)
Dim docPathTMP = VERAG_PROG_ALLGEMEIN.cFormularManager.getTMPPath_MSG()
System.IO.File.Copy(MailFileUVM, docPathTMP)
Process.Start(docPathTMP)
Else
Process.Start(MailFileUVM)
End If
End If
Dim MailFile = VERAG_PROG_ALLGEMEIN.cDATENSERVER.GET_PDFPath_BY_DocID(UVM.kdvm_emailId)
'Muss von Mail zu PDF konvertiert und dann der Liste angehängt werden!
'Dim Mailpath As String = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getTMPPath("mail.msg", ".msg", True,,)
'files.Add(DATENVERVER_OPTIONS.getPDFViaSpirePDF_FromFile(MailFile, Mailpath))
End If
End If
If BA IsNot Nothing Then
If BA.ba_datenarchivId > 0 Then files.Add(VERAG_PROG_ALLGEMEIN.cDATENSERVER.GET_PDFPath_BY_DocID(BA.ba_datenarchivId))
End If
For Each r As DataGridViewRow In dgvUnterlagen.Rows
files.Add(VERAG_PROG_ALLGEMEIN.cDATENSERVER.GET_PDFPath_BY_DocID(r.Cells("fka_docId").Value))
Next
VERAG_PROG_ALLGEMEIN.cFormularManager.mergePDFs(files, outputFile)
End If
If BA IsNot Nothing Then
If BA.ba_datenarchivId > 0 Then files.Add(VERAG_PROG_ALLGEMEIN.cDATENSERVER.GET_PDFPath_BY_DocID(BA.ba_datenarchivId))
End If
For Each r As DataGridViewRow In dgvUnterlagen.Rows
files.Add(VERAG_PROG_ALLGEMEIN.cDATENSERVER.GET_PDFPath_BY_DocID(r.Cells("fka_docId").Value))
Next
VERAG_PROG_ALLGEMEIN.cFormularManager.mergePDFs(files, outputFile)
Process.Start(outputFile)
@@ -287,7 +327,6 @@ Public Class usrcntlFiskaluebersicht
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Me.Cursor = Cursors.Default
End Sub
Private Sub btnOK_Click(sender As Object, e As EventArgs) Handles btnOK.Click

View File

@@ -1511,45 +1511,6 @@ Public Class usrcntlKundeBearbeitenFull
End If
'Using UserControl1 As usrcntlCreditsafe = New usrcntlCreditsafe()
' Using tmpForm As Form = New Form()
' tmpForm.Width = UserControl1.Width
' tmpForm.Height = UserControl1.Height + 40
' tmpForm.Text = "Creditsafe-Firmensuche"
' tmpForm.StartPosition = tmpForm.StartPosition.CenterParent
' tmpForm.Controls.Add(UserControl1)
' If tmpForm.ShowDialog() = DialogResult.OK Then
' txtKurzname.Text = UserControl1.comp.name & ";" & UserControl1.comp.city
' txtFirmenname1.Text = UserControl1.comp.name
' txtCreditsafe.Text = UserControl1.comp.credissafeId
' txtStrasse.Text = UserControl1.comp.street
' txtOrt.Text = UserControl1.comp.city
' txtPlz.Text = UserControl1.comp.postCode
' txtTel.Text = UserControl1.comp.phoneNo
' If UserControl1.comp.country IsNot Nothing Then
' cbxLandKz.changeItem(UserControl1.comp.country.Substring(0, 1))
' End If
' If UserControl1.comp.vatNo <> "" Then
' cboUSt_UstIdNrLand.changeItem(UserControl1.comp.vatNo.Substring(0, 2))
' If UserControl1.comp.country <> "" Then
' txtUSt_UstIdNr.Text = UserControl1.comp.vatNo.Replace(UserControl1.comp.country, "")
' Else
' txtUSt_UstIdNr.Text = UserControl1.comp.vatNo
' End If
' End If
' End If
' End Using
'End Using
Cursor = Cursors.Default
End Sub

View File

@@ -0,0 +1,166 @@
Public Class cOregonNCTSDeclarations
Public Class PacksAttribute
Public Property pack_count As Integer
Public Property pack_type As String
Public Property notes As String
End Class
Public Class DocumentsAttribute
Public Property doc_type As String
Public Property doc_no As String
Public Property pre_post As String
End Class
Public Class ProducedDocumentsAttribute
Public Property code As String
Public Property reference As String
Public Property status As String
Public Property reason As String
Public Property quantity As Integer
End Class
Public Class AdditionalCodesAttribute
Public Property code As String
Public Property notes As String
End Class
Public Class GoodsAttribute
Public Property commodity As String
Public Property gtip_code As String
Public Property gtip_language As String
Public Property brut_wg As Double
Public Property net_wg As Double
Public Property sender_name As String
Public Property sender_address As String
Public Property sender_city_name As String
Public Property sender_country_id As String
Public Property sender_postcode As String
Public Property sender_eori_code As String
Public Property consignee_name As String
Public Property consignee_address As String
Public Property consignee_city_name As String
Public Property consignee_country_id As String
Public Property consignee_postcode As String
Public Property consignee_eori_code As String
Public Property invoice_amount As String
Public Property invoice_curr As String
Public Property cpc_code As String
Public Property additional_cpc_code As String
Public Property container_no As String
Public Property preferential_country_id As String
Public Property cus_code As String
Public Property nature_of_transaction As String
Public Property additional_commodity_codes As String
Public Property origin_country_id As String
Public Property preference_request As String
Public Property quota_desc As String
Public Property valuation_method As String
Public Property valuation_adjustment As String
Public Property third_quantity_type As String
Public Property third_quantity As String
Public Property supplementary_unit As String
Public Property packs_attributes As PacksAttribute()
Public Property documents_attributes As DocumentsAttribute()
Public Property produced_documents_attributes As ProducedDocumentsAttribute()
Public Property additional_codes_attributes As AdditionalCodesAttribute()
End Class
Public Class PartiesAttribute
Public Property party_role As String
Public Property party_code As String
Public Property eori_code As String
End Class
Public Class TraderAdditionsAttribute
Public Property code As String
Public Property amount As Integer
Public Property curr As String
Public Property rate_code As Integer
End Class
Public Class DeclarationData
Public Property auto_send As Boolean
Public Property badge_code As String
Public Property service_code As String
Public Property doc_type As String
Public Property declaration_type As String
Public Property commercial_ref As String
Public Property ducr As String
Public Property mucr As String
Public Property ducr_part As String
Public Property declarant_eori As String
Public Property declarant_name As String
Public Property declarant_address As String
Public Property declarant_city_name As String
Public Property declarant_country_id As String
Public Property declarant_postcode As String
Public Property declarant_rep As String
Public Property export_country_id As String
Public Property consignor_eori As String
Public Property consignor_name As String
Public Property consignor_address As String
Public Property consignor_city_name As String
Public Property consignor_country_id As String
Public Property consignor_postcode As String
Public Property multiple_consignor As Boolean
Public Property import_country_id As String
Public Property consignee_eori As String
Public Property consignee_name As String
Public Property consignee_address As String
Public Property consignee_city_name As String
Public Property consignee_country_id As String
Public Property consignee_postcode As String
Public Property multiple_consignee As Boolean
Public Property invoice_amount As String
Public Property invoice_curr As String
Public Property goods_location As String
Public Property border_transport_type As String
Public Property border_vehicle_code As String
Public Property border_vehicle_coun As String
Public Property inland_transport_type As String
Public Property container_no As String
Public Property gvms_interested As Boolean
Public Property freight_amount As String
Public Property freight_curr As String
Public Property payment_method As String
Public Property carrier_eori As String
Public Property carrier_name As String
Public Property carrier_address As String
Public Property carrier_city_name As String
Public Property carrier_country_id As String
Public Property carrier_postcode As String
Public Property total_packages As Integer
Public Property nature_of_transaction As String
Public Property premises_code As String
Public Property first_dan_no As String
Public Property second_dan_no As String
Public Property insurance_amount As String
Public Property insurance_curr As String
Public Property other_amounts As String
Public Property other_amounts_curr As String
Public Property apportment_indicator As String
Public Property total_gross_weight As String
Public Property total_net_weight As String
Public Property airfreight_cost As String
Public Property vat_adjustment As String
Public Property vat_adjustment_curr As String
Public Property discount_amount As String
Public Property discount_curr As String
Public Property discount_rate As String
Public Property incoterm As String
Public Property incoterm_location As String
Public Property trader_ref As String
Public Property arrival_transport_type As String
Public Property guarantee_code As Integer
Public Property guarantee_reference As String
Public Property goods_attributes As GoodsAttribute()
Public Property parties_attributes As PartiesAttribute()
Public Property trader_additions_attributes As TraderAdditionsAttribute()
End Class
Public Class CustomsDeclaration
Public Property declaration_data As DeclarationData
End Class
End Class

View File

@@ -149,7 +149,7 @@ Public Class cUIDPruefung
Public Shared Function doUIDPruefungALL(Optional datum As Object = Nothing, Optional SaveErgInAdressen As Boolean = True, Optional Sciherheitsabfrage As Boolean = True, Optional MaxEintraege As Integer = -1, Optional showErr As Boolean = True) As DataTable
Dim dt As DataTable = Nothing
If datum = Nothing Then datum = CDate("01." & Now.ToString("MM.yyyy")).AddMonths(-1)
If datum = Nothing Then datum = CDate("15." & Now.ToString("MM.yyyy")).AddMonths(-1)
Dim where = ""
Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA

View File

@@ -197,6 +197,8 @@ Public Class cDATENSERVER
s = s.Replace("ı", "i")
s = s.Replace("", "E")
s = s.Replace(",", ".")
s = s.Replace("'", "")
s = s.Replace("´", "")
s = s.Replace("^", "") ' Es gibt Ü, die so geschreiben werden: Ü ....
s = s.Replace("Ì", ".")
s = s.Replace("", "U") ' .... das zum Beispiel

View File

@@ -301,7 +301,7 @@ Public Class cNorsware
Dim positions As Chilkat.JsonArray = json.ArrayOf("entityIslenmisVeriEk")
If (json.LastMethodSuccess = False) Then
'Return "positions not found."
Return "positions not found."
End If
Dim numPositions As Integer = positions.Size

View File

@@ -366,6 +366,7 @@
<Compile Include="Classes\cNCTS_TR_Nachrichten.vb" />
<Compile Include="Classes\cOffene_Posten.vb" />
<Compile Include="Classes\cOffene_Posten_DVO.vb" />
<Compile Include="Classes\cOregonNCTSDeclarations.vb" />
<Compile Include="Classes\cParameter.vb" />
<Compile Include="Classes\cProgrammeUpdate.vb" />
<Compile Include="Classes\cQSTeam.vb" />