Page 1 of 1

different queries are all returning the same data.

PostPosted: Thu Feb 25, 2021 12:43 pm
by JuiceyBrucey
/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

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

PostPosted: Thu Feb 25, 2021 1:04 pm
by Mike.Sheen
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.

Re: different queries are all returning the same data.

PostPosted: Fri Feb 26, 2021 4:23 pm
by JuiceyBrucey
Thank you Mike, that has cleared a lot up.
Cheers
this is resolved.

Re: different queries are all returning the same data.

PostPosted: Sun Feb 28, 2021 10:58 am
by JuiceyBrucey
how do I mark my posts as resolved?

Re: different queries are all returning the same data.

PostPosted: Mon Mar 01, 2021 12:09 pm
by Scott.Pearce
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

Re: different queries are all returning the same data.

PostPosted: Wed Mar 10, 2021 11:58 am
by Scott.Pearce
Moved to appropriate forum.