31 lines
675 B
PHP
31 lines
675 B
PHP
<?php
|
|
|
|
namespace KupShop\InvoicesBundle\Event;
|
|
|
|
use KupShop\OrderingBundle\Event\OrderEvent;
|
|
|
|
class OrderInvoiceEvent extends OrderEvent
|
|
{
|
|
/** Vygenerovani faktury */
|
|
public const ORDER_INVOICE = 'kupshop.order.invoice';
|
|
|
|
private const DEFAULT_INVOICE_NUMBER = 1; // default Faktura
|
|
|
|
private $invoice_number;
|
|
|
|
public function getInvoiceNumber()
|
|
{
|
|
return $this->invoice_number ?? self::DEFAULT_INVOICE_NUMBER;
|
|
}
|
|
|
|
public function setInvoiceNumber($invoice_number)
|
|
{
|
|
$this->invoice_number = $invoice_number;
|
|
}
|
|
|
|
public function invoiceNumberHasBeenSet(): bool
|
|
{
|
|
return (bool) $this->invoice_number;
|
|
}
|
|
}
|