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:
36
site/controllers/transactions_controller.php
Normal file
36
site/controllers/transactions_controller.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
class TransactionsController extends AppController {
|
||||
var $helpers = array('Html');
|
||||
var $uses = array('Contact', 'Charge', 'Payment', 'Receipt');
|
||||
|
||||
function ledger($id = null) {
|
||||
if (!$id) {
|
||||
$this->Session->setFlash(__('Invalid Item.', true));
|
||||
$this->redirect(array('action'=>''));
|
||||
}
|
||||
$this->Charge->recursive = 0;
|
||||
//$ledgers = array($this->Charge->read(null, $id));
|
||||
$this->set('ledgers', $this->Charge->find('all'));
|
||||
//$this->set(compact('ledgers', 'tables'));
|
||||
}
|
||||
|
||||
function contact($id = null) {
|
||||
if (!$id) {
|
||||
$this->Session->setFlash(__('Invalid Item.', true));
|
||||
$this->redirect(array('action'=>''));
|
||||
}
|
||||
$this->Contact->recursive = 4;
|
||||
$this->Contact->Lease->LeaseType->unbindModel(array('hasMany' => array('Lease')));
|
||||
$this->Contact->Lease->Charge->unbindModel(array('belongsTo' => array('Lease')));
|
||||
$this->Contact->Lease->Charge->ChargeType->unbindModel(array('hasMany' => array('Charge')));
|
||||
$this->Contact->Lease->Charge->Receipt->unbindModel(array('hasMany' => array('ChargesReceipt')));
|
||||
|
||||
//$ledgers = array($this->Charge->read(null, $id));
|
||||
//$this->set('ledgers', $this->Contact->Lease->Charge->find('all'));
|
||||
//$this->set(compact('ledgers', 'tables'));
|
||||
$this->set('tenant', $this->Contact->read(null, $id));
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user