Änderungen Fiskalübersicht und Creditsafe

This commit is contained in:
2023-05-26 15:55:53 +02:00
parent a508c89c3a
commit c0ebab418b
6 changed files with 247 additions and 123 deletions

View File

@@ -299,12 +299,12 @@ Public Class cCreditSafeAPI
If company.country = "DE" Then ' nur bei DE ausführen!
Dim companyAddInformObj As Chilkat.JsonObject = reportObj.ObjectOf("additionalInformation")
If (reportObj.LastMethodSuccess = True) Then
If (reportObj.LastMethodSuccess = True) And companyAddInformObj IsNot Nothing Then
Dim companyMiscObj As Chilkat.JsonObject = companyAddInformObj.ObjectOf("misc")
company.csBusinessPurpose = companyMiscObj.StringOf("businessPurpose")
If (companyAddInformObj.LastMethodSuccess = True) Then
Dim deCurrentRatingObj As Chilkat.JsonObject = companyMiscObj.ObjectOf("deCurrentRating")
If (companyAddInformObj.LastMethodSuccess = True) Then
If (companyAddInformObj.LastMethodSuccess = True) And deCurrentRatingObj IsNot Nothing Then
If (deCurrentRatingObj.LastMethodSuccess = True) Then
company.csIndex = deCurrentRatingObj.StringOf("value")
Else
@@ -320,10 +320,10 @@ Public Class cCreditSafeAPI
Dim companyIDObj As Chilkat.JsonObject = reportObj.ObjectOf("companyIdentification")
If (reportObj.LastMethodSuccess = True) Then
If (reportObj.LastMethodSuccess = True) And companyIDObj IsNot Nothing Then
Dim basicInfoObj As Chilkat.JsonObject = companyIDObj.ObjectOf("basicInformation")
If (companyIDObj.LastMethodSuccess = True) Then
If (companyIDObj.LastMethodSuccess = True) And basicInfoObj IsNot Nothing Then
Dim dateTime As New Chilkat.CkDateTime
Dim getAsLocal As Boolean = False
@@ -354,38 +354,41 @@ Public Class cCreditSafeAPI
If (reportObj.LastMethodSuccess = True) Then
Dim employeesInformationsArray As Chilkat.JsonArray = otherInformationObject.ArrayOf("employeesInformation")
If (otherInformationObject.LastMethodSuccess = True) Then
Dim employees As Chilkat.JsonObject = employeesInformationsArray.ObjectAt(0)
company.csSumEmployees = employees.StringOf("numberOfEmployees")
Else
Debug.WriteLine("otherInformationObject object not found.")
End If
If otherInformationObject IsNot Nothing Then
Dim bankersArray As Chilkat.JsonArray = otherInformationObject.ArrayOf("bankers")
If (otherInformationObject.LastMethodSuccess = True) Then
Dim bankers As Chilkat.JsonObject = bankersArray.ObjectAt(0)
company.csBank = bankers.StringOf("name") & " - " & bankers.StringOf("bankCode")
Else
Debug.WriteLine("otherInformationObject object not found.")
Dim employeesInformationsArray As Chilkat.JsonArray = otherInformationObject.ArrayOf("employeesInformation")
If (otherInformationObject.LastMethodSuccess = True) And employeesInformationsArray IsNot Nothing Then
Dim employees As Chilkat.JsonObject = employeesInformationsArray.ObjectAt(0)
company.csSumEmployees = employees.StringOf("numberOfEmployees")
Else
Debug.WriteLine("otherInformationObject object not found.")
End If
Dim bankersArray As Chilkat.JsonArray = otherInformationObject.ArrayOf("bankers")
If (otherInformationObject.LastMethodSuccess = True) And bankersArray IsNot Nothing Then
Dim bankers As Chilkat.JsonObject = bankersArray.ObjectAt(0)
company.csBank = bankers.StringOf("name") & " - " & bankers.StringOf("bankCode")
Else
Debug.WriteLine("otherInformationObject object not found.")
End If
End If
Dim creditRatingObj As Chilkat.JsonObject = creditScoreObj.ObjectOf("currentCreditRating")
If (creditScoreObj.LastMethodSuccess = True) Then
If (creditScoreObj.LastMethodSuccess = True) And creditRatingObj IsNot Nothing Then
company.csRiskclass = creditRatingObj.StringOf("commonValue")
Dim creditLimitObj As Chilkat.JsonObject = creditRatingObj.ObjectOf("creditLimit")
If (creditRatingObj.LastMethodSuccess = True) Then
If (creditRatingObj.LastMethodSuccess = True) And creditLimitObj IsNot Nothing Then
company.csMaxCreditAmount = creditLimitObj.StringOf("value")
Else
Debug.WriteLine("creditRating object not found.")
End If
Dim providerValueObj As Chilkat.JsonObject = creditRatingObj.ObjectOf("providerValue")
If (creditRatingObj.LastMethodSuccess = True) Then
If (creditRatingObj.LastMethodSuccess = True) And providerValueObj IsNot Nothing Then
company.csScore = providerValueObj.StringOf("value")
Else
Debug.WriteLine("providerValue object not found.")