Minor fixes

This commit is contained in:
harshjagad20
2022-03-03 13:25:12 +05:30
parent ea9748ca68
commit 69d8c95557
6 changed files with 36 additions and 15 deletions

View File

@ -47,4 +47,21 @@ class Currency extends Model
{
return $this->hasMany(RecurringInvoice::class);
}
public function checkTransactions()
{
if (
$this->customers()->exists() ||
$this->items()->exists() ||
$this->invoices()->exists() ||
$this->estimates()->exists() ||
$this->expenses()->exists() ||
$this->payments()->exists() ||
$this->recurringInvoices()->exists()
) {
return true;
}
return false;
}
}