public function GetValue($bCalculateVoucher = false, $dMaxValueAllowed = null, $bSponsoredVouchers = false)
    {
        if ($bCalculateVoucher) {
            $oSeries = &$this->GetFieldShopVoucherSeries();
            $dValue = $oSeries->fieldValue;
            $oBasket = TShopBasket::GetInstance();
            $dBasketValueApplicableForVoucher = $oBasket->GetBasketSumForVoucher($this);
            if ('prozent' == $oSeries->fieldValueType) {
                $dValue = round($dBasketValueApplicableForVoucher * ($dValue / 100), 2);
            } else {
                // now we need to subtract the amount already used...
                $dValue = $dValue - $this->GetValuePreviouslyUsed_GetValueHook();
            }

            // now if the voucher is worth more than the current basket, we need to use only the part that we can
            if ($dBasketValueApplicableForVoucher < $dValue) {
                $dValue = $dBasketValueApplicableForVoucher;
            }
            if ($dValue > $dMaxValueAllowed) {
                $dValue = $dMaxValueAllowed;
            }

            // if this is a NOT sponsored voucher, we need to reduce the article value
            if (false == $bSponsoredVouchers) {
                $oBasket->ApplyNoneSponsoredVoucherValueToItems($this, $dValue);
            }
            $this->voucherValueInBasket = $dValue;
        }

        return $this->voucherValueInBasket;
    }