<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — How to Let FA Accept Classes/Types ID's Characters]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=1035&amp;type=atom" />
	<updated>2010-02-02T16:16:54Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=1035</id>
		<entry>
			<title type="html"><![CDATA[Re: How to Let FA Accept Classes/Types ID's Characters]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=4627#p4627" />
			<content type="html"><![CDATA[<p>Hello, I have put your topic into the developers mailing list, Khaled.<br />We are having a good discussion here in the developers mailing list, and it seems to go your way, thanks to among others, Tom Hallman, US.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2010-02-02T16:16:54Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=4627#p4627</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to Let FA Accept Classes/Types ID's Characters]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=4621#p4621" />
			<content type="html"><![CDATA[<p>I see. Please Khaled, enter this topic in the developers mailing list. So we can have the material inside one thread here.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2010-02-02T01:17:42Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=4621#p4621</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to Let FA Accept Classes/Types ID's Characters]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=4618#p4618" />
			<content type="html"><![CDATA[<p>hi,</p><p>I am very glad that you are thinking to include this approach in 2.3.</p><p>RE : CHAR 15</p><p>0. The philosophy behind it is described as below :<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; suppose you have an account number 11006050</p><p>&nbsp; &nbsp; practically it is composed as :&nbsp; &nbsp; &nbsp; &nbsp; 1&nbsp; 100&nbsp; 1060</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;where :&nbsp; 1&nbsp; &nbsp; &nbsp; -&gt;&nbsp; refer to the Class&nbsp; account it belongs<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp;-&gt;&nbsp; refer to the Group account it belongs<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1060 -&gt;&nbsp; refer to the Account</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />1. Practically for a single company : CHAR 11&nbsp; &nbsp; &nbsp; is sure enough.</p><p>2. Using CHAR 15 will be helfull in the case of having a company with multiple <br />&nbsp; &nbsp; branshes. In this case,<br />&nbsp; &nbsp; &nbsp; &nbsp; -&nbsp; the first 11 char will be used to the company account <br />&nbsp; &nbsp; &nbsp; &nbsp; -&nbsp; and the last 4 char are to be used for the company branshes.<br />&nbsp; &nbsp; &nbsp; &nbsp; -&nbsp; in such a case , company with multiple branshes, you will have many<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;accounts with the same numbers :<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 11001060-010<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 11001060-020<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 11001060-030<br />&nbsp; &nbsp; &nbsp; &nbsp; Later on, and when you decide print &quot; Balance Sheet &quot; of any Bransh, it <br />&nbsp; &nbsp; &nbsp; &nbsp; can be isolated easely by queyring the database to the selected bransh <br />&nbsp; &nbsp; &nbsp; &nbsp; (010&nbsp; for example). A similar approach can also be developed to the <br />&nbsp; &nbsp; &nbsp; &nbsp; global company Balance Sheet.</p><br /><p>Thanks,</p><br /><p>Khaled</p>]]></content>
			<author>
				<name><![CDATA[Kalido]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=434</uri>
			</author>
			<updated>2010-02-01T21:22:57Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=4618#p4618</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to Let FA Accept Classes/Types ID's Characters]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=4612#p4612" />
			<content type="html"><![CDATA[<p>We are having a discussiong regarding this in the developers mailing list. Please participate here. However, I see no reason to increase the account code field from 11 to 15 characters.<br />If the discussion find this ok, it will be implemented in 2.3</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2010-02-01T13:57:30Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=4612#p4612</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to Let FA Accept Classes/Types ID's Characters]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=4550#p4550" />
			<content type="html"><![CDATA[<p>Errata :</p><p> * includes/ui/ui_lists.inc<br />&nbsp; &nbsp; &nbsp; &nbsp;&#039;order&#039; =&gt; array(&#039;account_code&#039;,&#039;type.id&#039;),&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // FA Original :&nbsp; array(&#039;type.id&#039;,&#039;account_code&#039;),<br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;should keep it as FA Original : array(&#039;type.id&#039;,&#039;account_code&#039;),</p><br /><p>khaled</p>]]></content>
			<author>
				<name><![CDATA[Kalido]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=434</uri>
			</author>
			<updated>2010-01-25T06:05:56Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=4550#p4550</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[How to Let FA Accept Classes/Types ID's Characters]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=4517#p4517" />
			<content type="html"><![CDATA[<p>Hello,</p><p>Find bellow a simple way to let the outstanding FA package support characters ID&#039;s in the Classes/Types Accounts.</p><br /><p>1 - use en_US-Demo.sql&nbsp; &amp; en_US-New.sql Supporting Classes/Types Characters <br />&nbsp; &nbsp; &nbsp;id&#039;s. This will be done easly by changing :</p><p>&nbsp; &nbsp; &nbsp; &nbsp;- all varchar(11) should be changed to varchar(15) in the .sql file</p><p>&nbsp; &nbsp; &nbsp; &nbsp;- CREATE TABLE `0_chart_class` (<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;`cid` varchar(3) NOT NULL default &#039;&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;`class_name` varchar(60) NOT NULL default &#039;&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;`ctype` tinyint(1) NOT NULL default &#039;0&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;`inactive` tinyint(1) NOT NULL default &#039;0&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PRIMARY KEY&nbsp; (`cid`)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ) TYPE=MyISAM&nbsp; ;</p><p>&nbsp; &nbsp; &nbsp; &nbsp;- CREATE TABLE `0_chart_master` (<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;`account_code` varchar(15) NOT NULL default &#039;&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;`account_code2` varchar(15) default &#039;&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;`account_name` varchar(60) NOT NULL default &#039;&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;`account_type` varchar(10) NOT NULL default &#039;0&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;`inactive` tinyint(1) NOT NULL default &#039;0&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PRIMARY KEY&nbsp; (`account_code`),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; KEY `account_code` (`account_code`),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; KEY `account_name` (`account_name`)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ) TYPE=MyISAM&nbsp; ;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; - CREATE TABLE `0_chart_types` (<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;`id` varchar(10) NOT NULL default &#039;&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;`name` varchar(60) NOT NULL default &#039;&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;`class_id` varchar(3) NOT NULL default &#039;0&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;`parent` varchar(10) NOT NULL default &#039;-1&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;`inactive` tinyint(1) NOT NULL default &#039;0&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PRIMARY KEY&nbsp; (`id`),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; KEY `name` (`name`)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ) TYPE=MyISAM;</p><p> 2 - do those simple modifications in the bellow files :</p><p>&nbsp; &nbsp; * gl/includes/db/gl_db_account_types.inc</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - function add_account_type<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $sql = &quot;INSERT INTO &quot;.TB_PREF.&quot;chart_types (id, name, class_id, parent)<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;VALUES (&quot;.db_escape($id).&quot;, &quot;.db_escape($name).&quot;, &quot;.db_escape<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ($class_id).&quot;, &quot;.db_escape($parent).&quot;)&quot;;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// FA original was&nbsp; : VALUES ( $id,.......</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - function get_account_types<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$sql .= &quot; ORDER BY class_id, id, parent &quot;; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // FA Original : &quot; ORDER BY class_id, id&quot;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - function get_account_classes<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$sql .= &quot; ORDER BY ctype,cid&quot;;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//&nbsp; FA Original : &quot; ORDER BY cid&quot;</p><p>&nbsp; &nbsp; * gl/manage/gl_account_classes.php<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1. comment the following lines:<br />&nbsp; &nbsp; &nbsp; /* if (!is_numeric($_POST[&#039;id&#039;])) <br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;{<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;display_error( _(&quot;The account class ID must be numeric.&quot;));<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set_focus(&#039;id&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return false;<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; } <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2. in the delete check :<br />&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; $sql= &quot;SELECT COUNT(*) FROM &quot;.TB_PREF.&quot;chart_types<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHERE class_id=&quot;.db_escape($selected_id).&quot; &quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// FA Original:&nbsp; class_id=$selected_id</p><p>&nbsp; &nbsp; &nbsp;* gl/manage/gl_account_types.php<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1. comment the following lines:<br />&nbsp; &nbsp; /*&nbsp; &nbsp;if (!input_num(&#039;id&#039;))<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;display_error( _(&quot;The account id must be an integer and cannot <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;be empty.&quot;));<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;set_focus(&#039;id&#039;);<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return false;<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2. minor changes:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- $th = array(_(&quot;Group ID&quot;), _(&quot;Group Name&quot;), _(&quot;Subgroup Of&quot;), <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _(&quot;Class Type&quot;), &quot;&quot;, &quot;&quot;);&nbsp; &nbsp; // khaled : ID ; Name</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- if ($myrow[&quot;parent&quot;] == &quot;0&quot;) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //FA Original :&nbsp; &nbsp;if ($myrow[&quot;parent&quot;]== ANY_NUMERIC) <br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; * gl/manage/gl_accounts.php<br />&nbsp; &nbsp; - text_row_ex(_(&quot;Account Code:&quot;), &#039;account_code&#039;, 15);&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//FA Original was 11<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&nbsp; text_row_ex(_(&quot;Account Code 2:&quot;), &#039;account_code2&#039;, 15);&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //FA Original was 11</p><p>&nbsp; &nbsp; &nbsp; &nbsp;* includes/ui/ui_lists.inc<br />&nbsp; &nbsp; &nbsp; &nbsp;&#039;order&#039; =&gt; array(&#039;account_code&#039;,&#039;type.id&#039;),&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // FA Original :&nbsp; array(&#039;type.id&#039;,&#039;account_code&#039;),</p><br /><p>Should also change in config.php : $accounts_alpha = 1;</p><p>I hope you will find those modifications usefull.</p><p>Finally, This is how I use FA &amp; in every new version I do those modifications.</p><p>Regards,</p><br /><p>Khaled</p>]]></content>
			<author>
				<name><![CDATA[Kalido]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=434</uri>
			</author>
			<updated>2010-01-21T22:56:51Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=4517#p4517</id>
		</entry>
</feed>
