<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Can't void customer payment]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=10038</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=10038&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Can't void customer payment.]]></description>
		<lastBuildDate>Mon, 21 Nov 2022 14:29:46 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Can't void customer payment]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41762#p41762</link>
			<description><![CDATA[<p>@kvvaradha</p><p>I hope you are looking at the last committed code from the core.</p><p>In the Invoice case we are first testing for $type == ST_SALESINVOICE before the return action (not voiding).</p><p>The code works smoothly. And it falls down to post_void_customer_trans with the correct $type and $type_no.</p><p>The $type and $type_no are never changed inside the function.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Mon, 21 Nov 2022 14:29:46 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41762#p41762</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can't void customer payment]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41761#p41761</link>
			<description><![CDATA[<p>Just check this way. </p><p>Customerpayment fall through the invoice,&nbsp; there we are passing only the trans_no. Not type. So what happens that tries to check the same customer payment trans_no on invoice.&nbsp; If the invoice exist. It voids the invoice instead of payment. </p><p>I am sure that fall through idea is not good here. So you need to have separate post_void_customer_trans.&nbsp; Hope you got me explanation. If not let me explain with an example</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Mon, 21 Nov 2022 13:15:52 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41761#p41761</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can't void customer payment]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41760#p41760</link>
			<description><![CDATA[<p>@kvvaradha</p><p>There are no missing breaks. I will explain.</p><p>The Customer Payment and the Sales Invoice must fall thru down to post_void_customer_trans($type, $type_no) on line 63 (inside ST_CUSTCREDIT and ST_CUSTDELIVERY.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Mon, 21 Nov 2022 07:58:43 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41760#p41760</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can't void customer payment]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41758#p41758</link>
			<description><![CDATA[<p>@joe did you check the break missing on voiding_db.inc</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Mon, 21 Nov 2022 07:23:24 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41758#p41758</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can't void customer payment]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41749#p41749</link>
			<description><![CDATA[<p>Shouldn&#039;t the return statements obviate the need for break statements.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Thu, 17 Nov 2022 16:11:53 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41749#p41749</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can't void customer payment]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41738#p41738</link>
			<description><![CDATA[<p>@joe</p><p>Break is missing for&nbsp; payment and invoice&nbsp; cases.&nbsp; Can we try this. ?</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Sat, 12 Nov 2022 11:51:48 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41738#p41738</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can't void customer payment]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41728#p41728</link>
			<description><![CDATA[<p>@doug86</p><p>Did you download the new file /admin/db/voiding_db.inc and replaced it after the new install from sourceforge.net?<br />This install file is not updated yet. This file is only updated after a new release.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Fri, 11 Nov 2022 14:51:43 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41728#p41728</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can't void customer payment]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41726#p41726</link>
			<description><![CDATA[<p>Sorry! False alarm. Should check things myself.</p><p>Still getting the same error with 2.4.14 from source forge.</p><p>Let me know if I can help narrow it down.</p><p>Dx</p>]]></description>
			<author><![CDATA[null@example.com (doug86)]]></author>
			<pubDate>Fri, 11 Nov 2022 14:11:58 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41726#p41726</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can't void customer payment]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41722#p41722</link>
			<description><![CDATA[<p>Thanks Everyone, works as expected!</p><p>Dx</p>]]></description>
			<author><![CDATA[null@example.com (doug86)]]></author>
			<pubDate>Thu, 10 Nov 2022 13:41:02 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41722#p41722</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can't void customer payment]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41694#p41694</link>
			<description><![CDATA[<p>Oops, will make a rerun.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Wed, 02 Nov 2022 12:18:05 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41694#p41694</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can't void customer payment]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41693#p41693</link>
			<description><![CDATA[<p>Sorry, I meant to say ST_SALESINVOICE instead of ST_SALES_INVOICE.</p><p>Line 48 should read:<br />if ($type == ST_SALESINVOICE &amp;&amp; is_cust_invoice_credited($type_no))</p><p>That way, the call to is_cust_invoice_credited is not called unless the type is an invoice.</p>]]></description>
			<author><![CDATA[null@example.com (Braath Waate)]]></author>
			<pubDate>Wed, 02 Nov 2022 11:09:21 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41693#p41693</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can't void customer payment]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41691#p41691</link>
			<description><![CDATA[<p>Thanks @Braath Waate.</p><p>This has been fixed in the 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/admin/db/voiding_db.inc">here</a>.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Wed, 02 Nov 2022 09:24:10 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41691#p41691</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can't void customer payment]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41684#p41684</link>
			<description><![CDATA[<p>The reason you are encountering this problem is because you won the lottery: you happen to have an invoice with the same transaction number that cannot be voided.</p><p>The code is indeed broken.&nbsp; A void of a customer payment shouldn&#039;t fall through the case statement and check for an invoice using the same transaction number (is_cust_invoice_credited).</p><p>This should be an easy fix.&nbsp; You can condition the call to cust_invoice_credited with &amp;&amp; $type == ST_SALES_INVOICE</p>]]></description>
			<author><![CDATA[null@example.com (Braath Waate)]]></author>
			<pubDate>Tue, 01 Nov 2022 19:23:39 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41684#p41684</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can't void customer payment]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41671#p41671</link>
			<description><![CDATA[<p>I replaced my admin/db/voiding_db.inc with the file linked above however the files were the exact same size and the problem remains.</p><p>Doing a diff on the two files shows they are the same.</p><p>Happy to cary out any experiments that might be useful!</p><p>Dx</p><br /><p>This invoice cannot be voided because it was already credited.<br />/PATH/frontaccounting/includes/ui/ui_msgs.inc:14:&nbsp; &nbsp; trigger_error(&#039;This invoice cannot be voided because it was already credited.&#039;,&#039;256&#039;)<br />/PATH/frontaccounting/admin/void_transaction.php:320:&nbsp; &nbsp; display_error(&#039;This invoice cannot be voided because it was already credited.&#039;)<br />/PATH/frontaccounting/admin/void_transaction.php:345:&nbsp; &nbsp; handle_void_transaction()</p>]]></description>
			<author><![CDATA[null@example.com (doug86)]]></author>
			<pubDate>Tue, 01 Nov 2022 16:06:38 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41671#p41671</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can't void customer payment]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41669#p41669</link>
			<description><![CDATA[<p>Not yet traced this problem again. <br />But my above solution worked.</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Tue, 01 Nov 2022 14:36:36 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41669#p41669</guid>
		</item>
	</channel>
</rss>
