<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Missing audit trail items]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7413&amp;type=atom" />
	<updated>2018-03-20T03:44:48Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=7413</id>
		<entry>
			<title type="html"><![CDATA[Re: Missing audit trail items]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31179#p31179" />
			<content type="html"><![CDATA[<p>It is pertinent to have such a message to accommodate records prior to inducting this table in FA and for records that straddled fiscal years when the older ones have been purged.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-03-20T03:44:48Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31179#p31179</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Missing audit trail items]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31178#p31178" />
			<content type="html"><![CDATA[<p>I was actually studying <strong>includes/db/audit_trail_db.inc</strong>. When no audit records match with GL transactions, it looks like it issues a warning like: &quot;Some transactions journal GL postings were not indexed due to lack of audit trail record&quot;. That led me to believe that all <strong>gl_trans</strong> records are expected to have a matching audit record.</p><p>When to write an audit record is causing me some confusion.</p>]]></content>
			<author>
				<name><![CDATA[oakstreet1]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=42263</uri>
			</author>
			<updated>2018-03-20T03:25:34Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31178#p31178</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Missing audit trail items]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31171#p31171" />
			<content type="html"><![CDATA[<p>Unless you edit /delete any transaction, an audit trail will generally not occur.</p><p>For a brand new <strong>sql/en_US-new.sql</strong> based company, on entering 1 customer, 1 supplier and 1 item, there are no <strong>audit_trail</strong> entries at all. GL Transactions will certainly have records generated in the <strong>audit_trail</strong> table.</p><p>All <strong>audit_trail</strong> records except latest one should have the field <em>gl_seq</em> set to NULL to avoid need for subqueries (absent in MySQL 3) all over the code - see code and comments in <strong>function add_audit_trail()</strong> in <em>includes/db/audit_trail_db.inc</em> file.</p><p>Read the <a href="https://frontaccounting.com/fawiki/index.php?n=Devel.ERDiagram23">Wiki</a>.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-03-19T16:37:01Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31171#p31171</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Missing audit trail items]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31169#p31169" />
			<content type="html"><![CDATA[<p>I probably did something to cause this. When I started entering things in January, I was doing everything wrong, and I had to restore from backups more than once.</p><p>In reading the audit_trail PHP script, it appears that it would be an error for there to be any gl_trans records with non-zero amounts that don&#039;t have a corresponding audit_trail record. Running reports manually in MySQL, I find 4 gl_trans records that do not have a matching audit_trail record.</p><p>The first two are type=0; the credit/debit for the opening balance of a bank account (I just put the opening balance in as a deposit on January 1, rather than putting it in for the previous fiscal year, then closing that fiscal year ... I didn&#039;t know how to do that, back then).</p><p>The next two appear to be from a line item on an invoice (type=10).</p><p>Do I need to fix something, or is this just going to post an informational message when I close this fiscal year? All of the general ledger entries are correct and everything balances.</p><div class="codebox"><pre><code>+---------+------+---------+------------+---------+-----------------+----------+--------------+---------------+----------------+-----------+
| counter | type | type_no | tran_date  | account | memo_           | amount   | dimension_id | dimension2_id | person_type_id | person_id |
+---------+------+---------+------------+---------+-----------------+----------+--------------+---------------+----------------+-----------+
|      32 |    0 |       3 | 2018-01-01 | 1060    | Opening balance |  4495.54 |            0 |             0 |           NULL | NULL      |
|      33 |    0 |       3 | 2018-01-01 | 3590    | Opening balance | -4495.54 |            0 |             0 |           NULL | NULL      |
|      46 |   10 |       7 | 2018-01-09 | 4012    |                 |      -48 |            0 |             0 |           NULL | NULL      |
|      47 |   10 |       7 | 2018-01-09 | 1200    |                 |       48 |            0 |             0 |              2 | 3         |
+---------+------+---------+------------+---------+-----------------+----------+--------------+---------------+----------------+-----------+</code></pre></div>]]></content>
			<author>
				<name><![CDATA[oakstreet1]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=42263</uri>
			</author>
			<updated>2018-03-19T16:13:39Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31169#p31169</id>
		</entry>
</feed>
