different queries are all returning the same data.  Topic is solved

Discussions relating to the REST API of Jiwa 7.

different queries are all returning the same data.

Postby JuiceyBrucey » Thu Feb 25, 2021 12:43 pm

/Queries/SalesOrderList
/Queries/SalesQuoteList
Queries/SO_Main?DebtorID=".$debtorId."&OrderBy=LastSavedDateTime&Take=".$limit."&Skip=".$start."";

Are all returning the same data.
Is there a way of only getting quotes or only getting orders?
Do they come from the same table and only differ by order type?
Thank you.
Cheers
JuiceyBrucey
Frequent Contributor
Frequent Contributor
 
Posts: 132
Joined: Tue Aug 18, 2020 7:19 pm
Topics Solved: 1

Re: different queries are all returning the same data.  Topic is solved

Postby Mike.Sheen » Thu Feb 25, 2021 1:04 pm

JuiceyBrucey wrote:Are all returning the same data.


Nah - just the /Queries/SalesOrderList and Queries/SO_Main are reporting of the same underlying data. Queries/SO_Main is just the SO_Main table, /Queries/SalesOrderList joins in a few other tables (such as DB_Main to get the debtor name).

Queries/SalesQuoteList is giving you quotes - from the QO_Main table - it just looks remarkably similar - and what doesn't help is our quote table has fields like InvoiceId and InvoiceNo, which might trick you into thinking they are sales orders.

Compare the two results:

https://api.jiwa.com.au/Queries/SalesOr ... =InvoiceNo

https://api.jiwa.com.au/Queries/SalesQu ... =InvoiceNo

Look closely at the Invoice Id and also the debtor for each - they are different.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: different queries are all returning the same data.

Postby JuiceyBrucey » Fri Feb 26, 2021 4:23 pm

Thank you Mike, that has cleared a lot up.
Cheers
this is resolved.
JuiceyBrucey
Frequent Contributor
Frequent Contributor
 
Posts: 132
Joined: Tue Aug 18, 2020 7:19 pm
Topics Solved: 1

Re: different queries are all returning the same data.

Postby JuiceyBrucey » Sun Feb 28, 2021 10:58 am

how do I mark my posts as resolved?
JuiceyBrucey
Frequent Contributor
Frequent Contributor
 
Posts: 132
Joined: Tue Aug 18, 2020 7:19 pm
Topics Solved: 1

Re: different queries are all returning the same data.

Postby Scott.Pearce » Mon Mar 01, 2021 12:09 pm

JuiceyBrucey wrote:how do I mark my posts as resolved?


It looks like you've figured it out, but for others, you click the little checkmark button at the top right of the post that provided the answer:

Screenshot 2021-03-01 120819.png
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 742
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221

Re: different queries are all returning the same data.

Postby Scott.Pearce » Wed Mar 10, 2021 11:58 am

Moved to appropriate forum.
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 742
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221


Return to REST API

Who is online

Users browsing this forum: No registered users and 2 guests