<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Sales Order Inquiry Sort Descending?]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=8637</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8637&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Sales Order Inquiry Sort Descending?.]]></description>
		<lastBuildDate>Mon, 20 Jan 2020 03:16:43 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Sales Order Inquiry Sort Descending?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36860#p36860</link>
			<description><![CDATA[<p>@paul: highlighting the the two similar lines will expose trailing spaces in the one to be removed.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Mon, 20 Jan 2020 03:16:43 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36860#p36860</guid>
		</item>
		<item>
			<title><![CDATA[Re: Sales Order Inquiry Sort Descending?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36859#p36859</link>
			<description><![CDATA[<p>Thank you very much. I thought I would get a notice of more replies to this post, but don&#039;t remember getting one. Anyways, thank you. I will apply patch when I can. The last line to add looks like the one above it to remove. ??</p>]]></description>
			<author><![CDATA[null@example.com (paul)]]></author>
			<pubDate>Mon, 20 Jan 2020 03:01:07 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36859#p36859</guid>
		</item>
		<item>
			<title><![CDATA[Re: Sales Order Inquiry Sort Descending?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36800#p36800</link>
			<description><![CDATA[<p>Thanks @joe.</p><p>Whilst we are on this, we might as well optimise the sql in the last function in <strong>sales/includes/db/sales_order_db.inc</strong> with:<br /></p><div class="codebox"><pre><code>--- sales/includes/db/sales_order_db.inc    Tue Jan 14 05:30:15 2020
+++ sales/includes/db/sales_order_db.inc    Tue Jan 14 05:42:21 2020
@@ -632,11 +632,9 @@
 {
         $sql = &quot;SELECT $field
             FROM &quot;.TB_PREF.&quot;sales_order_details d
-            WHERE order_no =
-            (SELECT order_no FROM &quot;.TB_PREF.&quot;sales_orders o
+            LEFT JOIN &quot; .TB_PREF.&quot;sales_orders o on d.order_no=o.order_no
             WHERE debtor_no=&quot; . db_escape($order-&gt;customer_id) . &quot;
-            ORDER BY order_no DESC LIMIT 1)
-            ORDER BY d.id DESC LIMIT 1&quot;;        
+            ORDER BY d.id DESC LIMIT 1&quot;;
 
         $last_query=db_query($sql, &quot;Could not retrieve last order detail&quot;);
         $row = db_fetch_row($last_query);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Tue, 14 Jan 2020 00:28:06 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36800#p36800</guid>
		</item>
		<item>
			<title><![CDATA[Re: Sales Order Inquiry Sort Descending?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36797#p36797</link>
			<description><![CDATA[<p>This has been committed to 2.4.7 stable repo.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Mon, 13 Jan 2020 14:55:39 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36797#p36797</guid>
		</item>
		<item>
			<title><![CDATA[Re: Sales Order Inquiry Sort Descending?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36795#p36795</link>
			<description><![CDATA[<p>I will have a look at it later.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Mon, 13 Jan 2020 14:19:00 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36795#p36795</guid>
		</item>
		<item>
			<title><![CDATA[Re: Sales Order Inquiry Sort Descending?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36792#p36792</link>
			<description><![CDATA[<p>@joe: can this be incorporated into the core?</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Mon, 13 Jan 2020 08:50:11 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36792#p36792</guid>
		</item>
		<item>
			<title><![CDATA[Re: Sales Order Inquiry Sort Descending?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36770#p36770</link>
			<description><![CDATA[<p>@paul</p><p>You are right.. I believe it should be as you described it.. Its more user friendly.. (logical).</p>]]></description>
			<author><![CDATA[null@example.com (rafat)]]></author>
			<pubDate>Tue, 07 Jan 2020 14:20:55 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36770#p36770</guid>
		</item>
		<item>
			<title><![CDATA[Re: Sales Order Inquiry Sort Descending?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36769#p36769</link>
			<description><![CDATA[<p>@rafat</p><p>Yes, thank you. That is what I do now, but since I need it that way every time, I wanted to make it &quot;stick&quot; so I didn&#039;t have to click on the Order Date twice.</p>]]></description>
			<author><![CDATA[null@example.com (paul)]]></author>
			<pubDate>Tue, 07 Jan 2020 14:17:47 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36769#p36769</guid>
		</item>
		<item>
			<title><![CDATA[Re: Sales Order Inquiry Sort Descending?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36768#p36768</link>
			<description><![CDATA[<p>@paul</p><p>Click on the Order Date (I think Twice) and it will be sorted by the latest date.</p>]]></description>
			<author><![CDATA[null@example.com (rafat)]]></author>
			<pubDate>Tue, 07 Jan 2020 14:15:06 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36768#p36768</guid>
		</item>
		<item>
			<title><![CDATA[Sales Order Inquiry Sort Descending?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36767#p36767</link>
			<description><![CDATA[<p>When I select Sales Order Inquiry, I would like the most recent orders on top just like the Work Order Inquiry returns newest Work Orders on top. When I watch the sql query for the Work Order Inquiry, I get an idea how it works with the &quot;ORDER BY workorder.id DESC&quot; portion of the statement, but after going through the included files for the Sales Order Inquiry, I cannot seem to find the correct area to sort my Sales Orders.</p><p>&nbsp; Could someone point me in the right direction? Thanks in advance.</p>]]></description>
			<author><![CDATA[null@example.com (paul)]]></author>
			<pubDate>Tue, 07 Jan 2020 14:07:23 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36767#p36767</guid>
		</item>
	</channel>
</rss>
