Acumatica 采购订单收据 API 找不到 PO Order Nbr [英] Acumatica Purchase Order Receipt API Can not find PO Order Nbr

查看:25
本文介绍了Acumatica 采购订单收据 API 找不到 PO Order Nbr的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用采购订单上的明细行项目创建采购收据.当我使用 API 执行此操作时,我收到一条错误消息,指出在系统中找不到 PO.如果我不引用 PO,我可以很好地添加行项目,但是一旦我引用了 PO,就会出现 API 错误.采购订单编号有效且项目在采购订单上.

I am trying to create a Purchase Receipt with a detail line item that is on a Purchase Order. When I do this with the API, I get an error back saying that the PO could not be found in the system. I can add line items fine if I do not reference the PO, but as soon as I reference the PO the API errors. The PO number is valid and the item is on the PO.

我可以在 Acumatica 中手动执行此操作,没有问题,而且 PO 实际上可用,并且就像所说的手动执行没有问题.

I can do this manually in Acumatica with no problem and the PO is in fact available and like a said doing it manually has no problems.

这是我正在发出的简单 JSON 请求.

Here is the simple JSON request I am making.

{
    "CreateBill": {"value": true},
    "VendorID": {"value": "ARTISTICCARP"},
    "Details": [
        {
            "InventoryID": {"value":"VND1807 4x6"},
            "ReceiptQty": {"value": 1},
            "POOrderNbr": {"value": "001131" },
            "POLineNbr": {"value": 1},
            "POOrderType": {"value": "Goods for IN"}
           
        }
    ]
}

这是我收到的错误:

 "innerException": {
            "message": "An error has occurred.",
            "exceptionMessage": "OrderNbr=Order Nbr. '001131' cannot be found in the system.",
            "exceptionType": "PX.Data.PXException",
            "stackTrace": "   at PX.Objects.DefaultEndpointImpl.PurchaseReceiptDetail_Insert(PXGraph graph, EntityImpl entity, EntityImpl targetEntity)"
        }

推荐答案

试试这个:

{
"CreateBill": {"value": true},
"VendorRef": {"value": "FROM_API"},
"VendorID": {"value": "ARTISTICCARP"},
"Details": [
    {
        "InventoryID": {"value":"VND1807 4x6"},
        "ReceiptQty": {"value": 1},
        "POOrderNbr": {"value": "001131" },
        "POLineNbr": {"value": 1},
        "POOrderType": {"value": "Normal"}
       
    }]
}

您传入了错误的订单类型,这就是它找不到采购订单的原因.如果 CreateBill = true,您还需要一个 Vendor Ref.

You passed in a wrong order type that's why it cannot find the purchase order. And you also need a Vendor Ref if CreateBill = true.

这篇关于Acumatica 采购订单收据 API 找不到 PO Order Nbr的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆