Kundenkontakte, Mitarbeiter, Bonitaetsauskungt, FIBU, Creditsafe
This commit is contained in:
@@ -2874,7 +2874,7 @@ Public Class usrCntlKundenuebersicht
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub setCreditSafeEntry(company As cCreditSafeAPI.Company, PDF As Byte(), krn As Integer, Optional forcedRequest As Boolean = False)
|
||||
Private Sub setCreditSafeEntry(company As cCreditSafeAPI.Company, PDF As Byte(), krn As Integer, Optional forcedRequest As Boolean = False, Optional cscounterbefore As Integer = 0, Optional cscounterafter As Integer = 0, Optional csmax As Integer = 0)
|
||||
|
||||
If company.csFailure <> "" Then
|
||||
MsgBox(company.csFailure)
|
||||
@@ -2905,6 +2905,9 @@ Public Class usrCntlKundenuebersicht
|
||||
|
||||
|
||||
cBonitaetsauskunft.ba_Pruefungstool = "creditsafe API"
|
||||
cBonitaetsauskunft.ba_CScounterBeforeRequest = cscounterbefore
|
||||
cBonitaetsauskunft.ba_CScounterAfterRequest = cscounterafter
|
||||
cBonitaetsauskunft.ba_CSmax = csmax
|
||||
|
||||
' Öster. Unternemen -> Creditscore, sonst Index
|
||||
If (IsNumeric(company.csIndex)) Then
|
||||
@@ -3060,6 +3063,21 @@ Public Class usrCntlKundenuebersicht
|
||||
Private Sub setCreditsafereportEntry(cs As cCreditSafeAPI, company As cCreditSafeAPI.Company, Optional forecedReqest As Boolean = False)
|
||||
|
||||
Dim pdfObject As Byte() = Nothing
|
||||
Dim dt As New DataTable
|
||||
Dim beforeRequestCount As Integer = 0
|
||||
Dim afterRequestCount As Integer = 0
|
||||
Dim limit As Integer = 0
|
||||
Dim country As String = ""
|
||||
|
||||
cs.getSubscriptionCountries(dt)
|
||||
|
||||
If dt.Rows.Count > 0 AndAlso dt.AsEnumerable.Any(Function(c) company.country = c.Item("countryIso2").ToString) Then
|
||||
Dim r As DataRow = dt.AsEnumerable.First((Function(c) company.country = c.Item("countryIso2").ToString))
|
||||
beforeRequestCount = r.Item("used")
|
||||
limit = r.Item("paid")
|
||||
country = r.Item("countryIso2")
|
||||
|
||||
End If
|
||||
|
||||
Dim failureDesc As String = cs.getReport(company, True)
|
||||
If failureDesc <> "" Then
|
||||
@@ -3069,13 +3087,25 @@ Public Class usrCntlKundenuebersicht
|
||||
End If
|
||||
|
||||
pdfObject = cs.getPDF(company, failureDesc)
|
||||
|
||||
cs.getSubscriptionCountries(dt)
|
||||
|
||||
If dt.Rows.Count > 0 AndAlso dt.AsEnumerable.Any(Function(c) company.country = c.Item("countryIso2").ToString) Then
|
||||
Dim r As DataRow = dt.AsEnumerable.First((Function(c) company.country = c.Item("countryIso2").ToString))
|
||||
afterRequestCount = r.Item("used")
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If pdfObject Is Nothing Then
|
||||
setCreditSafeEntry(company, Nothing, kdNr)
|
||||
setCreditSafeEntry(company, Nothing, kdNr, beforeRequestCount, afterRequestCount, limit)
|
||||
MsgBox("Fehler beim Erstellen des PDF-Dokuments" & vbNewLine & failureDesc)
|
||||
Else
|
||||
setCreditSafeEntry(company, pdfObject, kdNr, forecedReqest)
|
||||
setCreditSafeEntry(company, pdfObject, kdNr, forecedReqest, beforeRequestCount, afterRequestCount, limit)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If company.vatNo <> "" AndAlso checkNullStr(ADRESSE.UstIdKz) = "" AndAlso checkNullStr(ADRESSE.UstIdNr) = "" Then
|
||||
'set and check uid nr
|
||||
|
||||
@@ -3096,6 +3126,9 @@ Public Class usrCntlKundenuebersicht
|
||||
|
||||
End If
|
||||
|
||||
If beforeRequestCount = (limit - 100) Or afterRequestCount = (limit - 100) Then 'Benachrichtigung
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user