intuit / QuickBooks-V3-PHP-SDK

Official PHP SDK for QuickBooks REST API v3.0: https://developer.intuit.com/
Apache License 2.0
241 stars 242 forks source link

apply QBO Report Filters #453

Closed pjp-comp closed 2 years ago

pjp-comp commented 2 years ago

Is there any way to apply filters on reports which all are available in QBO UI side...?? Ex : apply fiilters like Display columns by, Show non-zero or active , Compare another period, Accounting method using this sdk.

I have made it possible by updating this class src/ReportService/ReportService.php to prepare $httpRequestUri based on the url they are preparing while clicking on to run report. Is it the correct way to fullfil requirements for filters ? or is there any other way available in sdk??

Please guide.

Screenshot from 2022-07-21 15-03-41 .

chas688 commented 2 years ago

I have similar issues, but what I have done is create a service layer between the SDK and my application where I just filter down what I need. I tend to use the QBO API as a "kitchen sink" method and then do my own filters from that point. Because I use the SDK as well as my own database layer, the service layer handles which query needs to go to what data source. Also I use the service layer to handle all the Oauth2 stuff between my database and the API.

pjp-comp commented 2 years ago

Thanks @chas688 i did the same thing by copied that class out side of sdk in my library and addon according my requirements..