@{
    'RKObjOrder' = @{
        'query' = "
            SELECT
	             OrderID
	            ,OrderDate
	            ,OrderStatus = (select enumeratorwording from cmn.refconfiguration where enumeratordomain = 'POMOrderItemStatus' and enumeratorkey = orderstatus and languagecode = 'en-gb')
	            ,CustomerID
	            ,AchievementDate
	            ,PaymentAgreementID
	            ,PaymentAuthorizationID
	            ,PaymentMode
	            ,PaymentRecipientRefNumber
	            ,Currency = (select enumeratorwording from cmn.refconfiguration where enumeratordomain = 'CurrencyCode' and enumeratorkey = Currency and languagecode = 'en-gb')
	            ,BankCardFee
	            ,BankCardType
	            ,RefundMeans
	            ,RefundMeansDetails
	            ,Channel = (select enumeratorwording from cmn.refconfiguration where enumeratordomain = 'Channel' and enumeratorkey = ChannelID and languagecode = 'en-gb')
	            ,UserLogin
	            ,OrderStatusDate
	            ,Comment
	            ,RegistrationNumber
	            ,AccountNumber
	            ,BankDetails
	            ,CancellationUserID
	            ,CancellationChannelID
	            ,CancellationBusinessParticipantID
	            ,BusinessParticipant = (select LongName from cmn.ObjBusinessParticipant bp where bp.BusinessParticipantID = o.BusinessParticipantID)
            FROM pom.ObjOrder o WITH(READUNCOMMITTED)
            WHERE OrderID = @OrderID"
        'columns' = @(
            'OrderID'
            'OrderDate'
            'OrderStatus'
            'CustomerID'
            'AchievementDate'
            'PaymentAgreementID'
            'PaymentAuthorizationID'
            'PaymentMode'
            'PaymentRecipientRefNumber'
            'Currency'
            'BankCardFee'
            'BankCardType'
            'RefundMeans'
            'RefundMeansDetails'
            'Channel'
            'UserLogin'
            'OrderStatusDate'
            'Comment'
            'RegistrationNumber'
            'AccountNumber'
            'BankDetails'
            'CancellationUserID'
            'CancellationChannelID'
            'CancellationBusinessParticipantID'
            'BusinessParticipant'
        )
    }

    'RKObjOrderItem' = @{
        'query' = "
            SELECT [OrderItemID]
                ,[OrderID]
                ,[OrderItemStatus] = (SELECT EnumeratorWording FROM cmn.refconfiguration WHERE EnumeratorDomain = 'POMOrderItemStatus' AND EnumeratorKey = OrderItemStatus AND LanguageCode = 'en-gb')
                ,[OrderItemType] = (SELECT EnumeratorWording FROM cmn.refconfiguration WHERE EnumeratorDomain = 'POMOrderItemType' AND EnumeratorKey = OrderItemType AND LanguageCode = 'en-gb')
                ,[FailureReasonCode]
                ,[FeeAmount]
                ,[DueFeeAmount]
                ,[OrderItemAmount]
                ,[ToBeInvoiced]
                ,[VATAmount]
                ,[ExpirationDate]
                ,[StatusModificationDate]
                ,[MediaInstanceID]
                ,[ProductInstanceID]
            FROM [AfcCookedIFSV2].[pom].[ObjOrderItem] oi
            WHERE OrderID = @OrderID"

        'columns' = @(
            'OrderItemID'
            'OrderID'
            'OrderItemStatus'
            'OrderItemType'
            'FailureReasonCode'
            'FeeAmount'
            'DueFeeAmount'
            'OrderItemAmount'
            'ToBeInvoiced'
            'VATAmount'
            'ExpirationDate'
            'StatusModificationDate'
            'MediaInstanceID'
            'ProductInstanceID'
        )
    }

    'RKCustomerOrders' = @{
        'query' = "
            SELECT [OrderID]
            FROM [AfcCookedIFSV2].[pom].[ObjOrder] o
            WHERE CustomerID = (
                SELECT CustomerID FROM cmn.ObjCustomer WHERE CustomerRefNumber = @RefNumber
            )"

        'columns' = @( 'OrderID' )
    }
}