---
name: "LedgerSMB::DBObject::EOY"
section: "3pm"
platform: "linux"
package: "ledgersmb"
version: "1.3.40-1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/LedgerSMB::DBObject::EOY"
---

# LedgerSMB::DBObject::EOY(3pm)

End of Year handling module

## NAME

LedgerSMB::DBObject::EOY - End of Year handling module

## SYNOPSYS

This class contains methods for end of year entry.

## BASIC PROPERTIES

- end\_date specifies the end date for a closed period.

  - reference specifies the gl reference field associated with the account closure

  - description specifies the gl description field associated with the account closure

  - retention\_acc\_id specifies the account id used as a retaining account.

  ## METHODS

- $eoy-\>*checkpoint\_only()*;

  This creates account checkpoints at `$eoy`-\>{end\_date}.  This has two uses: 1)  Can be used to "close" books without zeroing income/expense accounts.  This prevents data from being inserted for earlier dates.

  2\)  This can be used to improve performance by creating a "lookback" point.

- $eoy-\>*reopen\_books()*

  This reverses any end of year transaction on `$eoy`-\>{reopen\_date}, and deletes  checkpoints later than that and creates a checkpoint for the prior day.

- $eoy-\>*latest\_closing()*

  Needs no properties set (other than internal private ones).  Retrieves the  latest closing date and returns it.

- $eoy-\>*close\_books()*

  Requires all properies in BASIC PROPERTIES to be set.  This creates a gl  yearend transaction, and moves income/expenses to the selected equity account for retained earnings.

- $eoy-\>list\_earnings\_accounts

  Returns a list of equity accounts, and sets `$eoy`-\>{earnings\_accounts} to a  list of hashrefs.  These are used to select retained earnings accounts in  closing books.

## COPYRYIGHT

Copyright (C) 2009 The LedgerSMB Core Team.  This may be re-used as permitted by the GNU General Public License v 2 or at your option any later version.  Please see included License.txt for details.
