src/Factory/Invoice.php
public function delete()
    {
        if (!empty($this->iId)) {
            $oInvoiceModel = Factory::model('Invoice', 'nails/module-invoice');
            if (!$oInvoiceModel->delete($this->iId)) {
                throw new InvoiceException('Failed to delete invoice.');
            }
        }

        return $this;
    }
public function delete()
    {
        if (!empty($this->iId)) {
            $oInvoiceModel = Factory::model('Invoice', 'nails/module-invoice');
            if (!$oInvoiceModel->delete($this->iId)) {
                throw new InvoiceException('Failed to delete invoice.');
            }
        }

        return $this;
    }
public function delete ( ) { if ( ! empty ( $ this -> iId ) ) { $ oInvoiceModel = Factory :: model ( 'Invoice' , 'nails/module-invoice' ) ; if ( ! $ oInvoiceModel -> delete ( $ this -> iId ) ) { throw new InvoiceException ( 'Failed to delete invoice.' ) ; } } return $ this ; }
Deletes an invoice
@return $this
@throws InvoiceException
Deletes an invoice