<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Manually Enter Invoice Number]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8351&amp;type=atom" />
	<updated>2019-11-26T06:52:32Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=8351</id>
		<entry>
			<title type="html"><![CDATA[Re: Manually Enter Invoice Number]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=36492#p36492" />
			<content type="html"><![CDATA[<p>Yes you are right, @apmuthu.</p><p>Bug 4988 has been fixed and committed to 2.4.7 stable repo. The fixed file can be downloaded <a href="https://sourceforge.net/p/frontaccounting/git/ci/master/tree/sales/includes/cart_class.inc">here</a>.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2019-11-26T06:52:32Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=36492#p36492</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Manually Enter Invoice Number]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=36491#p36491" />
			<content type="html"><![CDATA[<p>This looks okay with the sysprefs variable on a per company basis changeable at will anytime without affecting past and future transactions. Consider the situation where we wish to jump the sequence and move forward a few numbers and later come back to fill in the missing ones. Check if this will mitigate it.</p><p>Logic change - replace the line:<br /></p><div class="codebox"><pre><code>if (!$increase || !is_new_reference($this-&gt;reference, $this-&gt;trans_type)) </code></pre></div><p>with:<br /></p><div class="codebox"><pre><code>else</code></pre></div><p>since the <strong>!is_new_reference($this-&gt;reference, $this-&gt;trans_type)</strong> is already there in the outer <strong>if</strong> construct.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2019-11-26T03:59:47Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=36491#p36491</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Manually Enter Invoice Number]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=36485#p36485" />
			<content type="html"><![CDATA[<p>@apmuthu,</p><p>This is related to bug number 4988 reported on Mantis.<br />Do you think that this will solve the issue:<br /></p><div class="codebox"><pre><code>         if ($this-&gt;reference != &#039;auto&#039; &amp;&amp; $this-&gt;trans_no == 0 &amp;&amp; !is_new_reference($this-&gt;reference, $this-&gt;trans_type))
        {
            $increase = !empty($SysPrefs-&gt;prefs[&#039;ref_no_auto_increase&#039;]);
            if ($increase)
                $this-&gt;reference = $Refs-&gt;get_next($this-&gt;trans_type, null, array(&#039;date&#039; =&gt; Today()));
            if (!$increase || !is_new_reference($this-&gt;reference, $this-&gt;trans_type))    
            {
                commit_transaction();
                return -1;
            }
        }</code></pre></div><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2019-11-25T21:44:55Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=36485#p36485</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Manually Enter Invoice Number]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35728#p35728" />
			<content type="html"><![CDATA[<p>The <strong>sys_prefs</strong> table by default has <strong>ref_no_auto_increase</strong> disabled but it still works in AutoInc mode.</p><p>The error is in the absence of an &quot;else&quot; for line 294 in <strong>sales/includes/cart_class.inc</strong> and it&#039;s positioning after a blank check. The lines 287 to 301 are reproduced here:<br /></p><div class="codebox"><pre><code>    function write($policy=0) {
        
        global $SysPrefs, $Refs;
        
        begin_transaction(); // prevents partial database changes in case of direct delivery/invoice
        if ($this-&gt;reference != &#039;auto&#039; &amp;&amp; $this-&gt;trans_no == 0 &amp;&amp; !is_new_reference($this-&gt;reference, $this-&gt;trans_type))
        {
            if (!empty($SysPrefs-&gt;prefs[&#039;ref_no_auto_increase&#039;]))
                $this-&gt;reference = $Refs-&gt;get_next($this-&gt;trans_type, null, array(&#039;date&#039; =&gt; Today()));
            if (!is_new_reference($this-&gt;reference, $this-&gt;trans_type))    
            {
                commit_transaction();
                return -1;
            }    
        }
...
...</code></pre></div>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2019-08-18T13:36:34Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35728#p35728</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Manually Enter Invoice Number]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35723#p35723" />
			<content type="html"><![CDATA[<p>Hi,</p><p>Regarding the Auto Increase of Document References in Setup -&gt; Company Setup </p><p>This function is always active even if one chooses to disable it. Auto increase is always on.</p><p>I think there is a bug somewhere. (FA2.4.7)</p>]]></content>
			<author>
				<name><![CDATA[rafat]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41964</uri>
			</author>
			<updated>2019-08-18T09:33:28Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35723#p35723</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Manually Enter Invoice Number]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35721#p35721" />
			<content type="html"><![CDATA[<p>Keep changing the next invoice number manually in <em>Setup =&gt; Transaction References</em> and then let it <strong>auto-populate</strong> this manually provided value in the invoice you enter. The responsibility of maintaining non duplicate Invoice Number will then vest with you as the system will simply reject duplicates only after entering the invoice.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2019-08-18T06:24:32Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35721#p35721</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Manually Enter Invoice Number]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35711#p35711" />
			<content type="html"><![CDATA[<p>We are doing Cargo Pick Up Service. We give pre-numbered Booklet Invoices to Customer.</p><p>When I enter in FA Software I need to give same Booklet Invoices number on Software Invoice Number. Is it Possible? I don&#039;t need auto generating Invoice number. Just enter manual number for each Invoice.</p><p>Can you please guide me how to ?</p>]]></content>
			<author>
				<name><![CDATA[niyazofficial@gmail.com]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=44858</uri>
			</author>
			<updated>2019-08-17T17:41:18Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35711#p35711</id>
		</entry>
</feed>
