src/Factory/Invoice.php
public function addItem(Item $oItem)
    {
        if (empty(!$this->iId)) {
            throw new InvoiceException('Invoice has been saved and cannot be modified.');
        }
        $this->aItems[] = $oItem;
        return $this;
    }
public function addItem(Item $oItem)
    {
        if (empty(!$this->iId)) {
            throw new InvoiceException('Invoice has been saved and cannot be modified.');
        }
        $this->aItems[] = $oItem;
        return $this;
    }
public function addItem ( Item $ oItem ) { if ( empty ( ! $ this -> iId ) ) { throw new InvoiceException ( 'Invoice has been saved and cannot be modified.' ) ; } $ this -> aItems [ ] = $ oItem ; return $ this ; }
Add an item to the invoice

@param Item $oItem the item to add

@return $this
@throws InvoiceException
Add an item to the invoice