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

>= Operator Unexpected Results #460

Closed hyphen81 closed 2 years ago

hyphen81 commented 2 years ago

I have a bill in the sandbox that has a date of 8/1/2022. This query returns no results:

Select * from Bill where VendorRef = 'my-vendor-ref-id' and TxnDate >= '2022-08-01' and TxnDate <= '2022-08-31' and Balance != '0.00' startposition 1

I went into the sandbox account and adjusted the bill date to 8/2/2022 and re-ran the query and it returned the bill.

The docs seem to indicate that providing a date (not a datetime) will work as I have it configured, but the results seem to indicate otherwise.

The docs use this specific example where it's just a date, not a datetime:

SELECT * FROM Invoice WHERE TxnDate > '2011-01-01' AND TxnDate <= CURRENT_DATE

Is this an issue, or am I doing something wrong?

hyphen81 commented 2 years ago

I think the STARTPOSITION and/or MAXRESULTS might have been causing me problems. I've adjusted my query and it seems to be returning the right records now.