<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Recurrent Invoices in 2.4 is not sending]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8025&amp;type=atom" />
	<updated>2019-04-24T16:20:17Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=8025</id>
		<entry>
			<title type="html"><![CDATA[Re: Recurrent Invoices in 2.4 is not sending]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34797#p34797" />
			<content type="html"><![CDATA[<p>Thanks guys, its works.</p>]]></content>
			<author>
				<name><![CDATA[seahawk]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=544</uri>
			</author>
			<updated>2019-04-24T16:20:17Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34797#p34797</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Recurrent Invoices in 2.4 is not sending]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34622#p34622" />
			<content type="html"><![CDATA[<p>Thanks Joe and Braath. Have downloaded it. Will check later, but I think we nailed it now.</p>]]></content>
			<author>
				<name><![CDATA[seahawk]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=544</uri>
			</author>
			<updated>2019-04-08T06:36:52Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34622#p34622</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Recurrent Invoices in 2.4 is not sending]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34616#p34616" />
			<content type="html"><![CDATA[<p>This has been fixed in core and committed to stable repo.</p><p>The fixed file can be downloaded <a href="https://sourceforge.net/p/frontaccounting/git/ci/master/tree/sales/create_recurrent_invoices.php">here</a>.</p><p>Thanks for finding this!</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2019-04-07T06:53:30Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34616#p34616</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Recurrent Invoices in 2.4 is not sending]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34612#p34612" />
			<content type="html"><![CDATA[<p>@joe: any fixes to the core?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2019-04-07T04:12:56Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34612#p34612</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Recurrent Invoices in 2.4 is not sending]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34602#p34602" />
			<content type="html"><![CDATA[<p>This is coded in sales/create_recurrent_invoices.php.&nbsp; The code:<br /></p><div class="codebox"><pre><code>        $ar = array(&#039;PARAM_0&#039; =&gt; $min.&quot;-&quot;.ST_SALESINVOICE,  &#039;PARAM_1&#039; =&gt; $max.&quot;-&quot;.ST_SALESINVOICE, &#039;PARAM_2&#039; =&gt; &quot;&quot;,
            &#039;PARAM_3&#039; =&gt; 0, &#039;PARAM_4&#039; =&gt; 0, &#039;PARAM_5&#039; =&gt; &quot;&quot;, &#039;PARAM_6&#039; =&gt; user_def_print_orientation());
        display_note(print_link(sprintf(_(&quot;&amp;Print Recurrent Invoices # %s - # %s&quot;), $min, $max), 107, $ar), 0, 1);
        $ar[&#039;PARAM_6&#039;] = 1; // orygina³
        $ar[&#039;PARAM_3&#039;] = 1; // email
        display_note(print_link(sprintf(_(&quot;&amp;Email Recurrent Invoices # %s - # %s&quot;), $min, $max), 107, $ar), 0, 1);</code></pre></div><p>looks to me to be in error, because as I listed in my first post, PARAM_6 is the customer and PARAM_7 is the print orientation.</p><p>The code should probably be:<br /></p><div class="codebox"><pre><code>       $ar = array(&#039;PARAM_0&#039; =&gt; $min.&quot;-&quot;.ST_SALESINVOICE,  &#039;PARAM_1&#039; =&gt; $max.&quot;-&quot;.ST_SALESINVOICE, &#039;PARAM_2&#039; =&gt; &quot;&quot;,
            &#039;PARAM_3&#039; =&gt; 0, &#039;PARAM_4&#039; =&gt; 0, &#039;PARAM_5&#039; =&gt; &quot;&quot;, &#039;PARAM_6&#039; =&gt; &quot;&quot;, &#039;PARAM_7&#039;=&gt;user_def_print_orientation());
        display_note(print_link(sprintf(_(&quot;&amp;Print Recurrent Invoices # %s - # %s&quot;), $min, $max), 107, $ar), 0, 1);
        $ar[&#039;PARAM_3&#039;] = 1; // email
        display_note(print_link(sprintf(_(&quot;&amp;Email Recurrent Invoices # %s - # %s&quot;), $min, $max), 107, $ar), 0, 1);</code></pre></div><p>Ha ha.&nbsp; I had been testing using customer 1, and the code erroneously hard coded PARAM_6 to 1, so coincidentally it worked for me.</p>]]></content>
			<author>
				<name><![CDATA[Braath Waate]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41493</uri>
			</author>
			<updated>2019-04-06T11:50:54Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34602#p34602</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Recurrent Invoices in 2.4 is not sending]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34599#p34599" />
			<content type="html"><![CDATA[<p>Why is the _7 missing in the sting for emailing recurring invoices?</p><p>Where would this be coded?</p>]]></content>
			<author>
				<name><![CDATA[seahawk]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=544</uri>
			</author>
			<updated>2019-04-06T09:15:38Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34599#p34599</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Recurrent Invoices in 2.4 is not sending]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34595#p34595" />
			<content type="html"><![CDATA[<p>I tried php 7.1 and it works fine.</p><p>I suggest playing with the url in the browser as I mentioned in my last post.&nbsp; The goal is to find out why one url works and the other doesn&#039;t.&nbsp; &nbsp;That will give a clue as to what the problem is.&nbsp; My thinking is that it is PARAM_6 but that is a guess at this point.</p>]]></content>
			<author>
				<name><![CDATA[Braath Waate]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41493</uri>
			</author>
			<updated>2019-04-05T16:24:57Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34595#p34595</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Recurrent Invoices in 2.4 is not sending]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34592#p34592" />
			<content type="html"><![CDATA[<p>Yes, for some or other reason I had it the wrong way around:</p><p>On the one system I have FA 2.4.4&nbsp; with PHP Version 7.1 and the other system I have FA 2.4.6 and PHPversion 7.1 Both have the same issue not sending email on recurring invoices. </p><p>Normal email tax invoice is the one:<br /></p><div class="codebox"><pre><code>/reporting/prn_redirect.php?PARAM_0=272-10&amp;PARAM_1=272-10&amp;PARAM_2=&amp;PARAM_3=1&amp;PARAM_4=&amp;PARAM_5=&amp;PARAM_6=&amp;PARAM_7=0&amp;REP_ID=107</code></pre></div><p>The one without the <strong>_7</strong> is then recurring invoice email.</p>]]></content>
			<author>
				<name><![CDATA[seahawk]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=544</uri>
			</author>
			<updated>2019-04-05T12:01:35Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34592#p34592</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Recurrent Invoices in 2.4 is not sending]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34590#p34590" />
			<content type="html"><![CDATA[<p>Good work!&nbsp; Now you can see the url that does work (Direction invoice creation) and the url that does not work (recurrent invoice) and lo and behold they differ which must somehow explain why one works and the other doesn&#039;t.&nbsp; </p><p>Oddly, on my 2.4.6 system, the direct invoice email link is:</p><div class="codebox"><pre><code>/reporting/prn_redirect.php?PARAM_0=11-10&amp;PARAM_1=11-10&amp;PARAM_2=&amp;PARAM_3=1&amp;PARAM_4=&amp;PARAM_5=&amp;PARAM_6=&amp;PARAM_7=0&amp;REP_ID=107</code></pre></div><p>and the recurrent invoice email link is:</p><div class="codebox"><pre><code>/reporting/prn_redirect.php?PARAM_0=12-10&amp;PARAM_1=12-10&amp;PARAM_2=&amp;PARAM_3=1&amp;PARAM_4=0&amp;PARAM_5=&amp;PARAM_6=1&amp;REP_ID=107</code></pre></div><p>Oddly, these seem to be reversed on your system?&nbsp; (Might I assume that you got them backwards in your post?)</p><p>Note that you can enter these urls in your browser and they should send mail, although we know the recurrent invoice url on your system will not work.&nbsp; I suggest putting the recurrent invoice url into your browser, and removing the &quot;1&quot; after PARAM_6.</p><p>On my system, the link would be:</p><div class="codebox"><pre><code>/reporting/prn_redirect.php?PARAM_0=12-10&amp;PARAM_1=12-10&amp;PARAM_2=&amp;PARAM_3=1&amp;PARAM_4=0&amp;PARAM_5=&amp;PARAM_6=&amp;REP_ID=107</code></pre></div><p>All these urls send mail on my system.&nbsp; My latest guess is that you might be having a php version issue that is causing this problem.&nbsp; What version are you running?</p>]]></content>
			<author>
				<name><![CDATA[Braath Waate]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41493</uri>
			</author>
			<updated>2019-04-04T20:24:40Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34590#p34590</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Recurrent Invoices in 2.4 is not sending]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34586#p34586" />
			<content type="html"><![CDATA[<p>Braath</p><p>On the Direct Invoice creation email option it has the following for email function:<br /></p><div class="codebox"><pre><code>/reporting/prn_redirect.php?PARAM_0=1045-10&amp;PARAM_1=1045-10&amp;PARAM_2=&amp;PARAM_3=1&amp;PARAM_4=0&amp;PARAM_5=&amp;PARAM_6=1&amp;REP_ID=107</code></pre></div><p>On recurrent invoices the email option have the following:<br /></p><div class="codebox"><pre><code>/reporting/prn_redirect.php?PARAM_0=1045-10&amp;PARAM_1=1045-10&amp;PARAM_2=&amp;PARAM_3=1&amp;PARAM_4=&amp;PARAM_5=&amp;PARAM_6=&amp;PARAM_7=0&amp;REP_ID=107</code></pre></div><p>It seems like the difference is that the recuurent invoice has a <strong>_7=0&amp;REP_ID=107</strong> whereas the Direct invoice email function have <strong>_6=1&amp;REP_ID=107</strong></p><p>Maybe you can figure out the difference, but I think the recurrent invoice email option should not have the <strong>_7</strong>, since the print function does not have a <strong>_7</strong></p><p>Trust this will help to resolve the issue?</p><p>Wynand</p>]]></content>
			<author>
				<name><![CDATA[seahawk]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=544</uri>
			</author>
			<updated>2019-04-04T16:45:27Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34586#p34586</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Recurrent Invoices in 2.4 is not sending]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34469#p34469" />
			<content type="html"><![CDATA[<p>I still suggest capturing the email link from Create and Print Recurrent Invoices and running it directly in the browser, as I suggested in point 1.&nbsp; This should work and display the email sent message in that window.&nbsp; If that does not work but selecting the invoice in Print Invoices does, then the problem has to be the invocation of the Print Invoices page from the print redirect page.&nbsp; &nbsp;This could be a browser or server issue as well, so checking the apache server logs or changing browsers could change the result.</p><p>Also make sure that debugging is turned on in config.php ($debug = 1).</p>]]></content>
			<author>
				<name><![CDATA[Braath Waate]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41493</uri>
			</author>
			<updated>2019-03-14T17:07:48Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34469#p34469</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Recurrent Invoices in 2.4 is not sending]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34468#p34468" />
			<content type="html"><![CDATA[<p>Braath, Thanks for the feedback.</p><p>They both point to REP_ID=107</p><p>You can email it from sales reports, and you can mail it from Template invoices but not from Recurring invoices. Normally it would display a green bar that the email was successfull, but it does not do anything.</p><br /><div class="quotebox"><blockquote><p>One change in 2.4 is more flexible reference numbers.&nbsp; Perhaps PARAM_0 or PARAM_1 have some unsupported special characters?</p></blockquote></div><p>Surely it would use the same PARAM is the email function is used either via Sales Reports, or after editing the invoice via Transaction Inquiry?</p><div class="quotebox"><blockquote><p>2. The next step then would be to instrument these pages to see where the call is being dropped</p></blockquote></div><p>Have no idea what you are talking about here.</p><div class="quotebox"><blockquote><p>3.&nbsp; Look to see if the email is being sent out of your system.</p></blockquote></div><p>There is nothing. not send, no record.</p>]]></content>
			<author>
				<name><![CDATA[seahawk]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=544</uri>
			</author>
			<updated>2019-03-14T16:20:17Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34468#p34468</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Recurrent Invoices in 2.4 is not sending]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34466#p34466" />
			<content type="html"><![CDATA[<p>It is hard to guess what is going wrong, so perhaps you could so some more troubleshooting to find the source of the bug.</p><p>1. On your browser, position your cursor on the Email Recurring Invoice line.&nbsp; On Firefox, the url will display in the lower left corner and you can right-click to bring up a menu with the Open Link in New Tab/Window or Copy Link Location. </p><p>This should run the code to send your invoice email, but obviously that does not work on your system.&nbsp; But you can examine the URL to see if there is anything wrong with it. </p><p>REP_ID=107 is the Print Invoices report, the same one that appears in Customer Sales Reports.&nbsp; &nbsp;In this report,<br /></p><div class="codebox"><pre><code>    $from = $_POST[&#039;PARAM_0&#039;];
    $to = $_POST[&#039;PARAM_1&#039;];
    $currency = $_POST[&#039;PARAM_2&#039;];
    $email = $_POST[&#039;PARAM_3&#039;];
    $pay_service = $_POST[&#039;PARAM_4&#039;];
    $comments = $_POST[&#039;PARAM_5&#039;];
    $customer = $_POST[&#039;PARAM_6&#039;];
    $orientation = $_POST[&#039;PARAM_7&#039;];</code></pre></div><p>One change in 2.4 is more flexible reference numbers.&nbsp; Perhaps PARAM_0 or PARAM_1 have some unsupported special characters? </p><p>2.&nbsp; You have said that&nbsp; the Print Invoices report works on these invoices.&nbsp; If so, then the problem has to be the calling parameters or some obscure problem with the print redirect page, which is very simple.&nbsp; The next step then would be to instrument these pages to see where the call is being dropped.</p><p>3.&nbsp; Look to see if the email is being sent out of your system.&nbsp; On most linux systems, this is logged in /var/log/syslog.&nbsp; &nbsp;Or, if you have a SMTP server, you can log into that and review its log files.&nbsp; &nbsp;Do this to confirm that the problem is indeed internal to FA.</p>]]></content>
			<author>
				<name><![CDATA[Braath Waate]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41493</uri>
			</author>
			<updated>2019-03-14T15:42:15Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34466#p34466</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Recurrent Invoices in 2.4 is not sending]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34464#p34464" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>apmuthu wrote:</cite><blockquote><p>There might be a delay in generating the PDF file that needs to be emailed. Try a sleep time waster or check for the presence of the last invoice in the PDF before attempting to email.</p></blockquote></div><p>@apmuthu</p><p>Have no idea what your are suggesting with sleep time waster. </p><p>In 2.3.26 it worked fine, no issues. In 2.4 nothing happens once you created the repeating invoice and you select the email invoice. You can open and print the invoice in pdf, but not mail it.</p><p>I think it is not reading the customer email addres or something. Not sure what the inner workings is supposed to do her and how that would differ from the normal direct or template invoice creations?</p>]]></content>
			<author>
				<name><![CDATA[seahawk]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=544</uri>
			</author>
			<updated>2019-03-14T13:34:11Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34464#p34464</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Recurrent Invoices in 2.4 is not sending]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34372#p34372" />
			<content type="html"><![CDATA[<p>There might be a delay in generating the PDF file that needs to be emailed. Try a sleep time waster or check for the presence of the last invoice in the PDF before attempting to email.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2019-03-01T05:11:38Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34372#p34372</id>
		</entry>
</feed>
