# reports.pm - The Reporting Class to provide base functionality for Reports.
# Created by James Pattie, 11/11/1999.
# new - Expects the Class Object, Global Database pointer, Ledger Database pointer.
# You must check that no Error Occurred before you can assume that the object is complete.

# getGlobalDB - Returns the pointer to the Global Databasen Object to work with.

# getLedgerDB - Returns the pointer to the Ledger Database Object to work with.

# didErrorOccurr - Returns the flag value to indicate if an error occurred.

# getErrorMessage - Returns the Error Message created by the class.

# ClearErrorMessage - Will set the Error String back to nothing.

# AccountActivity
#           Takes  : Array of Accounts with the Debit Increases Flag and Account Name
#           Takes  : Begin and End Dates
#           Returns: Array of activity and # of entries for each account

# Scripts used in: reports4.cgi

# GetAccountTypeNames
#    Takes  : Array of Account Types
#    Returns: Array of Account Type Names in relation to the Account Types given.

# Scripts used in: reports4.cgi

# GetLocalAccounts
#    Takes  : Array of Account Types
#    Takes  : Taxable Flag (Optional, if not specified assumed to be 0)
#    Returns: Array of Local Accounts for each Account Type with the Debit Increases Flag for each Account Type and the Account Name
#             Array [AccountType]
#             [AccountType] = [LocalAccounts]
#             [LocalAccounts] = Account Number, Debit Increases Flag, Account Name

# Scripts used in: reports4.cgi

# AccountTypeActivity
#    Takes  : Array of Account Types
#    Takes  : begin and end dates
#    Takes  : Taxable Flag (Optional, if not specified assumed to be 0)
#    Returns: Array of Activity and # of entries for each Account Type

# Scripts used in: reports4.cgi

# GetSubAccounts
#    Takes  : Array of Accounts with Number, Debit Increases Value, Name
#    Returns: Array of SubAccounts for each Account (name and number)
#             Array = [SubAccount]
#             [SubAccount] = Number, Name

# Scripts used in: reports4.cgi

# SubAccountActivity
#    Takes  : Array of Accounts with Debit Increases value
#             Array [Accounts]
#             [Accounts] = [Account Info]
#             [Account Info] = Account Number, Debit Increases Value, Account Name
#    Takes  : For each Account, an Array of SubAccounts
#             Array [Accounts]
#             [Accounts] = [SubAccounts]
#             [SubAccounts] = SubAccount Number, SubAccount Name
#    Takes  : begin and end dates
#    Returns: Array of Balances, with an array of SubAccount balances for each Account.
#             Array [Accounts]
#             [Accounts] = balance_total, [SubAccounts Balance]
#             [SubAccounts Balance] = activity of SubAccount and # of entries in same order as in SubAccount array.

# Scripts used in:

# GetSubEntities
#    Takes  : Nothing
#    Returns: Array of SubEntities in the current Ledger
#             Array = [SubEntities]
#             [SubEntities] = Code, Name

# Scripts used in:

# SubEntityAccountActivity
#    Takes  : Array of SubEntities (Codes, Names)
#    Takes  : Array of Accounts with Debit Increases value
#             Array [Accounts]
#             [Accounts] = [Account Info]
#             [Account Info] = Account Number, Debit Increases Value, Account Name
#    Takes  : begin and end dates
#    Returns: Array of Balances, with an array of Account balances for each SubEntity.
#             Array [SubEntities]
#             [SubEntities] = balance_total, [Accounts Balance], total num entries
#             [Accounts Balance] = activity of Account and # of entries in same order as in Account array.

# Scripts used in:

# GetActivityData
#    Takes  : Account Info Array (Number, Debit Increases Value, Name) [Required]
#    Takes  : SubAccount Array (SubAccount Number, SubAccount Name) [Optional may be ()]
#    Takes  : SubEntity Array (Code, Name) [Optional may be ()]
#    Takes  : begin and end dates [Required]
#    Returns: Array of Entries from the debitcredit_tb that match the given data.
#             Array [Entries]
#             [Entities] = parent_num, sub_e_code, account_num, sub_account_num, sub_account_name, amount, dorc, cleared, counter, trans_date, payee_payer, memo, journal code

# Scripts used in:

# GetAccountBalances
#    Takes  : Account Info Array (Number, Debit Increases Value, Name) [Required]
#    Takes  : date to calculate balance to [Required]
#    Returns: Array of Balances and # of entries for all accounts specified.

# Scripts used in: reports4.cgi

# GetAccountTypeBalances
#    Takes  : Array of Account Types
#    Takes  : Date to get the balance up till
#    Takes  : Taxable Flag (Optional, if not specified assumed to be 0)
#    Returns: Array of Balances and # of entries for each Account Type

# Scripts used in: ledger.cgi

<hr><p> Copyright (c)  2001 HLR<br>
      Permission is granted to copy, distribute and/or modify this document
      under the terms of the GNU Free Documentation License, Version 1.1;
      A copy of the license is available at
 <a href="http://www.gnu.org/licenses/licenses.html#FDL">http://www.gnu.org/licenses/licenses.html#FDL</a>.
</p>
<p>Updated: $Id: oldreports.txt,v 1.1.1.1 2001/08/09 19:03:00 moreejt Exp $</p>
