src/Joomla/VirtueMart/Invoice/Creator.php
protected function getCalcRule($calcKind, $orderItemId = 0)
    {
        foreach ($this->order['calc_rules'] as $calcRule) {
            if ($calcRule->calc_kind == $calcKind) {
                if (empty($orderItemId) || $calcRule->virtuemart_order_item_id == $orderItemId) {
                    return $calcRule;
                }
            }
        }
        return null;
    }
protected function getCalcRule($calcKind, $orderItemId = 0)
    {
        foreach ($this->order['calc_rules'] as $calcRule) {
            if ($calcRule->calc_kind == $calcKind) {
                if (empty($orderItemId) || $calcRule->virtuemart_order_item_id == $orderItemId) {
                    return $calcRule;
                }
            }
        }
        return null;
    }
protected function getCalcRule ( $ calcKind , $ orderItemId = 0 ) { foreach ( $ this -> order [ 'calc_rules' ] as $ calcRule ) { if ( $ calcRule -> calc_kind == $ calcKind ) { if ( empty ( $ orderItemId ) || $ calcRule -> virtuemart_order_item_id == $ orderItemId ) { return $ calcRule ; } } } return null ; }
Returns a calculation rule identified by the given reference

@param string $calcKind
The value for the kind of calc rule.
@param int $orderItemId
The value for the order item id, or 0 for special lines.

@return null|object
The (1st) calculation rule for the given reference, or null if none
found.
Returns a calculation rule identified by the given reference