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