You are here

public function Generator::getNext in Commerce Invoice 7.2

Returns the next invoice number for the pattern.

File

src/InvoiceNumber/Generator.php, line 45
Invoice Number Generator

Class

Generator
Invoice number generator.

Namespace

Drupal\commerce_invoice\InvoiceNumber

Code

public function getNext(Invoice $invoice = NULL) {
  $key = $this
    ->getKey($invoice);
  return new InvoiceNumber($this
    ->getNextSequence($key), $key, $this->name);
}