My Products
Help

Error creating purchase receipt. Error: 'ShipAddressID' cannot be empty.

by Roland van Belle - Consolit

We create a purchase receipt for an Transferorder. The customer now reports that the processing gives an error. The shipment is processed without any problems. After we proces the shipment, we create the purchase receipt.

 

We now always get the error:

'ShipAddressID' cannot be empty.

 

We don't know where to put this field, because it's not a field in the end-point for purchase receipts.

 

Please let us know if this is a known issue and how we have to solve this.

10 REPLIES 10
Yıldırım
VISMA

by Yıldırım

Hello Roland, 

 

This issue has been planned to be fixed in Visma.net Financials API updates for version 8.86.0 (March 2022)

Please follow the "News" for the final release notes.

Yıldırım
VISMA

by Yıldırım (Updated ‎02-02-2022 18:21 by Yıldırım VISMA )

Hello Roland, 

thank you for the information you've provided. We're able to reproduce the issue, we've informed the relevant team for the investigation. 

 

Steps to reproduce:

1) Create "TR" Type Sales Order in the Financials ERP (ScreenId=SO301000)

1.1) Create Shipment via Actions > Create Shipment in the SalesOrder screen.

2) Confirm shipment via Actions > Confirm Shipment in the Shipment screen.(ScreenId=SO302000)

2.1) Update Inventory via Actions > Update Inventory in the Shipment (ScreenId=SO302000)

3) Create "Transfer Receipt" type Purchase Receipt (ScreenId=PO302000)

3.1) Add TR type SalesOrder to the "Transfer Receipt" via "Add Order" button in the Purchase Receipt ✔️

 

4) Add TR type SalesOrder to the "Transfer Receipt" via POST Purchase Receipt API 

POST > https://integration.visma.net/API/controller/api/v1/PurchaseReceipt

Returns: "Error creating purchase receipt. Error: 'ShipAddressID' cannot be empty."

 

{
    "lines": [
        {
            "operation": "Insert",
            "transferOrderType": {
                "value": "TransferOrder"
            },
            "transferOrderNbr": {
                "value": "000519"
            },
            "transferOrderLineNbr": {
                "value": 1
            }
        }
    ],
    "receiptType": {
        "value": "TransferReceipt"
    },
    "warehouseId": {
        "value": "2"
    }
}

 

 

Can somebody please give me an update on this issue?

We have a large customer who have several errors on daily processes due to this case.

Yıldırım
VISMA

Hello, 

currently the case is being worked on, and the fix is undergoing.We will provide further updates when they are available.

Yıldırım
VISMA

by Yıldırım

Thanks. Could you also describe the followed workflow for each step in detail ? 

1) How "Transfer Order's been created via API or Financials ERP UI ?  

  -If via API: Send us the used POST JSON

  -If in the UI: Send us a print screens of the "Transfer Order" where we can see the document header - lines,  Delivery Settings and  Shipments tab.


2) How "Shipment" is processed ? 


3) Have you tried adding the "Transfer Order" to the "Transfer Purchase Receipt" by using "Add  Transfer" option in the Purchase Receipt, Financials ERP UI ?

add_transfer_order_Purchase receipts.jpg

 

 

1. The user makes a salesorder of type TR by hand in the system.

2. They make a shipment in Visma.net by hand direct from the salesorder.

3. They pick the shipment in the warehouse with a scanner.

The shipment is processed with the API.

 

4. When I add transfer order by hand, it works well.

 

Only if we process the receipt with the API, we get the error mentioned. This process worked well till end of december/begin of januari. Unfortunately our customer did not posted the issue direct at the beginning. We compared the code with older versions, we don't made any changes in this process.

Yıldırım
VISMA

Hello, 


@Roland van Belle - Consolit wrote:

1. The user makes a salesorder of type TR by hand in the system.


 -If TransferOrder has been created in the UI please send us a print screens of the "Transfer Order" where we can see the document header - lines,  "Delivery Settings" and  "Shipments" tab.

 

Is this error only occurring with that specific "TransferOrder" ? Have you tried creating a new one by following the same steps ?

by Roland van Belle - Consolit (Updated ‎02-02-2022 16:48 by Roland van Belle - Consolit PARTNER )

Hello Yildrim,

 

The error occurring with all transferorders. I can reproduce the error easily.

 

TR Order:

RolandvanBelleConsolit_0-1643816818903.pngRolandvanBelleConsolit_1-1643816846551.png

 

RolandvanBelleConsolit_2-1643816858274.png

This TR order is processed by hand. But gave an error in the API/our software.

 

Hope this gave you enough info to research the problem/issue.

Thank you very much.

Yıldırım
VISMA

by Yıldırım

Hello, please share the details of your API Transaction/s.

  1. Used API Endpoint URL / Method
  2. Returned Http Status Code
  3. Returned Response Body (Error Message)
  4. If this is a POST/PUT request, then Used RAW JSON script has to be attached

Thanks.

1. Used API Endpoint:

POST_.PurchaseReceipt

2. Returned Http Status Code

"ContentType": "application/json; charset=utf-8",
"ContentLength": -1,
"ContentEncoding": "",
"Content": "{\"message\":\"VismaId: 91b35633-563d-4250-a903-cb2ba1e942d0. Error creating purchase receipt. Error: 'ShipAddressID' cannot be empty.\"}",
"StatusCode": 500,
"StatusDescription": "Internal Server Error",
"ResponseUri": "https://integration.visma.net/API/controller/api/v1/PurchaseReceipt",

4. RAW JSON script:

{
"lines": [
{
"allocations": null,
"operation": "Insert",
"receiptQty": {
"value": 2.0
},
"locationId": {
"value": "TRANS"
},
"transferOrderType": {
"value": "TransferOrder"
},
"transferOrderNbr": {
"value": "000242"
},
"transferOrderLineNbr": {
"value": 1
},
"lotSerialNumber": {
"value": "24680"
}
}
],
"receiptType": {
"value": "TransferReceipt"
},
"warehouseId": {
"value": "CASHCARRY"
}
}