Skip to content

Report for Profit and Loss only returns monthly report and not yearly or quarterly #203

Answered by rjaus
CaptureKervin asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @CaptureKervin,

Just took a look at this. I think your issue is that you're not specifying a fromDate & toDate.

From the docs:
https://developer.xero.com/documentation/api/accounting/reports#profit-and-loss

fromDate | The date the report starts e.g. 2021-03-01. Defaults to the begining of the current month if not provided.
toDate | The date the report ends e.g. 2021-03-31. Defaults to the end of the current month if not provided.

If you do not specify, it retrieves the current month, and the timeframe is pretty irrelevant.

If you specify a year of data, and then MONTH or QUARTER, you'll get the data segmented as expected.

I haven't tried this specifically with the ruby wrapper, but t…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rjaus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #167 on October 21, 2021 03:50.