【问题标题】:Unable to create Shipment by code - Acumatica无法通过代码创建货件 - Acumatica
【发布时间】:2021-01-19 19:46:10
【问题描述】:

我尝试在 Acumatica 中通过代码创建货件,它在没有序列号的库存项目上运行良好,但我在使用序列号的项目时收到此错误

**PX.Data.PXRowPersistingException: 'SO Error: One or more lines have unassigned slots and / or lot / serial number**

我正在使用此代码创建货件:

SOShipmentEntrysoShipmentGraph=PXGraph.CreateInstance<SOShipmentEntry>();
soShipmentGraph.Clear();
DocumentList<SOShipment>created=newDocumentList<SOShipment>(soShipmentGraph);
SOShipmentsOShipment=newSOShipment();
created.Add(sOShipment);
soShipmentGraph.CreateShipment(newOrder,5,newOrder.OrderDate,true,SOOperation.Issue,created);

我错过了什么?谢谢。

【问题讨论】:

    标签: acumatica


    【解决方案1】:

    我的猜测是您没有足够的库存来填充 SO 行的数量。例如,CreateShipment API 尝试分配 5 个小部件,但仅找到 4 个可用的序列号。您应该查看库存项目并确认存在足够的数量。

    【讨论】:

    • 我有足够的数量,但问题是我需要通过代码影响到船公司的序列号,我不知道如何使用我正在使用的代码来做到这一点
    • 您在 CreateShipment 调用中创建并用作参数的 SOSshipments 变量列表将包含成功执行后成功创建的货件。我将创建一个 SOSshipmentEntry 图表并将其设置为当前值。然后,您必须深入到 SOShipLineSplit 才能更改分配。
    猜你喜欢
    • 2022-10-19
    • 2021-01-27
    • 1970-01-01
    • 2012-02-05
    • 1970-01-01
    • 2021-10-01
    • 2018-07-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多