<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Transaction Reference Source?]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=8577</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8577&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Transaction Reference Source?.]]></description>
		<lastBuildDate>Wed, 18 Dec 2019 17:16:34 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Transaction Reference Source?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36648#p36648</link>
			<description><![CDATA[<p>If I go into the workorders table and rename all existing work orders to eliminate the last two digits (12), then my new Transaction Reference is used correctly.</p>]]></description>
			<author><![CDATA[null@example.com (paul)]]></author>
			<pubDate>Wed, 18 Dec 2019 17:16:34 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36648#p36648</guid>
		</item>
		<item>
			<title><![CDATA[Re: Transaction Reference Source?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36647#p36647</link>
			<description><![CDATA[<p>Thanks for the reply, apmuthu, but this does not seem to work. I tried your suggestion before starting this post and it did not work. </p><p>While I don&#039;t understand all of the code for obtaining the next number, I find this after I start a new work order when I have the Transaction References set to 3 for prefix followed by {YY}{01}{MM}:</p><div class="codebox"><pre><code>SELECT MAX(CAST(SUBSTR(wo_ref, 4,LENGTH(wo_ref)-5) AS UNSIGNED)) FROM `workorders` tbl
                    LEFT JOIN voided v ON tbl.`id`=v.id AND v.type=&#039;26&#039; WHERE ISNULL(v.id) AND `wo_ref` REGEXP &#039;^319[0-9]*12$&#039;</code></pre></div><p>&nbsp; It looks like it is looking in the workorders table to extract the next number and the resulting number is 3198612</p><p>&nbsp; When I change the Transaction Reference to 3 {YY}{01}, I get this:</p><div class="codebox"><pre><code>SELECT MAX(CAST(SUBSTR(wo_ref, 4,LENGTH(wo_ref)-3) AS UNSIGNED)) FROM `workorders` tbl
                    LEFT JOIN voided v ON tbl.`id`=v.id AND v.type=&#039;26&#039; WHERE ISNULL(v.id) AND `wo_ref` REGEXP &#039;^319[0-9]*$&#039;</code></pre></div><p>&nbsp; The result is 3191287. I was hoping to get 31987.</p>]]></description>
			<author><![CDATA[null@example.com (paul)]]></author>
			<pubDate>Wed, 18 Dec 2019 17:12:13 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36647#p36647</guid>
		</item>
		<item>
			<title><![CDATA[Re: Transaction Reference Source?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36643#p36643</link>
			<description><![CDATA[<p>Set the next reference to be 12001 in the <strong>0_refs</strong> table.<br />Check with the following SQL for next references:<br /></p><div class="codebox"><pre><code>SELECT * FROM 0_refs ORDER BY RIGHT(`reference`, 4), `type`, `id`;</code></pre></div><p>The above assumes the <strong>0_reflines.pattern</strong> to be <em>{001}/{YYYY}</em> which is the default.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Wed, 18 Dec 2019 04:45:50 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36643#p36643</guid>
		</item>
		<item>
			<title><![CDATA[Transaction Reference Source?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36636#p36636</link>
			<description><![CDATA[<p>I started using FrontAccounting with a Work Order Transaction Reference to add the month to the end {MM}. The work order number would auto increment in December similar to 00112, 00212, 00312.</p><p>&nbsp; I have since thought I did not need the Month indicated in the work order number so I changed the Trans Ref to just {001}. When I create a new work order, the number is now 12004, 12005, 12006, etc...</p><p>&nbsp; I am using a prefix that I wish to not change. I can change the prefix (create a new reference) and the new format is followed after the new prefix. Is there a way to reset the transaction reference and still keep the prefix?</p><p>Thanks.</p>]]></description>
			<author><![CDATA[null@example.com (paul)]]></author>
			<pubDate>Tue, 17 Dec 2019 20:26:32 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36636#p36636</guid>
		</item>
	</channel>
</rss>
