Merge branch 'add-transaction-service-charge' into development

This commit is contained in:
ahmedsophyudden
2022-02-28 22:50:13 +08:00
28 changed files with 755 additions and 68 deletions
+16
View File
@@ -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
*/