<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Account & Account Type Ordering]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=1776&amp;type=atom" />
	<updated>2021-09-09T19:45:09Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=1776</id>
		<entry>
			<title type="html"><![CDATA[Re: Account & Account Type Ordering]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=39984#p39984" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[advocaat.pollet]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=46170</uri>
			</author>
			<updated>2021-09-09T19:45:09Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=39984#p39984</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Account & Account Type Ordering]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28659#p28659" />
			<content type="html"><![CDATA[<p>Sorry Joe, I may have confused you with my lack of understanding of how the code worked... please ignore last post</p>]]></content>
			<author>
				<name><![CDATA[poncho1234]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19944</uri>
			</author>
			<updated>2017-09-18T20:03:37Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28659#p28659</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Account & Account Type Ordering]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28651#p28651" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2017-09-17T14:20:58Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28651#p28651</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Account & Account Type Ordering]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28641#p28641" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[poncho1234]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19944</uri>
			</author>
			<updated>2017-09-15T17:27:16Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28641#p28641</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Account & Account Type Ordering]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28640#p28640" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2017-09-15T16:49:24Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28640#p28640</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Account & Account Type Ordering]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28633#p28633" />
			<content type="html"><![CDATA[<p>@joe: makes sense.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-09-15T14:36:55Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28633#p28633</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Account & Account Type Ordering]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28629#p28629" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[poncho1234]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19944</uri>
			</author>
			<updated>2017-09-15T04:06:24Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28629#p28629</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Account & Account Type Ordering]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=7832#p7832" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[LUTi]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=597</uri>
			</author>
			<updated>2010-12-27T14:02:01Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=7832#p7832</id>
		</entry>
</feed>
