Reporting Periods

Reporting periods corresponds to the financial years of the entity’s operations. They are used to identify reports generated by the package.

Attributes

  • period_count: The period count is an integer that indicates the number of periods the entity has been in operation. It serves as an index to transaction numbers for easy identification and tracing.
  • year: The calendar year corresponding to the reporting period.
  • status: The status of the period. Defaults to ReportingPeriod::OPEN.
  • entity: The Entity associated with the reporting period. Defaults to the entity of the logged in user.
  • closingRates: The closing exchange rates for currencies used in transactions during the period.
  • closingTransactions: The translation transactions for foreign currency accounts for the period.

Methods

  • $reportingPeriod->toString(): The string representation of the Reporting Period object instance.
  • ReportingPeriod::getPeriod($date): Retrieves the reporting period of the date given, and if none is given of the current date.
  • ReportingPeriod::year($date): Retrieves the calendar year of the date given, and if none is given of the current date.
  • ReportingPeriod::periodStart($date): Retrieves the first date of the reporting period for the date given, and if none is given of the current date.
  • ReportingPeriod::periodEnd($date): Retrieves the last date of the reporting period for the date given, and if none is given of the current date.
  • $reportingPeriod->attributes(): Presents the reporting period’s attributes as an object. Useful for debugging.
  • $reportingPeriod->transactionCurrencies(): Retrieves all foreign currencies used in transactions within the period.
  • $reportingPeriod->prepareBalancesTranslation() Create the foreign currency translation transactions for the period.
  • $reportingPeriod->getTranslations(): Retrieves all foreign currency translation transactions for the period.
  • $reportingPeriod->postTranslations(): Commits all foreign currency translation transactions for the period to the ledger.

Constants

  • ReportingPeriod::OPEN: An open reporting period is one that is currently having transactions posted in it.
  • ReportingPeriod::CLOSED: A closed reporting period is one which has been audited and therefore does not allow any more transactions to be posted.
  • ReportingPeriod::ADJUSTING: During the adjusting status of a period only transactions that adjust the figures in the reports for audit purposes may be posted.

Constraints

  • MissingReportingPeriod: The Entity does not have a reporting period for the date given.
  • InvalidAccountType: The account specified for posting forex translations must be of type Accont::Euity (Other Comprehensive Income).
  • InvalidPeriodStatus: Forex translations can only be performed for a reporting period that is in the adjusting stage.
  • MissingClosingRate: The currency does not have a closing rate.