mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 19:51:09 -04:00
Minor fixes
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,7 +27,6 @@ class Invoice extends Model implements HasMedia
|
||||
|
||||
public const STATUS_DRAFT = 'DRAFT';
|
||||
public const STATUS_SENT = 'SENT';
|
||||
public const STATUS_OVERDUE = 'OVERDUE';
|
||||
public const STATUS_VIEWED = 'VIEWED';
|
||||
public const STATUS_COMPLETED = 'COMPLETED';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user