API账单创建不可见,通过GUI却显示税收信息账单创建。
https://developer.intuit.com/docs/api/accounting/bill
使用沙箱数据和api测试器。 https://developer.intuit.com/v2/apiexplorer?apiname=V3QBO#?id=Account
输入json
{
"BatchItemRequest":[
{
"bId":"bid0",
"operation":"create",
"Bill":{
"Line":[ {
"Description":"name badges",
"Amount":3,
"DetailType":"AccountBasedExpenseLineDetail",
"AccountBasedExpenseLineDetail":{
"CustomerRef":{
"value":"59",
"name":"Andre"
},
"AccountRef":{
"value":"84",
"name":"account 84 idk"
},
"TaxCodeRef":{
"value":"5",
"name":"HST ON"
},
"BillableStatus":"NotBillable"
}
}
],
"VendorRef":{
"value":"33",
"name":"Vendor"
},
"TotalAmt":19
}
}
]
}
输出json
{
"BatchItemResponse": [
{
"Bill": {
"DueDate": "2018-09-27",
"Balance": 3.39,
"HomeBalance": 3.39,
"domain": "QBO",
"sparse": false,
"Id": "299",
"SyncToken": "0",
"MetaData": {
"CreateTime": "2018-09-27T13:27:45-07:00",
"LastUpdatedTime": "2018-09-27T13:27:45-07:00"
},
"TxnDate": "2018-09-27",
"CurrencyRef": {
"value": "CAD",
"name": "Canadian Dollar"
},
"ExchangeRate": 1,
"Line": [
{
"Id": "1",
"Description": "name badges",
"Amount": 3.0,
"DetailType": "AccountBasedExpenseLineDetail",
"AccountBasedExpenseLineDetail": {
"CustomerRef": {
"value": "59",
"name": "Andre Prefontaine"
},
"AccountRef": {
"value": "84",
"name": "Cost of Goods Sold"
},
"BillableStatus": "NotBillable",
"TaxCodeRef": {
"value": "5"
}
}
}
],
"TxnTaxDetail": {
"TotalTax": 0.39,
"TaxLine": [
{
"Amount": 0.39,
"DetailType": "TaxLineDetail",
"TaxLineDetail": {
"TaxRateRef": {
"value": "11"
},
"PercentBased": true,
"TaxPercent": 13,
"NetAmountTaxable": 3.0
}
}
]
},
"VendorRef": {
"value": "33",
"name": "Jacque Hudspeth"
},
"APAccountRef": {
"value": "31",
"name": "Accounts Payable"
},
"TotalAmt": 3.39,
"GlobalTaxCalculation": "NotApplicable"
},
"bId": "bid0"
}
],
"time": "2018-09-27T13:27:45.38-07:00"
}
一些图像可以更好地说明使用API而不是GUI的输入差异。
Api账单创建缺少可见的“营业税列”显示和计算,但正确应用了。
下面是通过GUI 创建Bill的样子,请注意“ Sales Tax”列和底部的可见税计算。