Topic: Retained Earnings and Profit/Loss Year issue

Hi.
I am from Romania and I am trying to set up the General GL, but I have no knowledge of accounting, so I am trying to figure out how it should be configured.

I am trying to set up Retained Earnings and Profit/Loss Year accounts but I keep getting the error
"The Retained Earnings Account should be a Balance Account or the Profit and Loss Year Account should be an Expense Account (preferred the last one in the Expense Class)"

I cheeked the code and the condition for this error is

if (!is_account_balancesheet(get_post('retained_earnings_act')) || is_account_balancesheet(get_post('profit_loss_year_act')))

As best of my understanding, the condition and the error message are in opposition. The problem is that I do not know what is correct? Is the error message correct (condition should be &&)  or is the condition correct (error text should be with AND instead of OR)

Re: Retained Earnings and Profit/Loss Year issue

Hi, x_roast

Retained earnings is under Balance sheet Liabilities & equity section.
Goto Banking and General Ledger>GL Account Groups, add Retained Earnings account and select Liabilities on Class.
Goto Setup>System and General GL Setup, select your Retained Earnings account you just created.

Year Profit/Loss is under Income Statement/Profit and Loss Statement.
Goto Banking and General Ledger>GL Account, create Year Profit/Loss account and select Expenses on Account Group.
Goto Setup>System and General GL Setup, select your Profit/Loss Year account you just created.

Regards.

Re: Retained Earnings and Profit/Loss Year issue

Hi,
Please note that my post refers to a software condition that is in conflict with the associated error message, and not the workaround for the problem.
Meanwhile I managed to  make the workaround, but only after digging in the code.

Re: Retained Earnings and Profit/Loss Year issue

@x-roast: Kindly share your workaround for peer review to ensure that you are on the right track.

Re: Retained Earnings and Profit/Loss Year issue

I am on the wrong track, and I know it. :-(
My workaround is a dirty hack that might backfire....but I will make a db backup before closing the year. As I understand these accounts are only used when closing the year. Or am I wrong? 

As I pointed out in the original post, I do not know what is correct:
a:  <Retained Earnings Account must be  Balance Account> OR <Profit and Loss Year Account must be Expense Account>
b:  <Retained Earnings Account must be Balance Account> AND <Profit and Loss Year Account must be Expense Account>

Further more, as best of my understanding, in the Romanian COA both Retained Earnings and Profit and Loss Year is Balance Account. More exactly is class 1 (Equity)......but I might be wrong.

Here is a multi-language document with the Romanian COA (this is identical with what is in FA)
https://assets.kpmg/content/dam/kpmg/ro/pdf/plan-de-conturi-2016-web.pdf
As I understand:
Retained Earnings is 117 ....?
Profit and Loss Year is 121 ....?

Re: Retained Earnings and Profit/Loss Year issue

the code is correct.
if (!is_account_balancesheet(get_post('retained_earnings_act')) || is_account_balancesheet(get_post('profit_loss_year_act')))
Display error if retained earning not a Balance sheet a/c OR profit & loss is a Balance sheet a/c

Profit & Loss is a company earned over a period of time (fiscal years),
Retained Earnings is the accumulated profits of the company since business started, minus any dividends distributed.
Profit & Loss is a temporary account like all revenue, expenses account, when you closing account, temporary account balance will transfer to permanent entries on balance sheet like retained Earnings, temporary account will set to zero in preparation for the new accounting period.

Re: Retained Earnings and Profit/Loss Year issue

Ok, So then the error message should be with AND, not OR (Or I still do not understand something right):

"The Retained Earnings Account should be a Balance Account AND the Profit and Loss Year Account should be an Expense Account (preferred the last one in the Expense Class)"


Regarding the accounting part (I am only starting to learn this part):
Here in Romania, at the end of each mount all income is entered to Profit & Loss (121) as Credit, and all Expense  is entered to  Profit & Loss (121) as Debit. Is this the same in the rest of the world? Or it is done differently?
Can FA do this automatically at the end of each mount, or is it intended to be done manually?

Re: Retained Earnings and Profit/Loss Year issue

Hi, I just checked the display_error message, and I think I get what you meant.   
    if (!is_account_balancesheet(get_post('retained_earnings_act')) || is_account_balancesheet(get_post('profit_loss_year_act')))
    {
        display_error(_("The Retained Earnings Account should be a Balance Account or the Profit and Loss Year Account should be an Expense Account (preferred the last one in the Expense Class)"));
        return false;
    }
This is something like, enter user id and password, if either 1 is wrong then should display error message "invalid user id or password" or "invalid user id and password"?
of course, is better to split the code to check each error.
if (!is_account_balancesheet(get_post('retained_earnings_act'))
        display_error(_("The Retained Earnings Account should be a Balance Account ))
if (is_account_balancesheet(get_post('profit_loss_year_act'))
               display_error(_("The Retained Earnings Account should be a Balance Account ))

Yes, is Credit income, and debit expenses.

Re: Retained Earnings and Profit/Loss Year issue

I meant in P&L, is Credit income, and debit expenses.

Re: Retained Earnings and Profit/Loss Year issue

Sorry should be:
if (!is_account_balancesheet(get_post('retained_earnings_act'))
        display_error(_("The Retained Earnings Account should be a Balance Account ))
if (is_account_balancesheet(get_post('profit_loss_year_act'))
               display_error(_("The profit and loss should not be a Balance Account ))

Re: Retained Earnings and Profit/Loss Year issue

Thanks for the clarification regarding error message.

Regarding the  Profit & Loss account:
Please confirm that in the rest of the world (and In FA) Profit & Loss account is Credit income, and debit expenses at the end of each mount, or only in the end of the Fiscal year.

Also if you have time, please take a lock at the Romaiam COA setup that is available in FA. It might happen that this setup is not correct. due to the fact that both Retained Earnings (117) and Profit and Loss Year (121) are configured as Balanced accounts

Re: Retained Earnings and Profit/Loss Year issue

Hi, I am only a FA user, those experts in accounting and FA please correct me if I am wrong.

In computerized accounting system, the Profit & Loss year a/c is mainly for keeping the profit or loss in the fiscal year.
I think what you mentioned P&L account is credit income debit expenses is for manual accounting system.
The COA in FA are template, you have to setup COA according to your country standard and company need.
The Romania COA should be wrong, just follow the FA standard, set Profit and Loss Year Account to Expenses class.

Re: Retained Earnings and Profit/Loss Year issue

So you suggest that I should create Profit and Loss Year Account that is not part of the Official Romanian COA and set that "unofficial" account as  Profit and Loss Year Account for FA.
The thing is that in this case I do net see the reason for FA Profit and Loss Year Account functionality because the official Profit and Loss account, that has to be updated manually at the end of each mount (this is a legal requirement) will be same in the end of the year as the  "unofficial", so practically the software dose not help in this calculation. It can be used just for double checking at the end of the year that the manual calculations are correct or not.

Re: Retained Earnings and Profit/Loss Year issue

I think you are referring to Profit & Loss statement.
in manual accounting, you have to enter all debit and credit entries for trial balance, P&L and Balance sheet.
in computerize accounting system, all GL entries are posted from Sales,purchases, Journal entries etc modules,and trial balance, P&L, Balance sheet reports are generated from GL.
Profit and Loss, Balance Sheet report requirement differ from all countries, companies and type of business, so either we output FA report to excel format and modifying from it, or customize the 2 reports.