0
我創建並使用下面的代碼保存自定義字段在發票:自定義字段值不使用QuickBooks的,紅寶石在QuickBooks節約創業板
custom_field = Quickbooks::Model::CustomField.new
custom_field.name = "LFI Invoice #"
custom_field.type = "StringType"
custom_field.string_value = "LFI12345678"
invoice = Quickbooks::Model::Invoice.new
invoice.custom_fields = [custom_field]
所以保存發票對象JSON之前是如下調試時:
{
"line_items": [
{
"amount": "5.99",
"description": "Plush Baby Doll",
"detail_type": "SalesItemLineDetail",
"sales_line_item_detail": {
"unit_price": "5.99",
"quantity": 1,
"item_ref": {
"value": "36"
}
}
}
],
"custom_fields": [
{
"name": "LFI Invoice #",
"type": "StringType",
"string_value": "LFI123456"
}
],
"customer_ref": {
"value": "95"
},
"txn_date": "2015-02-05",
"doc_number": ""
}
但發票創建後,它讓我空自定義字段,當我在查詢API探險發票,它給了我下面的自定義字段部分的JSON:
"CustomField": [
{
"DefinitionId": "1",
"Name": "LFI Invoice #",
"Type": "StringType"
}
],
任何建議,有什麼問題
尋找錯誤,'invoice.errors.messages' – Sontya 2015-02-09 08:19:16