<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Rep108: Statement - since when is it only emailing when overdue debits]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=10347&amp;type=atom" />
	<updated>2023-09-16T03:46:11Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=10347</id>
		<entry>
			<title type="html"><![CDATA[Re: Rep108: Statement - since when is it only emailing when overdue debits]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=42560#p42560" />
			<content type="html"><![CDATA[<p>The difference between the v2.4.14 and 2.4.16 for the file reporting/rep108.php in diff format is as follows:<br /></p><div class="codebox"><pre><code> core/reporting/rep108.php | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/core/reporting/rep108.php b/core/reporting/rep108.php
index abb11e7..f2d6d42 100644
--- a/core/reporting/rep108.php
+++ b/core/reporting/rep108.php
@@ -175,12 +175,16 @@ function print_statements()
         for ($i = 0; $i &lt; 5; $i++)
             $rep-&gt;TextWrap($col[$i], $rep-&gt;row, $col[$i + 1] - $col[$i], $str2[$i], &#039;right&#039;);
         if ($email == 1)
-            $rep-&gt;End($email, _(&quot;Statement&quot;) . &quot; &quot; . _(&quot;as of&quot;) . &quot; &quot; . sql2date($date));
-
+        {
+            if (($CustomerRecord[&quot;Balance&quot;]) != ($CustomerRecord[&quot;Balance&quot;] - $CustomerRecord[&quot;Due&quot;]))
+                $rep-&gt;End($email, _(&quot;Statement&quot;) . &quot; &quot; . _(&quot;as of&quot;) . &quot; &quot; . sql2date($date) . &quot; &quot; . _(&quot;from&quot;) . &quot; &quot; . get_company_pref(&#039;coy_name&#039;));
+            else
+                display_notification(sprintf(_(&quot;Customer %s has no overdue debits. No e-mail is sent.&quot;), $myrow[&quot;DebtorName&quot;]));       
+        }
     }
 
     if (!isset($rep))
-        display_notification(&quot;No customers with outstanding balances found&quot;);
+        display_notification(_(&quot;No customers with outstanding balances found&quot;));
     else if ($email == 0)
         $rep-&gt;End();
 }</code></pre></div><p>The last change is that the notification text is now translated.<br />The &quot;End(email...&quot; statement is now in an &quot;if&quot; construct that you may revert as needed.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2023-09-16T03:46:11Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=42560#p42560</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Rep108: Statement - since when is it only emailing when overdue debits]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=42510#p42510" />
			<content type="html"><![CDATA[<p>I upgraded from 2.4.14 to 2.4.16 and just wanted to run my monthly statement reports to my dealers.<br />So I selected customer and email: yes.<br />Then I got the message &quot;customer xxx has no overdue debits. No email is sent&quot;.</p><p>WHY? I checked an older version of rep108.php and it hasn&#039;t got this check... and I even can&#039;t find in the GITHub change logs anything about this.</p><div class="codebox"><pre><code>            if (($CustomerRecord[&quot;Balance&quot;]) != ($CustomerRecord[&quot;Balance&quot;] - $CustomerRecord[&quot;Due&quot;]))
                $rep-&gt;End($email, _(&quot;Statement&quot;) . &quot; &quot; . _(&quot;as of&quot;) . &quot; &quot; . sql2date($date) . &quot; &quot; . _(&quot;from&quot;) . &quot; &quot; . get_company_pref(&#039;coy_name&#039;));
            else
                display_notification(sprintf(_(&quot;Customer %s has no overdue debits. No e-mail is sent.&quot;), $myrow[&quot;DebtorName&quot;]));       </code></pre></div><p>This makes no sense. Even if a customer has NO overdue debits he still needs to be sent a statement... I could just print it into a PDF, which still works and then manually create an email... but why would I need to do this...?</p><p>For now I have overwritten the new rep108 with the older one to keep the functionality.</p>]]></content>
			<author>
				<name><![CDATA[incocare]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=17294</uri>
			</author>
			<updated>2023-08-16T00:23:34Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=42510#p42510</id>
		</entry>
</feed>
