mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
Merge branch 'add-transaction-service-charge' into development
This commit is contained in:
@@ -30,6 +30,22 @@ class Transaction extends AbstractModel implements Documentable, Transactionable
|
||||
return $this->morphTo();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return MorphMany
|
||||
*/
|
||||
public function transactions(): MorphMany
|
||||
{
|
||||
return $this->MorphMany(Transaction::class, 'owner');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return MorphOne
|
||||
*/
|
||||
public function creditNoteTransaction()
|
||||
{
|
||||
return $this->MorphOne(Transaction::class, 'owner')->where('type', TransactionType::CREDIT_NOTE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return MorphMany
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user