public function subTotal($format = true, $withDiscount = true, $taxedItemsOnly = false, $withTax = false)
    {
        $total = $this->price(false, $taxedItemsOnly) * $this->qty;

        if ($withDiscount) {
            $total -= $this->getDiscount(false);
        }

        if ($total < 0) {
            $total = 0;
        }

        if ($withTax) {
            $total += $this->tax(0, false, false, $withDiscount);
        }

        return LaraCart::formatMoney($total, $this->locale, $this->internationalFormat, $format);
    }