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.