Will now look for new field "transaction_type_type"

This commit is contained in:
James Cole
2016-03-02 12:03:04 +01:00
parent 5978b1c421
commit a61eafeac2

View File

@@ -165,55 +165,51 @@ class TransactionJournal extends Model
} }
/** /**
* TODO zo even aanpassen naar nieuwe veldnaam.
* @return bool * @return bool
*/ */
public function isDeposit() public function isDeposit()
{ {
if (!is_null($this->type)) { if (!is_null($this->transaction_type_type)) {
return $this->type == TransactionType::DEPOSIT; return $this->transaction_type_type == TransactionType::DEPOSIT;
} }
return $this->transactionType->isDeposit(); return $this->transactionType->isDeposit();
} }
/** /**
* TODO zo even aanpassen naar nieuwe veldnaam.
* *
* @return bool * @return bool
*/ */
public function isOpeningBalance() public function isOpeningBalance()
{ {
if (!is_null($this->type)) { if (!is_null($this->transaction_type_type)) {
return $this->type == TransactionType::OPENING_BALANCE; return $this->transaction_type_type == TransactionType::OPENING_BALANCE;
} }
return $this->transactionType->isOpeningBalance(); return $this->transactionType->isOpeningBalance();
} }
/** /**
* TODO zo even aanpassen naar nieuwe veldnaam.
* *
* @return bool * @return bool
*/ */
public function isTransfer() public function isTransfer()
{ {
if (!is_null($this->type)) { if (!is_null($this->transaction_type_type)) {
return $this->type == TransactionType::TRANSFER; return $this->transaction_type_type == TransactionType::TRANSFER;
} }
return $this->transactionType->isTransfer(); return $this->transactionType->isTransfer();
} }
/** /**
* TODO zo even aanpassen naar nieuwe veldnaam.
* *
* @return bool * @return bool
*/ */
public function isWithdrawal() public function isWithdrawal()
{ {
if (!is_null($this->type)) { if (!is_null($this->transaction_type_type)) {
return $this->type == TransactionType::WITHDRAWAL; return $this->transaction_type_type == TransactionType::WITHDRAWAL;
} }
return $this->transactionType->isWithdrawal(); return $this->transactionType->isWithdrawal();