This is the remainder of the previous, invalid, partial checkin.
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@419 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -9,6 +9,10 @@ class Transaction extends AppModel {
|
||||
var $hasMany = array(
|
||||
'LedgerEntry',
|
||||
'StatementEntry',
|
||||
'DepositTender' => array(
|
||||
'className' => 'Tender',
|
||||
'foreignKey' => 'deposit_transaction_id',
|
||||
),
|
||||
|
||||
'Charge' => array(
|
||||
'className' => 'StatementEntry',
|
||||
@@ -112,18 +116,9 @@ class Transaction extends AppModel {
|
||||
$deposit['customer_id'] = null;
|
||||
$deposit['lease_id'] = null;
|
||||
|
||||
// For some reason, $data is being modified by the
|
||||
// addTransaction call, even though we're not passing by
|
||||
// reference. Not all items in $data['Entry'] are being
|
||||
// stomped on... only the last one in the list :-/
|
||||
// Save off all the tender ids now, before calling
|
||||
// addTransaction, to make sure we don't lose any.
|
||||
$tender_ids = array_map(create_function('$item',
|
||||
/* 'if (!isset($item))' . */
|
||||
/* ' pr("NO ITEM");' . */
|
||||
/* 'if (!isset($item["tender_id"]))' . */
|
||||
/* ' pr(array("BAD ITEM" => compact("item")));' . */
|
||||
'return $item["tender_id"];'),
|
||||
// Save the list of IDs, so that we can mark their
|
||||
// deposit transaction after it has been created.
|
||||
$tender_ids = array_map(create_function('$item', 'return $item["tender_id"];'),
|
||||
$data['Entry']);
|
||||
|
||||
// Go through the statement entries and re-group by account id
|
||||
|
||||
Reference in New Issue
Block a user