<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Test out new Sales Map and other Modules]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7599&amp;type=atom" />
	<updated>2018-07-22T00:20:13Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=7599</id>
		<entry>
			<title type="html"><![CDATA[Re: Test out new Sales Map and other Modules]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=32269#p32269" />
			<content type="html"><![CDATA[<p>While it&#039;s recognized and listed, I could not activate it.</p><p>Whenever I put a tick on the checkbox and save, FA says it is saved succesfully while it actually not </p><p>Upon logout and login back again the checkbox won&#039;t be ticked</p>]]></content>
			<author>
				<name><![CDATA[aleifuuwork]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=42567</uri>
			</author>
			<updated>2018-07-22T00:20:13Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=32269#p32269</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Test out new Sales Map and other Modules]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=32268#p32268" />
			<content type="html"><![CDATA[<p>&quot;Unknown&quot; is okay for third party extensions.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-07-21T13:57:02Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=32268#p32268</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Test out new Sales Map and other Modules]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=32267#p32267" />
			<content type="html"><![CDATA[<p>I&#039;m definitely interested in trying out some of these newer extension, especially Sales Map since I&#039;m developing somewhat similar to like this using Leaflet (https://leafletjs.com/) to map out company customers and such</p><p>I&#039;m new to FA environment and started only recently using FA24. Anyway, How do you get manually installed extensions such as the one @apmuthu hosts here to work correctly ?</p><p>I have modify <strong>./installed_extensions.php</strong> to include the new module and update <strong>$next_extension_id</strong> correctly. for example :<br /></p><div class="codebox"><pre><code>5 =&gt;
    array (
    &#039;name&#039; =&gt; &#039;Bank GL Inquiry (new)&#039;,
    &#039;package&#039; =&gt; &#039;bank_gl_inquiry&#039;,
    &#039;version&#039; =&gt; &#039;2.4.0-4&#039;,
    &#039;type&#039; =&gt; &#039;extension&#039;,
    &#039;active&#039; =&gt; false,
    &#039;path&#039; =&gt; &#039;modules/bank_gl_inquiry&#039;,
  ),</code></pre></div><p>I have also made sure appropriate permissions are already assigned to bank_gl_inquiry for www-data</p><p>On Setup =&gt; Install/Activate Extensions, the new modules are listed but it&#039;s unknown in the column <strong>Installed</strong> and <strong>Available</strong> </p><p>What steps am I missing ?</p><p>Cheers</p>]]></content>
			<author>
				<name><![CDATA[aleifuuwork]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=42567</uri>
			</author>
			<updated>2018-07-21T13:41:04Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=32267#p32267</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Test out new Sales Map and other Modules]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=32155#p32155" />
			<content type="html"><![CDATA[<p>Yes it works.. I guess you missed the brackets ..should be like:</p><p>if (isset($_GET[&#039;bank_account&#039;])) {<br />&nbsp; &nbsp; $_POST[&#039;bank_account&#039;] = $_GET[&#039;bank_account&#039;];<br />}</p>]]></content>
			<author>
				<name><![CDATA[rafat]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41964</uri>
			</author>
			<updated>2018-07-10T14:53:17Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=32155#p32155</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Test out new Sales Map and other Modules]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=32148#p32148" />
			<content type="html"><![CDATA[<p>1.&nbsp; By design, the Bank GL Inquiry report is cluttered with GL entries.&nbsp; &nbsp;If you do not want the GL entries, then use the built-in Bank Inquiry report.&nbsp; Indeed, I don&#039;t use the GL report personally, but was requested by accounting staff.</p><p>2. The report relies on additional core change to gl_bank.php for this function to work.&nbsp; It might work if you add something like</p><div class="codebox"><pre><code>if isset($_GET[&#039;bank_account&#039;])
    $_POST[&#039;bank_account&#039;] = $_GET[&#039;bank_account&#039;];</code></pre></div><p>&nbsp; <br />All the core changes to that file are:</p><div class="codebox"><pre><code>diff --git a/core/gl/gl_bank.php b/core/gl/gl_bank.php
index 71e2c04..0897a1b 100644
--- a/core/gl/gl_bank.php
+++ b/core/gl/gl_bank.php
@@ -30,6 +30,8 @@ if ($SysPrefs-&gt;use_popup_windows)
 if (user_use_date_picker())
     $js .= get_js_date_picker();
 
+set_posts(array(&quot;bank_account&quot;));
+
 if (isset($_GET[&#039;NewPayment&#039;])) {
     $_SESSION[&#039;page_title&#039;] = _($help_context = &quot;Bank Account Payment Entry&quot;);
     create_cart(ST_BANKPAYMENT, 0);
@@ -43,6 +45,15 @@ if (isset($_GET[&#039;NewPayment&#039;])) {
     $_SESSION[&#039;page_title&#039;] = _($help_context = &quot;Modify Bank Deposit Entry&quot;).&quot; #&quot;.$_GET[&#039;trans_no&#039;];
     create_cart(ST_BANKDEPOSIT, $_GET[&#039;trans_no&#039;]);
 }
+
+if (isset($_SERVER[&#039;HTTP_REFERER&#039;])) {
+    $referer=parse_url($_SERVER[&#039;HTTP_REFERER&#039;], PHP_URL_PATH);
+    if (basename($referer) == &quot;index.php&quot;)
+        unset($_SESSION[&#039;HTTP_REFERER&#039;]);
+    else if ($referer != $_SERVER[&#039;PHP_SELF&#039;])
+        $_SESSION[&#039;HTTP_REFERER&#039;] = $_SERVER[&#039;HTTP_REFERER&#039;];
+}
+
 page($_SESSION[&#039;page_title&#039;], false, false, &#039;&#039;, $js);
 
 //-----------------------------------------------------------------------------------------------
@@ -78,9 +89,9 @@ if (isset($_GET[&#039;AddedID&#039;]))
 
     display_note(get_gl_view_str($trans_type, $trans_no, _(&quot;&amp;View the GL Postings for this Payment&quot;)));
 
-    hyperlink_params($_SERVER[&#039;PHP_SELF&#039;], _(&quot;Enter Another &amp;Payment&quot;), &quot;NewPayment=yes&quot;);
+    hyperlink_params($_SERVER[&#039;PHP_SELF&#039;], _(&quot;Enter Another &amp;Payment&quot;), &quot;NewPayment=yes&amp;date_=&quot;.$_GET[&#039;date_&#039;].&quot;&amp;bank_account=&quot;.$_POST[&#039;bank_account&#039;]);
 
-    hyperlink_params($_SERVER[&#039;PHP_SELF&#039;], _(&quot;Enter A &amp;Deposit&quot;), &quot;NewDeposit=yes&quot;);
+    hyperlink_params($_SERVER[&#039;PHP_SELF&#039;], _(&quot;Enter A &amp;Deposit&quot;), &quot;NewDeposit=yes&amp;date_=&quot;.$_GET[&#039;date_&#039;].&quot;&amp;bank_account=&quot;.$_POST[&#039;bank_account&#039;]);
 
     hyperlink_params(&quot;$path_to_root/admin/attachments.php&quot;, _(&quot;Add an Attachment&quot;), &quot;filterType=$trans_type&amp;trans_no=$trans_no&quot;);
 
@@ -112,9 +123,9 @@ if (isset($_GET[&#039;AddedDep&#039;]))
 
     display_note(get_gl_view_str($trans_type, $trans_no, _(&quot;View the GL Postings for this Deposit&quot;)));
 
-    hyperlink_params($_SERVER[&#039;PHP_SELF&#039;], _(&quot;Enter Another Deposit&quot;), &quot;NewDeposit=yes&quot;);
+    hyperlink_params($_SERVER[&#039;PHP_SELF&#039;], _(&quot;Enter Another Deposit&quot;), &quot;NewDeposit=yes&amp;date_=&quot;.$_GET[&#039;date_&#039;].&quot;&amp;bank_account=&quot;.$_POST[&#039;bank_account&#039;]);
 
-    hyperlink_params($_SERVER[&#039;PHP_SELF&#039;], _(&quot;Enter A Payment&quot;), &quot;NewPayment=yes&quot;);
+    hyperlink_params($_SERVER[&#039;PHP_SELF&#039;], _(&quot;Enter A Payment&quot;), &quot;NewPayment=yes&amp;date_=&quot;.$_GET[&#039;date_&#039;].&quot;&amp;bank_account=&quot;.$_POST[&#039;bank_account&#039;]);
 
     display_footer_exit();
 }
@@ -197,7 +208,10 @@ function create_cart($type, $trans_no)
 
     } else {
         $cart-&gt;reference = $Refs-&gt;get_next($cart-&gt;trans_type, null, $cart-&gt;tran_date);
-        $cart-&gt;tran_date = new_doc_date();
+            if (isset($_GET[&#039;date_&#039;]))
+                    $cart-&gt;tran_date  = $_GET[&#039;date_&#039;];
+                else
+                    $cart-&gt;tran_date = new_doc_date();
         if (!is_date_in_fiscalyear($cart-&gt;tran_date))
             $cart-&gt;tran_date = end_fiscalyear();
     }
@@ -300,6 +314,16 @@ if (isset($_POST[&#039;Process&#039;]) &amp;&amp; !check_trans())
 
     $trans_type = $trans[0];
        $trans_no = $trans[1];
+
+        // retain the reconciled status if desired by user
+        if (isset($_POST[&#039;reconciled&#039;])
+            &amp;&amp; $_POST[&#039;reconciled&#039;] == 1) {
+            $sql = &quot;UPDATE &quot;.TB_PREF.&quot;bank_trans SET reconciled=&quot;.db_escape($_POST[&#039;reconciled_date&#039;])
+                .&quot; WHERE type=&quot; . $trans_type . &quot; AND trans_no=&quot;.db_escape($trans_no);
+
+            db_query($sql, &quot;Can&#039;t change reconciliation status&quot;);
+        }
+
     new_doc_date($_POST[&#039;date_&#039;]);
 
     $_SESSION[&#039;pay_items&#039;]-&gt;clear_items();
@@ -307,12 +331,27 @@ if (isset($_POST[&#039;Process&#039;]) &amp;&amp; !check_trans())
 
     commit_transaction();
 
-    if ($new)
-        meta_forward($_SERVER[&#039;PHP_SELF&#039;], $trans_type==ST_BANKPAYMENT ?
-            &quot;AddedID=$trans_no&quot; : &quot;AddedDep=$trans_no&quot;);
-    else
-        meta_forward($_SERVER[&#039;PHP_SELF&#039;], $trans_type==ST_BANKPAYMENT ?
-            &quot;UpdatedID=$trans_no&quot; : &quot;UpdatedDep=$trans_no&quot;);
+    $params = &quot;&quot;;
+    $referer = &quot;&quot;;
+    if (!isset($_SESSION[&#039;HTTP_REFERER&#039;])) {
+        $referer=$_SERVER[&#039;PHP_SELF&#039;];
+        if ($new) {
+            $params .= ($trans_type==ST_BANKPAYMENT ?  &quot;AddedID=&quot; : &quot;AddedDep=&quot;);
+            $params .= &quot;$trans_no&amp;date_=&quot;.$_POST[&#039;date_&#039;].&quot;&amp;bank_account=&quot;.$_POST[&#039;bank_account&#039;];
+        } else
+            $params .= ($trans_type==ST_BANKPAYMENT ?
+                &quot;UpdatedID=$trans_no&quot; : &quot;UpdatedDep=$trans_no&quot;);
+    } else {
+        $referer=parse_url($_SESSION[&#039;HTTP_REFERER&#039;], PHP_URL_PATH);
+        $params = parse_url(htmlspecialchars_decode($_SESSION[&#039;HTTP_REFERER&#039;]), PHP_URL_QUERY);
+        $params = preg_replace(&#039;/[&amp;]*message.*/&#039;, &#039;&#039;, $params);
+        if (!empty($params))
+            $params .= &quot;&amp;&quot;;
+        $params .= &quot;message=&quot;;
+        $params .= ($trans_type==ST_BANKPAYMENT ? &quot;Payment&quot; : &quot;Deposit&quot;);
+        $params .= &quot; Completed&quot;;
+    }
+    meta_forward($referer, $params);
 
 }
 </code></pre></div>]]></content>
			<author>
				<name><![CDATA[Braath Waate]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41493</uri>
			</author>
			<updated>2018-07-09T12:27:29Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=32148#p32148</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Test out new Sales Map and other Modules]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=32147#p32147" />
			<content type="html"><![CDATA[<p>I agree with @poncho1234 for the Bank GL Inquiry to be standalone extension for the time being. I see it being a part of the core very soon ..maybe in the next release if possible. It does give a good view of the Bank GL. </p><p>Now been testing this extension.. another 2 Remarks:</p><p>1. The screen is cluttered with all GL enteries.. Instead I would&nbsp; like to have&nbsp; a button to expand/collapse the entries within a transaction.<br />2. The (Enter Another Payment) or (Enter A Deposit) button&nbsp; from the main screen always defaults to the current account even if one has already chosen another account. I would expect it to t go that specific account chosen to begin with.</p>]]></content>
			<author>
				<name><![CDATA[rafat]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41964</uri>
			</author>
			<updated>2018-07-09T11:20:07Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=32147#p32147</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Test out new Sales Map and other Modules]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=32144#p32144" />
			<content type="html"><![CDATA[<p>The Bank GL Inquiry - with memo can stand on it&#039;s own as an extension and then as apmuthu states replace the existing Bank Account Inquiry as and when<br />The Customer Statement Report - enhanced &amp; Sales Type Summary Report are suitable for extensions.</p><p>The Sales Map &amp; Picklist for deliveries require further work before they are &#039;stand-alone&#039; extensions; the picklist needs to be included in the sale map as if your business requires one of these it will probably require the other one as well.</p>]]></content>
			<author>
				<name><![CDATA[poncho1234]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19944</uri>
			</author>
			<updated>2018-07-08T16:58:11Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=32144#p32144</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Test out new Sales Map and other Modules]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=32142#p32142" />
			<content type="html"><![CDATA[<p>Let us push it for a later release when you have more time as vetting it and it&#039;s ramifications are important. At the moment, <a href="https://github.com/braathwaate/frontac24">@brathwaate&#039;s fork</a> can be used by those interested.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-07-08T16:24:51Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=32142#p32142</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Test out new Sales Map and other Modules]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=32141#p32141" />
			<content type="html"><![CDATA[<p>Hello Guys,</p><p>I am not sure, but if there are several of you Senior Members then we should probably implement it into core.</p><p>I am overloaded with work at present and I haven&#039;t got time to look into this project. Are we talking about an imideate or next major (2.5) release?</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2018-07-08T08:23:06Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=32141#p32141</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Test out new Sales Map and other Modules]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=32139#p32139" />
			<content type="html"><![CDATA[<p>@joe: is it worth adding in this core feature?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-07-08T04:30:03Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=32139#p32139</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Test out new Sales Map and other Modules]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=32136#p32136" />
			<content type="html"><![CDATA[<p>Yes.. Its working..</p>]]></content>
			<author>
				<name><![CDATA[rafat]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41964</uri>
			</author>
			<updated>2018-07-08T02:06:21Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=32136#p32136</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Test out new Sales Map and other Modules]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=32131#p32131" />
			<content type="html"><![CDATA[<p>Somehow my cut and paste did more cutting than pasting. <br /></p><div class="codebox"><pre><code>@@ -26,10 +26,35 @@ if (user_use_date_picker())
 if ($SysPrefs-&gt;use_popup_windows)
     $js .= get_js_open_window(800, 500);
     
+if (isset($_GET[&#039;trans_no&#039;])
+    &amp;&amp; isset($_GET[&#039;filterType&#039;])) {
+    $_POST[&#039;FromTransNo&#039;] = $_POST[&#039;ToTransNo&#039;] = $_POST[&#039;selected_id&#039;] = $_POST[&#039;trans_no&#039;] = $_GET[&#039;trans_no&#039;];
+    $_POST[&#039;filterType&#039;] = $_GET[&#039;filterType&#039;];
+    $_POST[&#039;ProcessVoiding&#039;] = true;
+}
+
+$referer=parse_url($_SERVER[&#039;HTTP_REFERER&#039;], PHP_URL_PATH);
+if (basename($referer) == &quot;index.php&quot;)
+    unset($_SESSION[&#039;HTTP_REFERER&#039;]);
+else if ($referer != $_SERVER[&#039;PHP_SELF&#039;])
+    $_SESSION[&#039;HTTP_REFERER&#039;] = $_SERVER[&#039;HTTP_REFERER&#039;];
+
 page(_($help_context = &quot;Void a Transaction&quot;), false, false, &quot;&quot;, $js);
 
 simple_page_mode(true);
 //----------------------------------------------------------------------------------------
+function returnToReferer($message)
+{
+    $referer=parse_url($_SESSION[&#039;HTTP_REFERER&#039;], PHP_URL_PATH);
+    $params = parse_url(htmlspecialchars_decode($_SESSION[&#039;HTTP_REFERER&#039;]), PHP_URL_QUERY);
+    $params = preg_replace(&#039;/&amp;message.*/&#039;, &#039;&#039;, $params);
+    if (!empty($params))
+        $params .= &quot;&amp;&quot;;
+    $params .= &quot;message=$message&quot;;
+
+    meta_forward($referer, $params);
+}
+
 function exist_transaction($type, $type_no)
 {
     $void_entry = get_voided_entry($type, $type_no);
@@ -287,6 +312,9 @@ function handle_void_transaction()
 
         if (!$msg) 
         {
+            if (isset($_SESSION[&#039;HTTP_REFERER&#039;]))
+                returnToReferer(&quot;Void Completed&quot;);
+
             display_notification_centered(_(&quot;Selected transaction has been voided.&quot;));
             unset($_POST[&#039;trans_no&#039;]);
             unset($_POST[&#039;memo_&#039;]);
@@ -324,6 +352,8 @@ if (isset($_POST[&#039;ConfirmVoiding&#039;]))
 
 if (isset($_POST[&#039;CancelVoiding&#039;]))
 {
+    if (isset($_SESSION[&#039;HTTP_REFERER&#039;]))
+        returnToReferer(&quot;Void Canceled&quot;);
     $selected_id = -1;
     $Ajax-&gt;activate(&#039;_page_body&#039;);
 }</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Braath Waate]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41493</uri>
			</author>
			<updated>2018-07-07T11:53:13Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=32131#p32131</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Test out new Sales Map and other Modules]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=32122#p32122" />
			<content type="html"><![CDATA[<p>Hi Braath,<br />Just testing the first half of the above and it seems its not filtering the transaction type. The txn numbers are correct but the type always defaults to Journal Entry.</p>]]></content>
			<author>
				<name><![CDATA[rafat]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41964</uri>
			</author>
			<updated>2018-07-07T02:48:23Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=32122#p32122</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Test out new Sales Map and other Modules]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=32116#p32116" />
			<content type="html"><![CDATA[<p>The delete button is a separate core feature.&nbsp; &nbsp;To add that, change void_transaction:</p><div class="codebox"><pre><code>+++ b/core/admin/void_transaction.php
@@ -26,10 +26,35 @@ if (user_use_date_picker())
 if ($SysPrefs-&gt;use_popup_windows)
        $js .= get_js_open_window(800, 500);
        
+if (isset($_GET[&#039;trans_no&#039;])
+    &amp;&amp; isset($_GET[&#039;filterType&#039;])) {
+    $_POST[&#039;FromTransNo&#039;] = $_POST[&#039;ToTransNo&#039;] = $_POST[&#039;selected_id&#039;] = $_POST[&#039;trans_no&#039;] = $_GET[&#039;trans_no&#039;];
+}

 page(_($help_context = &quot;Void a Transaction&quot;), false, false, &quot;&quot;, $js);</code></pre></div><p>Then if you want control to return back to the inquiry page (in this case, bank g/l inquiry) after the delete, you can add the http referer core feature.&nbsp; The code for both feature adds is:</p><div class="codebox"><pre><code>@@ -26,10 +26,35 @@ if (user_use_date_picker())
 if ($SysPrefs-&gt;use_popup_windows)
        $js .= get_js_open_window(800, 500);
        
+if (isset($_GET[&#039;trans_no&#039;])
+    &amp;&amp; isset($_GET[&#039;filterType&#039;])) {
+    $_POST[&#039;FromTransNo&#039;] = $_POST[&#039;ToTransNo&#039;] = $_POST[&#039;selected_id&#039;] = $_POST[&#039;trans_no&#039;] = $_GET[&#039;trans_no&#039;];
+}
+
+$referer=parse_url($_SERVER[&#039;HTTP_REFERER&#039;], PHP_URL_PATH);
+if (basename($referer) == &quot;index.php&quot;)
+    unset($_SESSION[&#039;HTTP_REFERER&#039;]);
+else if ($referer != $_SERVER[&#039;PHP_SELF&#039;])
+    $_SESSION[&#039;HTTP_REFERER&#039;] = $_SERVER[&#039;HTTP_REFERER&#039;];
+
 page(_($help_context = &quot;Void a Transaction&quot;), false, false, &quot;&quot;, $js);
 
 simple_page_mode(true);
 //----------------------------------------------------------------------------------------
+function returnToReferer($message)
+{
+    $referer=parse_url($_SESSION[&#039;HTTP_REFERER&#039;], PHP_URL_PATH);
+    $params = parse_url(htmlspecialchars_decode($_SESSION[&#039;HTTP_REFERER&#039;]), PHP_URL_QUERY);
+    $params = preg_replace(&#039;/&amp;message.*/&#039;, &#039;&#039;, $params);
+    if (!empty($params))
+        $params .= &quot;&amp;&quot;;
+    $params .= &quot;message=$message&quot;;
+
+    meta_forward($referer, $params);
+}
+
 function exist_transaction($type, $type_no)
 {
        $void_entry = get_voided_entry($type, $type_no);
@@ -287,6 +312,9 @@ function handle_void_transaction()
 
                if (!$msg) 
                {
+            if (isset($_SESSION[&#039;HTTP_REFERER&#039;]))
+                returnToReferer(&quot;Void Completed&quot;);
+
                        display_notification_centered(_(&quot;Selected transaction has been voided.&quot;));
                        unset($_POST[&#039;trans_no&#039;]);
                        unset($_POST[&#039;memo_&#039;]);
@@ -324,6 +352,8 @@ if (isset($_POST[&#039;ConfirmVoiding&#039;]))
 
 if (isset($_POST[&#039;CancelVoiding&#039;]))
 {
+    if (isset($_SESSION[&#039;HTTP_REFERER&#039;]))
+        returnToReferer(&quot;Void Canceled&quot;);
        $selected_id = -1;
        $Ajax-&gt;activate(&#039;_page_body&#039;);
 }</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Braath Waate]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41493</uri>
			</author>
			<updated>2018-07-06T11:55:05Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=32116#p32116</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Test out new Sales Map and other Modules]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=32114#p32114" />
			<content type="html"><![CDATA[<p>The Bank GL Inquiry works, just 2 remarks:</p><p>1. Not remembering the date (the ajax issue)<br />2. The delete button takes you to the general Void a Transaction screen. I thought it should take us to that specific transaction for deletion. I dont know how difficult it is to achieve that.</p><p>Looks promising.</p>]]></content>
			<author>
				<name><![CDATA[rafat]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41964</uri>
			</author>
			<updated>2018-07-06T09:34:30Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=32114#p32114</id>
		</entry>
</feed>
