src/Managers/InvoiceManager.php
public function issue(Invoice $invoice)
    {
        $result = $this->update($invoice, [
            'issued_at'  => new \DateTime(),
            'expires_at' => (new \DateTime())->modify('+1 month'),
            'number'     => $this->getNumberManager()->calculateNextFreeNumber(),
        ]);

        $result->ok() && event(new Events\InvoiceIssued($invoice));

        return $result;
    }
public function issue(Invoice $invoice)
    {
        $result = $this->update($invoice, [
            'issued_at'  => new \DateTime(),
            'expires_at' => (new \DateTime())->modify('+1 month'),
            'number'     => $this->getNumberManager()->calculateNextFreeNumber(),
        ]);

        $result->ok() && event(new Events\InvoiceIssued($invoice));

        return $result;
    }
public function issue ( Invoice $ invoice ) { $ result = $ this -> update ( $ invoice , [ 'issued_at' => new \ DateTime ( ) , 'expires_at' => ( new \ DateTime ( ) ) -> modify ( '+1 month' ) , 'number' => $ this -> getNumberManager ( ) -> calculateNextFreeNumber ( ) , ] ) ; $ result -> ok ( ) && event ( new Events \ InvoiceIssued ( $ invoice ) ) ; return $ result ; }
Issue an invoice.

@param Invoice $invoice

@return \Railken\Lem\Result
Issue an invoice .