<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — REP_ID 107 Void Invoice Still Exist In Drop-down]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=8451</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8451&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in REP_ID 107 Void Invoice Still Exist In Drop-down.]]></description>
		<lastBuildDate>Sun, 13 Oct 2019 23:29:19 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: REP_ID 107 Void Invoice Still Exist In Drop-down]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36261#p36261</link>
			<description><![CDATA[<p><a href="https://sourceforge.net/p/frontaccounting/git/ci/master/tree/reporting/includes/printer_class.inc">Committed</a> and sent to 2.4.7 repo.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sun, 13 Oct 2019 23:29:19 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36261#p36261</guid>
		</item>
		<item>
			<title><![CDATA[Re: REP_ID 107 Void Invoice Still Exist In Drop-down]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36260#p36260</link>
			<description><![CDATA[<p>Thanks @kvvaradha and @dearmosin</p><p>Will fix this later this evening</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sun, 13 Oct 2019 16:26:42 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36260#p36260</guid>
		</item>
		<item>
			<title><![CDATA[Re: REP_ID 107 Void Invoice Still Exist In Drop-down]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36258#p36258</link>
			<description><![CDATA[<p>for other types. </p><div class="codebox"><pre><code>case &#039;INVOICE&#039;:
                    $IV = $type_shortcuts[ST_SALESINVOICE];
                    $ref = ($SysPrefs-&gt;print_invoice_no() == 1 ? &quot;trans_no&quot; : &quot;reference&quot;);
                    $sql = &quot;SELECT concat(debtor_trans.trans_no, &#039;-&#039;, debtor_trans.type) AS TNO,
                                concat(&#039;$IV &#039;, debtor_trans.$ref,&#039; &#039;, debtor.name) as IName
                        FROM &quot;.TB_PREF.&quot;debtors_master debtor,&quot;
                            .TB_PREF.&quot;debtor_trans debtor_trans LEFT JOIN &quot;.TB_PREF.&quot;voided AS vd ON debtor_trans.type=vd.type AND debtor_trans.trans_no=vd.id
                        WHERE debtor_trans.type=&quot;.ST_SALESINVOICE.&quot; AND debtor.debtor_no=debtor_trans.debtor_no AND ISNULL(vd.id)
                        ORDER BY debtor_trans.trans_no DESC&quot;;
                    return combo_input($name, &#039;&#039;, $sql, &#039;TNO&#039;, &#039;IName&#039;,array(&#039;order&#039;=&gt;false));

                case &#039;CREDIT&#039;:
                    $CN = $type_shortcuts[ST_CUSTCREDIT];
                    $ref = ($SysPrefs-&gt;print_invoice_no() == 1 ? &quot;trans_no&quot; : &quot;reference&quot;);
                    $sql = &quot;SELECT concat(debtor_trans.trans_no, &#039;-&#039;, debtor_trans.type) AS TNO,
                                concat(&#039;$CN &#039;, debtor_trans.$ref,&#039; &#039;, debtor.name) as IName
                        FROM &quot;.TB_PREF.&quot;debtors_master debtor,&quot;
                            .TB_PREF.&quot;debtor_trans debtor_trans LEFT JOIN &quot;.TB_PREF.&quot;voided AS vd ON debtor_trans.type=vd.type AND debtor_trans.trans_no=vd.id
                        WHERE debtor_trans.type=&quot;.ST_CUSTCREDIT.&quot; AND debtor.debtor_no=debtor_trans.debtor_no AND ISNULL(vd.id)
                        ORDER BY debtor_trans.trans_no DESC&quot;;
                    return combo_input($name, &#039;&#039;, $sql, &#039;TNO&#039;, &#039;IName&#039;,array(&#039;order&#039;=&gt;false));

                case &#039;DELIVERY&#039;:
                    $DN = $type_shortcuts[ST_CUSTDELIVERY];
                    $sql = &quot;SELECT    concat(debtor_trans.trans_no, &#039;-&#039;, debtor_trans.type) AS TNO,
                                concat(debtor_trans.trans_no, &#039; $DN &#039;, debtor.name) as IName
                        FROM &quot;.TB_PREF.&quot;debtors_master debtor,&quot;
                            .TB_PREF.&quot;debtor_trans debtor_trans LEFT JOIN &quot;.TB_PREF.&quot;voided AS vd ON debtor_trans.type=vd.type AND debtor_trans.trans_no=vd.id
                        WHERE debtor_trans.type=&quot;.ST_CUSTDELIVERY.&quot; AND debtor.debtor_no=debtor_trans.debtor_no AND ISNULL(vd.id)
                        ORDER BY debtor_trans.trans_no DESC&quot;;
                    return combo_input($name, &#039;&#039;, $sql, &#039;TNO&#039;, &#039;IName&#039;,array(&#039;order&#039;=&gt;false));


                case &#039;REMITTANCE&#039;:
                    $BP = $type_shortcuts[ST_BANKPAYMENT];
                    $SP = $type_shortcuts[ST_SUPPAYMENT];
                    $CN = $type_shortcuts[ST_SUPPCREDIT];
                    $ref = ($SysPrefs-&gt;print_invoice_no() == 1 ? &quot;trans_no&quot; : &quot;reference&quot;);
                    $sql = &quot;SELECT concat(trans.trans_no, &#039;-&#039;,trans.type) AS TNO,
                                concat(trans.$ref, IF(type=&quot;.ST_BANKPAYMENT.&quot;, &#039; $BP &#039;, IF(type=&quot;.ST_SUPPAYMENT.&quot;, &#039; $SP &#039;, &#039; $CN &#039;)), supplier.supp_name) as IName
                            FROM &quot;.TB_PREF.&quot;suppliers supplier, &quot;
                                .TB_PREF.&quot;supp_trans trans  LEFT JOIN &quot;.TB_PREF.&quot;voided AS vd ON trans.type=vd.type AND trans.trans_no=vd.id
                            WHERE trans.type IN(&quot;.ST_BANKPAYMENT.&quot;,&quot;.ST_SUPPAYMENT.&quot;,&quot;.ST_SUPPCREDIT.&quot;)    AND supplier.supplier_id=trans.supplier_id AND ISNULL(vd.id)
                            ORDER BY trans.trans_no DESC&quot;;
                    return combo_input($name, &#039;&#039;, $sql, &#039;TNO&#039;, &#039;IName&#039;,array(&#039;order&#039;=&gt;false));

                case &#039;RECEIPT&#039;:
                    $BD = $type_shortcuts[ST_BANKDEPOSIT];
                    $CP = $type_shortcuts[ST_CUSTPAYMENT];
                    $ref = ($SysPrefs-&gt;print_invoice_no() == 1 ? &quot;trans_no&quot; : &quot;reference&quot;);
                    $sql = &quot;SELECT concat(trans.trans_no, &#039;-&#039;, trans.type) AS TNO,
                                concat(trans.$ref, IF(trans.type=&quot;.ST_BANKDEPOSIT.&quot;, &#039; $BD &#039;, &#039; $CP &#039;), debtor.name) as IName
                        FROM &quot;.TB_PREF.&quot;debtors_master debtor,&quot;
                            .TB_PREF.&quot;debtor_trans trans LEFT JOIN &quot;.TB_PREF.&quot;voided AS vd ON trans.type=vd.type AND trans.trans_no=vd.id
                        WHERE trans.type IN(&quot;.ST_BANKDEPOSIT.&quot;,&quot;.ST_CUSTPAYMENT.&quot;,&quot;.ST_CUSTCREDIT.&quot;) AND debtor.debtor_no=trans.debtor_no AND ISNULL(vd.id)
                        ORDER BY trans.trans_no DESC&quot;;
                    return combo_input($name, &#039;&#039;, $sql, &#039;TNO&#039;, &#039;IName&#039;,array(&#039;order&#039;=&gt;false));</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Sun, 13 Oct 2019 15:14:14 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36258#p36258</guid>
		</item>
		<item>
			<title><![CDATA[Re: REP_ID 107 Void Invoice Still Exist In Drop-down]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36257#p36257</link>
			<description><![CDATA[<p>A good issue, @joe looks like we have to add voided table in it.</p><p>it sholud be like this for sales invoice </p><div class="codebox"><pre><code>case &#039;INVOICE&#039;:
                    $IV = $type_shortcuts[ST_SALESINVOICE];
                    $ref = ($SysPrefs-&gt;print_invoice_no() == 1 ? &quot;trans_no&quot; : &quot;reference&quot;);
                    $sql = &quot;SELECT concat(debtor_trans.trans_no, &#039;-&#039;, debtor_trans.type) AS TNO,
                                concat(&#039;$IV &#039;, debtor_trans.$ref,&#039; &#039;, debtor.name) as IName
                        FROM &quot;.TB_PREF.&quot;debtors_master debtor,&quot;
                            .TB_PREF.&quot;debtor_trans debtor_trans LEFT JOIN &quot;.TB_PREF.&quot;voided AS vd ON debtor_trans.type=vd.type AND debtor_trans.trans_no=vd.id
                        WHERE debtor_trans.type=&quot;.ST_SALESINVOICE.&quot; AND debtor.debtor_no=debtor_trans.debtor_no AND ISNULL(vd.id)
                        ORDER BY debtor_trans.trans_no DESC&quot;;
                    return combo_input($name, &#039;&#039;, $sql, &#039;TNO&#039;, &#039;IName&#039;,array(&#039;order&#039;=&gt;false));</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Sun, 13 Oct 2019 15:05:51 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36257#p36257</guid>
		</item>
		<item>
			<title><![CDATA[REP_ID 107 Void Invoice Still Exist In Drop-down]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36256#p36256</link>
			<description><![CDATA[<p>My company setting is $SysPrefs-&gt;print_invoice_no() is FALSE</p><p>HOW TO PRODUCE THIS ERROR<br />I tried voiding invoice and then created invoice with same reference number which I voided earlier. When I try to print invoice it is displaying two invoice with same reference in drop-down</p><p>SOLUTIONS<br />in reporting/includes/reports_classes.inc I made these changes to prevent voided invoice displaying in print invoice section</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case &#039;INVOICE&#039;:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $IV = $type_shortcuts[ST_SALESINVOICE];<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $ref = ($SysPrefs-&gt;print_invoice_no() == 1 ? &quot;trans_no&quot; : &quot;reference&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $sql = &quot;SELECT concat(debtor_trans.trans_no, &#039;-&#039;, debtor_trans.type) AS TNO,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; concat(&#039;$IV &#039;, debtor_trans.$ref,&#039; &#039;, debtor.name) as IName<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM &quot;.TB_PREF.&quot;debtors_master debtor,&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .TB_PREF.&quot;debtor_trans debtor_trans<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHERE type=&quot;.ST_SALESINVOICE.&quot; AND debtor.debtor_no=debtor_trans.debtor_no AND version = 0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ORDER BY debtor_trans.trans_no DESC&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return combo_input($name, &#039;&#039;, $sql, &#039;TNO&#039;, &#039;IName&#039;,array(&#039;order&#039;=&gt;false)); </p><p>In where clause I just added&nbsp; AND version = 0</p>]]></description>
			<author><![CDATA[null@example.com (dearmosin)]]></author>
			<pubDate>Sun, 13 Oct 2019 09:49:59 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36256#p36256</guid>
		</item>
	</channel>
</rss>
