src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php
protected function GetNextAvailableVoucher($sVoucherCode, $sSeriesId, $sMessageConsumer)
    {
        $oNextAvailableVoucher = null;
        $oVoucher = TdbShopVoucher::GetNewInstance();
        if ($oVoucher->LoadFromFields(array('code' => $sVoucherCode, 'is_used_up' => '0', 'shop_voucher_series_id' => $sSeriesId))) {
            $oNextAvailableVoucher = $oVoucher;
        }

        return $oNextAvailableVoucher;
    }
protected function GetNextAvailableVoucher($sVoucherCode, $sSeriesId, $sMessageConsumer)
    {
        $oNextAvailableVoucher = null;
        $oVoucher = TdbShopVoucher::GetNewInstance();
        if ($oVoucher->LoadFromFields(array('code' => $sVoucherCode, 'is_used_up' => '0', 'shop_voucher_series_id' => $sSeriesId))) {
            $oNextAvailableVoucher = $oVoucher;
        }

        return $oNextAvailableVoucher;
    }
protected function GetNextAvailableVoucher ( $ sVoucherCode , $ sSeriesId , $ sMessageConsumer ) { $ oNextAvailableVoucher = null ; $ oVoucher = TdbShopVoucher :: GetNewInstance ( ) ; if ( $ oVoucher -> LoadFromFields ( array ( 'code' => $ sVoucherCode , 'is_used_up' => '0' , 'shop_voucher_series_id' => $ sSeriesId ) ) ) { $ oNextAvailableVoucher = $ oVoucher ; } return $ oNextAvailableVoucher ; }
Get next available voucher for whith given vocuehr code and series id.
Was used after deleting vouchers used in other order.

@param string $sVoucherCode
@param string $sSeriesId
@param string $sMessageConsumer

@return TdbShopVoucher
Get next available voucher for whith given vocuehr code and series id . Was used after deleting vouchers used in other order .