added new invoice status: canceled (#2922)
This commit is contained in:
@@ -37,6 +37,7 @@ class Invoice
|
||||
{
|
||||
public const STATUS_PENDING = 'pending';
|
||||
public const STATUS_PAID = 'paid';
|
||||
public const STATUS_CANCELED = 'canceled';
|
||||
public const STATUS_NEW = 'new';
|
||||
|
||||
/**
|
||||
@@ -306,6 +307,16 @@ class Invoice
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function isCanceled(): bool
|
||||
{
|
||||
return $this->status === self::STATUS_CANCELED;
|
||||
}
|
||||
|
||||
public function setIsCanceled(): void
|
||||
{
|
||||
$this->status = self::STATUS_CANCELED;
|
||||
}
|
||||
|
||||
public function getDueDays(): int
|
||||
{
|
||||
return $this->dueDays;
|
||||
|
||||
Reference in New Issue
Block a user