git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@71 97e9348a-65ac-dc4b-aefc-98561f571b83
65 lines
1.5 KiB
PHP
65 lines
1.5 KiB
PHP
<?php
|
|
class Ledger extends AppModel {
|
|
|
|
var $name = 'Ledger';
|
|
var $validate = array(
|
|
'id' => array('numeric'),
|
|
'name' => array('notempty'),
|
|
);
|
|
|
|
var $belongsTo = array(
|
|
'Account' => array(
|
|
'className' => 'Account',
|
|
'foreignKey' => 'account_id',
|
|
'conditions' => '',
|
|
'fields' => '',
|
|
'order' => ''
|
|
),
|
|
);
|
|
|
|
var $hasMany = array(
|
|
/* 'LedgerEntry' => array( */
|
|
/* 'className' => 'LedgerEntry', */
|
|
/* 'foreignKey' => false, */
|
|
/* 'dependent' => false, */
|
|
/* 'conditions' => '', */
|
|
/* 'fields' => '', */
|
|
/* 'order' => '', */
|
|
/* 'limit' => '', */
|
|
/* 'offset' => '', */
|
|
/* 'exclusive' => '', */
|
|
/* 'finderQuery' => 'SELECT `Entry`.* FROM pmgr_entries AS `Entry` */
|
|
/* WHERE Entry.debit_ledger_id = ({$__cakeID__$}) */
|
|
/* OR Entry.credit_ledger_id = ({$__cakeID__$})', */
|
|
/* 'counterQuery' => '' */
|
|
/* ), */
|
|
'DebitLedgerEntry' => array(
|
|
'className' => 'LedgerEntry',
|
|
'foreignKey' => 'debit_ledger_id',
|
|
'dependent' => false,
|
|
'conditions' => '',
|
|
'fields' => '',
|
|
'order' => '',
|
|
'limit' => '',
|
|
'offset' => '',
|
|
'exclusive' => '',
|
|
'finderQuery' => '',
|
|
'counterQuery' => ''
|
|
),
|
|
'CreditLedgerEntry' => array(
|
|
'className' => 'LedgerEntry',
|
|
'foreignKey' => 'credit_ledger_id',
|
|
'dependent' => false,
|
|
'conditions' => '',
|
|
'fields' => '',
|
|
'order' => '',
|
|
'limit' => '',
|
|
'offset' => '',
|
|
'exclusive' => '',
|
|
'finderQuery' => '',
|
|
'counterQuery' => ''
|
|
),
|
|
);
|
|
|
|
}
|
|
?>
|