src/Entity/Order.php
public function setPrice($amount)
    {
        $tax    = $this->getTaxRate()  / 100;
        $taxAmount = $amount * $tax;

        $this->prices = [
            'pretax' => round($amount, 2),
            'tax'    => round($taxAmount, 2),
            'net'    => round($amount + $taxAmount, 2),
        ];

        return $this;
    }
public function setPrice($amount)
    {
        $tax    = $this->getTaxRate()  / 100;
        $taxAmount = $amount * $tax;

        $this->prices = [
            'pretax' => round($amount, 2),
            'tax'    => round($taxAmount, 2),
            'net'    => round($amount + $taxAmount, 2),
        ];

        return $this;
    }
public function setPrice ( $ amount ) { $ tax = $ this -> getTaxRate ( ) / 100 ; $ taxAmount = $ amount * $ tax ; $ this -> prices = [ 'pretax' => round ( $ amount , 2 ) , 'tax' => round ( $ taxAmount , 2 ) , 'net' => round ( $ amount + $ taxAmount , 2 ) , ] ; return $ this ; }
Sets the total amount without tax.

Discount and sconti should be calculated before hand.

@param int $amount

@return self
Sets the total amount without tax .