<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Unhandled exception [0]: Call to undefined function | Same includes]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8026&amp;type=atom" />
	<updated>2019-02-28T20:38:03Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=8026</id>
		<entry>
			<title type="html"><![CDATA[Re: Unhandled exception [0]: Call to undefined function | Same includes]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34370#p34370" />
			<content type="html"><![CDATA[<p>Update:</p><p>Changed the submit before the end_form (); to the following:</p><p>&nbsp; &nbsp; submit_add_or_update_center($selected_id == -1, &#039;&#039;, &#039;both&#039;);</p><p>Now I get no error, but a &#039;spinner&#039; in the Preferences bar which spins for&nbsp; 6 or 7 seconds before becoming a yellow triangle with an exclamation mark.</p><p>I have sql debug on and also backtrace. Nothing erroneous displayed and no errors in /tmp.</p><p>Any thoughts?</p><p>Thanks.</p>]]></content>
			<author>
				<name><![CDATA[neholtz]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=42211</uri>
			</author>
			<updated>2019-02-28T20:38:03Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34370#p34370</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Unhandled exception [0]: Call to undefined function | Same includes]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34368#p34368" />
			<content type="html"><![CDATA[<p>Working on adding Batch Processing to FA:</p><p>I have two php scripts which have the identical includes (as below).<br />They are both located in the /batches/manage directory.<br />The first script calls two functions within the /batches/db/batches_db.inc file.<br />They both work without error.</p><p>The second script also calls two different functions also in the /batches/db/batches_db.inc file.<br />The first call to get_links($link_id) as seen below, works fine.<br />The second call to the function create_new_link() as seen below throws an error:<br />&nbsp; Unhandled exception [0]: Call to undefined function<br />The error displayed shows that the script is trying to call that function from the /batches/manage directory.<br />The function exists correctly in the /batches/db/batches_db.inc file.</p><p>Any assistance appreciated.</p><p>//-------------------------------------------------------------</p><p>$path_to_root = &quot;../..&quot;;</p><p>include_once($path_to_root . &quot;/includes/session.inc&quot;);<br />include_once($path_to_root . &quot;/includes/date_functions.inc&quot;);<br />include_once($path_to_root . &quot;/includes/ui.inc&quot;);<br />include_once($path_to_root . &quot;/batches/db/batches_db.inc&quot;);&nbsp; &nbsp; &nbsp; &nbsp; // db handling functions for batches</p><br /><p>link_id below comes from a another script calling this script:<br />//-------------------------------------------------------------</p><p>$link_id&nbsp; &nbsp;= $_GET[&#039;link_id&#039;];</p><p>// call to a function in /batches/db/batches.db.inc</p><p>$result = get_links($link_id);</p><p>// Results obtained without any problems.</p><br /><br /><p>NOTE: can_process() returns TRUE when the below is called.<br />//-------------------------------------------------------------------------------------</p><p>if ($Mode==&#039;ADD_ITEM&#039; &amp;&amp; can_process())<br />{<br />&nbsp; &nbsp; create_new_link($_POST[&#039;link_id&#039;], $_POST[&#039;batch_ref&#039;], $_POST[&#039;trans_id&#039;]);</p><p>&nbsp; &nbsp; display_notification(_(&#039;New transaction link has been added to selected batch&#039;));&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; $Mode = &#039;RESET&#039;;<br />}</p><br /><p>routine to display the new link to be added<br />//------------------------------------------------------------</p><p>&nbsp; &nbsp; if ($trans_id = $_GET[&#039;trans_id&#039;])&nbsp; &nbsp; &nbsp; &nbsp; // these come from calling script<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; $link_id&nbsp; &nbsp;= $_GET[&#039;link_id&#039;];<br />&nbsp; &nbsp; &nbsp; &nbsp; $batch_ref = $_GET[&#039;batch_ref&#039;];</p><p>&nbsp; &nbsp; &nbsp; &nbsp; $_POST[&#039;link_id&#039;]&nbsp; &nbsp;= $link_id;<br />&nbsp; &nbsp; &nbsp; &nbsp; $_POST[&#039;batch_ref&#039;] = $batch_ref;<br />&nbsp; &nbsp; &nbsp; &nbsp; $_POST[&#039;trans_id&#039;]&nbsp; = $trans_id;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; start_form($multi=false, $dummy=false, $action=&quot;POST&quot;, $name=&quot;newLink&quot;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; start_table(TABLESTYLE2);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; $th = array(_(&quot;Batch ID&quot;), _(&quot;Reference&quot;), _(&quot;Transaction ID&quot;), &quot;&quot;, &quot;&quot;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; inactive_control_column($th);<br />&nbsp; &nbsp; &nbsp; &nbsp; table_header($th);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; echo &quot;&lt;tr&gt;&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; echo &quot;&lt;td&gt;$link_id&lt;/td&gt;&lt;td&gt;$batch_ref&lt;/td&gt;&lt;td&gt;$trans_id&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; echo &quot;&lt;/tr&gt;&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; echo &quot;&lt;br /&gt;&quot;;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; end_table(1);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; $msg = &quot;Transaction &quot; . $trans_id . &quot; will be added to Batch &quot; . $link_id . &quot; &quot; . $batch_ref;<br />&nbsp; &nbsp; &nbsp; &nbsp; display_note($msg, 1, 1, &quot;&quot;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; submit_center(&#039;ADD_ITEM&#039;, _(&quot;Add&quot;), true, &#039;&#039;, &#039;default&#039;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; end_form();</p><p>&nbsp; &nbsp; }<br />//----------------------------------------------------------</p>]]></content>
			<author>
				<name><![CDATA[neholtz]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=42211</uri>
			</author>
			<updated>2019-02-28T17:57:13Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34368#p34368</id>
		</entry>
</feed>
