【问题标题】:Invoice record adding in netsuite在 netsuite 中添加发票记录
【发布时间】:2013-12-19 14:51:39
【问题描述】:

我有一个问题。 当我在 NetSuite 中添加发票时,请帮助我,它给了我一个 错误:[代码] => USER_ERROR [消息] => 请输入以下值:部门、班级、仓库 谁能告诉我如何通过 API 生成 NetSuite 发票。

$inv=new Invoice();

$customFormR=new RecordRef();
$customFormR->internalId =104;





//'1 Aquatic Fitness Concepts'

$inv_items= new InvoiceItem();

$itemRR = new RecordRef();
$itemRR->internalId = 25;
$itemRR->recordType = "inventoryItem";
$inv_items->item=$itemRR;

$location=new RecordRef();
$location->internalId =2;

$inv_items->location=$location;

$departmentRR=new RecordRef();
$departmentRR->internalId =6;
$inv_items->department=$departmentRR;

$classRR=new RecordRef();
$classRR->internalId =22;

$inv_items->class=$classRR;

$inv_it_list=new InvoiceItemList();

$inv_it_list->item=array($inv_items);
$inv->itemList= $inv_it_list;
$inv->entity = new RecordRef();
$inv->entity->internalId = 932;
//$inv->entity
$inv->customForm=$customFormR;

$request = new AddRequest();
$request->record = $inv;


$addResponse = $service->add($request);

if (!$addResponse->writeResponse->status->isSuccess) {
    echo "ADD ERROR";
    print_r($addResponse);
    exit();
} else {
    echo "ADD SUCCESS, id " . $addResponse->writeResponse->baseRef->internalId;
}

【问题讨论】:

  • 我正在使用 PHPTookkit 代码
  • 发布您的代码。我会告诉你哪里做错了,并提供解决方案。
  • 请您发布您的代码。
  • 谢谢达尼洛,检查我做错了什么..
  • 如果您有在 netsuite 中创建发票的代码,请发给我。

标签: netsuite


【解决方案1】:

在 NetSuite 中,您可以选择在标题级别将 Location、Department、Class 设置为默认值,在行级别设置为默认值。

查看如何为您的 NetSuite 帐户中的交易设置位置、部门和类别。您的代码显示您正在尝试在订单项级别设置这些字段。如果未启用在行级别指定它们的选项(设置->会计->会计首选项->常规),您应该无法在行级别设置它们。

尝试在标题级别设置这些字段。例如:

$inv->department = $departmentRR;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-06-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-26
    相关资源
    最近更新 更多