Erik wrote:
Please find attached a replacement 'import_csv.pm' to be placed in lib/LedgerSMB/Scripts/.
* Log into your company After successful login, the URL will look something like: http://localhost/login.pl?action=login&company=<your company>. * Add '#import_csv.pl?action=begin_import&type=goods' at the end of that URL
The resulting page looks like a transaction upload page. Don't mind that; simply select the CSV you want to upload and press "Save".
Should I ignore or fill in the other fields? Like "date", or "Reference", or "Description", or "Transaction"? I'm stumped. I'm not getting either the new "goods" import or the existing "inventory" import to work. Maybe the content or format of my files? Maybe something else missing in my Debian Buster (10) install? LedgerSMB is version 1.6.9 installed from package, with the content of "ledgersmb/old/bin" updated (per email of 2019-12-24) and a new "import_csv.pl" (per email of 2019-12-27). I sent a couple messages to the list with my .csv files attached. Maybe those didn't get through. Any help or hints or clues would be appreciated!! I'm getting two different errors when I try to use the new import_csv.pm. I'm not tracking down what I'm going different to get each message. A dialog box may open with this message: ******************************************* Error! Can't use an undefined value as a subroutine reference at /usr/share/ledgersmb/bin/../lib/LedgerSMB/Scripts/import_csv.pm line 517. dbversion: tester, company: 1.6.9 ******************************************** Or, I see the error "Internal Server Error" syslog reports this: ******************************************** Feb 18 01:15:03 host-smb starman[332]: Can't locate LedgerSMB/Template/UI.pm in @INC (you may need to install the LedgerSMB::Template::UI module) (@INC contains: /usr/share/ledgersmb/bin/../old/lib /usr/share/ledgersmb/bin/../lib /usr/share/ledgersmb/bin/.. lib old/lib /etc/perl /usr/local/lib/i386-linux-gnu/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/i386-linux-gnu/perl5/5.28 /usr/share/perl5 /usr/lib/i386-linux-gnu/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/i386-linux-gnu/perl-base) at /usr/share/ledgersmb/bin/../lib/LedgerSMB/Scripts/import_csv.pm line 24. Feb 18 01:15:03 host-smb starman[332]: BEGIN failed--compilation aborted at /usr/share/ledgersmb/bin/../lib/LedgerSMB/Scripts/import_csv.pm line 24. Feb 18 01:15:03 host-smb starman[332]: Compilation failed in require at /usr/share/perl5/Module/Runtime.pm line 314. *************************************************************** #### #### #### #### #### #### #### #### #### #### Next I tried a different browser. Clean cache. Cookies reset. The error dialog box showed 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. dbversion: tester, company: 1.6.9 ******************************************** Syslog showed this: ******************************************** Feb 18 01:32:11 host-smb starman[332]: Req:C68BB800522011EAADB8D4835481929E 2020/02/18 01:32:11 - ERROR - LedgerSMB::PSGI::catch {...} /usr/share/ledgersmb/bin/../lib/LedgerSMB/PSGI.pm (134) -- Can't use an undefined value as a subroutine reference at /usr/share/ledgersmb/bin/../lib/LedgerSMB/Scripts/import_csv.pm line 517.\n Feb 18 01:32:11 host-smb starman[332]: Req:C68BB800522011EAADB8D4835481929E ::1 - - [18/Feb/2020:01:32:11 -0600] "POST /import_csv.pl HTTP/1.1" 500 244 "http://localhost:7777/login.pl?action=login&company=tester" "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" ******************************************** I also tried the existing "import inventory" on the couple of items I added manually. It failed with ******************************************** Error! Can't use an undefined value as a subroutine reference at /usr/share/ledgersmb/bin/../lib/LedgerSMB/Scripts/import_csv.pm line 517. dbversion: tester, company: 1.6.9 ******************************************** Syslog reports ******************************************** Feb 18 01:44:36 host-smb starman[332]: Attempt to reload LedgerSMB/Scripts/import_csv.pm aborted. Feb 18 01:44:36 host-smb starman[332]: Compilation failed in require at /usr/share/perl5/Module/Runtime.pm line 314. ******************************************** The content of the two .csv file I'm using: ******************************************** "partnumber","description","unit","listprice","sellprice","lastcost","weight","notes","makemodel","assembly","alternate","rop","inventory_accno","income_accno","expense_accno","returns_accno","bin","bom","image","drawing","microfiche","partsgroup","avgcost","taxaccnos" "QTSm-RCAf","adapter - 1/4 inch TS plug to RCA jack","ea",,$1.50,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "BNC75-TERM","adapter - BNC 75 ohm terminator","ea",,$2.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "BNC75f-BNCf","adapter - BNC barrel, 75 ohm","ea",,$4.25,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "BNC50f-BNCf","same as above, but 50 ohm","ea",,$2.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "BNCm-RCAf","adapter - BNC-m to RCA-f","ea",,$1.50,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "RCAf-RCAf","adapter - RCA, barrel","ea",,$1.50,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "YCm-RCAf","adapter - RCA jack to Y/C 4pin plug, signal converter","ea",,$7.50,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "RCAm-BNCf","adapter - RCA-m to BNC-f","ea",,$1.50,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "RCAm-2RCAf-90Y","adapter - RCAm to two RCAf, 90 deg and 180 deg, wye","ea",,$1.50,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "NA4LJ","adapter - Speakon to 1/4in jack","ea",,$8.25,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "YCf-YCf","adapter - Y/C 4pin barrel","ea",,$5.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "RCAm-YCf","adapter - Y/C 4pin jack to RCA plug, signal converter","ea",,$7.50,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "ZFSC-4-1-75","antenna - power splitter, 4-way, BNC, 75 ohm, 10-1000MHz","ea",,$140.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "PB25","box - 1/3 rack wide, project box, ProCo","ea",,$20.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "1593KBK","box - 2.6x2.6x1.1 inch, black, with end panels, Hammond","ea",,$4.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "71886BK","box - 5.1x5.1x1.5, black, PacTec","ea",,$9.50,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "KY-BOX","box - keystone, use 1 or 2 modules, surface mount","ea",,$3.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "1551ATS100","box - PCB mounting screws, #2 x 3/8 ","x100",,$15.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "1551NFLBK","box - tiny project box, flanged lid, short, 35x35x15 mm, black, Hammond","ea",,$3.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "1551MFLBK","box - tiny project box, flanged lid, tall, 35x35x20 mm, black, Hammond","ea",,$3.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "1551NBK","box - tiny project box, flush lid, short, 35x35x15 mm, black, Hammond","ea",,$3.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "1551MBK","box - tiny project box, flush lid, tall, 35x35x20 mm, black, Hammond","ea",,$3.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "BNCm-RCAm-06","cable assy - BNC to phono, 6ft","ea",,$8.15,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 ******************************************** ******************************************** "Part number","On hand","purchase price" "QTSm-RCAf",11,0.75 "BNCm-RCAf",22,1.50 "BNC50f-BNCf",23,5 "nl4fx",8,4.25 ******************************************** -- f
On Tue, Feb 18, 2020 at 9:14 AM fmiser <fmiser@gmail.com> wrote:
Erik wrote:
Please find attached a replacement 'import_csv.pm' to be placed in lib/LedgerSMB/Scripts/.
* Log into your company After successful login, the URL will look something like: http://localhost/login.pl?action=login&company=<your company>. * Add '#import_csv.pl?action=begin_import&type=goods' at the end of that URL
The resulting page looks like a transaction upload page. Don't mind that; simply select the CSV you want to upload and press "Save".
Should I ignore or fill in the other fields? Like "date", or "Reference", or "Description", or "Transaction"?
Yes. Those fields are for a different type of upload and the upload input screen doesn't distinguish its various uses.
I'm stumped. I'm not getting either the new "goods" import or the existing "inventory" import to work. Maybe the content or format of my files?
Now that you get me thinking about it again, I don't think you will get the "inventory adjustment" upload to work for your purpose: when uploading inventory adjustments, the adjustment code expects inventory to (have been or) be available in order to modify the actual numbers in stock; while it does that, it adjusts the information required for posting COGS (Cost Of Goods Sold) as well. However, in your case, no COGS information is available yet, which means that the COGS information can't be adjusted. I'm now expecting that the upload of inventory adjustments leads to errors. That said, I'm coming to the - to me - disturbing conclusion that we have no means to initialize a company's inventory when e.g. moving off of another accounting solution, other than by manually entering an AP invoice. I mean, with a database script you could, but it's not supported by the application out of the box at the moment. (I've created https://github.com/ledgersmb/LedgerSMB/issues/4496 to make sure that we grow this functionality!)
Maybe something else missing in my Debian Buster (10) install? LedgerSMB is version 1.6.9 installed from package, with the content of "ledgersmb/old/bin" updated (per email of 2019-12-24) and a new "import_csv.pl" (per email of 2019-12-27).
From the information you provided below, I have to conclude that the Internal Server Error you're seeing is a mistake I made when I prepared the new import_csv.pl file for you: it's based on master&1.7, but you're running 1.6. With my considerations and thoughts above, I'm afraid fixing that file isn't going to be a solution to your problem. Instead, I have to write new functionality to allow you to upload your inventory. I'll need time to develop that though, I'm afraid. In the mean time, I could help you indicate which tables and fields you should fill if you were to do an import with SQL scripts, if that's of help. Sorry for the laggy reply; there were simply too few hours in a day over the past month. Regards, Erik.
I sent a couple messages to the list with my .csv files attached. Maybe those didn't get through.
Any help or hints or clues would be appreciated!!
I'm getting two different errors when I try to use the new import_csv.pm. I'm not tracking down what I'm going different to get each message.
A dialog box may open with this message: ******************************************* Error!
Can't use an undefined value as a subroutine reference at /usr/share/ledgersmb/bin/../lib/LedgerSMB/Scripts/import_csv.pm line 517.
dbversion: tester, company: 1.6.9 ********************************************
Or, I see the error "Internal Server Error"
syslog reports this: ******************************************** Feb 18 01:15:03 host-smb starman[332]: Can't locate LedgerSMB/Template/UI.pm in @INC (you may need to install the LedgerSMB::Template::UI module) (@INC contains: /usr/share/ledgersmb/bin/../old/lib /usr/share/ledgersmb/bin/../lib /usr/share/ledgersmb/bin/.. lib old/lib /etc/perl /usr/local/lib/i386-linux-gnu/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/i386-linux-gnu/perl5/5.28 /usr/share/perl5 /usr/lib/i386-linux-gnu/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/i386-linux-gnu/perl-base) at /usr/share/ledgersmb/bin/../lib/LedgerSMB/Scripts/import_csv.pm line 24. Feb 18 01:15:03 host-smb starman[332]: BEGIN failed--compilation aborted at /usr/share/ledgersmb/bin/../lib/LedgerSMB/Scripts/import_csv.pm line 24. Feb 18 01:15:03 host-smb starman[332]: Compilation failed in require at /usr/share/perl5/Module/Runtime.pm line 314.
***************************************************************
#### #### #### #### #### #### #### #### #### #### Next I tried a different browser. Clean cache. Cookies reset.
The error dialog box showed 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.
dbversion: tester, company: 1.6.9 ********************************************
Syslog showed this: ******************************************** Feb 18 01:32:11 host-smb starman[332]: Req:C68BB800522011EAADB8D4835481929E 2020/02/18 01:32:11 - ERROR - LedgerSMB::PSGI::catch {...} /usr/share/ledgersmb/bin/../lib/LedgerSMB/PSGI.pm (134) -- Can't use an undefined value as a subroutine reference at /usr/share/ledgersmb/bin/../lib/LedgerSMB/Scripts/import_csv.pm line 517.\n Feb 18 01:32:11 host-smb starman[332]: Req:C68BB800522011EAADB8D4835481929E ::1 - - [18/Feb/2020:01:32:11 -0600] "POST /import_csv.pl HTTP/1.1" 500 244 "http://localhost:7777/login.pl?action=login&company=tester" "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" ********************************************
I also tried the existing "import inventory" on the couple of items I added manually. It failed with
******************************************** Error!
Can't use an undefined value as a subroutine reference at /usr/share/ledgersmb/bin/../lib/LedgerSMB/Scripts/import_csv.pm line 517.
dbversion: tester, company: 1.6.9 ********************************************
Syslog reports ******************************************** Feb 18 01:44:36 host-smb starman[332]: Attempt to reload LedgerSMB/Scripts/ import_csv.pm aborted. Feb 18 01:44:36 host-smb starman[332]: Compilation failed in require at /usr/share/perl5/Module/Runtime.pm line 314. ********************************************
The content of the two .csv file I'm using: ********************************************
"partnumber","description","unit","listprice","sellprice","lastcost","weight","notes","makemodel","assembly","alternate","rop","inventory_accno","income_accno","expense_accno","returns_accno","bin","bom","image","drawing","microfiche","partsgroup","avgcost","taxaccnos" "QTSm-RCAf","adapter - 1/4 inch TS plug to RCA jack","ea",,$1.50,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "BNC75-TERM","adapter - BNC 75 ohm terminator","ea",,$2.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "BNC75f-BNCf","adapter - BNC barrel, 75 ohm","ea",,$4.25,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "BNC50f-BNCf","same as above, but 50 ohm","ea",,$2.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "BNCm-RCAf","adapter - BNC-m to RCA-f","ea",,$1.50,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "RCAf-RCAf","adapter - RCA, barrel","ea",,$1.50,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "YCm-RCAf","adapter - RCA jack to Y/C 4pin plug, signal converter","ea",,$7.50,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "RCAm-BNCf","adapter - RCA-m to BNC-f","ea",,$1.50,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "RCAm-2RCAf-90Y","adapter - RCAm to two RCAf, 90 deg and 180 deg, wye","ea",,$1.50,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "NA4LJ","adapter - Speakon to 1/4in jack","ea",,$8.25,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "YCf-YCf","adapter - Y/C 4pin barrel","ea",,$5.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "RCAm-YCf","adapter - Y/C 4pin jack to RCA plug, signal converter","ea",,$7.50,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "ZFSC-4-1-75","antenna - power splitter, 4-way, BNC, 75 ohm, 10-1000MHz","ea",,$140.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "PB25","box - 1/3 rack wide, project box, ProCo","ea",,$20.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "1593KBK","box - 2.6x2.6x1.1 inch, black, with end panels, Hammond","ea",,$4.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "71886BK","box - 5.1x5.1x1.5, black, PacTec","ea",,$9.50,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "KY-BOX","box - keystone, use 1 or 2 modules, surface mount","ea",,$3.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "1551ATS100","box - PCB mounting screws, #2 x 3/8 ","x100",,$15.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "1551NFLBK","box - tiny project box, flanged lid, short, 35x35x15 mm, black, Hammond","ea",,$3.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "1551MFLBK","box - tiny project box, flanged lid, tall, 35x35x20 mm, black, Hammond","ea",,$3.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "1551NBK","box - tiny project box, flush lid, short, 35x35x15 mm, black, Hammond","ea",,$3.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "1551MBK","box - tiny project box, flush lid, tall, 35x35x20 mm, black, Hammond","ea",,$3.00,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 "BNCm-RCAm-06","cable assy - BNC to phono, 6ft","ea",,$8.15,0,,"f","f","f","f",0,1510,4010,5010,1510,,"f",,,,0,,2150 ********************************************
******************************************** "Part number","On hand","purchase price" "QTSm-RCAf",11,0.75 "BNCm-RCAf",22,1.50 "BNC50f-BNCf",23,5 "nl4fx",8,4.25 ********************************************
-- f
-- Bye, Erik. http://efficito.com -- Hosted accounting and ERP. Robust and Flexible. No vendor lock-in.
Erik wrote:
On Tue, Feb 18, 2020 at 9:14 AM fmiser <fmiser@gmail.com> wrote:
Erik wrote:
Please find attached a replacement 'import_csv.pm' to be placed in lib/LedgerSMB/Scripts/.
* Log into your company After successful login, the URL will look something like: http://localhost/login.pl?action=login&company=<your company>. * Add '#import_csv.pl?action=begin_import&type=goods' at the end of that URL
The resulting page looks like a transaction upload page. Don't mind that; simply select the CSV you want to upload and press "Save". fmiser asked:
Should I ignore or fill in the other fields? Like "date", or "Reference", or "Description", or "Transaction"?
Erik wrote:
Yes. Those fields are for a different type of upload and the upload input screen doesn't distinguish its various uses.
Heh. I still don't know if I should ignore them or fill them in. [smiles] But in light of what you say later I guess it doesn't matter.
Now that you get me thinking about it again, I don't think you will get the "inventory adjustment" upload to work for your purpose: when uploading inventory adjustments, the adjustment code expects inventory to (have been or) be available in order to modify the actual numbers in stock; while it does that, it adjusts the information required for posting COGS (Cost Of Goods Sold) as well. However, in your case, no COGS information is available yet, which means that the COGS information can't be adjusted. I'm now expecting that the upload of inventory adjustments leads to errors.
Aaah. I see.
That said, I'm coming to the - to me - disturbing conclusion that we have no means to initialize a company's inventory when e.g. moving off of another accounting solution, other than by manually entering an AP invoice. I mean, with a database script you could, but it's not supported by the application out of the box at the moment. (I've created https://github.com/ledgersmb/LedgerSMB/issues/4496 to make sure that we grow this functionality!)
Good! But I don't think I get to wait for it.
Maybe something else missing in my Debian Buster (10) install? LedgerSMB is version 1.6.9 installed from package, with the content of "ledgersmb/old/bin" updated (per email of 2019-12-24) and a new "import_csv.pl" (per email of 2019-12-27).
From the information you provided below, I have to conclude that the Internal Server Error you're seeing is a mistake I made when I prepared the new import_csv.pl file for you: it's based on master 1.7,
I'm not sure how to update my Debian package install to 1.7. I did try at one point to just "drop it in" but there must be a few configuration differences. I didn't look very hard.
I could help you indicate which tables and fields you should fill if you were to do an import with SQL scripts, if that's of help.
Thank you. I think this is what I need to do.
Sorry for the laggy reply; there were simply too few hours in a day over the past month.
I'll send another email in a day or two, when I have a hour. [smiles] -- f
participants (2)
-
Erik Huelsmann
-
fmiser