我需要在销售订单中添加预付款。会计已在 Acumatica 中设置了所需的课程和付款方式。我可以通过 GUI 执行此操作,但是当我尝试使用 Web 服务在销售订单上输入付款信息时,我收到了错误响应。错误响应是:PX.Data.PXException: Error #14: Inserting 'SOAdjust' 记录引发一个或多个错误。请查阅。错误:“参考编号。” 不能为空。
` SO301000Content SO301000 = context.SO301000GetSchema(); 上下文.SO301000Clear();
List<Command> cmds = new List<Command>();
cmds.AddRange(new Command[]{
new Value {Value = "C3", LinkedCommand = SO301000.OrderSummary.OrderType},
new Value { Value = orderNbr, LinkedCommand = SO301000.OrderSummary.OrderNbr, Commit = true},
SO301000.Payments.ServiceCommands.NewRow,
new Value { Value = "Prepayment", LinkedCommand = SO301000.Payments.DocType},
new Value { Value = paymentNbr, LinkedCommand = SO301000.Payments.ReferenceNbr, Commit = true },
// new Value { Value = "3.00" , LinkedCommand = SO301000.Payments.AppliedToOrder, Commit = true},
SO301000.Actions.Save,
SO301000.OrderSummary.OrderNbr
});
string orderNumber = string.Empty;
try
{
var SO301000ContentReturned = context.SO301000Submit(cmds.ToArray());
orderNumber = SO301000ContentReturned[0].OrderSummary.OrderNbr.Value;
Console.WriteLine(orderNumber);
}
catch (Exception exception)
{
orderNumber = exception.Message;
Console.WriteLine(exception);
}
return orderNumber;`
有什么建议么?我也尝试使用 AR302000 屏幕将付款从付款屏幕应用到订单并收到相同的错误消息。