public function update(array $data, $line)
    {
        if( is_integer($line) )
        {
            $line = array('Id' => $line);
        }

        foreach( $data as $name => $value )
        {
            if( is_null($value) )
                continue;

            switch( strtolower($name) )
            {
                case 'description':
                    $this->description($line, $value);
                    break;
                case 'price':
                    $this->price($line, $value);
                    break;
                case 'discount':
                    $this->discount($line, $value);
                    break;
                case 'qty':
                    $this->qty($line, $value);
                    break;
                case 'unit':
                    $this->unit($line, $value);
                    break;
            }
        }

        return $this->getArrayFromHandles( array('CurrentInvoiceLineHandle'=>$line) );
    }
public function update(array $data, $line)
    {
        if( is_integer($line) )
        {
            $line = array('Id' => $line);
        }

        foreach( $data as $name => $value )
        {
            if( is_null($value) )
                continue;

            switch( strtolower($name) )
            {
                case 'description':
                    $this->description($line, $value);
                    break;
                case 'price':
                    $this->price($line, $value);
                    break;
                case 'discount':
                    $this->discount($line, $value);
                    break;
                case 'qty':
                    $this->qty($line, $value);
                    break;
                case 'unit':
                    $this->unit($line, $value);
                    break;
            }
        }

        return $this->getArrayFromHandles( array('CurrentInvoiceLineHandle'=>$line) );
    }
public function update ( array $ data , $ line ) { if ( is_integer ( $ line ) ) { $ line = array ( 'Id' => $ line ) ; } foreach ( $ data as $ name => $ value ) { if ( is_null ( $ value ) ) continue ; switch ( strtolower ( $ name ) ) { case 'description' : $ this -> description ( $ line , $ value ) ; break ; case 'price' : $ this -> price ( $ line , $ value ) ; break ; case 'discount' : $ this -> discount ( $ line , $ value ) ; break ; case 'qty' : $ this -> qty ( $ line , $ value ) ; break ; case 'unit' : $ this -> unit ( $ line , $ value ) ; break ; } } return $ this -> getArrayFromHandles ( array ( 'CurrentInvoiceLineHandle' => $ line ) ) ; }
Update Invoice Line with data
@param  array  $data
@param  object $line
@return object
Update Invoice Line with data