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

Class: SACCOrg

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

Class Overview

CDMBaseObject
   |
   --SACCOrg

SACCOrg object - Organisation


Author(s):

Version:

  • 1

Methods



Class Details

[line 53]
SACCOrg object - Organisation



Tags:

version:  1


[ Top ]


Class Methods


constructor SACCOrg [line 61]

SACCOrg SACCOrg( )

Constructor

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

  1. $this->initVar('id',XOBJ_DTYPE_INT,0,TRUE); //organisation id
  2. $this->initVar('base_crcy',XOBJ_DTYPE_TXTBOX,null,TRUE,3); //base currency code
  3. $this->initVar('org_name',XOBJ_DTYPE_TXTBOX,null,TRUE,30); //org name
  4. $tmp = array(); //dummy array to initialise variable
  5. $this->initVar('accounts',XOBJ_DTYPE_OTHER,$tmp); //accounts array for organisation
  6. $this->initVar('journal',XOBJ_DTYPE_OTHER,$tmp); //journal array for organisation




[ Top ]

method getAccounts [line 105]

array getAccounts( )

Return array of account data suitable for display on screen

Returned array looks like: Array ( [0] => Array ( [id] => 1 [ac_prnt_id] => 0 [org_id] => 1 [ac_tp] => ASSET [ac_nm] => Asset Master A/C [ac_prps] => [ac_note] => [ac_curr] => GBP [ac_dr] => 0 [ac_cr] => 0 [ac_level] => 0 [has_kids] => 1 [disp_order] => 0 [ac_net_bal] => 0 [ac_cr_altnm] => Decrease [ac_dr_altnm] => Increase [entries] => Array ( ) [row_flag] => Active [row_uid] => 1 [row_dt] => 20050508144536 ) [1] => Array ( [id] => 6 [ac_prnt_id] => 1 [org_id] => 1 [ac_tp] => BANK [ac_nm] => Current Bank Account [ac_prps] => [ac_note] => [ac_curr] => GBP [ac_dr] => 0 [ac_cr] => 0 [ac_level] => 1 [has_kids] => 0 [disp_order] => 1 [ac_net_bal] => 0 [ac_cr_altnm] => Decrease [ac_dr_altnm] => Increase [entries] => Array ( ) [row_flag] => Active [row_uid] => 1 [row_dt] => 20050508144536 ) [2] => Array ( [id] => 2 [ac_prnt_id] => 0 [org_id] => 1 [ac_tp] => LIABIL [ac_nm] => Liability Master A/C [ac_prps] => [ac_note] => [ac_curr] => GBP [ac_dr] => 0 [ac_cr] => 0 [ac_level] => 0 [has_kids] => 0 [disp_order] => 2 [ac_net_bal] => 0 [ac_cr_altnm] => Increase [ac_dr_altnm] => Decrease [entries] => Array ( ) [row_flag] => Active [row_uid] => 1 [row_dt] => 20050508144536 ) [3] => Array ( [id] => 3 [ac_prnt_id] => 0 [org_id] => 1 [ac_tp] => INCOME [ac_nm] => Income Master A/C [ac_prps] => [ac_note] => [ac_curr] => GBP [ac_dr] => 0 [ac_cr] => 0 [ac_level] => 0 [has_kids] => 0 [disp_order] => 3 [ac_net_bal] => 0 [ac_cr_altnm] => Income [ac_dr_altnm] => Charge [entries] => Array ( ) [row_flag] => Active [row_uid] => 1 [row_dt] => 20050508144536 ) [4] => Array ( [id] => 4 [ac_prnt_id] => 0 [org_id] => 1 [ac_tp] => EXPENS [ac_nm] => Expense Master A/C [ac_prps] => [ac_note] => [ac_curr] => GBP [ac_dr] => 0 [ac_cr] => 0 [ac_level] => 0 [has_kids] => 0 [disp_order] => 4 [ac_net_bal] => 0 [ac_cr_altnm] => Refund [ac_dr_altnm] => Expense [entries] => Array ( ) [row_flag] => Active [row_uid] => 1 [row_dt] => 20050508144536 ) [5] => Array ( [id] => 5 [ac_prnt_id] => 0 [org_id] => 1 [ac_tp] => EQUITY [ac_nm] => Equity Master A/C [ac_prps] => [ac_note] => [ac_curr] => GBP [ac_dr] => 0 [ac_cr] => 0 [ac_level] => 0 [has_kids] => 1 [disp_order] => 5 [ac_net_bal] => 0 [ac_cr_altnm] => Increase [ac_dr_altnm] => Decrease [entries] => Array ( ) [row_flag] => Active [row_uid] => 1 [row_dt] => 20050508144536 ) [6] => Array ( [id] => 7 [ac_prnt_id] => 5 [org_id] => 1 [ac_tp] => EQUITY [ac_nm] => Opening Balances [ac_prps] => [ac_note] => [ac_curr] => GBP [ac_dr] => 0 [ac_cr] => 0 [ac_level] => 1 [has_kids] => 0 [disp_order] => 6 [ac_net_bal] => 0 [ac_cr_altnm] => Increase [ac_dr_altnm] => Decrease [entries] => Array ( ) [row_flag] => Active [row_uid] => 1 [row_dt] => 20050508144536 ) )




Tags:

return:  cleaned up array for each account held for the organisation
version:  1


[ Top ]

method getJournal [line 120]

array getJournal( )

Return array of journal data suitable for display on screen

Returned array looks like this: Array ( [0] => Array ( [id] => 1 [org_id] => 1 [jrn_dt] => 2005-05-08 00:00:00 [jrn_prps] => Test [acc_entry] => Array ( ) [row_flag] => Active [row_uid] => 1 [row_dt] => 20050508145557 ) [1] => Array ( [id] => 2 [org_id] => 1 [jrn_dt] => 2005-05-08 00:00:00 [jrn_prps] => Test 2 [acc_entry] => Array ( ) [row_flag] => Active [row_uid] => 1 [row_dt] => 20050508145657 ) )




Tags:

return:  cleaned up array for each journal entry for the organisation
version:  1


[ Top ]

method setDefunct [line 133]

boolean setDefunct( )

Function: setDefunct

Extend ancestor. Defunct any accounts that the organisation has. Although the account data is saved to the database, the organisation data is not until inesrt() is called




Tags:

return:  TRUE on success else FALSE
version:  1


[ Top ]


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