Quickbooks发票是零美元

时间:2016-07-05 14:38:57

标签: salesforce quickbooks-online

我的发票应该有两行 1号线 - 5个单位x 25.00美元= 125.00美元 2号线 - 3个单位x $ 35.00 = 105.00美元 发票总额s / b $ 230.00

我不知道我的标签在哪里,我没有给Quickbooks它需要的东西。

这是我的要求:

{
  "TxnStatus" : null,
  "TxnDate" : "2016-07-05",
  "TotalAmt" : null,
  "ShipAddr" : null,
  "Line" : [ {
    "SubTotalLineDetail" : { },
    "SalesItemLineDetail" : {
      "UnitPrice" : 25.0,
      "Qty" : 5.0,
      "ItemRef" : {
        "value" : null,
        "name" : null
      }
    },
    "LineNum" : null,
    "Id" : null,
    "DiscountLineDetail" : {
      "PercentBased" : null,
      "DiscountPercent" : null,
      "DiscountAccountRef" : null
    },
    "DetailType" : "SalesItemLineDetail",
    "Description" : "New seat license",
    "Amount" : 125.0
  }, {
    "SubTotalLineDetail" : { },
    "SalesItemLineDetail" : {
      "UnitPrice" : 35.0,
      "Qty" : 3.0,
      "ItemRef" : {
        "value" : null,
        "name" : null
      }
    },
    "LineNum" : null,
    "Id" : null,
    "DiscountLineDetail" : {
      "PercentBased" : null,
      "DiscountPercent" : null,
      "DiscountAccountRef" : null
    },
    "DetailType" : "SalesItemLineDetail",
    "Description" : "New seat license V3",
    "Amount" : 105.0
  } ],
  "Id" : null,
  "DocNumber" : "INV-27188-aaa",
  "CustomerRef" : {
    "value" : "598"
  },
  "CustomerMemo" : null,
  "BillAddr" : null
}

此处返回零美元发票:

      {

    "Invoice": {

      "Deposit": 0,

      "AllowIPNPayment": false,

      "AllowOnlinePayment": false,

      "AllowOnlineCreditCardPayment": false,

      "AllowOnlineACHPayment": false,

      "domain": "QBO",

      "sparse": false,

      "Id": "1129",

      "SyncToken": "0",

      "MetaData": {

        "CreateTime": "2016-07-05T07:02:29-07:00",

        "LastUpdatedTime": "2016-07-05T07:02:29-07:00"

      },

      "CustomField": [

        {

          "DefinitionId": "1",

          "Name": "Customer ID",

          "Type": "StringType"

        }

      ],

      "DocNumber": "INV-27188-aaa",

      "TxnDate": "2016-07-05",

      "CurrencyRef": {

        "value": "USD",

        "name": "United States Dollar"

      },

      "LinkedTxn": [],

      "Line": [

        {

          "Id": "1",

          "LineNum": 1,

          "Description": "New seat license",

          "DetailType": "DescriptionOnly",

          "DescriptionLineDetail": {}

        },

        {

          "Id": "2",

          "LineNum": 2,

          "Description": "New seat license V3",

          "DetailType": "DescriptionOnly",

          "DescriptionLineDetail": {}

        },

        {

          "Amount": 0,

          "DetailType": "SubTotalLineDetail",

          "SubTotalLineDetail": {}

        }

      ],

      "CustomerRef": {

        "value": "598",

        "name": "Coville's IT/Solar Consulting"

      },

      "BillAddr": {

        "Id": "601",

        "City": "Columbus",

        "PostalCode": "43203",

        "Lat": "39.9705946",

        "Long": "-82.9689738"

      },

      "ShipAddr": {

        "Id": "601",

        "City": "Columbus",

        "PostalCode": "43203",

        "Lat": "39.9705946",

        "Long": "-82.9689738"

      },

      "DueDate": "2016-08-04",

      "TotalAmt": 0,

      "ApplyTaxAfterDiscount": false,

      "PrintStatus": "NeedToPrint",

      "EmailStatus": "NotSet",

      "Balance": 0

    },

    "time": "2016-07-05T07:02:29.889-07:00"

  }

1 个答案:

答案 0 :(得分:0)

在使用QB-online API资源管理器进一步测试后,我发现删除了NULL #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { int a; char b[20]; printf("Input your ID: "); scanf("%d", &a); printf("Input your name: "); scanf("\n%[^\n]", b); //first \n says to ignore last 'return' //%[^\n] read until find a 'return' printf("---------\n"); printf("Name: %s\n\n", b); system("pause"); return 0; } 给了我预期的结果。 如果API无法解析“null”ItemRef,我原本期望API失败并且不添加发票。