Topic: Different behaviour Main vs. Secondary Company

I am trying to edit GL entries that have already been submitted (e.g. having a #x).
I do this with a user, having a role with "access setup" market everything.
There is no problem if i do it with my main company, but when I do it with
a secondary company (e.g. which has more disabled functions in the setup/maintainance area),
I get the error "Process journal entry only if debits equal to credits".


It obviously comes from the file gl/gl_journal.php , but i am curious why ?

I checked
*debit=credit
*active financial year=open
*entry has date in active financial year
* closing date < entry date

The System Diagnostics shows all ok, but missing local scheme files.

Can I please get a hint how to solve this easyly ?

FA 2.4.6 (git clone on 5.2.2019)
MariaDB
Appache 2.4, php 7.3.1

2 (edited by poncho1234 02/08/2019 12:17:24 am)

Re: Different behaviour Main vs. Secondary Company

The 'debits = credits' is because FA is double entry accounts software, so the problem may be with the main company?


Were the two companies created with the same COA?

May be worth comparing the two db with WinMerge. The data of course will be different, but you will see any differences in the db structure. (Make a backup of each company, select both in explorer, right click for context menu - WinMerge)

Re: Different behaviour Main vs. Secondary Company

I name the companies A (works) and B (I can not edit entries).

I have always been inserting entries with the sum of column debit = sum of column credit (>1000 entries for company A).

I just made A to secondary and B to main company. The problem remains then with the Main company. Thus the status Main/Secondary has nothing to do with the problem.

They have very different COAs. A (coming from FA 2.3.x some years ago) B with fresh 2.4.6 intallation and making almost all
accounts inactive.

I just did a WinMerge comparison, some differences:
1) A has "DE" and B has "Global" in _areas table
2) A has a table _sys_types, B has not
3) A has content in the tables _grn_batch, _grn_items,_grn_item_codes and B has not
4) B has in table _debtor_trans "order_" as a key, A has not
5) A has content in _trans_tax_details, B has not

Re: Different behaviour Main vs. Secondary Company

So as I understand, you swapped the db's around and the problem moved with the db?

So the problem is definitely within the db.

Have a closer look at the 3 account tables...chart_class, chart_master and chart_types

Can you use your backups and see when the problem appears?

Maybe when you upgraded you didn't upgrade the db at each stage? Or something went wrong?

5 (edited by born.accounting 02/08/2019 01:36:48 pm)

Re: Different behaviour Main vs. Secondary Company

No, I just made Company B to be "Default Company", my wording  "Main Company" was not correct.
The only difference that may explain something is, that company B has empty fields account_code2 in the _chart_master
table, while company A has letters and numbers, like A0, A1-1, P3 etc..

I have no idea what these account_code2`s are good for.

I dont know what you mean by backups. Company B is fresh initialilzed.

Therefore will next try to just run company B on a different installed FA 2.4.6 with different appache Port.

Re: Different behaviour Main vs. Secondary Company

You missed my point in post 2 above:-
With reference to your 1st post
The secondary company is working as expected... error "Process journal entry only if debits equal to credits" is correct, FA is double entry accounts software; for every credit there must be an equal debit and vice-versa. It means you have not entered a corresponding debit/credit in the journal entry

Re: Different behaviour Main vs. Secondary Company

Attached Screenshots say more than my words.
You see 3 screenshots
1: old entry
2: entry with a changed text ("TEST" added)
3: the screen shown after pressing "Process Journal Entry" Button.
All the time the debt=credit =1200

I am still very clueless about this but i solved it for me by making a second FA installation with only new databases and a
German GOA.

This problem does not appear in the new installation, even with more than one company activated. I am using the same database for all companies but different "x_" prefixed-table names (x=0,1,2,...), while before I had different databases for different companies.

Hope I can attach .png's...

Re: Different behaviour Main vs. Secondary Company

the screenshots should be available here

https://1drv.ms/f/s!Aorbd8DW2bSfgoAvkbX-ZtXAtCKGaw

I haven't managed to attache here.

BTW are you really from Columbia ?

Post's attachments

EditingGL.zip 104.5 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Different behaviour Main vs. Secondary Company

So the problem is in the db then...

Not Columbia... Colombia

Re: Different behaviour Main vs. Secondary Company

I meant Colombia (Bogotha), heard one of the most beautiful countries in the world.
Will maybe become useful that you use the same program over there.

Re: Different behaviour Main vs. Secondary Company

The field ordering for some tables do not match the en_US-new.sql. The table sys_types is no longer used in FA 2.4.x. There are other tables / fields in FA 2.4.6 with some dropped. The official charts have been reasonably updated to comply with table names and field presence and ordering in the FA24extensions repo.