added new invoice status: canceled (#2922)

This commit is contained in:
Kevin Papst
2021-11-10 12:37:36 +01:00
committed by GitHub
parent 21dbfdb4f9
commit 6e6c60b29a
10 changed files with 49 additions and 8 deletions

View File

@@ -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;