Topic: Profit and Loss Year Account should be an Expense Account issue

Hi

My default Chart of Account is Egypt CoA,
Profit & Loss - Current Year account should be Balance sheet account according Egypt standards and IFRS
and i don't want to change its class tp be expense account

How can I ignore error check message of "Profit and Loss Year Account should be an Expense Account" or

How to change check criteria  "Profit and Loss Year Account should be an Balance Sheet  Account"

your quick response is appreciated.
Regards

Re: Profit and Loss Year Account should be an Expense Account issue

How to change this code to solve above issue:

function close_year($year)
{
    global $Refs;

    $co = get_company_prefs();
    if (get_gl_account($co['retained_earnings_act']) == false || get_gl_account($co['profit_loss_year_act']) == false)
    {
        display_error(_("The Retained Earnings Account or the Profit and Loss Year Account has not been set in System and General GL Setup"));
        return false;
    }
    if (!is_account_balancesheet($co['retained_earnings_act']) || is_account_balancesheet($co['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;
    }