Files
pmgr/models/ledger_entry.php

43 lines
918 B
PHP

<?php
class LedgerEntry extends AppModel {
var $name = 'LedgerEntry';
var $validate = array(
'id' => array('numeric'),
'transaction_id' => array('numeric'),
'amount' => array('money')
);
var $belongsTo = array(
'MonetarySource' => array(
'className' => 'MonetarySource',
'foreignKey' => 'monetary_source_id',
'conditions' => '',
'fields' => '',
'order' => ''
),
'Transaction' => array(
'className' => 'Transaction',
'foreignKey' => 'transaction_id',
'conditions' => '',
'fields' => '',
'order' => ''
),
'DebitLedger' => array(
'className' => 'Ledger',
'foreignKey' => 'debit_ledger_id',
'conditions' => '',
'fields' => '',
'order' => ''
),
'CreditLedger' => array(
'className' => 'Ledger',
'foreignKey' => 'credit_ledger_id',
'conditions' => '',
'fields' => '',
'order' => ''
),
);
}
?>