src/Price/Model/PricedItemTrait.php
public function calculateTotal()
    {
        $this->calculateAdjustmentsTotal();

        $this->total = ($this->quantity * $this->unitPrice) + $this->adjustmentsTotal;

        if ($this->total < 0) {
            $this->total = 0;
        }

        return $this;
    }
public function calculateTotal()
    {
        $this->calculateAdjustmentsTotal();

        $this->total = ($this->quantity * $this->unitPrice) + $this->adjustmentsTotal;

        if ($this->total < 0) {
            $this->total = 0;
        }

        return $this;
    }
public function calculateTotal ( ) { $ this -> calculateAdjustmentsTotal ( ) ; $ this -> total = ( $ this -> quantity * $ this -> unitPrice ) + $ this -> adjustmentsTotal ; if ( $ this -> total < 0 ) { $ this -> total = 0 ; } return $ this ; }
Calculates the total for the item

@return $this
Calculates the total for the item