Chart of accounts empty

Hi,
I have installed version 8.0.0 and 8.0.2 both chart of account are empty. I tried to change model and load very quickly, but empty, nothing.
Please help, let me know if I done something wrong.

Hello again,
I checked version 8 database table accounting_account is empty. Then I found version 7 table has all the data. What should I do? Can I copy that table to version 8?
Also it was installed by Softaculous. Was that the reason why? Please help

Thank you.
R

Kindly post (here) your Dolibarr setup environment as suggested in the [url=www.dolibarr.org/t/post-guidelines/16873/1 Guidelines[/url]. This will greatly help the community in assisting you where possible.

Most probably NOT as the database structure may have changed. Can’t confirm though.

Possibly

If you did a backup, restore your v7 database into your v8 and see if that works?

I tried download version. That table is also empty.

Hi all,

I just downloaded Dolibarr 8.0.2 and installed it on a Debian 9.5 along with Apache Webserver and PostgreSQL 9.6.10.

I have problems with setting up the chart of accounts, while all other modules seem to work fine on the first glance. When selecting and loading either SKR03 or SKR04 charts of accounts, they seem to be empty “Accounts - Chart of Accounts”.

Is there a way of narrowing down the root cause?

Thanks in advance for your help.

Can you retry with 8.0.3
The data files for SKR03 and SKR04 was known to be bugged with 8.0.2 and lower.

Hi eldy, thanks for your fast response.

I removed the database and the server from the system and made a fresh install of 8.0.3. Then I activated the Advanced Accounting Module and loaded the SKR03 chart. 519 accounts are shown in the list, even though I get the error message “ErrorDuringChartLoad”.

How can I get further information on the error? Are debugging information logged by default and if yes, how can I get them?

Hello,
For getting more information on errors, see https://wiki.dolibarr.org/index.php/Error_reporting Module syslog

Hey Yves, thanks for the hint.

The error seems to be related to some key errors in the DB and the field names of the accounts being too long. I uploaded the log file for reference. Can some of the more experienced people please take a quick glance at it and give some feedback? Thanks in advance, really appreciate your help.

Edit: File upload seems to have failed. Examples:

2018-11-07 06:38:50 DEBUG   192.168.0.185   sql=INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (1, 8268, 'SKR04', 'Vortrags-, Kapital-, Korrektur- und statistische Konten', 'Privat Teilhafter (Eigenkapital, für Verrechnung mit Kapitalkonto III – Konto 9840-9806', 9443, 9, 'Zuwendungen, Spenden');
2018-11-07 06:38:50 ERR     192.168.0.185   DoliDBPgsql::query SQL Error message: ERROR:  22001: value too long for type character varying(20)
LOCATION:  varchar, varchar.c:624 (DB_ERROR_22001)
2018-11-07 06:38:50 ERR     192.168.0.185   Admin.lib::run_sql Request 7086 Error DB_ERROR_22001 INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (1, 8085, 'SKR04', 'Vortrags-, Kapital-, Korrektur- und statistische Konten', 'Umbuchungen auf andere Kapitalkonten: Vollhafter', 9175, 9, 'Verrechnungskonto für Einzahlungsverpflichtungen – Umbuchungen VH');<br>ERROR:  22001: value too long for type character varying(20)
LOCATION:  varchar, varchar.c:624

2018-11-07 06:38:36 ERR 192.168.0.185 DoliDBPgsql::query SQL Error message: ERROR: 23505: duplicate key value violates unique constraint "llx_accounting_account_pkey" DETAIL: Key (rowid)=(5535) already exists. SCHEMA NAME: public TABLE NAME: llx_accounting_account CONSTRAINT NAME: llx_accounting_account_pkey LOCATION: _bt_check_unique, nbtinsert.c:433 (DB_ERROR_RECORD_ALREADY_EXISTS) LOCATION: errorMissingColumn, parse_relation.c:3194 (DB_ERROR_NOSUCHFIELD) 2018-11-07 06:38:34 ERR 192.168.0.185 DoliDBPgsql::query SQL Error usesavepoint = 1 2018-11-07 06:38:34 DEBUG 192.168.0.185 Admin.lib::run_sql Request 1430 2018-11-07 06:38:34 DEBUG 192.168.0.185 sql=INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1, 2429 + 100500000, 'SKR03','3','Expense','3987', K3BA12 + 100500000,'Lager Differenzkorrektur Marktwert',1); 2018-11-07 06:38:34 ERR 192.168.0.185 DoliDBPgsql::query SQL Error message: ERROR: 42703: column "k3ba12" does not exist LINE 1: ... 2429 + 100500000, 'SKR03','3','Expense','3987', K3BA12 + 1...

I took a more detailed look into the log file. The problem seems to occur, when the parent account number is used.

Example:

2018-11-07 06:38:34 DEBUG   192.168.0.185   Admin.lib::run_sql Request 1649
2018-11-07 06:38:34 DEBUG   192.168.0.185   sql=INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1, 2648 + 100500000,  'SKR03','4','Expense','4436', K4GVA31 + 100500000,'(zur freien VerfĂĽgung)',1);
2018-11-07 06:38:34 ERR     192.168.0.185   DoliDBPgsql::query SQL Error message: ERROR:  42703: column "k4gva31" does not exist

The problematic operation is apparently the calculation of the parent account number. “llx_accounting_account_de.sql” provides this value as a string/varchar, while it is subsequently treated as an integer. In the swiss accounting sql, which I took as a reference, because it’s upload seemed to work, this column is provided as integer.
Furthermore, column “active” is provided as integer, while in the swiss accounting file, it’s provided as a character.

Is this a possible root cause of the problem? How can this issue be fixed?

Thank you very much for your help in advance.

Topic moved to the Bugs on a STABLE Version category

Hey folks,

I checked the file “llx_accointing_account_de.sql”. In SKR03 part of the file, the parent account is either provided as NULL (no problem I guess) or as a string. Why is it provided as a string of characters? Is it wise to change the respective column in the DB to type varchar? The SKR04 part of the file provides the parent account number as a number.

Thanks in advance for your help and kind regards

Tobias

Hi,

Problem is the Data, it contains Strings in Account Number. I will check and clean it soon and commit it to github/dolibarr.
I was the contributor of the Accounting Plan SKR03/SKR04

Markus

1 Like

Hi all,

I tested Markus’ updated version of the llx_accounting_account_de.sql with a fresh 8.0.3 install with MySQl as well as with PostgreSQL, please find below my findings.

MySQL:
There seem to be some duplicate account numbers (990, 8075 and 9000) in chart of accounts SKR03. All SKR04 statements will afterwards fail, because of already existing row-IDs.

PostgreSQL:
The length of the “label” column is not big enough (20 byte). Therefor, many statements will fail, because of the label being too long. Also, the same problems as with the MySQL database do occur.

Regards

Tobias