Price:    £99.99
Rate:     20%
Quantity: 3
Freebie:  false
Taxable:  true
Discount: £0
Delivery: £0

@return Product
325705
public function two()
    {
        $sku     = '2';
        $name    = 'Kindle';
        $rate    = new UnitedKingdomValueAddedTax;
        $price   = new Money(9999, new Currency('GBP'));
        $product = new Product($sku, $name, $price, $rate);
        $product->quantity(3);

        return $product;
    }
87219
public function discountAmount()
    {
        $totalDiscount = 0;

        foreach ($this->transaction->discounts as $discount) {
            $totalDiscount += $discount->amount;
        }

        return (float) $totalDiscount;
    }
840627
public function six()
    {
        $sku     = '6';
        $name    = 'Aeron Chair';
        $rate    = new UnitedKingdomValueAddedTax;
        $price   = new Money(89999, new Currency('GBP'));
        $product = new Product($sku, $name, $price, $rate);
        $product->delivery(new Money(6000, new Currency('GBP')));

        return $product;
    }
1037192
public function subtotal(Product $product)
    {
        $subtotal = $this->money($product);

        if (! $product->freebie) {
            $value    = $this->value($product);
            $discount = $this->discount($product);
            $subtotal = $subtotal->add($value)->subtract($discount);
        }

        $delivery = $this->delivery($product);
        $subtotal = $subtotal->add($delivery);

        return $subtotal;
    }
597345
public function getSumPrice()
	{
		$price = clone $this->_price;

		$price->setValue( $price->getValue() * $this->_values['quantity'] );
		$price->setCosts( $price->getCosts() * $this->_values['quantity'] );
		$price->setRebate( $price->getRebate() * $this->_values['quantity'] );

		return $price;
	}
1060233
public function getFUnitPrice()
    {
        if ($this->_fPricePerUnit == null) {
            if ($oPrice = $this->getUnitPrice()) {
                if ($dPrice = $this->_getPriceForView($oPrice)) {
                    $this->_fPricePerUnit = \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($dPrice);
                }
            }
        }

        return $this->_fPricePerUnit;
    }
1073501
def getDiscountedBulkPrice(self):
        
        price = self.getBulkPrice()
        price = price and price or 0
        discount = self.bika_setup.getMemberDiscount()
        discount = discount and discount or 0
        return float(price) - (float(price) * float(discount)) / 100
1081996
protected function getDiscountPriceWithoutTaxValueAttribute()
    {
        $fPrice = TaxHelper::instance()->getPriceWithoutTax($this->discount_price_value, $this->tax_percent);

        return $fPrice;
    }
277910
public function _getDiscountedProductsSum()
    {
        if ($oProductsPrice = $this->getDiscountProductsPrice()) {
            $dPrice = $oProductsPrice->getSum($this->isCalculationModeNetto());
        }

        // subtracting total discount
        if ($oPrice = $this->getTotalDiscount()) {
            $dPrice -= $oPrice->getPrice();
        }

        if ($oVoucherPrice = $this->getVoucherDiscount()) {
            $dPrice -= $oVoucherPrice->getPrice();
        }

        return $dPrice;
    }
81154
public function one()
    {
        $basket = new Basket(new UnitedKingdom);

        $basket = $this->addProductOne($basket);
        $basket = $this->addProductTwo($basket);

        return $basket;
    }
17934
public function create()
    {
        $zeroPrice = $this->createZeroAmountMoney();

        /**
         * @var Product $product
         */
        $classNamespace = $this->getEntityNamespace();
        $product = new $classNamespace();

        $stock = $this->useStock
            ? 0
            : ElcodiProductStock::INFINITE_STOCK;

        $product
            ->setStock($stock)
            ->setType(ElcodiProductTypes::TYPE_PRODUCT_PHYSICAL)
            ->setShowInHome(true)
            ->setPrice($zeroPrice)
            ->setReducedPrice($zeroPrice)
            ->setAttributes(new ArrayCollection())
            ->setVariants(new ArrayCollection())
            ->setCategories(new ArrayCollection())
            ->setImages(new ArrayCollection())
            ->setWidth(0)
            ->setHeight(0)
            ->setDepth(0)
            ->setWidth(0)
            ->setWeight(0)
            ->setImagesSort('')
            ->setEnabled(true)
            ->setCreatedAt($this->now());

        return $product;
    }
594989
public function prices() : Float
    {
        $total = 0;

        if( ! empty(Properties::$items) ) foreach( Properties::$items as $values )
        {
            $quantity = (int)   ($values['quantity'] ?? 1);
            $price    = (float) ($values['price']    ?? 0);

            $total += $price * $quantity;
        }

        return $total;
    }
741970
public function discount()
    {
        return $this->formatAmount($this->invoice->subtotal + $this->invoice->tax - $this->invoice->total);
    }
1068837
def getTotal(self):
        
        total = 0
        for lineitem in self.supplyorder_lineitems:
            total += Decimal(lineitem['Quantity']) * \
                     Decimal(lineitem['Price']) *  \
                     ((Decimal(lineitem['VAT']) /100) + 1)
        return total
685691
public function one()
    {
        $sku     = '1';
        $name    = 'The 4-Hour Work Week';
        $rate    = new UnitedKingdomValueAddedTax;
        $price   = new Money(1500, new Currency('GBP'));
        $product = new Product($sku, $name, $price, $rate);
        $product->category(new PhysicalBook);

        return $product;
    }
1129028
public function zero()
    {
        $sku     = '0';
        $name    = 'Back to the Future Blu-ray';
        $rate    = new UnitedKingdomValueAddedTax;
        $price   = new Money(1000, new Currency('GBP'));
        $product = new Product($sku, $name, $price, $rate);

        return $product;
    }
329444
protected function getDiscountPriceWithTaxValueAttribute()
    {
        $fPrice = TaxHelper::instance()->getPriceWithTax($this->discount_price_value, $this->tax_percent);

        return $fPrice;
    }