Closed basherr closed 7 years ago
Or you could just send in true
as a string instead of Boolean.
->where('Job', '=', 'true')
I'm not a fan of automatically correcting user's input under the hood.
@khairulashraff The suggestion does not seem to work as well. Here's what I get in response from QB.
System Failure Error: java.lang.String cannot be cast to java.lang.Boolean
Indeed you are correct. where()
is wrapped in a quote hence will always be a string.
I have added (https://github.com/rangka/quickbooks/commit/4f716f895e9ad90e4b0dc64ed2245a1bc6456780) according to your second suggestion except skipping the operator argument. I don't think there's any less or greater for a boolean value.
Thanks!
@khairulashraff Thanks
As of php Boolean value is being converted to either 1 or 0 while Quickbooks does not accept such parameters for Boolean values and will throw error as of
value 1/0 is not recognized for such parameter
. I've faced the issue while fetching jobs for the customer.I've come up with solution by adding a method for Bool values which fix that. Would you please add this code in Query.php or let me know if there is any alternate solution.
Or another solution would be
Thanks