<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — update journal entry has query issue]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7427&amp;type=atom" />
	<updated>2018-03-29T13:40:22Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=7427</id>
		<entry>
			<title type="html"><![CDATA[Re: update journal entry has query issue]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31269#p31269" />
			<content type="html"><![CDATA[<p>The journal voucher customization I did it for a company. There it used. It won&#039;t be applied to core feature</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2018-03-29T13:40:22Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31269#p31269</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: update journal entry has query issue]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31263#p31263" />
			<content type="html"><![CDATA[<p>The <strong>function write_journal_entries()</strong> defined in <strong>gl/includes/db/gl_journal.inc</strong> is now used to edit journal entries by first voiding it and then adding the modified entry it as a new one.</p><p>In FA 2.3.x, the said <strong>function write_journal_entries()</strong> is defined in <strong>gl/includes/db/gl_db_trans.inc</strong>.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-03-29T05:44:30Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31263#p31263</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: update journal entry has query issue]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31259#p31259" />
			<content type="html"><![CDATA[<p>@kvvaradha: Provide your patch to include in the core. During such editing, does the reference number of the entry change?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-03-29T02:40:17Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31259#p31259</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: update journal entry has query issue]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31254#p31254" />
			<content type="html"><![CDATA[<p>This is created to use in edit journal. But unfortunately it&#039;s not used , but I am using it for editing the journal vouchers.</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2018-03-28T17:20:50Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31254#p31254</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: update journal entry has query issue]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31247#p31247" />
			<content type="html"><![CDATA[<p>This is a new file in FA 2.4.x. Looks like it was made to be linked into an Edit Journal button on journal entries listing.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-03-27T17:03:52Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31247#p31247</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: update journal entry has query issue]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31245#p31245" />
			<content type="html"><![CDATA[<p>@notrinos.</p><p>You are right. This is the reason why no errors are reported from MySql.</p><p>This is a redundant function at the moment. This should be removed. Will discuss this with Janusz.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2018-03-27T16:47:04Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31245#p31245</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: update journal entry has query issue]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31244#p31244" />
			<content type="html"><![CDATA[<p>No one has caught this problem because this function <strong>update_journal()</strong> has never been used in any where.<br />Don&#039;t know whether to be happy or sad <img src="https://frontaccounting.com/punbb/img/smilies/neutral.png" width="15" height="15" alt="neutral" /></p>]]></content>
			<author>
				<name><![CDATA[notrinos]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=36772</uri>
			</author>
			<updated>2018-03-27T16:19:25Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31244#p31244</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: update journal entry has query issue]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31243#p31243" />
			<content type="html"><![CDATA[<p>This has been <a href="https://github.com/FrontAccountingERP/FA/commit/dca4242efab883345aa91daa24f737695e975e71">committed</a>. Strange that this passed the MySql server without warnings!</p><p>Thanks for catching this.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2018-03-27T15:26:38Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31243#p31243</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: update journal entry has query issue]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31242#p31242" />
			<content type="html"><![CDATA[<p>@kvvaradha: Good catch.<br />Wonder how it slipped thru for so long.</p><p>@joe: can commit it by removing the last closing bracket in the <strong>doc_date</strong> line.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-03-27T15:07:06Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31242#p31242</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[update journal entry has query issue]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31241#p31241" />
			<content type="html"><![CDATA[<p>Hello @joe, </p><p>This post is for the @joe and @apmuthu to update their repo.</p><p><strong>gl/includes/db/gl_journal.inc</strong></p><p>Here there is a function for update_journal</p><div class="codebox"><pre><code>function update_journal($type, $trans_no, $amount, $tran_date, $currency, $reference, $source_ref=&#039;&#039;, $rate=1,
     $event_date=&#039;&#039;, $doc_date=&#039;&#039;)
{
    $sql = &quot;UPDATE &quot;.TB_PREF.&quot;journal SET &quot;
      .&quot;`amount`=&quot;.db_escape($amount).&quot;,&quot;
      .&quot;`currency`=&quot;.db_escape($currency).&quot;,&quot;
      .&quot;`rate`=&quot;.db_escape($rate).&quot;,&quot;
      .&quot;`reference`=&quot;.db_escape($reference).&quot;,&quot;
      .&quot;`source_ref`=&quot;.db_escape($source_ref).&quot;,&quot;
      .&quot;`tran_date`=&quot;.&quot;&#039;&quot;.date2sql($tran_date).&quot;&#039;,&quot;
      .&quot;`event_date`=&quot;.&quot;&#039;&quot;.date2sql($event_date).&quot;&#039;,&quot;
      .&quot;`doc_date`=&quot;.&quot;&#039;&quot;.date2sql($doc_date).&quot;&#039;)  // here the &#039;(&#039; should be removed. 
       WHERE `type`=&quot;.db_escape($type).&quot; AND &quot; .&quot;`trans_no`=&quot;.db_escape($trans_no);

    return db_query($sql, &#039;cannot update journal entry&#039;);
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2018-03-27T13:45:38Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31241#p31241</id>
		</entry>
</feed>
