Skip to content

Commit

Permalink
Added payee transaction handling to TransactionToFinishModel
Browse files Browse the repository at this point in the history
  • Loading branch information
emery303 committed Sep 21, 2016
1 parent a9c4cd5 commit 8fde837
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions library/models/TransactionToFinishModel.php
Expand Up @@ -50,4 +50,23 @@ public function AddItems($items)
}
}
}

public function AddPayeeTransaction(PayeeTransactionModel $model)
{
if ($this->PayeeTransactions == null) {
$this->PayeeTransactions = array();
}
array_push($this->PayeeTransactions, $model);
}

public function AddPayeeTransactions($transactions)
{
if (!empty($transactions)) {
foreach ($transactions as $transaction) {
if ($transaction instanceof PayeeTransactionModel) {
$this->AddPayeeTransaction($transaction);
}
}
}
}
}

0 comments on commit 8fde837

Please sign in to comment.