get user Group A, B or C price, returns db price if user is not in groups

@return double
508891
protected function _getGroupPrice()
    {
        $dPrice = $this->oxarticles__oxprice->value;
        if ($oUser = $this->getArticleUser()) {
            if ($oUser->inGroup('oxidpricea')) {
                $dPrice = $this->oxarticles__oxpricea->value;
            } elseif ($oUser->inGroup('oxidpriceb')) {
                $dPrice = $this->oxarticles__oxpriceb->value;
            } elseif ($oUser->inGroup('oxidpricec')) {
                $dPrice = $this->oxarticles__oxpricec->value;
            }
        }

        // #1437/1436C - added config option, and check for zero A,B,C price values
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blOverrideZeroABCPrices') && (double) $dPrice == 0) {
            $dPrice = $this->oxarticles__oxprice->value;
        }

        return $dPrice;
    }
925825
private function subTotalPrice()
    {
        return $this->items->sum(function ($item) {
            return bcmul($item['price'], $item['ammount'], $this->decimals);
        });
    }
1000307
public function getVarMinPrice()
    {
        if (!\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('bl_perfLoadPrice') || !$this->_blLoadPrice) {
            return;
        }

        $oPrice = null;
        $dPrice = $this->_calculateVarMinPrice();

        $oPrice = $this->_getPriceObject();
        $oPrice->setPrice($dPrice);

        $this->_calculatePrice($oPrice);

        return $oPrice;
    }
881498
public function getPrice()
    {
        if ($this->_dPrice == null) {
            $this->_dPrice = false;
            if ($oArticle = $this->getArticle()) {
                $myUtils = \OxidEsales\Eshop\Core\Registry::getUtils();
                $oThisCurr = $this->getPriceAlarmCurrency();

                // #889C - Netto prices in Admin
                // (we have to call $oArticle->getPrice() to get price with VAT)
                $dArtPrice = $oArticle->getPrice()->getBruttoPrice() * $oThisCurr->rate;
                $dArtPrice = $myUtils->fRound($dArtPrice);

                $this->_dPrice = $dArtPrice;
            }
        }

        return $this->_dPrice;
    }
1362909
public function getDiscountsAmount()
    {
        $discountsAmount = 0;

        if (count($this->getDiscounts())) {
            // Discount amount based on global ticket discounts
            foreach ($this->getDiscounts() as $discount) {
                /** @var \Argentum\Common\Discount $discount */
                $discountsAmount += $discount->getAmount();
            }
        } else {
            // Discount amount based on items discounts
            foreach ($this->getItems() as $item) {
                /** @var \Argentum\Common\Item $item */
                $discountsAmount += $item->getDiscount();
            }
        }

        return $discountsAmount;
    }
472032
public function getGroup() {

		$groupTable = CmnTables::getTableName( CmnTables::TABLE_GROUP );

		return $this->hasOne( Group::class, [ 'id' => 'groupId' ] )->from( "$groupTable group" );
	}
1026664
public function getGroup() : ?int 
    {
        if ( ! $this->hasGroup()) {
            $this->setGroup($this->getDefaultGroup());
        }
        return $this->group;
    }
908178
public function get_total_other_users() {
        global $DB;
        if ($this->totalotherusers === null) {
            list($ctxcondition, $params) = $DB->get_in_or_equal($this->context->get_parent_context_ids(true), SQL_PARAMS_NAMED, 'ctx');
            $params['courseid'] = $this->course->id;
            $sql = "SELECT COUNT(DISTINCT u.id)
                      FROM {role_assignments} ra
                      JOIN {user} u ON u.id = ra.userid
                      JOIN {context} ctx ON ra.contextid = ctx.id
                 LEFT JOIN (
                           SELECT ue.id, ue.userid
                             FROM {user_enrolments} ue
                        LEFT JOIN {enrol} e ON e.id=ue.enrolid
                            WHERE e.courseid = :courseid
                         ) ue ON ue.userid=u.id
                     WHERE ctx.id $ctxcondition AND
                           ue.id IS NULL";
            $this->totalotherusers = (int)$DB->count_records_sql($sql, $params);
        }
        return $this->totalotherusers;
    }
841678
public function getBidPrice()
    {
        if ($this->_sBidPrice === null) {
            $this->_sBidPrice = false;

            $aParams = $this->_getParams();
            $oCur = \OxidEsales\Eshop\Core\Registry::getConfig()->getActShopCurrencyObject();
            $iPrice = \OxidEsales\Eshop\Core\Registry::getUtils()->currency2Float($aParams['price']);
            $this->_sBidPrice = \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($iPrice, $oCur);
        }

        return $this->_sBidPrice;
    }
303632
def db_group(self):
        '''
        '''
        if self._db_group is None:
            self._db_group = self.db_user
        return self._db_group
616359
function getDefaultUsergroup()
    {
        $usergroups = Groups::get($this->getJname(), true);

        $groups = array();
        if ($usergroups !== null) {
	        $list = $this->getUsergroupList();
	        foreach ($list as $group) {
		        if(in_array($group->id, $usergroups)){
			        $groups[] = $group->name;
		        }
	        }
        }
        return $groups;
    }
515865
public function getPrice()
    {
        if (empty($this->price)) {
            throw new LogicException(
                sprintf(self::ERROR_MISSING_ATTRIBUTE_FORMAT, 'price')
            );
        }
        return $this->price;
    }
688134
public function getDiscountedProductsBruttoPrice()
    {
        if ($oProductsPrice = $this->getDiscountProductsPrice()) {
            $dPrice = $oProductsPrice->getBruttoSum();
        }

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

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

        return $dPrice;
    }
1286410
public function GetPrice()
    {
        if (is_null($this->dPrice)) {
            $this->dPrice = 0;

            // price based on basket
            if ($this->fieldValueBasedOnEntireBasket) {
                $oBasket = TShopBasket::GetInstance();
                $iTotalNumberOfArticlesInBasketThatAreExcludedFromShippingCostCalculation = 0;
                $iTotalDiscountedPriceOfArticlesInBasketThatAreExcludedFromShippingCostCalculation = 0;
                $oItemList = $oBasket->GetBasketContents();
                $oItemList->GoToStart();
                while ($oItem = &$oItemList->Next()) {
                    if ($oItem->fieldExcludeFromShippingCostCalculation) {
                        $iTotalNumberOfArticlesInBasketThatAreExcludedFromShippingCostCalculation += $oItem->dAmount;
                        $iTotalDiscountedPriceOfArticlesInBasketThatAreExcludedFromShippingCostCalculation += $oItem->dPriceTotalAfterDiscount;
                    }
                }
                $oItemList->GoToStart();

                if ('absolut' == $this->fieldValueType) {
                    $this->dPrice = $this->fieldValue;
                    if ($this->fieldAddValueForEachArticle ||
                        ($iTotalNumberOfArticlesInBasketThatAreExcludedFromShippingCostCalculation > 0 &&
                         $oBasket->dTotalNumberOfArticles == $iTotalNumberOfArticlesInBasketThatAreExcludedFromShippingCostCalculation
                        )
                    ) {
                        $this->dPrice = ($oBasket->dTotalNumberOfArticles - $iTotalNumberOfArticlesInBasketThatAreExcludedFromShippingCostCalculation) * $this->dPrice;
                    }
                } else {
                    $this->dPrice = round($this->ApplyPriceModifiers(($oBasket->dCostArticlesTotalAfterDiscounts - $iTotalDiscountedPriceOfArticlesInBasketThatAreExcludedFromShippingCostCalculation) * ($this->fieldValue / 100)), 2);
                }
            } else {
                // price based on current list
                /** @var $oArticleList TShopBasketArticleList */
                $oArticleList = &$this->GetAffectedBasketArticles();
                if (!is_null($oArticleList)) {
                    $iTotalNumberOfArticlesInListThatAreExcludedFromShippingCostCalculation = 0;
                    $iTotalDiscountedPriceOfArticlesInListThatAreExcludedFromShippingCostCalculation = 0;
                    $oArticleList->GoToStart();
                    while ($oArticle = &$oArticleList->Next()) {
                        if ($oArticle->fieldExcludeFromShippingCostCalculation) {
                            $iTotalNumberOfArticlesInListThatAreExcludedFromShippingCostCalculation += $oArticle->dAmount;
                            $iTotalDiscountedPriceOfArticlesInListThatAreExcludedFromShippingCostCalculation += $oArticle->dPriceTotalAfterDiscount;
                        }
                    }
                    $oArticleList->GoToStart();

                    if ('absolut' == $this->fieldValueType) {
                        $this->dPrice = $this->fieldValue;
                        if ($this->fieldAddValueForEachArticle ||
                            ($iTotalNumberOfArticlesInListThatAreExcludedFromShippingCostCalculation > 0 &&
                             $oArticleList->dNumberOfItems == $iTotalNumberOfArticlesInListThatAreExcludedFromShippingCostCalculation
                            )
                        ) {
                            $this->dPrice = ($oArticleList->dNumberOfItems - $iTotalNumberOfArticlesInListThatAreExcludedFromShippingCostCalculation) * $this->dPrice;
                        }
                    } else {
                        $this->dPrice = round($this->ApplyPriceModifiers(($oArticleList->dProductPrice - $iTotalDiscountedPriceOfArticlesInListThatAreExcludedFromShippingCostCalculation) * ($this->fieldValue / 100)), 2);
                    }
                }
            }
        }

        return $this->dPrice;
    }
23449
public function getBidding()
    {
        $items = Item::typeAuction()->active()->whereHas('bids', function ($query) {
            return $query->where('user_id', Auth::user()->userId);
        });

        $items = Item::typeAuction()->active()->leftJoin('bids')->where(
            'bids.user_id',
            Auth::user()->userId
        )->addSelect(
            DB::raw('max(`bids`.`amount`) as `max_bid`')
        )->addSelect(
            DB::raw('count(`bids`.`bid_id`) as `bid_count`')
        )->groupBy('items.item_id');

        $table = new InventoryBidding($items);

        return view('mustard::inventory.bidding', [
            'table' => $table,
            'items' => $table->paginate(),
        ]);
    }
1101750
public function getDiscount()
    {
        $discounts = ArrayList::create();

        foreach ($this->owner->Groups() as $group) {
            foreach ($group->Discounts() as $discount) {
                $discounts->add($discount);
            }
        }

        $discounts->sort("Amount", "DESC");

        return $discounts->first();
    }
556909
public function getFPrice()
    {
        $dPrice = $this->getPrice();

        return \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($dPrice, \OxidEsales\Eshop\Core\Registry::getConfig()->getActShopCurrencyObject());
    }