IBY_XML_FC_BA_ACCT_V

Details

  • Schema: FUSION

  • Object owner: IBY

  • Object type: VIEW

Columns

Name

PAYEE_ACCOUNT

MBATCHID

BEP_ACCOUNT_ID

Query

SQL_Statement

SELECT XMLElement("PayeeAccount", XMLElement("PaymentSystemAccount", XMLElement( "AccountName",keys.key), XMLElement("BatchBookingFlag", nvl(seft.batch_booking_flag, 'N')),

(SELECT account_options

FROM IBY_XML_BEP_ACCT_OPTIONS_V

WHERE bep_account_id= keys.bep_account_id

) ), XMLElement("Payee", XMLElement("Name",payee.name), XMLForest(DECODE( payee.mcc_code, -1,NULL, payee.mcc_code) AS "MCC") ), XMLElement("OrderCount" ,txn_totals.NUMTRXNS), XMLElement("AccountTotals", XMLElement( "AuthorizationsTotal", XMLElement("Value", 0 ), XMLElement("Currency", XMLElement("Code",TXN_TOTALS.CURRENCY_CODE) ) ), XMLElement( "CapturesTotal", XMLElement("Value", TXN_TOTALS.BATCHTOTAL), XMLElement( "Currency", XMLElement("Code",TXN_TOTALS.CURRENCY_CODE) ) ), XMLElement("CreditsTotal" , XMLElement("Value", 0 ), XMLElement("Currency", XMLElement("Code",TXN_TOTALS.CURRENCY_CODE) ) ) ),

(SELECT XMLAgg(fndcpt_order)

FROM IBY_XML_FC_BA_ORDER_V xml_order

WHERE xml_order.mbatchid = TXN_TOTALS.mbatchid

) ) PAYEE_ACCOUNT,

TXN_TOTALS.mbatchid MBATCHID,

keys.bep_account_id BEP_ACCOUNT_ID

FROM IBY_BEPKEYS KEYS,

IBY_PAYEE PAYEE,

iby_batches_all TXN_TOTALS,

iby_fndcpt_user_eft_pf_b ueft,

iby_fndcpt_sys_eft_pf_b seft

WHERE keys.ownerid = payee.payeeid

AND keys.ownertype = 'PAYEE'

AND keys.ownerid = TXN_TOTALS.payeeid

AND keys.key = TXN_TOTALS.bepkey

AND keys.bepid = TXN_TOTALS.bepid

AND TXN_TOTALS.process_profile_code = ueft.user_eft_profile_code

AND ueft.sys_eft_profile_code = seft.sys_eft_profile_code