Open Christian-Sachse opened 5 months ago
Hallo @Christian-Sachse , kannst du mal das JSON schicken, dass du überträgst? Danke!
{ "StatusContinuation": null, "ElectronicInvoiceFormat": null, "BusinessTransaction": null, "Id": null, "DocumentNumber": null, "DocumentTypeId": null, "DocumentType": "EA", "CreationDate": null, "CreatedBy": null, "ChangingDate": null, "ChangedBy": null, "LastModified": null, "IsPrinted": null, "IsFixed": null, "IsInStatistics": null, "IsPrintedInInvoiceBook": null, "IsTransferredToFinancialAccounting": null, "CustomerId": null, "CustomerNumber": 83310.0, "DocumentDate": "2024-05-21", "DeliveryDate": null, "InspectionDate": null, "Rebate": null, "DeliveryConditionId": null, "DeliveryCondition": null, "IncotermCode": null, "IncotermVersion": null, "IncotermLocation": null, "CurrencyId": null, "CurrencyIso": null, "TermsOfPaymentId": null, "TermsOfPayment": null, "SepaMandateReference": null, "SepaMoveInDate": null, "Iban": null, "BankId": null, "BankKey": null, "InvoiceRecipientId": null, "InvoiceRecipientNumber": null, "InvoiceRecipientAccountingDistribution": null, "InvoiceRecipientTurnover": null, "PriceList": null, "HintText": null, "AdditionalText": null, "Notes": "PickUp: Y\r\n\r\nCustomerReference: BE24010053", "ShowNotesOnChange": true, "OrderNumber": null, "OrderDate": null, "OrderReference": "BE24010053", "ContractNumber": null, "BillingPeriodBegin": null, "BillingPeriodEnd": null, "StockId": null, "StockNumber": null, "LanguageId": null, "Language": null, "BusinessOpportunity": null, "Preamble": null, "VatIdentificationNumber": null, "TaxIdentificationNumber": null, "EoriNumber": null, "TaxDestinationCountryId": null, "TaxDestinationCountry": null, "UserDefinedFields": [ { "Type": "Alphanumeric", "Number": 5, "Name": null, "AlphanumericValue": "BE24010053", "NumericValue": null, "DateValue": null } ], "Addresses": [ { "AddressType": "DeliveryAddress", "Salutation": null, "Name1": "Zweigstelle", "Name2": null, "Name3": null, "StreetOrPOBox": "Testhof 9", "CountryId": null, "Country": "", "Zip": "19061", "City": "Schwerin", "AdditionalText1": null, "AdditionalText2": null, "AdditionalText3": null, "PhoneNumber": null, "FaxNumber": null, "EMail": null, "Website": null, "Gln": null } ], "LineItems": [ { "StatusContinuation": null, "LineItemType": "Text", "Id": null, "Key": 1, "TextLineItemData": { "LineNumber": null, "Text": " LANCIA Y (840) 1.2 8V Fire BJ: 1996 - 2003 kW / PS: 44 / 60 HSN / TSN: 4001 174002" } }, { "StatusContinuation": null, "LineItemType": "Product", "Id": null, "Key": 2, "ProductLineItemData": { "QuantityUnitIndicator": null, "GrossOrNetIndicator": null, "LineNumber": null, "ProductId": null, "ProductNumber": "4250314106578", "ReferencedProductNumber": null, "IsForAssembly": null, "AssemblyDate": null, "StockNumber": 1, "Quantity": 4.0, "QuantityUnit": null, "QuantityFactor1": null, "QuantityFactor2": null, "QuantityFactor3": null, "QuantityFactor4": null, "QuantityInPriceUnits": null, "QuantityUnitForPriceUnits": null, "QuantityInDeliveryUnits": null, "QuantityUnitForDeliveryUnits": null, "IsUnitPriceAndRebateFixed": null, "UnitPrice": null, "RebatePercentage": null, "PriceList": null, "GrossAmount": null, "NetAmount": null, "IsAmountFixed": null, "Amount": null, "IsPurchasePriceFixed": null, "PurchasePrice": null, "DeliveryDate": "2024-05-21", "CustomerDeliveryDate": null, "RemainingQuantity": null, "QuantityAlreadyProcessed": null, "QuantityToProcess": null, "Remark": null, "Text": null, "UserDefinedFields": null, "SerialOrLotNumbers": null, "NetWeight": null, "DoCalcNetWeightFromBOM": null, "IsAlternateItem": null, "CalculationFieldValues": null } } ], "TotalNetAmount": null, "TotalGrossAmount": null, "NetAmountMinusInterimInvoices": null, "GrossAmountMinusInterimInvoices": null, "DocumentLinks": null, "IsLockedForThirdPartyApplication": null, "IdInThirdPartyApplication": null, "Shipments": null, "AgentCommissions": null, "BuyerReference": null, "UsePeppol": null, "DeliverOnlyIfAllProductsInStock": null, "ConsiderForPackagingLaw": null, "IsLockedForDunningOrDirectDebit": null, "CalculationFieldTotals": null, "CostCenter": null, "CostUnit": null }
{
"StatusContinuation": null,
"ElectronicInvoiceFormat": null,
"BusinessTransaction": null,
"Id": null,
"DocumentNumber": null,
"DocumentTypeId": null,
"DocumentType": "EA",
"CreationDate": null,
"CreatedBy": null,
"ChangingDate": null,
"ChangedBy": null,
"LastModified": null,
"IsPrinted": null,
"IsFixed": null,
"IsInStatistics": null,
"IsPrintedInInvoiceBook": null,
"IsTransferredToFinancialAccounting": null,
"CustomerId": null,
"CustomerNumber": 83310.0,
"DocumentDate": "2024-05-21",
"DeliveryDate": null,
"InspectionDate": null,
"Rebate": null,
"DeliveryConditionId": null,
"DeliveryCondition": null,
"IncotermCode": null,
"IncotermVersion": null,
"IncotermLocation": null,
"CurrencyId": null,
"CurrencyIso": null,
"TermsOfPaymentId": null,
"TermsOfPayment": null,
"SepaMandateReference": null,
"SepaMoveInDate": null,
"Iban": null,
"BankId": null,
"BankKey": null,
"InvoiceRecipientId": null,
"InvoiceRecipientNumber": null,
"InvoiceRecipientAccountingDistribution": null,
"InvoiceRecipientTurnover": null,
"PriceList": null,
"HintText": null,
"AdditionalText": null,
"Notes": "PickUp: Y\r\n\r\nCustomerReference: BE24010053",
"ShowNotesOnChange": true,
"OrderNumber": null,
"OrderDate": null,
"OrderReference": "BE24010053",
"ContractNumber": null,
"BillingPeriodBegin": null,
"BillingPeriodEnd": null,
"StockId": null,
"StockNumber": null,
"LanguageId": null,
"Language": null,
"BusinessOpportunity": null,
"Preamble": null,
"VatIdentificationNumber": null,
"TaxIdentificationNumber": null,
"EoriNumber": null,
"TaxDestinationCountryId": null,
"TaxDestinationCountry": null,
"UserDefinedFields": [
{
"Type": "Alphanumeric",
"Number": 5,
"Name": null,
"AlphanumericValue": "BE24010053",
"NumericValue": null,
"DateValue": null
}
],
"Addresses": [
{
"AddressType": "DeliveryAddress",
"Salutation": null,
"Name1": "Test - Zweigstelle",
"Name2": null,
"Name3": null,
"StreetOrPOBox": "Testhof 9",
"CountryId": null,
"Country": null,
"Zip": "19061",
"City": "Schwerin",
"AdditionalText1": null,
"AdditionalText2": null,
"AdditionalText3": null,
"PhoneNumber": null,
"FaxNumber": null,
"EMail": null,
"Website": null,
"Gln": null
}
],
"LineItems": [
{
"StatusContinuation": null,
"LineItemType": "Text",
"Id": null,
"Key": 1,
"TextLineItemData": {
"LineNumber": null,
"Text": " LANCIA Y (840) 1.2 8V Fire BJ: 1996 - 2003 kW / PS: 44 / 60 HSN / TSN: 4001 174002"
}
},
{
"StatusContinuation": null,
"LineItemType": "Product",
"Id": null,
"Key": 2,
"ProductLineItemData": {
"QuantityUnitIndicator": null,
"GrossOrNetIndicator": null,
"LineNumber": null,
"ProductId": null,
"ProductNumber": "4250314106578",
"ReferencedProductNumber": null,
"IsForAssembly": null,
"AssemblyDate": null,
"StockNumber": 1,
"Quantity": 4.0,
"QuantityUnit": null,
"QuantityFactor1": null,
"QuantityFactor2": null,
"QuantityFactor3": null,
"QuantityFactor4": null,
"QuantityInPriceUnits": null,
"QuantityUnitForPriceUnits": null,
"QuantityInDeliveryUnits": null,
"QuantityUnitForDeliveryUnits": null,
"IsUnitPriceAndRebateFixed": null,
"UnitPrice": null,
"RebatePercentage": null,
"PriceList": null,
"GrossAmount": null,
"NetAmount": null,
"IsAmountFixed": null,
"Amount": null,
"IsPurchasePriceFixed": null,
"PurchasePrice": null,
"DeliveryDate": "2024-05-21",
"CustomerDeliveryDate": null,
"RemainingQuantity": null,
"QuantityAlreadyProcessed": null,
"QuantityToProcess": null,
"Remark": null,
"Text": null,
"UserDefinedFields": null,
"SerialOrLotNumbers": null,
"NetWeight": null,
"DoCalcNetWeightFromBOM": null,
"IsAlternateItem": null,
"CalculationFieldValues": null
}
}
],
"TotalNetAmount": null,
"TotalGrossAmount": null,
"NetAmountMinusInterimInvoices": null,
"GrossAmountMinusInterimInvoices": null,
"DocumentLinks": null,
"IsLockedForThirdPartyApplication": null,
"IdInThirdPartyApplication": null,
"Shipments": null,
"AgentCommissions": null,
"BuyerReference": null,
"UsePeppol": null,
"DeliverOnlyIfAllProductsInStock": null,
"ConsiderForPackagingLaw": null,
"IsLockedForDunningOrDirectDebit": null,
"CalculationFieldTotals": null,
"CostCenter": null,
"CostUnit": null
}
Keine Ahnung warum er das JSOn mal so und mal so mach :/ Auf jeden Fall ist Country einmal NULL und einmal leer. Geht bei beiden nicht
AIS 23263
Hallo zusammen,
liegt man einen neuen Beleg an und gibt eine abweichende Lieferadresse an und lässt das Land NULL, so gibt es per API den Fehler:
{"HsErrorId":"0","Message":"The input data is not correct (InvalidData).","MessageDetail":"RCDB = RCDB_REF_INTEGRITY_VIOLATION in Beleg::save, Zeile 9605\r\n\r\nDatenbankfehler\r\n[SAP][ODBC Driver][SQL Anywhere]Kein Primärschlüsselwert für Fremdschlüssel 'Land_in_Firmenadresse' in Tabelle 'std_firmenadresse'\r\nSQL State: 23000\r\nNative Error: -194"}
Da wird sicher Null und 0 nicht richtig behandelt :)
Viele Grüße Christian