LedgerSMB
The foundation for your business
Fork me on GitHub
[ledgersmb-users] Re: Adding parts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ledgersmb-users] Re: Adding parts



> > > Erik wrote:
> >
> > > ... copy the directory ledgersmb/old/bin
> > > to /usr/share/ledgersmb/old/

> > fmiser  wrote:
> >
> > Woo-hoo!  That works!

> Erik wrote:
> 
> Great! I hope the Debian project releases a fixed binary package
> soon!

> > After adding a single part, I tried batch importing using
> > "import inventory" but am not finding much info on how the CSV
> > file should be arranged.

> Right. I'm sorry to have to point you to the source code instead
> of to nicely written documentation, but the columns for each
> import are here:
> https://github.com/ledgersmb/LedgerSMB/blob/master/lib/LedgerSMB/Scripts/import_csv.pm#L29-L40
> 
> 
> > When I search for a part, there is a choice for CSV export.
> > That has the fields as:
> > "Part Number","Description","On Hand","Unit","Sell Price","Last
> > Cost","Order"
> >
> > When I try that file, I get this error
> >      "Can't use an undefined value as a subroutine reference
> >       at /usr/share/ledgersmb/bin/../lib/LedgerSMB/Scripts/import_csv.pm
> >       line 517"
> >
> 
> Hmm. That begs for smarter error reporting. Truth of the matter
> is that inventory importing is somethnig that only works on
> existing parts.

I came to that conclusion - after I sent the email.  I did find
the import_csv.pm file and made a csv with just those three
columns and got an error about "can't find part number".

> > Then I found the post
> > <https://archive.ledgersmb.org/ledger-smb-users/msg08412.html>
> >
> > It suggests "the upload has 3 columns: part number, on-hand and
> > the purchase price."   That didn't work either.  The same
> > error as above.

My error here was I did not have a header row.

> > Is there a way for me to import my existing inventory?  Other
> > than creating parts one at a time?

> Well, not at the moment. 

> I'm totally seeing where you're coming from and I think I can
> quite quickly develop an extention to the import script to allow
> you to import parts(goods), services and labor/overhead.

That could be really handy!

> Do you need to import assemblies too?

I don't need assemblies.  The old SQL-Ledger had troubles with
assemblies so I don't have them anymore.

I did additional digging and found how I can populate a postgres
table from a .csv file.  I have not tried that - but I'm concerned
that if I were to do that there would be problems caused by how
much the pieces of LedgeSMB link together.  For example, what
would happen with "cost of goods sold" if all the goods show up
without purchase.  

So does the import script currently do more than just fill in the
"parts" table?   Maybe I could use psql to fill in the table with
everything but "qty on hand" and "purchase price".  Then use the
existing inventory update process.

Then what about customers and vendors (contacts)?  Is there a way
to get 200 customers and 120 vendors in - again without adding
them one at a time?  In import_csv.pm it looks like I can import
invoices - but not the contacts.  And in looking at the SQL
tables, it appears the info is not all on one table.  That doesn't
look hopeful for a simple and quick import via psql.

Thanks for all the hints so far!

--   f
_______________________________________________
users mailing list -- ..hidden..
To unsubscribe send an email to ..hidden..