Continued waiver progress. At the moment, it works ok, but I don't like the way that security deposit balances work. It's probably a general issue, not just security deposits, but it's not clear whether stats from StatementEntry should be subtracting waiver totals from the overall charge reconciliation total. It should in some cases, and not in others. I'll tweak on it in later checkins.
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@479 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -37,7 +37,7 @@ class Transaction extends AppModel {
|
||||
);
|
||||
|
||||
|
||||
var $default_log_level = 30;
|
||||
var $default_log_level = array('log' => 30, 'show' => 15);
|
||||
|
||||
/**************************************************************************
|
||||
**************************************************************************
|
||||
@@ -122,14 +122,15 @@ class Transaction extends AppModel {
|
||||
function addWaiver($data, $charge_id, $customer_id, $lease_id = null) {
|
||||
$this->prEnter(compact('data', 'charge_id', 'customer_id', 'lease_id'));
|
||||
|
||||
// Just make sure the entries are marked as waivers...
|
||||
foreach ($data['Entry'] AS &$entry)
|
||||
$entry['type'] = 'WAIVE';
|
||||
if (count($data['Entry']) != 1)
|
||||
die("INTERNAL ERROR: Should be one Entry for addWaiver");
|
||||
|
||||
// ... and the charge statement entry is recorded...
|
||||
// Just make sure the payment(s) are marked as waivers
|
||||
// and that they go to cover the specific charge.
|
||||
$data['Transaction']['payment_type'] = 'WAIVE';
|
||||
$data['Transaction']['charge_entry_id'] = $charge_id;
|
||||
|
||||
// ... and in all other respects this is just a receipt.
|
||||
// In all other respects this is just a receipt.
|
||||
$ids = $this->addReceipt($data, $customer_id, $lease_id);
|
||||
if (isset($ids['transaction_id']))
|
||||
$ids['waiver_id'] = $ids['transaction_id'];
|
||||
@@ -517,6 +518,9 @@ class Transaction extends AppModel {
|
||||
: null),
|
||||
($transaction['type'] == 'RECEIPT' && !empty($transaction['charge_entry_id'])
|
||||
? $transaction['charge_entry_id']
|
||||
: null),
|
||||
(!empty($transaction['payment_type'])
|
||||
? $transaction['payment_type']
|
||||
: null)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user