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

# LedgerSMB::DBObject::Asset\_Report(3pm)

LedgerSMB Base Class for Asset Reports

## NAME

LedgerSMB::DBObject::Asset\_Report - LedgerSMB Base Class for Asset Reports

## SYNOPSIS

This library contains the base utility functions for creating, saving, and retrieving depreciation categories of asset depreciation and disposal reports.

## STANDARD PROPERTIES

- id int

  Integer id of asset report

- report\_date date

  Effective date of report

- gl\_id bigint

  ID of GL transaction if applicable and approved.

- asset\_class bigint

  ID of asset class for the report the assets are

- report\_class int

  Integer of the report class desired.

- entered\_by bigint

  Integer id of the individual who entered the report

- approved\_by bigint

  Integer id of the individual who approved the report

- entered\_at timestamp

  Timestamp the report was created

- approved\_at timestamp

  Timestamp the report was approved

- depreciated\_qty

  Number of units (production or time) depreciated

- dont\_approve bool

  If true, do not approve, ever.

- submitted bool

  If true, submitted for approval

## METHODS

- save

  Uses standard properties

  Saves report to the database.  Sets ID.

  For each asset to be added to the report, we see:

  for each row, id\_$row contains the asset id for that row.  Let this be `$id`

  if asset\_$id, the asset is added.  Each asset also has: amount\_$id dm\_$id percent\_$id

- get

  Gets report from the database.

- get\_nbv

  Returns line items for the Net Book Value report.

- generate

  Properties used:

  \* report\_id int:  Report to enter the transactions into,  \* accum\_account\_id int:  ID for accumulated depreciation.

- approve

  Properties used:

  id

  For depreciation accounts, expense\_acct must be set.

  For disposal accounts, gain\_acct and loss\_acct must be set.

  Approves the referenced transaction and creates a GL draft (which must then be  approved.

- search

  Searches for matching asset reports for review and approval.

  Search criteria in properties:

  \* start\_date date \* end\_date date \* asset\_class int \* approved bool \* entered\_by int

  Start and end dates specify the date range (inclusive) and all other matches are exact. Undefs match all records.

- get\_metadata

  Sets the following properties:

  \* asset\_classes:  List of asset classes \* exp\_accounts:  List of expense accounts \* gain\_accounts:  List of gain accounts \* loss\_accounts:  list of loss accounts \* disp\_methods:  List of disposal methods

## Copyright (C) 2010, The LedgerSMB core team.

This file is licensed under the Gnu General Public License version 2, or at your option any later version.  A copy of the license should have been included with your software.
