Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to import inventory items with CSV
01-14-2014, 12:45 AM,
#1
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,
Reply
01-14-2014, 01:09 AM,
#2
RE: How to import inventory items with CSV
This error is caused by the incorrect spelling of Decimal in your headings. Should be Decimal not Desimal.

That said when I make this correction I get some errors with the data you sent which need sorting before it will work:

ERROR Message Report : The volume of the packaged item in cubic metres must be numeric
ERROR Message Report : The weight of the packaged item in KGs must be numeric
ERROR Message Report : The economic order quantity must be numeric
ERROR Message Report : Items must be of MBFlag type Manufactured(M), Assembly(A), Kit-Set(K), Purchased(B), Dummy(D) or Phantom(G)
ERROR Message Report : ItemPDF must contain either a filename, or the keyword `none`

Thanks
Tim

Reply
01-14-2014, 08:41 AM,
#3
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
Reply
01-14-2014, 12:20 PM,
#4
RE: How to import inventory items with CSV
Yes, s I remember you do. Most of the items you can just have the same value in. For instance if you have nn serialised goods, make that whole column 0. Script should really put default values in for you, but as at this moment it doesn't.

Tim
Reply
01-14-2014, 11:42 PM,
#5
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
Reply
01-15-2014, 01:03 AM,
#6
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
Reply
03-25-2014, 06:17 PM,
#7
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
Reply
09-29-2016, 05:42 PM,
#8
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
Reply
09-29-2016, 06:23 PM,
#9
RE: How to import inventory items with CSV
It is saying that the stock category code for the items that you have in the csv file is not created in webERP. Have you checked this?

Thanks
Tim
Reply
09-29-2016, 07:13 PM,
#10
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)