You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Report for Profit and Loss only returns monthly report and not yearly or quarterly #167
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 that's how the API works (which I have verified). If you can try that in the wrapper and still face issues let me know and I'll take a closer look.
Activity
rjaus commentedon Sep 1, 2021
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
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 that's how the API works (which I have verified). If you can try that in the wrapper and still face issues let me know and I'll take a closer look.