<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Sort Chart of Accounts by name]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7134&amp;type=atom" />
	<updated>2017-11-19T07:13:51Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=7134</id>
		<entry>
			<title type="html"><![CDATA[Re: Sort Chart of Accounts by name]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29668#p29668" />
			<content type="html"><![CDATA[<p><a href="https://github.com/FrontAccountingERP/FA/commit/4a69b00fd33fac15b82e68ef3e6a5cdae8bd6088">Committed</a>.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2017-11-19T07:13:51Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29668#p29668</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Sort Chart of Accounts by name]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29667#p29667" />
			<content type="html"><![CDATA[<p>The following fixes it:<br /></p><div class="codebox"><pre><code>--- admin/inst_chart.php    Thu Nov 12 03:19:51 2015
+++ admin/inst_chart.php    Sun Nov 19 12:15:49 2017
@@ -42,6 +42,10 @@
     install_extension($id);
 
 //---------------------------------------------------------------------------------------------
+function sortByOption($a, $b) {
+    return strcmp($a[&#039;name&#039;], $b[&#039;name&#039;]);
+}
+
 start_form(true);
 
     div_start(&#039;ext_tbl&#039;);
@@ -52,6 +56,8 @@
         display_note(_(&quot;No optional chart of accounts is currently available.&quot;));
     else
     {
+        uasort($mods, &#039;sortByOption&#039;);
+
         $th = array(_(&quot;Chart&quot;),  _(&quot;Installed&quot;), _(&quot;Available&quot;), _(&quot;Encoding&quot;), &quot;&quot;, &quot;&quot;);
         $k = 0;
 </code></pre></div><p>@joe: would you like to commit it?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-11-19T06:55:27Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29667#p29667</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Sort Chart of Accounts by name]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29663#p29663" />
			<content type="html"><![CDATA[<p>When we are installing Charts of Accounts, as the list is long and many non standard custom ones with numerical indices will be available in the array of charts details that countries with a set of charts will be far apart making searching difficult.</p><p>Unlike languages which must start with the lang code, the charts can pretty much be anything, the name comes in handy when it denotes the country primarily though some start with number of digits in the account code.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-11-18T17:18:29Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29663#p29663</id>
		</entry>
</feed>
