<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Import Inventory]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=2192&amp;type=atom" />
	<updated>2013-03-21T01:39:59Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=2192</id>
		<entry>
			<title type="html"><![CDATA[Re: Import Inventory]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=16111#p16111" />
			<content type="html"><![CDATA[<p>I changed code in import_items.php to</p><p>line 141&nbsp; &nbsp; &nbsp; &nbsp; if ($i == 0) $hdr .= $k . &quot;;&quot;; <br />line 142&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$str .= htmlspecialchars_decode($d) . &quot;;&quot;;</p><p>using &quot;;&quot; as separator instead of &quot;,&quot; when exporting.<br />so far it works.</p><p>Eric</p>]]></content>
			<author>
				<name><![CDATA[ericta]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=5299</uri>
			</author>
			<updated>2013-03-21T01:39:59Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=16111#p16111</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Import Inventory]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=15874#p15874" />
			<content type="html"><![CDATA[<p>Thank you.</p><p>Eric</p>]]></content>
			<author>
				<name><![CDATA[ericta]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=5299</uri>
			</author>
			<updated>2013-03-03T01:02:22Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=15874#p15874</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Import Inventory]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=15855#p15855" />
			<content type="html"><![CDATA[<p>No, it means you have to escape commas in the description field.&nbsp; that means you add &quot;\&quot; before each comma that&#039;s part of the &quot;description&quot; text so that the import module doesn&#039;t confuse those commas with field separators.&nbsp; You can do this in any spreadsheet program and then save the file to cvs format for import into FA.&nbsp; It&#039;s a bit of work, but using find and replace (find &quot;,&quot; and replace with &quot;\,&quot;) should help.</p><p>Hope that&#039;s helpful...</p><p>Regards,</p><p>Chris</p>]]></content>
			<author>
				<name><![CDATA[chrison]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=17070</uri>
			</author>
			<updated>2013-03-02T06:54:52Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=15855#p15855</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Import Inventory]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=15853#p15853" />
			<content type="html"><![CDATA[<p>does that mean I can&#039;t use this import plugin?</p><p>Thank you<br />Eric</p>]]></content>
			<author>
				<name><![CDATA[ericta]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=5299</uri>
			</author>
			<updated>2013-03-01T23:25:04Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=15853#p15853</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Import Inventory]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=15844#p15844" />
			<content type="html"><![CDATA[<p>Well, seems you have unescaped comma in description field, so the &#039;description&#039; is imported into columns C&amp;D, and all the following columns are shifted to the right.<br />Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2013-02-28T14:31:39Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=15844#p15844</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Import Inventory]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=15833#p15833" />
			<content type="html"><![CDATA[<p>category, units, dummy... fields are all wrong!<br />please see the link below<br />https://docs.google.com/file/d/0B8lA_TPXJ45GUXhrWldHWXQ4ak0/edit?usp=sharing</p><div class="quotebox"><cite>tom wrote:</cite><blockquote><p>humm... that does not help.</p><p>Which lines appear wrong?</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[ericta]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=5299</uri>
			</author>
			<updated>2013-02-28T01:46:14Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=15833#p15833</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Import Inventory]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=15820#p15820" />
			<content type="html"><![CDATA[<p>humm... that does not help.</p><p>Which lines appear wrong?</p>]]></content>
			<author>
				<name><![CDATA[tom]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=331</uri>
			</author>
			<updated>2013-02-27T03:39:21Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=15820#p15820</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Import Inventory]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=15818#p15818" />
			<content type="html"><![CDATA[<p>please see the link below</p><p>https://docs.google.com/file/d/0B2hEL1wolzPkYjFwZ1l3M/edit?usp=sharing</p><p>Thank you<br />Eric</p><br /><div class="quotebox"><cite>tom wrote:</cite><blockquote><p>can you show us the first few lines of the csv file?</p><p>tom</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[ericta]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=5299</uri>
			</author>
			<updated>2013-02-26T22:52:45Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=15818#p15818</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Import Inventory]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=15791#p15791" />
			<content type="html"><![CDATA[<p>can you show us the first few lines of the csv file?</p><p>tom</p>]]></content>
			<author>
				<name><![CDATA[tom]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=331</uri>
			</author>
			<updated>2013-02-25T02:47:07Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=15791#p15791</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Import Inventory]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=15790#p15790" />
			<content type="html"><![CDATA[<p>Hi all,</p><p>I installed csv import modules recently, exported item.csv took a look. but<br />most fields are placed wrong! eg. &quot;unit&quot; field has value like &quot;services&quot;. description string in &quot;category&quot; field...</p><p>Am I missing anything?</p><p>TIA<br />Eric</p>]]></content>
			<author>
				<name><![CDATA[ericta]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=5299</uri>
			</author>
			<updated>2013-02-25T00:53:09Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=15790#p15790</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Import Inventory]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=9697#p9697" />
			<content type="html"><![CDATA[<p>If you are running 2.3.5 you should be able to go to Setup-&gt;Install/Activate Extensions and see &quot;Inventory Items CSV Import&quot;</p><p>Once you install it, change the pull-down from &quot;Available&quot; to your site and make sure it is enabled.</p><p>Then go to Setup-&gt;Access Setup, Select your role (System Administrator) and click the check boxes for &quot;Import CSV Items&quot;<br />at the end of the list.</p><p>That will give you an Import option under the &quot;Items and Inventory&quot; tab, Maintenance sub tab on the right.</p><p>See the README.TXT in the modules/import_items/ directory</p><p>tom</p>]]></content>
			<author>
				<name><![CDATA[tom]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=331</uri>
			</author>
			<updated>2011-07-12T11:18:58Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=9697#p9697</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Import Inventory]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=9693#p9693" />
			<content type="html"><![CDATA[<p>Hi tclim</p><p>Sorry I have not responded sooner.&nbsp; Thank you for the very prompt and full reply.&nbsp; It was a bit above my &quot;pay grade&quot; but it gave me some pointers.&nbsp; I have the system up and undergoing testing.&nbsp; </p><p>I appreciate your help</p><p>Regards</p>]]></content>
			<author>
				<name><![CDATA[old_guy]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=2010</uri>
			</author>
			<updated>2011-07-12T08:22:17Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=9693#p9693</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Import Inventory]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=9565#p9565" />
			<content type="html"><![CDATA[<p>Hi old_guy,</p><p>&nbsp; In order to insert products into FA. You may refer to the table stock_master. For stock category, you may refer to stock_category.</p><p> Below are my sample code that I created to synchronize the item in FA. If you need to use it, you need to change the parameter values in the array Object. I have hardcoded for my testing.</p><p>-------------------------------------------------------------------------------------------------------------------------------------<br />$objInfo = array();&nbsp; &nbsp; &nbsp; &nbsp; </p><p>//Array Information&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />$objInfo[&#039;units&#039;] = &#039;Each&#039;;<br />$objInfo[&#039;units_of_measure&#039;] = &#039;0&#039;;<br />$objInfo[&#039;tax_type&#039;] = &#039;0&#039;;<br />$objInfo[&#039;qty&#039;] = &#039;1&#039;;&nbsp; &nbsp;&nbsp; <br />$objInfo[&#039;mb_flag&#039;] = &#039;B&#039;;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; </p><p>$objInfo[&#039;sales_act&#039;] = &#039;&#039;; <br />$objInfo[&#039;cogs_act&#039;] = &#039;&#039;;<br />$objInfo[&#039;inventory_account&#039;] = &#039;&#039;;<br />$objInfo[&#039;adjustment_account&#039;] = &#039;&#039;;<br />$objInfo[&#039;assembly_account&#039;] = &#039;&#039;;<br />$objInfo[&#039;dim1&#039;] = &#039;&#039;;<br />$objInfo[&#039;dim2&#039;] = &#039;&#039;;<br />$objInfo[&#039;actual_cost&#039;] = &#039;0&#039;;<br />$objInfo[&#039;last_cost&#039;] = &#039;0&#039;;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <br />$objInfo[&#039;labour_cost&#039;] = &#039;0&#039;;<br />$objInfo[&#039;overhead_cost&#039;] = &#039;0&#039;;<br />$objInfo[&#039;no_sale&#039;] = &#039;0&#039;;<br />$objInfo[&#039;editable&#039;] = &#039;0&#039;;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; <br />//Set information<br />$objInfo[&#039;stock_id&#039;] = &#039;123&#039;;<br />$objInfo[&#039;description&#039;] = &#039;abc&#039;;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />$objInfo[&#039;long_description&#039;] = &#039;this is a description of the item&#039;;<br />$objInfo[&#039;category&#039;] = &#039;productcategory&#039;;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <br />$objInfo[&#039;material_cost&#039;] = &#039;100.00&#039;;<br />$objInfo[&#039;price&#039;] = &#039;150.00&#039;<br />$objInfo[&#039;reorder_level&#039;] = &#039;10&#039;;<br />//FA Active Record = 0 and InActive = 1<br />$objInfo[&#039;inactive&#039;] = &#039;0&#039;</p><br /><br /><p>Method name: syncItem<br />-------------------------------------------------------------------------------------------------------------------------------------</p><p>/*<br /> * To Sync Item <br /> * $arrObj&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&nbsp; &nbsp; Item Array Object<br /> * $return&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&nbsp; &nbsp; Item ID<br /> */<br />function syncItem($arrObj) {<br />&nbsp; &nbsp; global $log;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; $selected_id = &#039;&#039;;<br />&nbsp; &nbsp; $category_id = &#039;&#039;;<br />&nbsp; &nbsp; $item_unit_id = &#039;&#039;;</p><p>&nbsp; &nbsp; //Retrieve Item Units&nbsp; &nbsp; <br />&nbsp; &nbsp; $sql = &quot;SELECT abbr FROM &quot;.TB_PREF.&quot;item_units WHERE UPPER(name) = UPPER(&quot; . db_escape($arrObj[&#039;units&#039;]) .&quot;)&quot;;<br />&nbsp; &nbsp; $result = db_query($sql, &quot;Unable to find units&quot;);<br />&nbsp; &nbsp; $row = db_fetch_row($result);<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; if (!$row) {&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; write_item_unit(&#039;&#039;, strtolower($arrObj[&#039;units&#039;]), $arrObj[&#039;units&#039;], $arrObj[&#039;units_of_measure&#039;]);<br />&nbsp; &nbsp; &nbsp; &nbsp; $item_unit_id = strtolower($arrObj[&#039;units&#039;]);<br />&nbsp; &nbsp; } else {<br />&nbsp; &nbsp; &nbsp; &nbsp; $item_unit_id = $row[0];<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; //Retrieve Category Id&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br /> &nbsp; &nbsp; $sqlCategory = &quot;SELECT category_id FROM &quot;.TB_PREF.&quot;stock_category WHERE description LIKE &quot; . db_escape(stripslashes(trim($arrObj[&#039;category&#039;])));<br />&nbsp; &nbsp; $resultCategory = db_query($sqlCategory, &quot;could not get stock category&quot;);</p><p>&nbsp; &nbsp; $rowCategory = db_fetch_row($resultCategory);<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; if (!$rowCategory) { //If category not exist, add new category <br />&nbsp; &nbsp; &nbsp; &nbsp; add_item_category($arrObj[&#039;category&#039;],$arrObj[&#039;tax_type&#039;],&nbsp; &nbsp; $arrObj[&#039;sales_act&#039;],<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $arrObj[&#039;cogs_act&#039;], $arrObj[&#039;inventory_account&#039;], $arrObj[&#039;adjustment_account&#039;], $arrObj[&#039;assembly_account&#039;], <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $item_unit_id, $arrObj[&#039;mb_flag&#039;],&nbsp; &nbsp; $arrObj[&#039;dim1&#039;], $arrObj[&#039;dim2&#039;],&nbsp; &nbsp; $arrObj[&#039;no_sale&#039;]);<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; $category_id = db_insert_id();<br />&nbsp; &nbsp; } else {<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; $category_id = $rowCategory[0];<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; //Query Stock ID<br />&nbsp; &nbsp; $sql = &quot;SELECT a.stock_id FROM &quot;.TB_PREF.&quot;stock_master a WHERE (a.stock_id = &quot; . db_escape($arrObj[&#039;stock_id&#039;]) . &quot; || a.description = &quot; . db_escape($arrObj[&#039;description&#039;]) . &quot;)&quot;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; $result = db_query($sql, &quot;stock item could not be retreived&quot;);<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; $row = db_fetch_row($result);</p><p>&nbsp; &nbsp; //Default to returning ID<br />&nbsp; &nbsp; $selected_id = $arrObj[&#039;stock_id&#039;];<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; //Retrieve the default currency<br />&nbsp; &nbsp; $currency_code = get_company_pref(&#039;curr_default&#039;);</p><p>&nbsp; &nbsp; //Insert or update Item<br />&nbsp; &nbsp; if (!$row) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; add_item($arrObj[&#039;stock_id&#039;], $arrObj[&#039;description&#039;],<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $arrObj[&#039;long_description&#039;], $category_id, $arrObj[&#039;tax_type&#039;],<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $item_unit_id, $arrObj[&#039;mb_flag&#039;], $arrObj[&#039;sales_act&#039;],<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $arrObj[&#039;inventory_account&#039;], $arrObj[&#039;cogs_act&#039;],<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $arrObj[&#039;adjustment_account&#039;], $arrObj[&#039;assembly_account&#039;], <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $arrObj[&#039;dim1&#039;], $arrObj[&#039;dim2&#039;],$arrObj[&#039;no_sale&#039;],$arrObj[&#039;editable&#039;]);<br />&nbsp; &nbsp; } else {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $sql = &quot;UPDATE &quot;.TB_PREF.&quot;stock_master SET long_description=&quot;.db_escape($arrObj[&#039;long_description&#039;]).&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; description=&quot;.db_escape($arrObj[&#039;description&#039;]).&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; category_id=&quot;.db_escape($category_id).&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tax_type_id=&quot;.db_escape($arrObj[&#039;tax_type&#039;]).&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; units=&quot;.db_escape($item_unit_id).&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; inactive=&quot;.db_escape($arrObj[&#039;inactive&#039;]).&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mb_flag=&quot;.db_escape($arrObj[&#039;mb_flag&#039;]) . &quot; WHERE stock_id=&quot;.db_escape($arrObj[&#039;stock_id&#039;]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_query($sql, &quot;The item could not be updated&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; update_item_code(-1, $arrObj[&#039;stock_id&#039;], $arrObj[&#039;stock_id&#039;], $arrObj[&#039;description&#039;], $category_id, $arrObj[&#039;qty&#039;]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (isset($arrObj[&#039;currency_code&#039;])) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $currency_code = $arrObj[&#039;currency_code&#039;]; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $sql = &quot;UPDATE &quot;.TB_PREF.&quot;prices SET curr_abrev=&quot;.db_escape($currency_code).&quot;, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; price=&quot;.db_escape($arrObj[&#039;price&#039;]).&quot; WHERE stock_id=&quot;.db_escape($arrObj[&#039;stock_id&#039;]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_query($sql,&quot;an item price could not be updated&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; //Update Item Codes<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; $sql = &quot;SELECT id from &quot;.TB_PREF.&quot;item_codes WHERE item_code=&quot; . db_escape($arrObj[&#039;stock_id&#039;]) . &quot; || stock_id = &quot; . db_escape($arrObj[&#039;stock_id&#039;]);<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;$result = db_query($sql, &quot;item code could not be retreived&quot;);<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;$row = db_fetch_row($result);<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;if (!$row) { <br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; add_item_code($arrObj[&#039;stock_id&#039;], $arrObj[&#039;stock_id&#039;], $arrObj[&#039;description&#039;], $category_id, $arrObj[&#039;qty&#039;]);&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; <br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;} else {<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; update_item_code($row[0], $arrObj[&#039;stock_id&#039;], $arrObj[&#039;stock_id&#039;], $arrObj[&#039;description&#039;], $category_id, $arrObj[&#039;qty&#039;]);<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;}<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; return $selected_id;<br />}</p><p>-------------------------------------------------------------------------------------------------------------------------------------</p>]]></content>
			<author>
				<name><![CDATA[tclim]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=4821</uri>
			</author>
			<updated>2011-06-28T08:49:17Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=9565#p9565</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Import Inventory]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=9563#p9563" />
			<content type="html"><![CDATA[<p>Hi All,</p><p>Can someone tell me the structure required to import products into the Inventory.&nbsp; I am testing the latest version (2.3.5) and can&#039;t seem to import anything.</p><p>If there is not a module for importing the inventory through Frontaccounting can someone tell me the tables that are affected when items are directly added to the database.</p><p>Thanks in advance</p>]]></content>
			<author>
				<name><![CDATA[old_guy]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=2010</uri>
			</author>
			<updated>2011-06-28T07:19:11Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=9563#p9563</id>
		</entry>
</feed>
