Reputation: 1096
I get this kind of data from the Journal Transactions API.
{
"UID": "",
"DisplayID": "00000001",
"JournalType": "Purchase",
"SourceTransaction": {
"UID": "",
"TransactionType": "Bill",
"URI": ""
},
"DateOccurred": "2024-04-01T00:00:00",
"DatePosted": "2024-04-18T09:24:10.657",
"Description": "Purchase; Supplier AA",
"Lines": [
{
"Account": {
"UID": "",
"Name": "Inventory",
"DisplayID": "1-1320",
"URI": ""
},
"Amount": 1500.0,
"IsCredit": false,
"Job": null,
"LineDescription": "Books; Books",
"ReconciledDate": null,
"UnitCount": null
},
{
"Account": {
"UID": "",
"Name": "GST Paid",
"DisplayID": "2-1220",
"URI": ""
},
"Amount": 150.0,
"IsCredit": false,
"Job": null,
"LineDescription": "",
"ReconciledDate": null,
"UnitCount": null
},
{
"Account": {
"UID": "",
"Name": "Trade Creditors",
"DisplayID": "2-1510",
"URI": ""
},
"Amount": 1650.0,
"IsCredit": true,
"Job": null,
"LineDescription": "",
"ReconciledDate": null,
"UnitCount": null
}
],
"URI": "",
"RowVersion": "-7620372044487589888"
},
How can I know which line is GST? And to which line was applied? It seems the account name is always GST Collected or GST Paid. But this way I would need to iterate the lines and do calculations. To go with calculations:
Anyone knows a better solution? I'm using MYOB AccountRight, the Business API v2 on Windows, to get the data. Here’s the documentation: https://developer.myob.com/api/myob-business-api/v2/
Upvotes: 0
Views: 24