Skip to content

Year-End Closing

Year-end closing is the process of finalizing a fiscal year by transferring all revenue and expense account balances to an income summary account, and then moving the net income (or loss) to retained earnings. This resets revenue and expense accounts to zero for the next fiscal year while preserving the cumulative profit in equity.

Purpose

  • Close all revenue accounts by debiting them and crediting an income summary account
  • Close all expense accounts by crediting them and debiting the income summary account
  • Transfer net income (or loss) from the income summary to the retained earnings account
  • Verify readiness before executing -- all periods must be closed and all entries posted
  • Allow reopening a closed year in exceptional circumstances

Entity Attributes

Year-End Closing

FieldTypeDescription
idintegerPrimary key
company_idintegerOwning company
fiscal_year_idintegerFiscal year being closed
statusenumpending, in_progress, completed, reopened
income_summary_account_idinteger?GL account for the income summary
retained_earnings_account_idinteger?GL account for retained earnings
revenue_closing_entry_idinteger?Journal entry that closes revenue accounts
expense_closing_entry_idinteger?Journal entry that closes expense accounts
income_summary_closing_entry_idinteger?Journal entry that transfers to retained earnings
opening_balance_entry_idinteger?Journal entry for the next year's opening balances
total_revenuedecimal(12,3)?Sum of all revenue accounts
total_expensesdecimal(12,3)?Sum of all expense accounts
net_incomedecimal(12,3)?Revenue minus expenses
executed_byinteger?User who executed the closing
executed_atdatetime?Execution timestamp
reopened_byinteger?User who reopened the year
reopened_atdatetime?Reopen timestamp
notestext?Notes (English)
notes_artext?Notes (Arabic)
created_atdatetimeCreation timestamp
updated_atdatetimeLast update timestamp

Relationships

API Endpoints

MethodPathDescription
GET/api/accounting/year-end-closingList all year-end closings (paginated)
GET/api/accounting/year-end-closing/{fiscalYearId}/readinessCheck if a fiscal year is ready to close
GET/api/accounting/year-end-closing/{fiscalYearId}Get the closing record for a fiscal year
POST/api/accounting/year-end-closing/{fiscalYearId}/executeExecute the year-end closing
POST/api/accounting/year-end-closing/{fiscalYearId}/reopenReopen a closed fiscal year

State Diagram

Step-by-Step Workflow

Follow these seven steps to close a fiscal year:

Step 1: Close All Fiscal Periods

Ensure every fiscal period in the year is closed. No journal entries should be posted to closed periods.

POST /api/accounting/fiscal-periods/{periodId}/close

Repeat for all 12 periods.

Step 2: Post All Draft Journal Entries

Review and post any remaining draft journal entries for the fiscal year.

POST /api/accounting/journal-entries/{id}/post

Step 3: Lock Opening Balances

If opening balances exist for the fiscal year, they must be locked.

POST /api/accounting/opening-balances/{id}/lock

Step 4: Run Readiness Check

Verify the fiscal year is ready to close.

GET /api/accounting/year-end-closing/{fiscalYearId}/readiness

Response 200 OK

json
{
  "data": {
    "fiscal_year_id": 1,
    "fiscal_year_name": "2026",
    "is_ready": true,
    "checks": {
      "all_periods_closed": true,
      "no_draft_entries": true,
      "no_pending_entries": true,
      "opening_balance_locked": true,
      "no_existing_closing": true
    },
    "summary": {
      "total_revenue": "850000.000",
      "total_expenses": "620000.000",
      "net_income": "230000.000"
    }
  }
}

If is_ready is false, the checks object will indicate which conditions are not met.

Step 5: Configure Closing Accounts

Choose the income summary and retained earnings accounts when executing.

Step 6: Execute Year-End Closing

POST /api/accounting/year-end-closing/{fiscalYearId}/execute

Request

json
{
  "income_summary_account_id": 35,
  "retained_earnings_account_id": 31,
  "notes": "Year-end closing for fiscal year 2026",
  "notes_ar": "إقفال نهاية السنة المالية 2026"
}

Response 201 Created

json
{
  "data": {
    "id": 1,
    "fiscal_year_id": 1,
    "fiscal_year": {
      "id": 1,
      "name": "2026"
    },
    "status": "completed",
    "status_label": "Completed",
    "income_summary_account_id": 35,
    "retained_earnings_account_id": 31,
    "revenue_closing_entry_id": 120,
    "expense_closing_entry_id": 121,
    "income_summary_closing_entry_id": 122,
    "opening_balance_entry_id": 123,
    "total_revenue": "850000.000",
    "total_expenses": "620000.000",
    "net_income": "230000.000",
    "executed_by": 1,
    "executed_at": "2026-12-31T23:59:00.000000Z",
    "notes": "Year-end closing for fiscal year 2026",
    "notes_ar": "إقفال نهاية السنة المالية 2026",
    "created_at": "2026-12-31T23:59:00.000000Z"
  }
}

Step 7: Verify Closing Journal Entries

The system creates up to four journal entries:

EntryPurposeExample
Revenue closingDebits all revenue accounts, credits income summaryJE-2026-0120
Expense closingCredits all expense accounts, debits income summaryJE-2026-0121
Income summary transferTransfers net income to retained earningsJE-2026-0122
Opening balanceCarries forward balance sheet accounts to next yearJE-2026-0123

Closing Journal Entry Detail

For a year with 850,000 KWD revenue and 620,000 KWD expenses:

Revenue Closing Entry

AccountDebitCredit
Sales Revenue700,000.000--
Service Revenue150,000.000--
Income Summary--850,000.000

Expense Closing Entry

AccountDebitCredit
Income Summary620,000.000--
Salaries Expense--350,000.000
Rent Expense--180,000.000
Utilities Expense--90,000.000

Income Summary Transfer

AccountDebitCredit
Income Summary230,000.000--
Retained Earnings--230,000.000

Business Rules

RuleDescription
All periods must be closedCannot execute if any fiscal period is still open
No unposted entriesAll draft/pending journal entries must be posted or cancelled
Opening balance lockedIf an opening balance exists, it must be in locked status
No duplicate closingCannot close a year that is already closed
Reopen reverses entriesReopening reverses all closing journal entries
Income summary accountMust be an equity-type account designated for temporary use
Retained earnings accountMust be an equity-type account for accumulated profits
Atomic operationThe entire closing executes in a database transaction
Company scopedClosings are filtered by the authenticated user's company

Moon ERP API Documentation