Very, very early snapshot. Some models are working, and I have a controller for testing. Everything is subject to change. I _do_ have a working tenant ledger though, so it's worth a snapshot.

git-svn-id: file:///svn-source/pmgr/branches/initial_20090526@15 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-05-28 05:49:03 +00:00
parent f4007a0269
commit df846f9963
13 changed files with 600 additions and 0 deletions

53
site/models/charge.php Normal file
View File

@@ -0,0 +1,53 @@
<?php
class Charge extends AppModel {
var $name = 'Charge';
var $validate = array(
'id' => array('numeric'),
'charge_type_id' => array('numeric'),
'lease_id' => array('numeric'),
'charge_date' => array('date'),
'charge_to_date' => array('date'),
'due_date' => array('date'),
'amount' => array('money'),
'tax' => array('money'),
'total' => array('money')
);
var $belongsTo = array(
'ChargeType' => array(
'className' => 'ChargeType',
'foreignKey' => 'charge_type_id',
'conditions' => '',
'fields' => '',
'order' => ''
),
'Lease' => array(
'className' => 'Lease',
'foreignKey' => 'lease_id',
'conditions' => '',
'fields' => '',
'order' => ''
)
);
var $hasAndBelongsToMany = array(
'Receipt' => array(
'className' => 'Receipt',
'joinTable' => 'charges_receipts',
'foreignKey' => 'charge_id',
'associationForeignKey' => 'receipt_id',
'unique' => true,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'finderQuery' => '',
'deleteQuery' => '',
'insertQuery' => ''
)
);
}
?>