Added customer since/until fields. Changed the ledger entry grid on the customers page into a receipts grid, and added it to the lease page as well, even though it is for the customer in general, and may include receipts for leases other than the one being viewed. I may put more effort into this later, but for now it solves the problem of getting the receipt tenders visible when viewing the lease.
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@509 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -202,7 +202,19 @@ class CustomersController extends AppController {
|
||||
));
|
||||
//pr($customer);
|
||||
|
||||
// Determine how long this customer has been with us.
|
||||
$leaseinfo = $this->Customer->find
|
||||
('first', array
|
||||
('link' => array('Lease' => array('fields' => array())),
|
||||
'fields' => array('MIN(Lease.movein_date) AS since',
|
||||
'IF(Customer.current_lease_count = 0, MAX(Lease.moveout_date), NULL) AS until'),
|
||||
'conditions' => array('Customer.id' => $id),
|
||||
'group' => 'Customer.id',
|
||||
));
|
||||
$this->set($leaseinfo[0]);
|
||||
|
||||
// Figure out the outstanding balances for this customer
|
||||
//$this->set('stats', $this->Customer->stats($id));
|
||||
$outstanding_balance = $this->Customer->balance($id);
|
||||
$outstanding_deposit = $this->Customer->securityDepositBalance($id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user