public function addItem($name, $price, $ammount = 1, $id = '-')
    {
        $this->items->push(Collection::make([
            'name'       => $name,
            'price'      => $price,
            'ammount'    => $ammount,
            'totalPrice' => number_format(bcmul($price, $ammount, $this->decimals), $this->decimals),
            'id'         => $id,
        ]));

        return $this;
    }
public function addItem($name, $price, $ammount = 1, $id = '-')
    {
        $this->items->push(Collection::make([
            'name'       => $name,
            'price'      => $price,
            'ammount'    => $ammount,
            'totalPrice' => number_format(bcmul($price, $ammount, $this->decimals), $this->decimals),
            'id'         => $id,
        ]));

        return $this;
    }
public function addItem ( $ name , $ price , $ ammount = 1 , $ id = '-' ) { $ this -> items -> push ( Collection :: make ( [ 'name' => $ name , 'price' => $ price , 'ammount' => $ ammount , 'totalPrice' => number_format ( bcmul ( $ price , $ ammount , $ this -> decimals ) , $ this -> decimals ) , 'id' => $ id , ] ) ) ; return $ this ; }
Adds an item to the invoice.

@method addItem

@param string $name
@param int    $price
@param int    $ammount
@param string $id

@return self
Adds an item to the invoice .