我正在使用 Netsuite SuiteTalk PHPToolKit 并尝试使用 php soap 调用创建供应商付款记录。
要求:
$vendorPayment = new VendorPayment();
$vendorPayment->entity = new RecordRef();
$vendorPayment->entity->internalId = $bill->entity->internalId;
$vendorPayment->entity->type = 'vendor';
$vendorPayment->account = new RecordRef();
$vendorPayment->account->internalId = self::SB_ACCOUNT_INTERNAL_ID;
$vendorPayment->apAcct = new RecordRef();
$vendorPayment->apAcct->internalId = $bill->account->internalId;
$vendorPayment->customForm = new RecordRef();
$vendorPayment->customForm->name = $bill->customForm->name;
$vendorPayment->subsidiary = new RecordRef();
$vendorPayment->subsidiary->internalId = $bill->subsidiary->internalId;
$vendorPayment->tranDate = time();
$vendorPayment->memo = 'Testing Memo';
// Create a new instance of the line item.
$lineItem = new \NetSuite\Classes\VendorPaymentApply();
$lineItem->apply = true;
$lineItem->type= 'Bill';
$lineItem->refNum = $bill->tranId;
$lineItem->amount = 30.00;
// Add the line item to the vendor payment record.
$vendorPayment->applyList = new \NetSuite\Classes\VendorPaymentApplyList();
$vendorPayment->applyList->apply = [$lineItem];
但我收到以下错误
不允许向子列表应用添加新行。
有人知道怎么做吗,请在这里帮助我。
提前致谢。