Retrieves payment return records from PAYMENT_OWNER.PAYMENT_RETURN with culture-aware reason code descriptions and joined detail and authorization data. WHERE clause is built dynamically by the collection criteria.
SelectPR.CREATE_DATEasCreateDate,PR.CREATE_USERasCreateUser,PR.CREDIT_DEBIT_CODEasCreditDebitCode,PR.CUSTOMER_IDasCustomerID,PR.CUSTOMER_NAMEasCustomerName,PR.PAYMENT_AMTasPaymentAmt,PR.PAYMENT_DETAIL_SEQ_NUMasPaymentDetailSeqNum,PR.PAYMENT_RETURN_REASON_CODEasPaymentReturnReasonCode,casewhenprrcG.code_descrisnullthencast(prrc.CODE_DESCRasnvarchar2(2000))elseprrcG.code_descrendASPaymentReturnReasonCodeDescr,PRRC.RETURN_PAYMENT_EVENT_CODEasReturnPaymentEventCode,PR.PAYMENT_RETURN_SEQ_NUMasPaymentReturnSeqNum,PR.PAYMENT_SOURCE_SYSTEM_CODEasPaymentSourceSystemCode,PR.RETURN_ADDENDA_LINEasReturnAddendaLine,PR.RETURN_DATEasReturnDate,PR.RETURN_DETAIL_LINEasReturnDetailLine,PR.RETURN_STATUS_CODEasReturnStatusCode,PR.RETURN_TYPE_CODEasReturnTypeCode,PR.TRACE_NUMasTraceNum,PR.UPDATE_DATEasUpdateDate,PR.UPDATE_USERasUpdateUser,PD.CONFIRMATION_CHECK_NUMASConfirmationCheckNum,PD.NSF_COUNTasTransactionNSFCount,PA.CUSTOMER_TYPE_CODEasCustomerTypeCode,PA.CUSTOMER_CONTACT_NAMEasCustomerContactName,PA.CUSTOMER_CONTACT_PHONE_NUMasCustomerContactPhoneNumber,PA.CUSTOMER_CONTACT_EMAIL_ADDRasCustomerContactEmail,PA.AUTHORIZATION_TYPE_CODEasAuthorizationTypeCode,ATC.CODE_DESCRasAuthorizationPaymentFrequency,ATC.CODE_DESCRasAuthorizationTypeDescriptionFrompayment_owner.PAYMENT_RETURNPRJOINpayment_owner.payment_return_reason_codeprrcON(pr.payment_return_reason_code=prrc.code)leftouterjoinPAYMENT_RETURN_REASON_GCODEprrcGon(prrcG.code=prrc.codeandupper(prrcG.CULTURE_CODE)=upper(:CultureCode))LEFTOUTERJOINpayment_owner.payment_detailpdON(pr.payment_detail_seq_num=pd.payment_detail_seq_num)LEFTOUTERJOINpayment_owner.payment_authorizationpaON(pd.payment_authorization_seq_num=pa.payment_authorization_seq_num)LEFTOUTERJOINpayment_owner.authorization_type_codeatcON(pa.authorization_type_code=atc.code)-- WHERE predicates appended by collection criteria*
Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.