ej2 / python-quickbooks

A Python library for accessing the Quickbooks API.
MIT License
394 stars 193 forks source link

Bug in get_report call for ProfitAndLossDetail? #340

Closed maxsg closed 1 month ago

maxsg commented 7 months ago

Hi,

I'm making calls to client.get_report to get ProfitAndLossDetail report data, but the JSON returned from this call does not match the structure returned when I make the API call directly to QBO. The call to get_report returns json data with the rows (corresponding to the chart of accounts in the QBO report) out of order and the nesting incorrect. For example, the "top-level" row/account names returned when I run the get_report call are:

['Ordinary Income/Expenses', 'Expenses', '7400 Admin & General Expenses', '7427 Auto Expense', '7430 Fuel/Parking', '7436 Team Meals', '7439 POS/Software Expense', '7442 Printing', '7445 Professional Fees', '7451 Storage', '7460 Dues & Subscriptions', '7475 Music & Trivia', 'Total for 7400 Admin & General Expenses', '7500 Utilities', '7600 Occupancy Cost', 'Total for Expenses', 'Net Ordinary Income', 'Other Income/Expense', 'Net Income']

This is strange because I would have expected all those 7XXX accounts to be nested under one of the two top-level Expenses-related accounts. Additionally, when I run the same report call directly against QBO reports API, I get the following top-level row/account names:

["Ordinary Income/Expenses", "Other Income/Expense", "Net Income"]

which is what I would expect to get. Also, when I view the report detail in QBO, the report structure matches this JSON returned from the QBO API, and not the JSON returned from the get_report call.

Thank you!

ej2 commented 5 months ago

Are you still having trouble with this? If so, could you post the code you are using to run the report? Also are you setting the minor version when running get_report?

ej2 commented 1 month ago

Closed due to inactivity