<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Recurring Invoices]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=3449&amp;type=atom" />
	<updated>2012-10-19T05:16:37Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=3449</id>
		<entry>
			<title type="html"><![CDATA[Re: Recurring Invoices]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13865#p13865" />
			<content type="html"><![CDATA[<p>There already is a check for $last_sent, if its empty it sets it to 0000-00-00 date.&nbsp; But yeah thats exactly it.</p>]]></content>
			<author>
				<name><![CDATA[simplacode]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=16445</uri>
			</author>
			<updated>2012-10-19T05:16:37Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13865#p13865</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Recurring Invoices]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13861#p13861" />
			<content type="html"><![CDATA[<p>Based on the value of a config variable say <strong>$Advance_Recurring_Invoice = false;</strong> in <strong>config.default.php</strong> or a <strong>sys_prefs</strong> table value settable in <strong>Company Setup</strong> (preferable), we choose to have Line 145 in <strong>sales/create_recurrent_invoices.php</strong> as:<br /></p><div class="codebox"><pre><code>$overdue = date1_greater_date2($today, 
            ((isset($Advance_Recurring_Invoice) &amp;&amp;  $
              AdvanceRecurringInvoice) ? $last_sent : $due_date)) &amp;&amp; 
         date1_greater_date2($today, $begin) &amp;&amp; 
         date1_greater_date2($end, $today);</code></pre></div><p>This may have to reflect in some reports as well........</p><p>May need a check to see if <strong>$last_sent</strong> exists in the first place.....</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2012-10-19T04:24:48Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13861#p13861</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Recurring Invoices]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13859#p13859" />
			<content type="html"><![CDATA[<p>Sorry I am using version 2.3.12 by the way <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[simplacode]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=16445</uri>
			</author>
			<updated>2012-10-19T03:37:59Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13859#p13859</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Recurring Invoices]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13858#p13858" />
			<content type="html"><![CDATA[<p>HI there,</p><p>I was having some issues with recurring invoices not being due so I could post them, and figured out the problem.&nbsp; The date that FA is calculating that the recurring invoice is due is after the fact.&nbsp; An example so you understand what I am going on about:</p><p>Recurring invoice for $100, set for every month on the 18th.&nbsp; I create last months, and today is 19/10, my next invoice to send out is the 18/10, but its not marked as being due.... until the 18/11..&nbsp; </p><p>I invoice my clients in advanced.&nbsp; They pay upfront on a new account.&nbsp; And then every month after.&nbsp; FA seems to invoice after that month, which isn&#039;t good for service work and hosting..</p><p>So a modification, very simple to make it work the way I want, which is on the 19/10, an invoice for 18/10 is marked as due and you can click the invoice icon to create an invoice.. is as below..</p><div class="codebox"><pre><code>/directory_to_FA_root/sales/create_recurrent_invoices.php

CHANGE Line 145:

$overdue = date1_greater_date2($today, $due_date) &amp;&amp; date1_greater_date2($today, $begin) &amp;&amp; date1_greater_date2($end, $today);

TO:

$overdue = date1_greater_date2($today, $last_sent) &amp;&amp; date1_greater_date2($today, $begin) &amp;&amp; date1_greater_date2($end, $today);</code></pre></div><p>Could we have that as an option in the settings?&nbsp; Ie:&nbsp; Invoice in Advance = yes or no..??</p><p>Anyhow, thought I would put that up here in case someone wants the invoice in advance thing like I did.</p><p>Regards<br />Wayne</p>]]></content>
			<author>
				<name><![CDATA[simplacode]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=16445</uri>
			</author>
			<updated>2012-10-19T03:36:37Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13858#p13858</id>
		</entry>
</feed>
