Minor tweaks, a shame for checkin r500 :-(

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@500 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-07 03:55:01 +00:00
parent c3e60a65c1
commit 16f7de421f
4 changed files with 12 additions and 11 deletions

View File

@@ -138,17 +138,18 @@ class AccountsController extends AppController {
$this->redirect(array('action'=>'index'));
}
$payment_accounts = $this->Account->collectableAccounts();
//$payment_accounts[$this->Account->nameToID('Closing')] = 'Closing';
//$payment_accounts[$this->Account->nameToID('Equity')] = 'Equity';
$default_accounts = array_diff_key($this->Account->receiptAccounts(),
array($this->Account->concessionAccountID() => 1));
$this->set(compact('payment_accounts', 'default_accounts'));
$this->Account->recursive = -1;
$account = $this->Account->read(null, $id);
$account = $account['Account'];
$payment_accounts = $this->Account->collectableAccounts();
//$payment_accounts[$this->Account->nameToID('Closing')] = 'Closing';
//$payment_accounts[$this->Account->nameToID('Equity')] = 'Equity';
//$payment_accounts[$id] = 'Reversals';
$default_accounts = array_diff_key($this->Account->receiptAccounts(),
array($this->Account->concessionAccountID() => 1));
$this->set(compact('payment_accounts', 'default_accounts'));
$title = ($account['name'] . ': Collected Report');
$this->set(compact('account', 'title'));
}

View File

@@ -186,7 +186,7 @@ class StatementEntry extends AppModel {
*
*/
function reverse($id, $balance = false, $stamp = null) {
$this->prEnter(compact('id', 'stamp'));
$this->prEnter(compact('id', 'balance', 'stamp'));
$ret = array();

View File

@@ -123,7 +123,7 @@ class Transaction extends AppModel {
$this->prEnter(compact('data', 'charge_id', 'customer_id', 'lease_id'));
if (count($data['Entry']) != 1)
die("INTERNAL ERROR: Should be one Entry for addWaiver");
INTERNAL_ERROR("Should be one Entry for addWaiver");
// Just make sure the disbursement(s) are marked as waivers
// and that they go to cover the specific charge.
@@ -150,7 +150,7 @@ class Transaction extends AppModel {
$this->prEnter(compact('data', 'charge_id', 'customer_id', 'lease_id'));
if (count($data['Entry']) != 1)
die("INTERNAL ERROR: Should be one Entry for addReversal");
INTERNAL_ERROR("Should be one Entry for addReversal");
// Just make sure the disbursement(s) are marked as reversals
// and that they go to cover the specific charge.

View File

@@ -164,7 +164,7 @@ echo $this->element('statement_entries', array
//'grid_setup' => array('hiddengrid' => true),
//'caption' => '<SPAN id="receipt-charges-caption"></SPAN>',
'caption' => 'Collected ' . Inflector::pluralize($account['name']),
'filter' => array('StatementEntry.type' => 'DISBURSEMENT',
'filter' => array(//'StatementEntry.type' => 'DISBURSEMENT',
'ChargeEntry.account_id' => $account['id']),
'exclude' => array('Account', 'Charge', 'Type'),
),