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.

Re: Retained Earnings and Profit/Loss Year issue

According to my accountant, following US standards, current year P&L account should be a Capital Account (ie Equity Class Type).  It is normally a "temporary" account that is transferred to the Retained Earnings account at year end.

This seems to be in line with what x_roast is referring to in Romanian standards.  I have run across this same problem stated in multiple posts in this forum as well as GL.  I can make it work by setting it up as an expense class, but this seems to run against what my accountant is saying as well as all of the reference documentation that I have found on the subject.

Could it be that India's standards are different than others?  Would it really make any difference whether current P&L account is Expense or Equity class as far as the way the FA system works?

Re: Retained Earnings and Profit/Loss Year issue

There are several ways of doing the Year end Closure. This is the way we are doing it.

At the year end, after closure all balance accounts should be in balance (assets - liabilities should be 0).

An example just before closure (a very simple illustration):

Balance accounts 
Assets           Liabilities 
  1000                   500 
                           X
----------------------------
 
P/L accounts 
Cost                  Income 
 800                    1300
   X
----------------------------

The annual year result (x) is debited the P/L accounts and credited the  Balance accounts (Retained Earnings).

Now all accounts are in balance.

And doing it this way we can use the P/L transactions for accumulated project P/L statements.

Joe

Re: Retained Earnings and Profit/Loss Year issue

Assets = Liabilities + Owner/Stockholder Equity

Suppose Owner's Equity account# is 3300
If yearly P&L were a temporary account# of Class Type Equity, say 3400, then...

Say prior to Year end close...
3300 balance 30K, 3400 balance 20k

Assets = Liabilities + Owner's Equity
150K   = 100K      + 50K

Now Year Close...
3300 balance 50k, 3400 balance 0
Assets = Liabilities + Owner's Equity
150K   = 100K      + 50K

Why should this NOT be allowed to follow local country standards?

Re: Retained Earnings and Profit/Loss Year issue

There is an  error in your explanation.

Where did the 20k in 3400 come from? We haven't done the closure yet.
This account should first be filled by the closure routine.
Well it is ok to make the closure manually by balancing the accounts before the closure routine.
If the balance accounts are already balanced, then FA is not doing any bookings.

Joe

Re: Retained Earnings and Profit/Loss Year issue

OK, I had made an improper assumption.  Is there anywhere that the closure routines are documented as far as what they do?  That would be helpful.  Thanks!

Re: Retained Earnings and Profit/Loss Year issue

Hi, You might try to do a search in the forum to see some more explanations. Otherwise I will try to make a more detailed  instruction about how the fiscal year closing is functioning in FA. Thanks for the discussion.

Joe

Re: Retained Earnings and Profit/Loss Year issue

Thanks so much!

I have gone through the posts, and am getting a better picture, but some things are still disjointed.

A detailed instruction or flow for closings would be most helpful.  It would also help to understand the best way to setup accounts within FA. Understanding the end-game flow helps to better understand overall setup to begin with. Perhaps a good place would be in the wiki?

Brad

22 (edited by MacKenzie 02/02/2023 11:43:18 pm)

Re: Retained Earnings and Profit/Loss Year issue

OK, I played around with the entire closing_gl module and I could not get it to work.   I reviewed the code, and frankly I'm not seeing HOW this could possibly close out the accounts.  Maybe I'm missing something. But we are talking about a traditional accounting closing exercise here right?  This essentially empties out the Revenue and Expense accounts and dumps the difference in a RE or SE account.  I do not see this calculation occuring anywhere in this code.  Again, maybe I'm missing something -> maybe it's calling it up somewhere else and I just missed it, but I am not now seeing how this code could possibly close out the books for a period (e.g., year).  Luckly it is an easy thing to do manually with a JE, and luckily one only has to do it once a year (in theory) per company.  Thanks

Re: Retained Earnings and Profit/Loss Year issue

@MacKensie

Please have a look at Posts 16 and 18, where I try to explain how we are implementing the Year Closure.

You can still do the year closing yourself and get it as you like. But if the transactions are not in balance we have to do it.

We are doing it this way in FA, by keeping the P/L transactions and only debit the year result as explained above.
This way we can perform multi year p/l and balance reports for dimensions (projects).

Joe

24 (edited by MacKenzie 01/31/2023 02:09:00 pm)

Re: Retained Earnings and Profit/Loss Year issue

Thanks Joe,  I reviewed the posts.  [scratching my head now].  I guess I'm not understanding what the close_period.php app is supposed to accomplish. I will continue to look at this.  I'm thinking it would be pretty easy to write an sql script that closes the books, or at least provides an easy calc page for someone to just post an adjusting journal entry.  I will continue to look at this. 

I appreciate your response.