protected function getDividend($row)
    {
        $currentValue = $row->getColumn($this->columnValueToRead);

        // if the site this is for doesn't support ecommerce & this is for the revenue_evolution column,
        // we don't add the new column
        if ($currentValue === false
            && $this->isRevenueEvolution
            && !Site::isEcommerceEnabledFor($row->getColumn('label'))
        ) {
            return false;
        }

        $pastRow = $this->getPastRowFromCurrent($row);
        if ($pastRow) {
            $pastValue = $pastRow->getColumn($this->columnValueToRead);
        } else {
            $pastValue = 0;
        }

        return $currentValue - $pastValue;
    }
protected function getDividend($row)
    {
        $currentValue = $row->getColumn($this->columnValueToRead);

        // if the site this is for doesn't support ecommerce & this is for the revenue_evolution column,
        // we don't add the new column
        if ($currentValue === false
            && $this->isRevenueEvolution
            && !Site::isEcommerceEnabledFor($row->getColumn('label'))
        ) {
            return false;
        }

        $pastRow = $this->getPastRowFromCurrent($row);
        if ($pastRow) {
            $pastValue = $pastRow->getColumn($this->columnValueToRead);
        } else {
            $pastValue = 0;
        }

        return $currentValue - $pastValue;
    }
protected function getDividend ( $ row ) { $ currentValue = $ row -> getColumn ( $ this -> columnValueToRead ) ; // if the site this is for doesn't support ecommerce & this is for the revenue_evolution column, // we don't add the new column if ( $ currentValue === false && $ this -> isRevenueEvolution && ! Site :: isEcommerceEnabledFor ( $ row -> getColumn ( 'label' ) ) ) { return false ; } $ pastRow = $ this -> getPastRowFromCurrent ( $ row ) ; if ( $ pastRow ) { $ pastValue = $ pastRow -> getColumn ( $ this -> columnValueToRead ) ; } else { $ pastValue = 0 ; } return $ currentValue - $ pastValue ; }
Returns the difference between the column in the specific row and its
sister column in the past DataTable.

@param Row $row
@return int|float
Returns the difference between the column in the specific row and its sister column in the past DataTable .