<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — New tab]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=2084&amp;type=atom" />
	<updated>2012-05-05T20:49:29Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=2084</id>
		<entry>
			<title type="html"><![CDATA[Re: New tab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=12402#p12402" />
			<content type="html"><![CDATA[<p>As far as I remember:<br />Check installed_extensions.php and<br />check access setup (privileges).</p><p>barney</p>]]></content>
			<author>
				<name><![CDATA[barneyfa]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=5856</uri>
			</author>
			<updated>2012-05-05T20:49:29Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=12402#p12402</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: New tab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=12398#p12398" />
			<content type="html"><![CDATA[<p>Am also going through this problem and I don&#039;t seem to get it fixed, I have no idea what am doing wrongly, I have scoured the forums and can&#039;t figure out. Am trying to install new Human Resource tab and here is my code</p><p>&lt;?php<br />define (&#039;SS_HR&#039;,102&lt;&lt;8);</p><p>class human_resource extends application<br />{<br />&nbsp; &nbsp; &nbsp; &nbsp; function human_resource()<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; global $path_to_root;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;application(&quot;hr&quot;, _($this-&gt;help_context = &quot;&amp;Human Resource&quot;));</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;add_module(_(&quot;Human Resource&quot;));<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;add_lapp_function(0, _(&quot;Staff&quot;),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $path_to_root.&#039;/modules/human_resource/staff.php&#039;, &#039;SA_STAFF&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;add_module(_(&quot;Payroll Management&quot;));<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;add_lapp_function(1, _(&quot;Payroll Management&quot;),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $path_to_root.&#039;/modules/human_resource/payroll.php&#039;, &#039;SA_PAYROLL&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;add_extensions();<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />}</p><br /><p>class hooks_hr extends hooks {<br />&nbsp; &nbsp; &nbsp; &nbsp; var $module_name = &#039;human_resource&#039;; // extension module name.</p><p>&nbsp; &nbsp; &nbsp; &nbsp; function install_tabs($app) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set_ext_domain(&#039;modules/human_resource&#039;);&nbsp; &nbsp; &nbsp; &nbsp; // set text domain for gettext<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $app-&gt;add_application(new human_resource); // add menu tab defined by example_class<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set_ext_domain();<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><br /><p>&nbsp; &nbsp; &nbsp; &nbsp; function install_access()<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $security_sections[SS_HR] = _(&quot;Human Resource&quot;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $security_areas[&#039;SA_HR&#039;] = array(SS_HR|1, _(&quot;Human Resource&quot;));<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $security_areas[&#039;SA_PR&#039;] = array(SS_HR|2, _(&quot;Payroll&quot;));<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return array($security_areas, $security_sections);<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>}</p><p>?&gt;</p>]]></content>
			<author>
				<name><![CDATA[lawmaina78]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=14031</uri>
			</author>
			<updated>2012-05-05T11:02:34Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=12398#p12398</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: New tab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=9174#p9174" />
			<content type="html"><![CDATA[<p>Thksalotlancelot!!!</p><p>Thats it. Great&nbsp; <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" /> and of course: my fault. <img src="https://frontaccounting.com/punbb/img/smilies/sad.png" width="15" height="15" alt="sad" /></p><p>Thks again,<br />barney</p>]]></content>
			<author>
				<name><![CDATA[barneyfa]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=5856</uri>
			</author>
			<updated>2011-05-18T08:17:32Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=9174#p9174</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: New tab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=9173#p9173" />
			<content type="html"><![CDATA[<p>Setup &gt; Install/Activate extensions &gt; Choose the company desired in select box above</p><p>kuro</p>]]></content>
			<author>
				<name><![CDATA[captain_kuro]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=6107</uri>
			</author>
			<updated>2011-05-18T08:05:11Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=9173#p9173</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: New tab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=9171#p9171" />
			<content type="html"><![CDATA[<p>Where do i activate the extension for the current company?<br />barneyfa</p>]]></content>
			<author>
				<name><![CDATA[barneyfa]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=5856</uri>
			</author>
			<updated>2011-05-18T07:22:13Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=9171#p9171</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: New tab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=9168#p9168" />
			<content type="html"><![CDATA[<p>have you followed itronics advice? have you made sure claim extension is active for the current company?</p><p>kuro</p>]]></content>
			<author>
				<name><![CDATA[captain_kuro]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=6107</uri>
			</author>
			<updated>2011-05-18T04:46:50Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=9168#p9168</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: New tab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=9151#p9151" />
			<content type="html"><![CDATA[<p>@ captain_kuro:<br />Well, the extension shows now in system administratin, after adding security codes in access_levels.inc.<br />I thought, install_acess in hooks.php would do this for me. Unfortunately not. Maybe that&#039;s the reason, because no tab is added?!?!<br />Is there a way to see what happens during installation of an extension, i mean beside debugging??<br />barney</p>]]></content>
			<author>
				<name><![CDATA[barneyfa]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=5856</uri>
			</author>
			<updated>2011-05-17T09:17:23Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=9151#p9151</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: New tab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=9149#p9149" />
			<content type="html"><![CDATA[<p>Well, I adapted installed_extensions.php:<br />----------------------------------------<br />&nbsp; 43 =&gt; <br />&nbsp; array (<br />&nbsp; &nbsp; &#039;package&#039; =&gt; &#039;claim&#039;,<br />&nbsp; &nbsp; &#039;name&#039; =&gt; &#039;claim&#039;,<br />&nbsp; &nbsp; &#039;version&#039; =&gt; &#039;2.3.4&#039;,<br />&nbsp; &nbsp; &#039;type&#039; =&gt; &#039;extension&#039;,<br />&nbsp; &nbsp; &#039;active&#039; =&gt; true,<br />&nbsp; &nbsp; &#039;path&#039; =&gt; &#039;modules/claim&#039;,<br />&nbsp; ),<br />----------------------------------------<br />Wrong, right, necessary??<br />But the claim extension never shows in the privileges part of system administration???&nbsp; <br />Hmm??&nbsp; <img src="https://frontaccounting.com/punbb/img/smilies/sad.png" width="15" height="15" alt="sad" /><br />barney</p>]]></content>
			<author>
				<name><![CDATA[barneyfa]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=5856</uri>
			</author>
			<updated>2011-05-17T08:18:06Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=9149#p9149</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: New tab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=9140#p9140" />
			<content type="html"><![CDATA[<p>have you enable the access for your logged in account for this extension?<br />for example if you are logging in as &quot;admin&quot; which means the role System Administrator, you have to open Access Setup menu and enable all priviledges of Claim extension for the role System Administration.<br />After you enable them, logout and login again to see whether you can see anything now.</p>]]></content>
			<author>
				<name><![CDATA[captain_kuro]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=6107</uri>
			</author>
			<updated>2011-05-16T17:52:42Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=9140#p9140</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: New tab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=9139#p9139" />
			<content type="html"><![CDATA[<p>Files looks roughly right. You have to install and activate the extension for every company you want via Install/Activate Extensions.<br />Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2011-05-16T17:34:39Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=9139#p9139</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: New tab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=9135#p9135" />
			<content type="html"><![CDATA[<p>Still struggling....</p><p>What is wrong?<br />I added a folder &#039;claim&#039; in modules, then put in hooks.php and travel.php:<br />hooks.php:<br />&lt;?php<br />define (&#039;SS_CL&#039;,71&lt;&lt;8);</p><p>class claim_app extends application<br />{<br />&nbsp; &nbsp; &nbsp; &nbsp; function claim_app()<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;application(&quot;claim&quot;, _($this-&gt;help_context = &quot;&amp;Claim&quot;));</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;add_module(_(&quot;Claim Application&quot;));<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;add_lapp_function(0, _(&quot;Sales Travelling Claim&quot;),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $path_to_root.&#039;/modules/claim/travel.php&#039;, &#039;SA_CLAPPLY&#039;, MENU_CLAIM);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;add_extensions();<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />}</p><br /><p>class hooks_claim extends hooks {<br />&nbsp; &nbsp; &nbsp; &nbsp; var $module_name = &#039;claim&#039;; // extension module name.</p><p>&nbsp; &nbsp; &nbsp; &nbsp; function install_tabs($app) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set_ext_domain(&#039;modules/claim&#039;);&nbsp; &nbsp; &nbsp; &nbsp; // set text domain for gettext<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $app-&gt;add_application(new claim_app); // add menu tab defined by example_class<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set_ext_domain();<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><br /><p>&nbsp; &nbsp; &nbsp; &nbsp; function install_access()<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $security_sections[SS_CL] =&nbsp; &nbsp; &nbsp;_(&quot;Claim&quot;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $security_areas[&#039;SA_CLAPPLY&#039;] = array(SS_CL|1, _(&quot;Claim Application&quot;));<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $security_areas[&#039;SA_CLCHECK&#039;] = array(SS_CL|2, _(&quot;Check Claim&quot;));<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $security_areas[&#039;SA_CLAPPROVE&#039;] = array(SS_CL|3, _(&quot;Approve Claim&quot;));<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $security_areas[&#039;SA_CLPAYMENT&#039;] = array(SS_CL|4, _(&quot;Release Payment&quot;));<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $security_areas[&#039;SA_CLVIEW&#039;] = array(SS_CL|5, _(&quot;View My Claim&quot;));</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return array($security_areas, $security_sections);<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>}</p><p>?&gt;</p><p>travel.php:<br />&lt;?php<br />/**********************************************<br />Author: Joe Hunt<br />Name: Import of CSV formatted customers<br />Free software under GNU GPL</p><p>This module helps to upload a bunch a customers from a csv file.<br />Modified by Gaston Huot 20100626 to take into account the new security included in version 2.2 and add a few colums:<br />-Customer short name<br />-Sales_Group for the branch. In this case you have to specify the id, not the name-despription<br />***********************************************/<br />$page_security = &#039;SA_CLAPPLY&#039;;<br />$path_to_root=&quot;../..&quot;;</p><p>include($path_to_root . &quot;/includes/session.inc&quot;);<br />add_access_extensions();</p><p>page(&quot;Import of CSV formatted Customers&quot;);</p><p>include_once($path_to_root . &quot;/includes/ui.inc&quot;);<br />include_once($path_to_root . &quot;/includes/data_checks.inc&quot;);</p><p>include_once($path_to_root . &quot;/sales/includes/db/branches_db.inc&quot;);<br />include_once($path_to_root . &quot;/sales/includes/db/customers_db.inc&quot;);</p><p>error_reporting(E_ALL);<br />ini_set(&quot;display_errors&quot;, &quot;on&quot;);</p><p>if (isset($_POST[&#039;import&#039;]))<br />{<br />&nbsp; &nbsp; if (isset($_FILES[&#039;imp&#039;]) &amp;&amp; $_FILES[&#039;imp&#039;][&#039;name&#039;] != &#039;&#039;)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; $filename = $_FILES[&#039;imp&#039;][&#039;tmp_name&#039;];<br />&nbsp; &nbsp; &nbsp; &nbsp; $sep = $_POST[&#039;sep&#039;];</p><p>&nbsp; &nbsp; &nbsp; &nbsp; $fp = @fopen($filename, &quot;r&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; if (!$fp)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; die(&quot;can not open file $filename&quot;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; $lines = $i = $j = 0;<br />&nbsp; &nbsp; &nbsp; &nbsp; // id; name; short_name; address1; address2; address3; address4; area; sales_group; phone; fax; email; contact; tax_id; currency; tax_group; gruppe; ktoart; mandant; ktotyp; adresse; sammelkto; bebuchbarkeit; EULand; EUWarenbewegung; EUDreiecksgeschaeft; zahlungskond; <br />&nbsp; &nbsp; &nbsp; &nbsp; while ($data = fgetcsv($fp, 4096, $sep))<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($lines++ == 0)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; list($id, $name, $short_name, $addr1, $addr2, $addr3, $addr4, $area, $sales_group, $phone, $fax, $email, $contact, $tax_id, $currency, $tax_group, $gruppe, $ktoart, $mandant, $ktotyp, $adresse, $sammelkto, $bebuchbarkeit, $euland, $euwarenbewegung, $eudreiecksgeschaeft, $zahlungskond) = $data;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $name = db_escape($name);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $short_name= db_escape($short_name);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $addr = &quot;&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($addr1 != &quot;&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $addr .= &quot;$addr1\n&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($addr2 != &quot;&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $addr .= &quot;$addr2\n&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($addr3 != &quot;&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $addr .= &quot;$addr3\n&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($addr4 != &quot;&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $addr .= &quot;$addr4\n&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $addr = db_escape($addr);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $sql = &quot;SELECT area_code, description FROM &quot;.TB_PREF.&quot;areas WHERE description=&#039;$area&#039;&quot;;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $result = db_query($sql, &quot;could not get area&quot;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $row = db_fetch_row($result);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!$row)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $sql = &quot;INSERT INTO &quot;.TB_PREF.&quot;areas (description) VALUES (&#039;$area&#039;)&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_query($sql,&quot;The sales area could not be added&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $area_code = db_insert_id();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $area_code = $row[0];<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($currency == &quot;&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $currency = get_company_pref(&quot;curr_default&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $row = get_currency($currency);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!$row)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; add_currency($currency, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $taxgid = &quot;&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($tax_group != &quot;&quot;) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $sql = &quot;select id from &quot;.TB_PREF.&quot;tax_groups WHERE name=&#039;&quot;.$tax_group.&quot;&#039;&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $result = db_query($sql, &quot;Non Taxable Group&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $row = db_fetch_row($result);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($row) $taxgid = $row[0];<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($taxgid == &quot;&quot;) $taxgid = $_POST[&#039;tax_group_id&#039;];<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($id != &quot;&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $sql = &quot;SELECT debtor_no FROM &quot;.TB_PREF.&quot;debtors_master WHERE debtor_no=$id&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $sql = &quot;SELECT debtor_no FROM &quot;.TB_PREF.&quot;debtors_master WHERE name=$name&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $result = db_query($sql,&quot;customer could not be retreived&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $row = db_fetch_row($result);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!$row)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($id != &quot;&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $sql = &quot;INSERT INTO &quot;.TB_PREF.&quot;debtors_master (debtor_no, name, debtor_ref, address, email,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tax_id, curr_code, sales_type, payment_terms, credit_status, zahlungskond)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VALUES ($id, $name, $short_name, $addr, &#039;$email&#039;, &#039;$tax_id&#039;, &#039;$currency&#039;, {$_POST[&#039;sales_type&#039;]},<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {$_POST[&#039;payment_terms&#039;]}, 1, $zahlungskond)&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $sql = &quot;INSERT INTO &quot;.TB_PREF.&quot;debtors_master (name, debtor_ref, address, email,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tax_id, curr_code, sales_type, payment_terms, credit_status, zahlungskond)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VALUES ($name, $short_name , $addr, &#039;$email&#039;, &#039;$tax_id&#039;, &#039;$currency&#039;, {$_POST[&#039;sales_type&#039;]},<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {$_POST[&#039;payment_terms&#039;]}, 1, $zahlungskond)&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // print $sql . &quot;&lt;br&gt;/n&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_query($sql, &quot;The customer could not be added&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($id == &quot;&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $id = db_insert_id();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $sql = &quot;INSERT INTO &quot;.TB_PREF.&quot;cust_branch (debtor_no, br_name, branch_ref, br_address, area, salesman, group_no, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; phone, fax, contact_name, email, default_location, tax_group_id, sales_account,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sales_discount_account, receivables_account, payment_discount_account, br_post_address)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VALUES ($id, $name, $short_name, $addr, &#039;$area_code&#039;, &#039;{$_POST[&#039;salesman&#039;]}&#039;, &#039;$sales_group&#039;, &#039;$phone&#039;, &#039;$fax&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;$contact&#039;, &#039;$email&#039;, &#039;{$_POST[&#039;default_location&#039;]}&#039;, $taxgid, &#039;{$_POST[&#039;sales_account&#039;]}&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;{$_POST[&#039;sales_discount_account&#039;]}&#039;, &#039;{$_POST[&#039;receivables_account&#039;]}&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;{$_POST[&#039;payment_discount_account&#039;]}&#039;, $addr)&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // print $sql . &quot;&lt;br&gt;/n&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_query($sql, &quot;The customer branch could not be added&quot;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $i++;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $sql = &quot;UPDATE &quot;.TB_PREF.&quot;debtors_master <br />&nbsp; &nbsp; &nbsp; SET address=$addr,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; email=&#039;$email&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tax_id=&#039;$tax_id&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; debtor_ref=$short_name,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; curr_code=&#039;$currency&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sales_type={$_POST[&#039;sales_type&#039;]},<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; payment_terms={$_POST[&#039;payment_terms&#039;]},<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; zahlungskond=&#039;$zahlungskond&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHERE name=$name&quot;;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // print $sql . &quot;&lt;br&gt;/n&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_query($sql, &quot;The customer could not be updated&quot;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $j++;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; @fclose($fp);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; display_notification(&quot;$i customer posts created, $j customer posts updated.&quot;);</p><p>&nbsp; &nbsp; }<br />&nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; display_error(&quot;No CSV file selected&quot;);<br />}</p><p>start_form(true);</p><p>start_table(TABLESTYLE2, &quot;width=40%&quot;);<br />&nbsp; &nbsp; <br />table_section_title(&quot;Default GL Accounts&quot;);</p><p>$company_record = get_company_prefs();</p><p>if (!isset($_POST[&#039;sales_account&#039;]) || $_POST[&#039;sales_account&#039;] == &quot;&quot;)<br />&nbsp; &nbsp;&nbsp; &nbsp; $_POST[&#039;sales_account&#039;] = $company_record[&quot;default_sales_act&quot;];</p><p>if (!isset($_POST[&#039;sales_discount_account&#039;]) || $_POST[&#039;sales_discount_account&#039;] == &quot;&quot;)<br />&nbsp; &nbsp;&nbsp; &nbsp; $_POST[&#039;sales_discount_account&#039;] = $company_record[&quot;default_sales_discount_act&quot;];</p><p>if (!isset($_POST[&#039;receivables_account&#039;]) || $_POST[&#039;receivables_account&#039;] == &quot;&quot;)<br />&nbsp; &nbsp; $_POST[&#039;receivables_account&#039;] = $company_record[&quot;debtors_act&quot;];</p><p>if (!isset($_POST[&#039;payment_discount_account&#039;]) || $_POST[&#039;payment_discount_account&#039;] == &quot;&quot;)<br />&nbsp; &nbsp; $_POST[&#039;payment_discount_account&#039;] = $company_record[&quot;default_prompt_payment_act&quot;];</p><p>if (!isset($_POST[&#039;sep&#039;]))<br />&nbsp; &nbsp; $_POST[&#039;sep&#039;] = &quot;;&quot;;</p><p>gl_all_accounts_list_row(&quot;Sales Account:&quot;, &#039;sales_account&#039;, $_POST[&#039;sales_account&#039;]);<br />gl_all_accounts_list_row(&quot;Sales Discount Account:&quot;, &#039;sales_discount_account&#039;, $_POST[&#039;sales_discount_account&#039;]);<br />gl_all_accounts_list_row(&quot;Receivables Account:&quot;, &#039;receivables_account&#039;, $_POST[&#039;receivables_account&#039;]);<br />gl_all_accounts_list_row(&quot;Payment Discount Account:&quot;, &#039;payment_discount_account&#039;, $_POST[&#039;payment_discount_account&#039;]);</p><p>table_section_title(&quot;Separator, Location, Tax Type, Sales Type, Sales Person and Payment Terms&quot;);<br />text_row(&quot;Field separator:&quot;, &#039;sep&#039;, $_POST[&#039;sep&#039;], 2, 1);<br />locations_list_row(&quot;Location:&quot;, &#039;default_location&#039;, null);<br />// This was a bug. Wrong Tax list - Tax Location not Item Tax Types<br />//item_tax_types_list_row(&quot;Item Tax Type:&quot;, &#039;tax_group_id&#039;, null);<br />tax_groups_list_row(_(&quot;Default Tax Group:&quot;), &#039;tax_group_id&#039;, null);<br />sales_types_list_row(&quot;Sales Type:&quot;, &#039;sales_type&#039;, null);<br />sales_persons_list_row(&quot;Sales Person&quot;, &#039;salesman&#039;, null);<br />payment_terms_list_row(&quot;Payment Terms&quot;, &#039;payment_terms&#039;, null);<br />label_row(&quot;CSV Import File:&quot;, &quot;&lt;input type=&#039;file&#039; id=&#039;imp&#039; name=&#039;imp&#039;&gt;&quot;);</p><p>end_table(1);</p><p>submit_center(&#039;import&#039;, &quot;Import CSV File&quot;);</p><p>end_form();</p><p>end_page();</p><p>?&gt;</p><br /><p>Then i installed the extension, made it active, but no success: Nothing can&#039;t be seen....&nbsp; &nbsp; <img src="https://frontaccounting.com/punbb/img/smilies/sad.png" width="15" height="15" alt="sad" /></p><br /><p>Any idea?<br />barney</p>]]></content>
			<author>
				<name><![CDATA[barneyfa]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=5856</uri>
			</author>
			<updated>2011-05-16T13:20:41Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=9135#p9135</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: New tab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=9132#p9132" />
			<content type="html"><![CDATA[<p>Very helpful...<br />thanks, barney</p>]]></content>
			<author>
				<name><![CDATA[barneyfa]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=5856</uri>
			</author>
			<updated>2011-05-16T10:27:09Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=9132#p9132</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: New tab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=9131#p9131" />
			<content type="html"><![CDATA[<p>You can take a look at this thread <a href="https://frontaccounting.com/punbb/viewtopic.php?id=1869">https://frontaccounting.com/punbb/viewtopic.php?id=1869</a> where evilive trying to create a new extension</p>]]></content>
			<author>
				<name><![CDATA[captain_kuro]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=6107</uri>
			</author>
			<updated>2011-05-16T10:09:47Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=9131#p9131</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[New tab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=9078#p9078" />
			<content type="html"><![CDATA[<p>I would like to add some new tab.<br />How do i create one new and how do i specify the position ?</p><p>barney</p>]]></content>
			<author>
				<name><![CDATA[barneyfa]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=5856</uri>
			</author>
			<updated>2011-05-10T08:41:17Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=9078#p9078</id>
		</entry>
</feed>
