[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Importing Customers, Vendors, Parts



Paul Bente wrote:
I have seen mention on this list of success in importing into LSMB lists of customers, vendors, and parts from csv files, but not in a form simple and detailed enough to for me to follow and succeed.

I was able to get the sample file "lsmb02-cli-example.pl" in ledgersmb/doc/samples to work apparently (it reported the 3 sample records as SAVED, etc and when I log in the records are there) but it then follows with about 40 lines reporting errors of the type:

Use of uninitialized value in substr at importvendor.pl line 61, <DATA> line 4. Use of uninitialized value in scalar assignment at importvendor.pl line 130, <DATA> line 4. Use of uninitialized value in concatenation (.) or string at importvendor.pl line 61, <DATA> line 4.
...
Use of uninitialized value in concatenation (.) or string at importvendor.pl line 86, <DATA> line 4.

<snip />

...

There were blank lines after the data.

Any idea as to the source or significance of these errors or how I might modify the script to eliminate them?

Make sure there are no blank lines -- only data -- in the section after the __END__.

I'll look at a simple check for a blank line and quit if found. This will not protect against bad data. That will take a few more fixes to handle that and will probably in a simplistic way. Put a blank or 'UKN' for strings and zero '0' for numbers. What do folks think or want?

Also I found there is some bogus code after the while() block. Another login. Not sure why unless it is the result of fast fingers that did a copy/paste. I've commented it out in my copy.

Where should I send these changes? Yeah, yeah, yeah! A diff would be great except I just hacked around on it. No check out etc.

I am also daunted by the prospect of editing the perl code in this example to try to import parts.
>
As an alternative to suggestions on how to get the above perl script working, can anyone provide or point to a set of step by step instructions for importing files of Parts and of Customers and Vendors including if possible Ship To addresses?

I'll work on scripts for this as time permits.

Chris (or another in-the-know developer), will the model for vendors, and parts change a lot in 1.3? I think customers does.


Rod
--
Regards,
Paul Bente
PPC Mac OS X 10.4.11, ledgersmb-1.2.14-rc1

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users