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
$idif 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.