<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Debit Credit Error on Trial Balance]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8761&amp;type=atom" />
	<updated>2020-09-06T09:43:21Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=8761</id>
		<entry>
			<title type="html"><![CDATA[Re: Debit Credit Error on Trial Balance]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38289#p38289" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>anoopmb wrote:</cite><blockquote><p>Hi, </p><p>I think <a href="https://github.com/anoopmb/FAApprovalSystem">Approval System for GL Transactions</a> should work fine here. Refer <a href="https://frontaccounting.com/punbb/viewtopic.php?id=7525">Forum Post</a>.</p><p>So system administrator/Accountant&nbsp; can review and approve it.</p></blockquote></div><p>Hi anoobpmb, I just read this thread and I agree. It is possible and often necessary to credit an account with a normal debit balance and vice versa. Your solution is the most ideal, as is the script suggested by kvvaradha and the comments of joe and detkenn.</p><p>I look forward to receiving the files for Version 2.4.8 of your Approval System for GL Transactions.</p><p>Celito</p>]]></content>
			<author>
				<name><![CDATA[ccmacachor]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=45610</uri>
			</author>
			<updated>2020-09-06T09:43:21Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38289#p38289</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Debit Credit Error on Trial Balance]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37540#p37540" />
			<content type="html"><![CDATA[<p>@joe can this be included into the core with a Company Setup flag in sysprefs table?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2020-05-17T16:49:49Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37540#p37540</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Debit Credit Error on Trial Balance]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37537#p37537" />
			<content type="html"><![CDATA[<p>@anoopmb, you are right, its useful module here. But where the company has less people and try that. its double work for them to do it. So the first solution, we applied there is for the small companies or those who handles FA functions totally.</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2020-05-16T17:44:12Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37537#p37537</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Debit Credit Error on Trial Balance]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37535#p37535" />
			<content type="html"><![CDATA[<p>Hi, </p><p>I think <a href="https://github.com/anoopmb/FAApprovalSystem">Approval System for GL Transactions</a> should work fine here. Refer <a href="https://frontaccounting.com/punbb/viewtopic.php?id=7525">Forum Post</a>.</p><p>So system administrator/Accountant&nbsp; can review and approve it.</p>]]></content>
			<author>
				<name><![CDATA[anoopmb]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18207</uri>
			</author>
			<updated>2020-05-16T14:28:11Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37535#p37535</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Debit Credit Error on Trial Balance]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37499#p37499" />
			<content type="html"><![CDATA[<p>Petty cash is treated like a bank account in FA. That is why you will find it in the <strong>bank_accounts</strong> table (check using the standard Chart of Accounts with demo data).</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2020-05-14T09:00:18Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37499#p37499</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Debit Credit Error on Trial Balance]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37471#p37471" />
			<content type="html"><![CDATA[<p>okay, but how do you record for example a payment of a small amount like 2 dollars? Are you writing a check?</p><p>I believe the petty cash is not a bank account right? It&#039;s money kept at hand by the petty cashier I believe for quick transactions that do not require writing of a check and making small payments like perdiems, transportation, fuel etc..</p><p>Regards</p>]]></content>
			<author>
				<name><![CDATA[cedricktshiyoyo]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=45118</uri>
			</author>
			<updated>2020-05-11T16:24:23Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37471#p37471</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Debit Credit Error on Trial Balance]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37469#p37469" />
			<content type="html"><![CDATA[<p>All money is belonging to a bank account. Even small cash accounts. This is to keep it safe. When operating where money is included, you can better use the deposit or payment form.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2020-05-11T16:00:23Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37469#p37469</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Debit Credit Error on Trial Balance]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37467#p37467" />
			<content type="html"><![CDATA[<p>@detkenn I don&#039;t think using payment is good idea, I don&#039;t know if you have noticed, <br />when you make an entry using payment, only bank accounts are listed, there is no other accounts. <br />Maybe our seniors can help also clarify for us, why is that so?<br />I believe we are all here to contribute with ideas not only coding but also provide our experts like @joe with our insights to make FA the best of the best.</p><p>With that in mind, I am bringing this illustration;</p><p>Not all payments are done through bank transactions right? Assuming I need to make a payment of $2, am I going to write a check for that amount?<br />The petty cashier is often given a certain amount of money at hand to pay for small transactions, now when He you process a payment, the petty cash must be credited and the other account debited.</p><p>Is there a possibility to allow a cash account (WHICH IS NOT BANK ACCOUNT) (if not all asset accounts) to appear in the list when processing a payment? @joe</p><p>Regards to all</p><p>Cedrick</p>]]></content>
			<author>
				<name><![CDATA[cedricktshiyoyo]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=45118</uri>
			</author>
			<updated>2020-05-11T15:02:05Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37467#p37467</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Debit Credit Error on Trial Balance]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37466#p37466" />
			<content type="html"><![CDATA[<p>As some of you guys mention, the Gl journal entries are for direct entries without any restrictions. And it should be so in My opinion.<br />Please use the more easy routines for transactions if you are unsure.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2020-05-11T14:33:47Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37466#p37466</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Debit Credit Error on Trial Balance]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37463#p37463" />
			<content type="html"><![CDATA[<p>In that case, I agree with you. <br />@Joe should consider integrating it to the core.</p>]]></content>
			<author>
				<name><![CDATA[detkenn]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=45282</uri>
			</author>
			<updated>2020-05-11T11:50:35Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37463#p37463</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Debit Credit Error on Trial Balance]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37460#p37460" />
			<content type="html"><![CDATA[<p>@detkenn - not everyone is expert in accounting.&nbsp; Sometimes a learning accountant,&nbsp; like new joiny or new person, might make mistake in account selection. And sometimes by mistake. We might choose wrong account and input it by accidently, in this cases the careless mistake can be highlighted. Most of accounting software&#039;s&nbsp; also have this feature to check before make entries. </p><p>Hope this feature would be helpful for others.</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2020-05-10T18:31:04Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37460#p37460</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Debit Credit Error on Trial Balance]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37459#p37459" />
			<content type="html"><![CDATA[<p>In my opinion, Journal Entries are meant to affect selected account on either side of debit or credit. Should any side be pre-assumed as default for certain account types?.<br />You can use Payments module to post expenses and you wont have to worry about wrong posting.</p>]]></content>
			<author>
				<name><![CDATA[detkenn]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=45282</uri>
			</author>
			<updated>2020-05-10T16:00:06Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37459#p37459</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Debit Credit Error on Trial Balance]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37458#p37458" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>cedricktshiyoyo wrote:</cite><blockquote><p>A thousand times thanks brother @kvvaradha . The code worked perfectly. <br />This was exactly what I needed. I will modify it little bit with your permission for other accounts too.</p><p>Big thanks again!!!</p></blockquote></div><p>That&#039;s good to hear it. </p><p> If you modify the code, I feel it&#039;s very much usefull to FA&nbsp; community. So provide it for us to update FA&nbsp; core.</p><p>@Joe,&nbsp; can you check this to update it to core. May be its useful feature for others.</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2020-05-10T11:59:56Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37458#p37458</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Debit Credit Error on Trial Balance]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37457#p37457" />
			<content type="html"><![CDATA[<p>A thousand times thanks brother @kvvaradha . The code worked perfectly. <br />This was exactly what I needed. I will modify it little bit with your permission for other accounts too.</p><p>Big thanks again!!!</p>]]></content>
			<author>
				<name><![CDATA[cedricktshiyoyo]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=45118</uri>
			</author>
			<updated>2020-05-10T11:26:16Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37457#p37457</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Debit Credit Error on Trial Balance]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37453#p37453" />
			<content type="html"><![CDATA[<p>Your second option is fine I feel. Because sometimes. People may make reverse entries once they made mistake in another form. So I think the warning would be fine. At the same time even if they post it with warning. It should work and submit the journal entry.</p><p>Here is a screenshot for reference what i talked. And code i modified in gl_journal.php</p><div class="codebox"><pre><code>// New function to check it 
function check_account_selection($code, $amount){
    $sql = &quot;SELECT ms.*, cl.class_name, cl.ctype FROM &quot;.TB_PREF.&quot;chart_master AS ms LEFT JOIN &quot;.TB_PREF.&quot;chart_types AS tp ON ms.account_type= tp.id LEFT JOIN &quot;.TB_PREF.&quot;chart_class AS cl ON cl.cid = tp.class_id WHERE account_code= &quot;.db_escape($code);
    $res = db_query($sql, &quot;Cant get the chart class selection&quot;);
    if(db_num_rows($res) == 1 ){
        if($row = db_fetch($res)){
            if($row[&#039;ctype&#039;] == CL_EXPENSE &amp;&amp; $amount &gt; 0)
                display_warning(_(&quot;You are entered the Expense under the debit side&quot;));
            if($row[&#039;ctype&#039;] == CL_ASSETS  &amp;&amp; $amount &lt; 0 )
                display_warning(_(&quot;You are entered the Asset in credit side&quot;));
        }
    }

}
function handle_new_item()
{
    if (!check_item_data())
        return;


    if (input_num(&#039;AmountDebit&#039;) &gt; 0)
        $amount = input_num(&#039;AmountDebit&#039;);
    else
        $amount = -input_num(&#039;AmountCredit&#039;);
    
    check_account_selection(get_post(&#039;code_id&#039;), $amount);  // This is new line in existing code
    

    $_SESSION[&#039;journal_items&#039;]-&gt;add_gl_item($_POST[&#039;code_id&#039;], $_POST[&#039;dimension_id&#039;],
        $_POST[&#039;dimension2_id&#039;], $amount, $_POST[&#039;LineMemo&#039;], &#039;&#039;, get_post(&#039;person_id&#039;));
      unset($_SESSION[&#039;journal_items&#039;]-&gt;tax_info);
    line_start_focus();
}</code></pre></div><p>abd for updating of exiting entry.<br /></p><div class="codebox"><pre><code> 
function handle_update_item()
{
    if($_POST[&#039;UpdateItem&#039;] != &quot;&quot; &amp;&amp; check_item_data())
    {
        if (input_num(&#039;AmountDebit&#039;) &gt; 0)
            $amount = input_num(&#039;AmountDebit&#039;);
        else
            $amount = -input_num(&#039;AmountCredit&#039;);


        check_account_selection(get_post(&#039;code_id&#039;), $amount); // This is new line in existing code


        $_SESSION[&#039;journal_items&#039;]-&gt;update_gl_item($_POST[&#039;Index&#039;], $_POST[&#039;code_id&#039;], 
            $_POST[&#039;dimension_id&#039;], $_POST[&#039;dimension2_id&#039;], $amount, $_POST[&#039;LineMemo&#039;], &#039;&#039;, get_post(&#039;person_id&#039;));
        unset($_SESSION[&#039;journal_items&#039;]-&gt;tax_info);
        line_start_focus();
    }
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2020-05-09T00:08:15Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37453#p37453</id>
		</entry>
</feed>
