My Products
Help
Karl-Oskar_Gunnarsson
CONTRIBUTOR *

Error creating purchase receipt for transfer order

by Karl-Oskar_Gunnarsson

Hi,

We try to create a purchase receipt for a TR sales order but it fails with the error message "Error creating purchase receipt. No Record found. TransferOrderNbr: '500263'".

I have checked that the sales order exists with the call:
GET https://salesorder.visma.net/api/v3/SalesOrders/TR/500263


We do the following API call to create the receipt:

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

{
  "receiptType": {
    "value": "TransferReceipt"
  },
  "hold": {
    "value": false
  },
  "date": {
    "value": "2024-12-09T12:01:33.2726361+01:00"
  },
  "warehouseId": {
    "value": "6"
  },
  "lines": [
    {
      "allocations": [
        {
          "operation": "Insert",
          "lineNbr": {
            "value": 1
          },
          "location": {
            "value": "1"
          },
          "lotSerialNumber": {
            "value": "231228841011"
          },
          "quantity": {
            "value": 1.000
          }
        },
        {
          "operation": "Insert",
          "lineNbr": {
            "value": 1
          },
          "location": {
            "value": "1"
          },
          "lotSerialNumber": {
            "value": "499125"
          },
          "quantity": {
            "value": 1.000
          }
        }
      ],
      "operation": "Insert",
      "inventoryId": {
        "value": "L137624"
      },
      "receiptQty": {
        "value": 2.0
      },
      "transferOrderType": {
        "value": "TransferOrder"
      },
      "transferOrderNbr": {
        "value": "500263"
      },
      "transferOrderLineNbr": {
        "value": 1
      },
      "warehouseId": {
        "value": "6"
      }
    }
  ]
}


We have encountered the same problem for two different customers using our integration to Visma.net. It does not happen for all orders. What do we do wrong?

 

4 REPLIES 4
Karl-Oskar_Gunnarsson
CONTRIBUTOR *

by Karl-Oskar_Gunnarsson

Hi again! It was no problem creating the receipt in the UI.

Marten Voort
VISMA

Thank you for the information! To thoroughly investigate this issue, we need to examine the details involved. As this may require reviewing the company-specific configuration, I recommend reaching out to the support teams specific to your country. Please see https://community.visma.com/t5/Forum-in-Developers-Visma-net/Update-on-Visma-net-ERP-API-Support-cha....

Karl-Oskar_Gunnarsson
CONTRIBUTOR *

by Karl-Oskar_Gunnarsson

I don't have access to the UI but I will ask someone who has to test. What is the corresponding action in the UI? Is it to create a new purchase receipt (ScreenId=PO302000) and then click Add Purchase?

KarlOskar_Gunnarsson_1-1733817106315.png

 

Marten Voort
VISMA

by Marten Voort

Hi! When you experience this error in the API, is it possible to manually select the transferorder in the UI?