My Products
Help
erik-kle
PARTNER

Error creating Transfer Receipt

by erik-kle

 

Hi, im trying to create a Transfer Receipt for a Transfer Order, but get "Error creating purchase receipt. No Record found. TransferOrderNbr: '000000067'" but if i manually try to add it in the UI it appears in the list of transfer orders.

 

Can someone point me in the right direction?

 

TransferReceipt.png

 

Request to POST/controller/api/v1/PurchaseReceipt

 

{
  "receiptType": {
    "Value": "TransferReceipt"
  },
  "warehouseId": {
    "Value": "10"
  },
  "date": {
    "Value": "2022-04-22T00:00:00.000Z"
  },
  "hold": {
    "Value": false
  },
  "lines": [
    {
      "operation": "Insert",
      "transferOrderNbr": {
        "Value": "000000067"
      },
      "transferOrderLineNbr": {
        "Value": 1
      },
      "transferOrderType": {
        "Value": "TransferOrder"
      },
      "receiptQty": {
        "Value": 10.000000
      },
      "lineNbr": {
        "Value": 0
      }
    },
    {
      "operation": "Insert",
      "transferOrderNbr": {
        "Value": "000000067"
      },
      "transferOrderLineNbr": {
        "Value": 3
      },
      "transferOrderType": {
        "Value": "TransferOrder"
      },
      "receiptQty": {
        "Value": 5.000000
      },
      "lineNbr": {
        "Value": 0
      }
    }
  ]
}

 

 

9 REPLIES 9
erik-kle
PARTNER

by erik-kle

Ping

 

Anyone at Visma?

by Magnus Johnsen

We were not able to reproduce the same issue:
2022-04-26 13_56_29-Postman.png

 

Have you tried this before with the custom SO type? 

by Magnus Johnsen

Hi Erik,

It sounds like this issue behaves in a similiar way of entering a purchaseOrder via line to a purchaseReceipt, in which case the recommended way to do this would be to first create an empty receipt first and the put the lines after.

We'll test it and get back to you shortly.

erik-kle
PARTNER

by erik-kle

I have tried this but not got it to work. Have you made any findings?

by Magnus Johnsen

Did you test the same but with a normal TR order?
We have not been able to reproduce the issue so far. 

erik-kle
PARTNER

by erik-kle (Updated ‎29-04-2022 12:27 by erik-kle PARTNER )

Same issue with TR. What can the reason be? Can you please share the settings you have on your TR ordertype?

transferOrderNbr should be the orderNbr from the TR Sales order, correct?

 

After some more testing and sending fields as in you example, we got TR to work, but not our clone of TR called IB. Why can that be?

erik-kle
PARTNER

by erik-kle

We have found that when we use ordertyp IB the errormessage says "Error creating purchase receipt. No Record found. TransferOrderNbr: ..."

But when we got the same error on ordertype TR, the errormessage said SOOrderNbr instead of TransferOrderNbr. 

by Magnus Johnsen

The TR in my case is just the base configuration:

2022-04-29 13_55_09-Order types - Brave.png2022-04-29 13_55_23-Order types - Brave.png

Just to clarify, is it working using the TR ordertype or not?

 

We can't say for certain why it works with the standard TR type and not a copy of it, but my guess is that since TR differs in fields from other SO types is that the handling might use the orderType to execute the code block that handles transferReceipts when sent via the API. The development team would need to do some investigation to determine this however.

 

Could you please send us screenshots of how your IB is setup?

erik-kle
PARTNER

by erik-kle (Updated ‎02-05-2022 13:56 by erik-kle PARTNER )

Have the development team looked at this? Its working with TR but no IB that is created based on TR template (exact copy). 
The api must be hard coded to only use TR for this?