<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — REST API]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=7123</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7123&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in REST API.]]></description>
		<lastBuildDate>Wed, 09 Sep 2020 10:49:05 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=38321#p38321</link>
			<description><![CDATA[<p>I want to give frontaccounting access in other website which is hosted on other server. In that website there should be login option where we can enter user name, password and company name. After clicking login button, he should access creating Direct sales invoice and Direct purchase invoice form. After entering the data in invoices it saves data, in database. How we can give this feature in frontaccounting. Can anybody explain this??</p>]]></description>
			<author><![CDATA[null@example.com (sumitg.mukti)]]></author>
			<pubDate>Wed, 09 Sep 2020 10:49:05 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=38321#p38321</guid>
		</item>
		<item>
			<title><![CDATA[Re: REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33338#p33338</link>
			<description><![CDATA[<p>Hi! i&#039;ve got the api up and running. i can list sales orders and sales invoice. is there anyway i can list which orders are delivered or pending delivery? i&#039;ve tried using trans_type 13 in sales but it returned nothing. thank you</p><p>yantz</p>]]></description>
			<author><![CDATA[null@example.com (yantz)]]></author>
			<pubDate>Tue, 20 Nov 2018 09:27:04 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33338#p33338</guid>
		</item>
		<item>
			<title><![CDATA[Re: REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32617#p32617</link>
			<description><![CDATA[<p>@kvvaradha, </p><p>Hosting server currently running php 5.6.&nbsp; &nbsp;The only move beyond that available is php 7.0.31.</p><p>I am awaiting a callback from Hosting&#039;s escalated tech support as the Level 1 was unable to shed any light on the matter.</p><p>I will post their comments if/when I have their response.</p><p>Until then.....</p>]]></description>
			<author><![CDATA[null@example.com (neholtz)]]></author>
			<pubDate>Fri, 07 Sep 2018 03:23:11 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32617#p32617</guid>
		</item>
		<item>
			<title><![CDATA[Re: REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32616#p32616</link>
			<description><![CDATA[<p>It&#039;s better to check with your hosting provider. It looks like some modules are not working inside php library. If possible upgrade your PHP version than try this.</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Fri, 07 Sep 2018 01:32:07 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32616#p32616</guid>
		</item>
		<item>
			<title><![CDATA[Re: REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32615#p32615</link>
			<description><![CDATA[<p>Downloaded, unzipped and uploaded apmuthu&#039;s unofficial version for PHP 5.3 to MY_FA_URL/modules/api24/.</p><p>Edited util.php with applicable credentials for my FA installation.</p><p>Tested on same Host with the following result for https://MY_FA_URL/modules/api/category:</p><p>MY_HOST_URL.com is currently unable to handle this request.<br />HTTP ERROR 500</p><p>I noticed the following:</p><p>1. There is no error.log generated under /modules/api/</p><p>2. In comparing the index.php from apmuthu&#039;s version to the June 26, 2018 one, apmuthu&#039;s had:</p><p>&lt;?php<br />ini_set(&#039;html_errors&#039;, false);</p><p>include_once (&#039;config_api.php&#039;);<br />foreach (glob(&quot;src/*.php&quot;) as $filename)<br />&nbsp; &nbsp; include $filename;</p><p>use FAAPI\Inventory;<br />use FAAPI\InventoryLocations;<br />use FAAPI\Category;<br />use FAAPI\TaxTypes;<br />use FAAPI\TaxGroups;<br />use FAAPI\Customers;<br />use FAAPI\Suppliers;<br />use FAAPI\BankAccounts;<br />use FAAPI\GLAccounts;<br />use FAAPI\Currencies;<br />use FAAPI\InventoryCosts;<br />use FAAPI\Sales;<br />use FAAPI\Dimensions;<br />use FAAPI\Journal;<br />use FAAPI\Purchases;</p><p>Where the later version only had the use FAFPI\ namespaces.&nbsp; In other words without the following:</p><p>ini_set(&#039;html_errors&#039;, false);</p><p>include_once (&#039;config_api.php&#039;);<br />foreach (glob(&quot;src/*.php&quot;) as $filename)<br />&nbsp; &nbsp; include $filename;</p><p>So neither version will run for me.&nbsp; </p><p>It is important to note that my installed version of FA 2.4.4 is running perfectly fine on the same server with php 5.6.</p><p>Not sure of a path forward at this moment.</p>]]></description>
			<author><![CDATA[null@example.com (neholtz)]]></author>
			<pubDate>Thu, 06 Sep 2018 18:52:12 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32615#p32615</guid>
		</item>
		<item>
			<title><![CDATA[Re: REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32614#p32614</link>
			<description><![CDATA[<p>@kvvaradha, I will try apmuthu&#039;s version shortly.</p><p>I was trying to see why this version was not performing under php 5.6 which is the version selected on my host.</p><p>Here is the log error.log file under /modules/api/</p><p>Quoting:</p><p>[06-Sep-2018 11:38:38] PHP Warning:&nbsp; PHP Startup: Unable to load dynamic library &#039;/usr/php/56/usr/lib64/php/modules/imagick.so&#039; - /usr/php/56/usr/lib64/php/modules/imagick.so: undefined symbol: zend_new_interned_string in Unknown on line 0<br />[06-Sep-2018 11:38:38] PHP Warning:&nbsp; PHP Startup: Unable to load dynamic library &#039;/usr/php/56/usr/lib64/php/modules/pdo_mysql.so&#039; - /usr/php/56/usr/lib64/php/modules/pdo_mysql.so: undefined symbol: mysqlnd_allocator in Unknown on line 0<br />[06-Sep-2018 11:38:38] PHP Warning:&nbsp; PHP Startup: pdo_sqlite: Unable to initialize module<br />Module compiled with module API=20131226, debug=0, thread-safety=0<br />PHP&nbsp; &nbsp; compiled with module API=20060613, debug=0, thread-safety=0<br />These options need to match<br /> in Unknown on line 0<br />[06-Sep-2018 11:38:38] PHP Warning:&nbsp; PHP Startup: pdo_pgsql: Unable to initialize module<br />Module compiled with module API=20131226, debug=0, thread-safety=0<br />PHP&nbsp; &nbsp; compiled with module API=20060613, debug=0, thread-safety=0<br />These options need to match<br /> in Unknown on line 0<br />[06-Sep-2018 11:38:38] PHP Warning:&nbsp; PHP Startup: magickwand: Unable to initialize module<br />Module compiled with module API=20131226, debug=0, thread-safety=0<br />PHP&nbsp; &nbsp; compiled with module API=20060613, debug=0, thread-safety=0<br />These options need to match<br /> in Unknown on line 0<br />[06-Sep-2018 11:38:38] PHP Warning:&nbsp; PHP Startup: Unable to load dynamic library &#039;/usr/php/56/usr/lib64/php/modules/mailparse.so&#039; - /usr/php/56/usr/lib64/php/modules/mailparse.so: undefined symbol: zend_new_interned_string in Unknown on line 0<br />[06-Sep-2018 11:38:38] PHP Warning:&nbsp; PHP Startup: Unable to load dynamic library &#039;/usr/php/56/usr/lib64/php/modules/oauth.so&#039; - /usr/php/56/usr/lib64/php/modules/oauth.so: undefined symbol: zend_new_interned_string in Unknown on line 0<br />[06-Sep-2018 11:38:38] PHP Warning:&nbsp; PHP Startup: Unable to load dynamic library &#039;/usr/php/56/usr/lib64/php/modules/oci8.so&#039; - /usr/php/56/usr/lib64/php/modules/oci8.so: undefined symbol: zend_new_interned_string in Unknown on line 0<br />[06-Sep-2018 11:38:38] PHP Warning:&nbsp; PHP Startup: Unable to load dynamic library &#039;/usr/php/56/usr/lib64/php/modules/uploadprogress.so&#039; - /usr/php/56/usr/lib64/php/modules/uploadprogress.so: undefined symbol: zend_ini_string_ex in Unknown on line 0<br />[06-Sep-2018 11:38:38] PHP Parse error:&nbsp; syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or &#039;(&#039; in /home2/finishl4/public_html/erp/modules/api/index.php on line 2</p><p>End of Quoting.</p><p>Tech support from my Host has been unable to explain why calls to php 5.6 library modules are unable to be found.&nbsp; I am awaiting an escalated callback on the ticket.</p><p>Beyond that the question is if apmuthu&#039;s version for 5.3 will run under 5.6.&nbsp; I will try it and post results here.</p><p>neholtz</p>]]></description>
			<author><![CDATA[null@example.com (neholtz)]]></author>
			<pubDate>Thu, 06 Sep 2018 18:21:09 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32614#p32614</guid>
		</item>
		<item>
			<title><![CDATA[Re: REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32606#p32606</link>
			<description><![CDATA[<p>@neholtz, try apmuthus repo files. And if you have the same issue. Just copy ten lines of index.php inside API directory</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Thu, 06 Sep 2018 00:41:00 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32606#p32606</guid>
		</item>
		<item>
			<title><![CDATA[Re: REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32602#p32602</link>
			<description><![CDATA[<p>Hosting Server php is 5.6</p><p>I also could not find anywhere within the api files where those namespaces were defined.</p>]]></description>
			<author><![CDATA[null@example.com (neholtz)]]></author>
			<pubDate>Wed, 05 Sep 2018 19:20:53 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32602#p32602</guid>
		</item>
		<item>
			<title><![CDATA[Re: REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32600#p32600</link>
			<description><![CDATA[<p>You can use <a href="https://github.com/apmuthu/FA24extensions/tree/master/Extensions/api24">my unofficial version for PHP 5.3</a>.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Wed, 05 Sep 2018 19:15:37 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32600#p32600</guid>
		</item>
		<item>
			<title><![CDATA[Re: REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32594#p32594</link>
			<description><![CDATA[<p>Can you check your PHP version.? </p><p>Is it greater than 5.3 ?</p><p>Because the index.php line no 2 is namespace use . If your PHP is lower than 5.4 it won&#039;t work with namespace.</p><p>Hope it helps you</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Wed, 05 Sep 2018 17:34:02 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32594#p32594</guid>
		</item>
		<item>
			<title><![CDATA[Re: REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32592#p32592</link>
			<description><![CDATA[<p>Downloaded and unzipped frontaccounting-2.4-api.module.1.7 as directed to /modules/api/ directory.</p><p>Changes variables in util.php to match my current test company.</p><p>Directed browser to : https://MY_FA_URL/modules/api/category/ as suggested.</p><p>Received a blank page with no results.</p><p>In the /modules/api/error.log file the following:</p><p>PHP Parse error:&nbsp; syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or &#039;(&#039; in /MY_FA_URL/modules/api/index.php on line 2</p><p>Stuck here.&nbsp; Help or suggestions appreciated.</p><p>Note: &#039;MY_FA_URL&#039; replaced with actual URL to site.</p>]]></description>
			<author><![CDATA[null@example.com (neholtz)]]></author>
			<pubDate>Tue, 04 Sep 2018 15:56:31 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32592#p32592</guid>
		</item>
		<item>
			<title><![CDATA[Re: REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32093#p32093</link>
			<description><![CDATA[<p>All the $ variables need to be populated and then the sql needs to be extracted.<br />Read the <a href="https://frontaccounting.com/fawiki/index.php?n=Devel.TrobleshootingFrontAccounting"> Troubleshooting page in the Wiki</a>.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Thu, 05 Jul 2018 14:02:19 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32093#p32093</guid>
		</item>
		<item>
			<title><![CDATA[Re: REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32087#p32087</link>
			<description><![CDATA[<p>would you please explain more.<br />I want to post json object like below to insert an invoice:<br />{<br />&nbsp; &nbsp; &nbsp; &nbsp; &quot;customer_id&quot;:2,<br />&nbsp; &nbsp; &nbsp; &nbsp; &quot;order_date&quot;:&quot;06/27/2018&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &quot;ref&quot;:&quot;001/2018&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &quot;trans_type&quot;:&quot;ST_SALESINVOICE&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &quot;items&quot;:[<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {&quot;stock_id&quot;:103, &quot;qty&quot;:5, &quot;price&quot;:5555, &quot;discount&quot;:0,&quot;description&quot;:&quot;no desc&quot;}<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]<br />}<br />I want to know how _parse_next function handle the next reference if there is no record in journal table with trans_type=ST_SALESINVOICE <br />When I post this object dbquery in references.inc 170+ does not respond:<br />$sql = &quot;SELECT MAX(CAST(SUBSTR($ref_fld, &quot;.(strlen($prefix)+1).&quot;,LENGTH($ref_fld)-&quot;.(strlen($postfix)+strlen($prefix)).&quot;) AS UNSIGNED))&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&quot; FROM `$trans_table` tbl<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LEFT JOIN &quot;.TB_PREF.&quot;voided v ON tbl.`$tno_fld`=v.id AND v.type=$type&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&quot; WHERE ISNULL(v.id)&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .($type_fld ? &quot; AND tbl.`$type_fld`=$type&quot; : &#039;&#039;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&quot; AND `$ref_fld` REGEXP &quot;.db_escape(&#039;^&#039;.preg_quote($prefix).&#039;[0-9]*&#039;.preg_quote($postfix).&#039;$&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; $result = db_query($sql, &#039;cannot retrieve last reference&#039;);</p>]]></description>
			<author><![CDATA[null@example.com (saramsht)]]></author>
			<pubDate>Thu, 05 Jul 2018 09:20:48 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32087#p32087</guid>
		</item>
		<item>
			<title><![CDATA[Re: REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32086#p32086</link>
			<description><![CDATA[<p>Try to display the sql after the sql. The where clause addresses the issue of absence of voided entry.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Thu, 05 Jul 2018 08:36:09 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32086#p32086</guid>
		</item>
		<item>
			<title><![CDATA[Re: REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32085#p32085</link>
			<description><![CDATA[<p>Because there is no record with required trans_type in journal table.</p>]]></description>
			<author><![CDATA[null@example.com (saramsht)]]></author>
			<pubDate>Thu, 05 Jul 2018 08:29:04 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32085#p32085</guid>
		</item>
	</channel>
</rss>
