Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Import GL Accounts
05-09-2014, 11:51 PM,
#1
Import GL Accounts
We want to have the GL accounts in webERP match the GL accounts in our old ERP software. However there are close to 900 GL accounts in our old software.

Is there anyway to import GL accounts in bulk?

Reply
05-10-2014, 02:04 AM,
#2
RE: Import GL Accounts
Z_ImportChartOfAccounts.php under utilities or run from browser.
<your_url>/Z_ImportChartOfAccounts.php

That load master data.
You can enter balances using Z_ImportGLTransactions.php
Reply
05-11-2014, 03:15 PM,
#3
RE: Import GL Accounts
The system creates the chartdetails automatically for all periods - so importing the chartmaster with this utility is the way to go.
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
05-13-2014, 12:44 AM,
#4
RE: Import GL Accounts
Thanks for pointing this out. But now I'm having issues with importing a CSV. I get the following error, no matter what GL account group I put in the imported CSV:

10005001000 Failure Error no 1106 - GL account group does not exist

I tried creating new groups, using the default groups all return the same error.
Reply
05-14-2014, 11:36 PM,
#5
RE: Import GL Accounts
Tried many different things. Still can't get an import to happen using /Z_ImportChartOfAccounts.php

This error is produced: 10005100250 Failure Error no 1106 - GL account group does not exist

This is my CSV: accountcode accountname group_
10005100250 Cash in Bank-(Disb) Wells Fargo Current Assets

Current Assets is a GL Group.

Any help would be appreciated.
Reply
05-15-2014, 11:27 PM,
#6
RE: Import GL Accounts
this may sound like a silly question but your CVS does have commas right? Your example above doesn't show them.
Reply
05-16-2014, 01:31 AM, (This post was last modified: 05-16-2014, 02:44 AM by pcofield.)
#7
RE: Import GL Accounts
Yes it does have comma's even though I didn't cut and paste it.

Here's the actual:
accountcode,accountname,group_
10005100250,Cash in Bank-(Disb) Wells Fargo,Current Assets
Reply
05-16-2014, 03:54 AM, (This post was last modified: 05-16-2014, 03:57 AM by agaluski.)
#8
RE: Import GL Accounts
Ok. I think I may have figured it out.
1) Make sure you have the correct db name in api/api_php.php (From the manual). Change to your database name
Quote:There is one hardcoded parameter that needs to be set in the api before you start to use it. The database name - the company database - to use with the api is defined in the file api/api_php.php - the variable
$api_DatabaseName="demo";
should be set before attempting to use the api.
2) Parsing the incoming file is dropping the 's' off of assets so it is Trying to load "Current Asset".
You can fix that by putting a space after "Current Assets " like that in your CSV. That got me past the validation 1106 error.
3) Then I was NOT getting back valid XML.
So it appeared the SQL being built in the API is incorrect. It was attempting to insert into chartmaster and chartdetails using
Code:
INSERT INTO chartmaster (accountcode, accountname, group_) VALUES (' "0005100250", "Cash in Bank-(Disb) Wells F", "Current Assets" ')
INSERT INTO chartdetails (accountcode, period) SELECT 0005100250, periodno FROM periods
The first insert has extra single quotes around the values. The second needs quotes around the accountcode.
I modified api/api_glaccounts.php to make these changes and successfully imported the record.
I am attaching a zip of the php I modified. Unzip and place in the api directory. Backup your database and check things carefully after you use the modified version as I have done limited testing.


Attached Files
.zip   api_glaccounts.zip (Size: 1.28 KB / Downloads: 9)
Reply
05-20-2014, 07:20 AM,
#9
RE: Import GL Accounts
pcofield
Did this work for you?
Reply
05-23-2014, 12:17 AM,
#10
RE: Import GL Accounts
1. I'm doing this all in the weberpdemo database, so the database name is correct.

2. I just got back to it this morning. I replaced api_glaccounts.php. Put a space after "Current Assets", still the same error. Then put another column in with no data, no error but no data imported.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)