<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Account & Account Type Ordering]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=1776</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=1776&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Account & Account Type Ordering.]]></description>
		<lastBuildDate>Thu, 09 Sep 2021 19:45:09 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Account & Account Type Ordering]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=39984#p39984</link>
			<description><![CDATA[<p>Indeed, could the sortorder be a selectable preference ?</p><p>In Belgium :</p><p> Equity is #1<br /> cost is #6<br /> income is #7 </p><p>...</p><p>Ordering classes/groups/accounts on &#039;ID&#039; is more appropriate, rather than hardcoded &#039;type&#039;.</p><p>Thanks,</p><p>F.</p>]]></description>
			<author><![CDATA[null@example.com (advocaat.pollet)]]></author>
			<pubDate>Thu, 09 Sep 2021 19:45:09 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=39984#p39984</guid>
		</item>
		<item>
			<title><![CDATA[Re: Account & Account Type Ordering]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=28659#p28659</link>
			<description><![CDATA[<p>Sorry Joe, I may have confused you with my lack of understanding of how the code worked... please ignore last post</p>]]></description>
			<author><![CDATA[null@example.com (poncho1234)]]></author>
			<pubDate>Mon, 18 Sep 2017 20:03:37 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=28659#p28659</guid>
		</item>
		<item>
			<title><![CDATA[Re: Account & Account Type Ordering]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=28651#p28651</link>
			<description><![CDATA[<p>I am a little confused over this.</p><p>Calculating the Detailed Balances is done recursively. You can have several levels of types. This is the reason for presenting it this way.</p><p>Maybe someone can help me to get the calculation correct if we change the order of types.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sun, 17 Sep 2017 14:20:58 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=28651#p28651</guid>
		</item>
		<item>
			<title><![CDATA[Re: Account & Account Type Ordering]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=28641#p28641</link>
			<description><![CDATA[<p>@ Joe, not sure if this is an easier option:-</p><p>Leave account types as they are, (as a non-accountant and looking at the code above I&#039;m assuming FA calculates in a different way by type) but when creating trial balance (in program or as a report) and printing COA etc. sort by ID not type? You&#039;ve probably already considered this..</p>]]></description>
			<author><![CDATA[null@example.com (poncho1234)]]></author>
			<pubDate>Fri, 15 Sep 2017 17:27:16 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=28641#p28641</guid>
		</item>
		<item>
			<title><![CDATA[Re: Account & Account Type Ordering]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=28640#p28640</link>
			<description><![CDATA[<p>Yes, I will have a look at this.&nbsp; Though it is more complicated than that. But I understand the question.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Fri, 15 Sep 2017 16:49:24 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=28640#p28640</guid>
		</item>
		<item>
			<title><![CDATA[Re: Account & Account Type Ordering]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=28633#p28633</link>
			<description><![CDATA[<p>@joe: makes sense.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Fri, 15 Sep 2017 14:36:55 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=28633#p28633</guid>
		</item>
		<item>
			<title><![CDATA[Re: Account & Account Type Ordering]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=28629#p28629</link>
			<description><![CDATA[<p>Is there any reason why this cannot be default in FA?<br />Why? In Colombia expenses is #5 and cost of goods sold #6 so when viewing/ printing COA, trial balance etc we get the order 1,2,3,4,6,5&nbsp; so therefore have to download to excel and sort from there.</p>]]></description>
			<author><![CDATA[null@example.com (poncho1234)]]></author>
			<pubDate>Fri, 15 Sep 2017 04:06:24 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=28629#p28629</guid>
		</item>
		<item>
			<title><![CDATA[Account & Account Type Ordering]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=7832#p7832</link>
			<description><![CDATA[<p>I prefer to see accounts and account types ordered by ID, and not by type.</p><p>I&#039;ve made the following modifications:</p><div class="codebox"><pre><code>--- gl/includes/db/gl_db_account_types.inc.ORIGINAL    2010-12-10 14:12:42.000000000 +0100
+++ gl/includes/db/gl_db_account_types.inc        2010-12-14 12:04:16.000000000 +0100
@@ -71,7 +71,7 @@ function get_account_types($all=false, $
 
     if (count($where))
         $sql .= &#039; WHERE &#039;.implode(&#039; AND &#039;, $where);
-    $sql .= &quot; ORDER BY class_id, id, parent&quot;;
+    $sql .= &quot; ORDER BY id, parent&quot;;
 
     return db_query($sql, &quot;could not get account types&quot;);
 }
@@ -128,7 +128,7 @@ function get_account_classes($all=false,
         $sql .= &quot; AND ctype&gt;&quot;.CL_EQUITY.&quot; OR ctype=0&quot;;
     elseif ($balance == 1) 
         $sql .= &quot; AND ctype&gt;0 AND ctype&lt;&quot;.CL_INCOME; 
-    $sql .= &quot; ORDER BY ctype, cid&quot;;
+    $sql .= &quot; ORDER BY cid&quot;;
 
     return db_query($sql, &quot;could not get account classes&quot;);
 }
--- includes/ui/ui_lists.inc.ORIGINAL            2010-12-10 14:12:42.000000000 +0100
+++ includes/ui/ui_lists.inc                2010-12-17 15:45:28.000000000 +0100
@@ -1547,7 +1547,7 @@ function gl_account_types_list($name, $s
     return combo_input($name, $selected_id, $sql, &#039;id&#039;, &#039;name&#039;,
     array(
         &#039;format&#039; =&gt; &#039;_format_account&#039;,
-        &#039;order&#039; =&gt; array(&#039;class_id&#039;, &#039;id&#039;, &#039;parent&#039;),
+        &#039;order&#039; =&gt; array(&#039;id&#039;, &#039;parent&#039;),
         &#039;spec_option&#039; =&gt;$all_option,
         &#039;spec_id&#039; =&gt; $all_items
     ) );
@@ -1592,7 +1592,7 @@ function gl_all_accounts_list($name, $se
         &#039;spec_option&#039; =&gt; $all_option===true ?  _(&quot;Use Item Sales Accounts&quot;) : $all_option,
         &#039;spec_id&#039; =&gt; &#039;&#039;,
         &#039;type&#039; =&gt; 2,
-        &#039;order&#039; =&gt; array(&#039;type.class_id&#039;,&#039;type.id&#039;,&#039;account_code&#039;),
+        &#039;order&#039; =&gt; array(&#039;type.id&#039;,&#039;account_code&#039;),
         &#039;search_box&#039; =&gt; $cells,
             &#039;search_submit&#039; =&gt; false,
             &#039;size&#039; =&gt; 12,
@@ -1608,7 +1608,13 @@ function gl_all_accounts_list($name, $se
 
 function _format_account($row)
 {
-        return $row[0] .  &quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot; . $row[1];
+        $return = $row[0];
+        $rlen = strlen($return);
+        if ($rlen &gt; 6) $rlen = 6;
+        for ($i = $rlen; $i &lt; 9; $i++) {
+            $return .= &quot;&amp;nbsp;&amp;nbsp;&quot;;
+        }
+        return $return . $row[1];
 }
 
 function gl_all_accounts_list_cells($label, $name, $selected_id=null,</code></pre></div><p>Maybe it would be good to have a setting (option) about that - to display them ordered by type, or by ID (maybe even by name as well)?</p>]]></description>
			<author><![CDATA[null@example.com (LUTi)]]></author>
			<pubDate>Mon, 27 Dec 2010 14:02:01 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=7832#p7832</guid>
		</item>
	</channel>
</rss>
