src/Invoice/Creator.php
protected function addProductInfo(array &$line)
    {
        $invoiceSettings = $this->config->getInvoiceSettings();
        $this->addTokenDefault($line, Tag::ItemNumber, $invoiceSettings['itemNumber']);
        $this->addTokenDefault($line, Tag::Product, $invoiceSettings['productName']);
        $this->addNature($line);
        if (!empty($invoiceSettings['costPrice'])) {
            $value = $this->getTokenizedValue($invoiceSettings['costPrice']);
            if (!Number::isZero($value)) {
                // If we have a cost price we add it, even if this is no margin
                // invoice.
                $line[Tag::CostPrice] = $value;
            }
        }
    }
protected function addProductInfo(array &$line)
    {
        $invoiceSettings = $this->config->getInvoiceSettings();
        $this->addTokenDefault($line, Tag::ItemNumber, $invoiceSettings['itemNumber']);
        $this->addTokenDefault($line, Tag::Product, $invoiceSettings['productName']);
        $this->addNature($line);
        if (!empty($invoiceSettings['costPrice'])) {
            $value = $this->getTokenizedValue($invoiceSettings['costPrice']);
            if (!Number::isZero($value)) {
                // If we have a cost price we add it, even if this is no margin
                // invoice.
                $line[Tag::CostPrice] = $value;
            }
        }
    }
protected function addProductInfo ( array & $ line ) { $ invoiceSettings = $ this -> config -> getInvoiceSettings ( ) ; $ this -> addTokenDefault ( $ line , Tag :: ItemNumber , $ invoiceSettings [ 'itemNumber' ] ) ; $ this -> addTokenDefault ( $ line , Tag :: Product , $ invoiceSettings [ 'productName' ] ) ; $ this -> addNature ( $ line ) ; if ( ! empty ( $ invoiceSettings [ 'costPrice' ] ) ) { $ value = $ this -> getTokenizedValue ( $ invoiceSettings [ 'costPrice' ] ) ; if ( ! Number :: isZero ( $ value ) ) { // If we have a cost price we add it, even if this is no margin // invoice. $ line [ Tag :: CostPrice ] = $ value ; } } }
Adds the product based tags to a line.

The product based tags are:
- item number
- product name
- nature
- cost price

@param array $line
Adds the product based tags to a line .