SACC
[ class tree: SACC ] [ index: SACC ] [ all elements ]

Class: SACCAccount

Source Location: /class/class.sacc.base.php

Class Overview

CDMBaseObject
   |
   --SACCAccount

SACCAccount object


Author(s):

Version:

  • 1

Methods


Child classes:

SACCDRAccount
Debit Account Base Object
SACCCRAccount
Credit Account Base Object

Class Details

[line 160]
SACCAccount object

The Base account object from which all account types are descended




Tags:

version:  1


[ Top ]


Class Methods


constructor SACCAccount [line 169]

SACCAccount SACCAccount( )

Constructor

The following variables are declared for retrieval via ->getVar()

  1. $this->initVar('id',XOBJ_DTYPE_INT,0,TRUE); //account id
  2. $this->initVar('ac_prnt_id',XOBJ_DTYPE_INT,0,TRUE); //account parent id
  3. $this->initVar('org_id',XOBJ_DTYPE_INT,0,TRUE); //organisation to which account belongs
  4. $this->initVar('ac_tp',XOBJ_DTYPE_TXTBOX,null,TRUE,6); //account type
  5. $this->initVar('ac_nm',XOBJ_DTYPE_TXTBOX,null,TRUE,20); //account name
  6. $this->initVar('ac_prps',XOBJ_DTYPE_TXTAREA,null,FALSE,255); //account purpose
  7. $this->initVar('ac_note',XOBJ_DTYPE_TXTAREA,null,FALSE,255); //account notes
  8. $this->initVar('ac_curr',XOBJ_DTYPE_TXTBOX,null,TRUE,3); //currency of account
  9. $this->initVar('ac_dr',XOBJ_DTYPE_INT,0,FALSE); //debit balance
  10. $this->initVar('ac_cr',XOBJ_DTYPE_INT,0,FALSE); //credit balance
  11. $this->initVar('ac_level',XOBJ_DTYPE_INT,0,FALSE);//display level
  12. $this->initVar('has_kids',XOBJ_DTYPE_INT,0,FALSE);//this account has child accounts
  13. $this->initVar('disp_order',XOBJ_DTYPE_INT,0,FALSE);//display order
  14. /* following are not held on database but computed by the object */
  15. $this->initVar('ac_net_bal',XOBJ_DTYPE_INT,0,FALSE); //account balance
  16. $this->initVar('ac_cr_altnm',XOBJ_DTYPE_OTHER,_MD_SACC_CR,FALSE); //alt name for CR value
  17. $this->initVar('ac_dr_altnm',XOBJ_DTYPE_OTHER,_MD_SACC_DR,FALSE); //alt name for DR value
  18. $entry = array();
  19. $this->initVar('entries',XOBJ_DTYPE_OTHER,$entry,FALSE); //account entries




[ Top ]

method getBalance [line 205]

int getBalance( )

Get the account balance

Returns the current account balance. Account balance is updated when an entry is posted into an account

IMPORTANT - Read the SACC help file for additional information on monetary values




Tags:

return:  current balance as an integer
version:  1


[ Top ]

method getEntries [line 230]

array getEntries( )

Return array of entry data suitable for display on screen

Array ( [0] => Array ( [id] => 1 [ac_id] => 6 [jrn_id] => 2 [txn_ref] => Money in [txn_dr] => 10000 [txn_cr] => 0 [row_flag] => Active [row_uid] => 1 [row_dt] => 20050508145657 ) [1] => Array ( [id] => 4 [ac_id] => 6 [jrn_id] => 3 [txn_ref] => Money out :-( [txn_dr] => 0 [txn_cr] => 2000 [row_flag] => Active [row_uid] => 1 [row_dt] => 20050508150843 ) )




Tags:

return:  cleaned up array of entries for this account
version:  1


[ Top ]


Documentation generated on Thu, 23 Feb 2006 13:06:00 +0000 by phpDocumentor 1.3.0RC3