01-14-2014, 12:45 AM,
|
|
karlboer
Member
|
Posts: 8
Threads: 4
Joined: Jan 2014
|
|
How to import inventory items with CSV
I am attempting to import a list of over 1000 inventory items using the "Import stock items from csv" item in the Utilities/Maintenance menu. I have figured out that the first line header needs to match the "template" (which best I can tell is just a string of characters I copied and pasted into my spreadsheet).
Now I have all the headers setup exactly as the template suggests, but I am still getting an error of "ERROR Message Report : File contains incorrect headers (DESIMALPLACES != . Try downloading a new template."
Here is my the first two lines of my csv file:
StockID,Description,LongDescription,CategoryID,Units,MBFlag,EOQ,Discontinued,Controlled,Serialised,Perishable,Volume,grossweight,BarCode,DiscountCategory,TaxCat,DesimalPlaces,ItemPDF
001B,"END CAP, BLUE BULLNOSE","END CAP, BLUE BULLNOSE",MAIN,Each,,,,,,,,,,,,0,
Any help?? I can't seem to find any documentation on importing inventory items from csv.
Thanks,
|
|
01-14-2014, 08:41 AM,
|
|
karlboer
Member
|
Posts: 8
Threads: 4
Joined: Jan 2014
|
|
RE: How to import inventory items with CSV
Thanks Tim,
Now I get:
Database Error 1064 : The item could not be added because
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' , , , 0, 0, '', '', , 0, 'non' at line 28
Database SQL Failure : The SQL that was used to add the item failed was
INSERT INTO stockmaster ( stockid, description, longdescription, categoryid, units, mbflag, eoq, discontinued, controlled, serialised, perishable, volume, grossweight, barcode, discountcategory, taxcatid, decimalplaces, appendfile) VALUES ( '001B', 'END CAP, BLUE BULLNOSE', 'END CAP, BLUE BULLNOSE', 'MAIN', 'Each', 'M', 1, , , , , 0, 0, '', '', , 0, 'none' );
Here is my updated first two lines:
StockID,Description,LongDescription,CategoryID,Units,MBFlag,EOQ,Discontinued,Controlled,Serialised,Perishable,Volume,grossweight,BarCode,DiscountCategory,TaxCat,DecimalPlaces,ItemPDF
001B,"END CAP, BLUE BULLNOSE","END CAP, BLUE BULLNOSE",MAIN,Each,M,1,,,,,0,0,,,,0,none
Do I need to fill each of these items with a value?
Thanks again,
Karl
|
|
01-14-2014, 11:42 PM,
|
|
karlboer
Member
|
Posts: 8
Threads: 4
Joined: Jan 2014
|
|
RE: How to import inventory items with CSV
I guess the reason I didn't fill in the other amounts is because I don't know what half of them are, and don't even know what a good value should be. Is there some way to export to csv so I can see what the existing values should be?
Thanks for all your help.
Karl
|
|
01-15-2014, 01:03 AM,
|
|
Forums
Senior Member
|
Posts: 155
Threads: 9
Joined: Jan 2014
|
|
RE: How to import inventory items with CSV
Hi Karl, the following array gives the default values as they are in the database table:
$Defaults = array(
'', // 0 'STOCKID',
'', // 1 'DESCRIPTION',
'', // 2 'LONGDESCRIPTION',
'', // 3 'CATEGORYID',
'each', // 4 'UNITS',
'B', // 5 'MBFLAG',
'0', // 6 'EOQ',
'0', // 7 'DISCONTINUED',
'0', // 8 'CONTROLLED',
'0', // 9 'SERIALISED',
'0', // 10 'PERISHABLE',
'0', // 11 'VOLUME',
'0', // 12 'KGS',
'', // 13 'BARCODE',
'', // 14 'DISCOUNTCATEGORY',
'1', // 15 'TAXCAT',
'0', // 16 'DECIMALPLACES',
'none' // 17 'ITEMPDF'
);
If you are not sure of the value you need use the one from this.
Thanks
Tim
|
|
03-25-2014, 06:17 PM,
|
|
cindy313
Member
|
Posts: 7
Threads: 0
Joined: Nov 2013
|
|
RE: How to import inventory items with CSV
(01-14-2014, 12:45 AM)karlboer Wrote: I am attempting to import a list of over 1000 inventory items using the "Import stock items from csv" item in the Utilities/Maintenance menu. I have figured out that the first line header needs to match the "template" (which best I can tell is just a string of characters I copied and pasted into my spreadsheet).
Now I have all the headers setup exactly as the template suggests, but I am still getting an error of "ERROR Message Report : File contains incorrect headers (DESIMALPLACES != . Try downloading a new template."
Here is my the first two lines of my csv file:
StockID,Description,LongDescription,CategoryID,Units,MBFlag,EOQ,Discontinued,Controlled,Serialised,Perishable,Volume,grossweight,BarCode,DiscountCategory,TaxCat,DesimalPlaces,ItemPDF
001B,"END CAP, BLUE BULLNOSE","END CAP, BLUE BULLNOSE",MAIN,Each,,,,,,,,,,,,0,
Any help?? I can't seem to find any documentation on importing inventory items from csv.
Thanks, can not be done by using barcode and barcode scanner
|
|
09-29-2016, 05:42 PM,
|
|
swaminathan
Member
|
Posts: 23
Threads: 6
Joined: Sep 2016
|
|
RE: How to import inventory items with CSV
Can Anyone please help me out..
I am trying hard with no success to import inventory items into database
the error i get is --
Database Error 1452 : The item could not be added because
Cannot add or update a child row: a foreign key constraint fails (`isons`.`stockmaster`, CONSTRAINT `stockmaster_ibfk_1` FOREIGN KEY (`categoryid`) REFERENCES `stockcategory` (`categoryid`))
Thanks
Swaminathan
|
|
09-29-2016, 07:13 PM,
|
|
swaminathan
Member
|
Posts: 23
Threads: 6
Joined: Sep 2016
|
|
RE: How to import inventory items with CSV
I did create
Thanks for pointing out when i rechecked there was a spelling mistake in one of the stock category
thank you again
Thanks
Swaminathan
|
|
|