<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — import_items module problem]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=588&amp;type=atom" />
	<updated>2011-10-09T17:37:44Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=588</id>
		<entry>
			<title type="html"><![CDATA[Re: import_items module problem]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=10419#p10419" />
			<content type="html"><![CDATA[<p>I am new to FA, and have no knowledge on how to use SQL, CSV, But I have been playing with the program and reading for the past 2 months,&nbsp; and manage to import CSV files through Heidi SQL. I have import my chart of accounts, using chart master, chart type, and chart class. I have set up the company files, vendors, exchange rates, bank account info, fiscal year, group, tax type.<br />Also imported stock master, stock category,&nbsp; and prices. Manually input a journal entry for my beginning balance.&nbsp; So far it looks good.</p><p>But went I see inventory evaluation report all my items are in zero. PLEASE tell me what chart I miss so that my inventory quantity is updated.</p><p>I appreciated your help and knowledge on using FA.</p><p>Thanks,<br />Jose.</p>]]></content>
			<author>
				<name><![CDATA[jiml]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=9585</uri>
			</author>
			<updated>2011-10-09T17:37:44Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=10419#p10419</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: import_items module problem]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=3874#p3874" />
			<content type="html"><![CDATA[<p><img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" /> Tom,</p><p>Thanks for response.</p><p>I appreciate your promptness, way of interacting and great programming skills ! Hats off Sir! It is very nice to interact with you !</p><p>With regards,</p>]]></content>
			<author>
				<name><![CDATA[chaitanya]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=524</uri>
			</author>
			<updated>2009-11-14T05:31:56Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=3874#p3874</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: import_items module problem]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=3873#p3873" />
			<content type="html"><![CDATA[<p>You are COMPLETELY Correct.</p><p>That is because that example is before the line that says:</p><p>VERSION 2 by Tom Moulton 5/2009</p><p>Look BELOW this line to see the updated format</p><p>What you need is in the last 10-15 lines of the file</p><p>tom</p>]]></content>
			<author>
				<name><![CDATA[tom]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=331</uri>
			</author>
			<updated>2009-11-13T16:40:28Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=3873#p3873</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: import_items module problem]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=3872#p3872" />
			<content type="html"><![CDATA[<p>Hi Tom,</p><p>I may be wrong somewhere but import format mentioned below does not seem to work</p><br /><p>id; description; category; units; mb_flag; currency; price;<br />21; Item21; MyCat; each; B; ; 300;<br />22; Item22; MyCat; each; B; ; 200;<br />23; Item23; MyCat; each; B; ; 300;<br />24; Item24; MyCat; each; B; ; 200;<br />25; Item25; MyCat; each; B; ; 300;<br />26; Item26; MyCat; each; B; ; 200;</p><p>Please advise.</p><p>Thanks</p>]]></content>
			<author>
				<name><![CDATA[chaitanya]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=524</uri>
			</author>
			<updated>2009-11-13T13:22:20Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=3872#p3872</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: import_items module problem]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=3871#p3871" />
			<content type="html"><![CDATA[<p>Here is the readme file I think it should have.</p><p>See the note:<br />***** Big changes see VERSION 2 below *******</p><p>Now go down to here:<br />VERSION 2 by Tom Moulton 5/2009<br />------------------------------------------------------------------------</p><p>/****************************************************************************<br />Author: Joe Hunt<br />Name: Import of CSV formatted items<br />Free software under GNU GPL<br />*****************************************************************************/</p><p>***** Big changes see VERSION 2 below *******</p><p>Recommended settings during install:</p><p>Menu Tab: Items and Inventory</p><p>Name: Import of CSV formatted items</p><p>Folder: import_items&nbsp; &nbsp;(should follow unix folder convention)</p><p>Browse for the file: import_items.php on you local harddisk.</p><p>Press the Install button.</p><p>--- Before you use the Import Items module ---</p><p>Do a Company Backup from the Setup tab, Backup and Restore.</p><p>The comma separated file should be of the following type:<br />1. line should contain the following description: </p><p>id; description; category; units; mb_flag; currency; price;</p><p>In this case the separator is &#039;;&#039;, id is the Stock ID, description is the Stock description,<br />category is a category you want to put your Stock. If this category doesn&#039;t exist it will<br />be created during import. units is the unit for the Stock. </p><p>The mb_flag is M for Manufacturered, B for Purchased or S for Service (no inventory)</p><p>currency is the currency for the price.<br />Leave empty for company currency.<br />price is the stock price. If you don&#039;t want the price to be entered, leave it empty.</p><p>Example of a CSV import file:</p><p>id; description; category; units; mb_flag; currency; price;<br />21; Item21; MyCat; each; B; ; 300;<br />22; Item22; MyCat; each; B; ; 200;<br />23; Item23; MyCat; each; B; ; 300;<br />24; Item24; MyCat; each; B; ; 200;<br />25; Item25; MyCat; each; B; ; 300;<br />26; Item26; MyCat; each; B; ; 200;</p><p>When the Import file is ready (you might prepare it in a spreadsheet if it is a huge one),<br />you are ready to go into the Import Module via Items and Inventory, right section.<br />First you see the default accounts for the various operations for the stocks. Leave them<br />as is, if you are satisfied with them.<br />The field separator is set to &#039;;&#039;. If you have used another separator, select it here.<br />Be aware, that if you have chosen &#039;,&#039; as a separator, you should enclose the fields with<br />double quotes (&quot;Item21&quot;) because it might be common to put a comma inside a description.<br />Next you should select a Location to put the stocks into (the &#039;B&#039; ones), Item Tax Type and<br />Sales Type. Last you browse to the CSV file and put it here.</p><p>If the items exist, they will be updated with the information here.</p><p>Now you are ready to press the Import CSV file button (Did you take a backup??)</p><p>Have fun!!</p><p>PS. The language inside the Import CSV file does NOT follow the traditional GETTEXT translations.<br />If you want to translate to another language, please rename the texts inside the file <br />import_items.php to your own language. <br />If you make improvements to this module, please share it with us!!. <br />We will then incorporate it into the module.</p><p>Contributor: Tom Moulton</p><p>Upgrade code to v2.1 database, perform same actions done during upgrade to create item_codes table</p><p>Also here is osCommerce SQL to dump items.</p><p>Remember to add trailing &quot;;&quot;, also extra spaces on non-quoted strings may be a problem.</p><p>SELECT p.products_model, pd.products_name, cd.categories_name, &#039;each&#039;, &#039;B&#039;, &#039;USD&#039;, p.products_price FROM<br />products p left join products_description pd on p.products_id = pd.products_id and pd.language_id = 1<br />left join products_to_categories pc on p.products_id = pc.products_id<br />left join categories_description cd on pc.categories_id = cd.categories_id and cd.language_id = 1<br />where p.products_status = 1</p><p>The mb_flag is M for Manufacturered, B for Purchased or S for Service</p><p>tom<br />--------------------------------------------------------------------------------<br />--------------------------------------------------------------------------------<br />--------------------------------------------------------------------------------<br />--------------------------------------------------------------------------------<br />--------------------------------------------------------------------------------<br />--------------------------------------------------------------------------------<br />VERSION 2 by Tom Moulton 5/2009</p><p>This version supports importing Items, Sales Kits and BOM</p><p>The fields used will be different depending upon what is being imported.<br />It will still be a good idea to have a fixed number of (empty) fields to keep parsing simple.</p><p>The first field is the record type and that will decide what the rest of the line means.</p><p>TYPE = BOM</p><p>BOM;PARENT;COMPONENT;WORK CENTER;dummy;dummy;QUANTITY;dummy;dummy;dummy;</p><p>The loc_code will be selected from a Pull-Down menu as a default for the entire import.<br />The work center will be added if needed.</p><p>TYPE = UOM</p><p>UOM;ABBR;NAME;dummy;dummy;dummy;DECIMAL PLACES;dummy;dummy;dummy;</p><p>TYPE = KIT</p><p>KIT;ITEM_CODE;STOCK_ID;Description;Category;dummy;Quantity;dummy;Currency;Price;</p><p>Where ITEM_CODE is the code for a Kit and Stock_id is a part of that kit (Quantity each)<br />The Currency and Price, if present will update the price of the kit.</p><br /><p>TYPE = FOREIGN</p><p>FOREIGN;ITEM_CODE;STOCK_ID;Description;Category;dummy;Quantity;dummy;dummy;dummy;</p><p>Where ITEM_CODE is the upc/etc code for an item and Stock_id is the item as we know it</p><p>ITEM;ITEM_CODE;STOCK_ID;Description;Category;units;dummy;MB_FLAG;Currency;Price;</p><p>Where Item_Code = STOCK_ID of the item.</p><p>TYPE = BUY</p><p>BUY;STOCK_ID;dummy;Description;Supplier Name;Supplier Units;Conversion Factor;dummy;Currency;Price;</p><p>Where Supplier must alrady exist</p><p>The rest should be as described elsewhere.</p>]]></content>
			<author>
				<name><![CDATA[tom]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=331</uri>
			</author>
			<updated>2009-11-13T11:54:34Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=3871#p3871</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: import_items module problem]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=3870#p3870" />
			<content type="html"><![CDATA[<p>Hello,</p><p>Readme of item import module is confusing and difficult to understand. (Downloaded today)<br />Can we give clear idea on what should be format of CSV. </p><p>There are two formats mentioned.<br />I tried first one but it raised array of errors.</p><p>Could you please state how to use this crucial feature ?</p><p>With Regards,</p>]]></content>
			<author>
				<name><![CDATA[chaitanya]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=524</uri>
			</author>
			<updated>2009-11-13T11:31:22Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=3870#p3870</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: import_items module problem]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=2300#p2300" />
			<content type="html"><![CDATA[<p>item_code table stores both internal and foreign codes. The items list selector gets data from this table, so to have stock items in the list you have to put stock_id code here.<br />Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2009-04-19T15:25:31Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=2300#p2300</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: import_items module problem]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=2283#p2283" />
			<content type="html"><![CDATA[<p>Ok, upon looking at things closer, it appears that Item Codes (or Foreign Item Codes) are used to translate a UPC/Barcode (aka Foreign code) into a stock item.</p><p>I see the quantity is used as a case quantity of the Stock Item we work with.</p><p>Are entries in the item_codes table required?</p><p>Why is item_code == stock_id in item_codes?<br />I expected item_code to be a foreign id, not a stock id.</p><p>tom</p>]]></content>
			<author>
				<name><![CDATA[tom]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=331</uri>
			</author>
			<updated>2009-04-16T11:10:22Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=2283#p2283</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: import_items module problem]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=2282#p2282" />
			<content type="html"><![CDATA[<p>I see stock_matster and item_codes</p><p>Why do they both have category_id?</p><p>Since item_codes.id is the key what is the meaning of a specific stock_id appearing more than once? Will they have different category_id&#039;s?</p><p>Also there is a Quantity field, isn&#039;t the quantity of a given item determined by looking it up in Stock_Moves as menti0ned above?</p><p>I would like to update items_import, but will need to understand what needs to be done in very simple terms.</p><p>I may be able to take initial stock quantities at the same time, but I think that is a secondary step at th moment...</p><p>tom</p>]]></content>
			<author>
				<name><![CDATA[tom]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=331</uri>
			</author>
			<updated>2009-04-16T03:20:42Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=2282#p2282</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: import_items module problem]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=2272#p2272" />
			<content type="html"><![CDATA[<p>In gl_trans type and type_no together are key to document for which the gl post was created. The same relation is for stock_moves trans_no and type fields.<br />Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2009-04-14T14:58:33Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=2272#p2272</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: import_items module problem]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=2270#p2270" />
			<content type="html"><![CDATA[<p>further to my above post:</p><p>in gl_trans, it looks like the type_no field ties up to the trans_no field in stock_moves</p>]]></content>
			<author>
				<name><![CDATA[Ant]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=355</uri>
			</author>
			<updated>2009-04-13T18:04:02Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=2270#p2270</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: import_items module problem]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=2269#p2269" />
			<content type="html"><![CDATA[<p>Many thanks. Can you perhaps clarify what the trans_no field means in stock_moves (and how it is derived)? I suspect that it links to gl_trans, but can&#039;t see the logic of the numbering.</p>]]></content>
			<author>
				<name><![CDATA[Ant]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=355</uri>
			</author>
			<updated>2009-04-13T17:59:51Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=2269#p2269</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: import_items module problem]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=2268#p2268" />
			<content type="html"><![CDATA[<p>Mostly this list is correct.<br />Quantity on hand is calculated from stock_moves. Stock_moves records are added during delivery/receiving of inventory items. To add prices you need first have defined sales types (price lists).<br />You will find current ERD diagram with all relations <a href="https://frontaccounting.com/wbt/modules/download_gallery/dlc.php?file=98">here</a>.</p><p>Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2009-04-13T17:39:37Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=2268#p2268</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: import_items module problem]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=2267#p2267" />
			<content type="html"><![CDATA[<p>Thanks Janusz.</p><p>I am happy to dive in manually for now - can you confirm that my understanding is correct?</p><p>To add stock I need to work with the following tables:<br />* stock_master<br />* loc_stock<br />* item_codes<br />* stock_category</p><p>to set pricing I only need to update<br />* prices</p><p>and to set quantity on hand I need to work with <br />* stock_moves<br />* gl_trans</p>]]></content>
			<author>
				<name><![CDATA[Ant]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=355</uri>
			</author>
			<updated>2009-04-13T13:25:20Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=2267#p2267</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: import_items module problem]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=2266#p2266" />
			<content type="html"><![CDATA[<p>Yes, the module was written for version 2.0. The item_codes table is new in 2.1, so it need some corrections in the code.<br />Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2009-04-13T13:09:16Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=2266#p2266</id>
		</entry>
</feed>
