DBA Data[Home] [Help]

APPS.IBY_FIPAYMENTS_PKG SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 17

         SELECT ext_bank_account_id
          FROM iby_ext_bank_accounts
          WHERE ext_bank_account_id = ci_instrid;
Line: 99

select iby_trxnsumm_mid_s.nextval
from dual;
Line: 103

select proc_reference_code, amount
from iby_trxn_summaries_all
where tangibleid= ci_tangible_id
--and  trxntypeid=20
--and  status=0
order by trxnmid desc;
Line: 111

select trxnmid, mtangibleid
from iby_trxn_summaries_all
where tangibleid=i_tangibleid
and payeeid=i_payeeid
and bepid=i_bepid
and bepkey=i_bepkey
and trxntypeid is null
order by trxnmid desc;
Line: 171

         * insert for transaction status.
         */
        SELECT NVL(bep_type,iby_bepinfo_pkg.C_BEPTYPE_GATEWAY)
        INTO   l_beptype
        FROM   IBY_BEPINFO
        WHERE  (bepid=i_bepid);
Line: 217

                SELECT
                    hz.account_name
                INTO
                    l_settle_cust_ref
                FROM
                    HZ_CUST_ACCOUNTS hz
                WHERE
                    hz.cust_account_id = i_custacctid
                ;
Line: 260

            SELECT
                COUNT(*)
            INTO
                l_cnt
            FROM
                IBY_TRXN_SUMMARIES_ALL trxn
            WHERE
                trxn.mpayeeid     = l_mpayeeid    AND
                trxn.instrtype    = 'BANKACCOUNT' AND
                trxn.instrsubtype = 'ACH'         AND
                trxn.payerid      = i_payerid
            ;
Line: 326

        insert into iby_trxn_summaries_all
                             ( trxnMId, transactionId, tangibleid,
                               mpayeeid, payeeid, payeeinstrid,
                               bepid, bepkey, ecappid, org_id, org_type,
                               paymentMethodname, payerid, payerinstrid,
                               amount, currencyNameCode, reqdate,
                               reqtype, status, settledate,
                               mtangibleId, nlslang, instrtype, instrsubtype,
                               last_update_date, updatedate, last_updated_by,
                               creation_date, created_by,
                               last_update_login, object_version_number,
                               proc_reference_code, proc_reference_amount,
                               cust_account_id, acct_site_id, acct_site_use_id,
                               settlement_customer_reference, first_trxn_flag,
                               process_profile_code, trxntypeid,needsupdt
                             )

        values ( l_tmid, l_tid, i_tangibleid, l_mpayeeid,
                 i_payeeid, i_bnfcryinstrid, i_bepid,
                 i_bepkey, i_ecappid, i_org_id, i_org_type, i_pmtMethod,
                 i_payerid, i_instrid, i_billamount,
                 i_billcurDef, i_reqdate, l_reqtype,
                 l_status, i_scheddate, l_mtangibleid, i_nlslang,
                 'BANKACCOUNT', 'ACH',
                 sysdate, sysdate, fnd_global.user_id,
                 sysdate, fnd_global.user_id,
                 fnd_global.login_id, 1, l_reference_code, l_reference_amount,
                 i_custacctid, i_acctsiteid, i_acctsiteuseid,
                 l_settle_cust_ref, l_first_trx_flag, i_profilecode,
                 l_trxntypeid,'Y'
                );
Line: 362

        insert into iby_trxn_fi
                    (trxnMid, psreqid, splitId,
		last_update_date, last_updated_by,
		creation_date, created_by,
		last_update_login, object_version_number)
        values ( l_tmid, i_psreqid, i_splitId,
		 sysdate, fnd_global.user_id,
		 sysdate, fnd_global.user_id,
		fnd_global.login_id, 1);
Line: 388

     UPDATE iby_trxn_summaries_all
          SET
              org_id                = i_org_id,
              ecappid               = i_ecappid,
              payeeid               = i_payeeid,
              bepid                 = i_bepid,
              bepkey                = i_bepkey,
              paymentMethodname     = i_pmtmethod,
              payerid               = i_payerid,
              payerinstrid          = i_instrid,
              amount                = i_billamount,
              currencyNameCode      = i_billcurDef,
              status                = l_status,
              cust_account_id       = i_custacctid,
              acct_site_id          = i_acctsiteid,
              acct_site_use_id      = i_acctsiteuseid,
              last_update_date      = sysdate,
              updatedate            = sysdate,
              last_updated_by       = fnd_global.user_id,
              creation_date         = sysdate,
              created_by            = fnd_global.user_id,
              last_update_login     = fnd_global.user_id,
              object_version_number = object_version_number+1,
              settlement_customer_reference = l_settle_cust_ref,
              first_trxn_flag       = l_first_trx_flag
        WHERE trxnmid               = l_old_tmid;
Line: 437

    select count(*) into l_cnt
    from iby_trxn_summaries_all s
    where transactionId = i_tid
    and reqType = i_reqType;
Line: 465

    select count(*)  into l_cnt
    from iby_trxn_summaries_all s
    where payeeId = i_payeeId
    and tangibleid = i_tangibleId
    and UPPER(reqType) = UPPER(i_reqType)
    and trxntypeid not in (20);
Line: 495

    select count(*) into l_cnt
    from iby_trxn_summaries_all s
    where transactionId = i_tid
    and (( (reqtype = 'ORAPMTREQ' or reqtype = 'ORAPMTCREDIT') and (status <> -99 and status <> 100)) or
          (reqtype = 'ORAPMTCANC'));
Line: 549

select iby_trxnsumm_mid_s.nextval
from dual;
Line: 554

select mtangibleid , tangibleid
from iby_trxn_summaries_all
where transactionId = ci_tid
group by mtangibleid , tangibleid;
Line: 606

   select reqtype into l_reqtype from iby_trxn_summaries_all
   WHERE transactionId = i_tid and status = 100
   and (reqtype = 'ORAPMTREQ' or reqtype = 'ORAPMTCREDIT');
Line: 612

** update the transactions table with the new data.
*/
        update iby_trxn_summaries_all
        set status  = -99,
	    last_update_date = sysdate,
     updatedate = sysdate,
	    last_updated_by = fnd_global.user_id,
	    last_update_login = fnd_global.login_id,
	    object_version_number = 1
        where transactionId = i_tid
        and (reqtype = 'ORAPMTREQ' or reqtype = 'ORAPMTCREDIT')
        and status = 100;
Line: 628

        select splitId  into l_splitId
        from iby_trxn_fi
        where trxnmid in ( select trxnmid
                           from iby_trxn_summaries_all
                           where transactionId =  i_tid)
        and rownum < 2;
Line: 638

        insert into iby_trxn_summaries_all
                             ( trxnMId, transactionId, tangibleid,
                                  mpayeeid, payeeid,  bepid, bepkey, ecappid,
				  org_id, paymentMethodname,
                                  payerid, payerinstrid, amount,
                                  currencyNameCode,
                                  reqdate, reqtype, status, settledate,
                                  mtangibleId, nlslang, instrtype,
				last_update_date, updatedate, last_updated_by,
				creation_date, created_by,
				last_update_login, object_version_number,needsupdt)

        values ( l_tmid, i_tid, i_tangibleid, l_mpayeeid, i_payeeid,
                 i_bepid, i_bepkey, i_ecappid, i_org_id, i_pmtMethod,
		 i_payerid, i_instrid,
                 i_billamount, i_billcurDef, i_reqdate,
                 l_reqtype, 100, i_scheddate, l_mtangibleid, i_nlslang,
		'BANKACCOUNT',
		 sysdate, sysdate, fnd_global.user_id,
		 sysdate, fnd_global.user_id,
		fnd_global.login_id, 1,'Y');
Line: 661

** After inserting an entry in transactions_summaries_all table,
** make an entry in the iby_trxn_fi table, corresponding to
** the transaction master id.
*/
        insert into iby_trxn_fi
                    (trxnMid, psreqid, splitId,
			last_update_date, last_updated_by,
			creation_date, created_by,
			last_update_login, object_version_number)
        values ( l_tmid, i_psreqid, l_splitId,
		 sysdate, fnd_global.user_id,
		 sysdate, fnd_global.user_id,
		fnd_global.login_id, 1);
Line: 687

** Procedure: deletePayment.
** Purpose: Marks the payment whose id matches the tid passed as
**          'CANCELLED'.
*/
-- procedure deletePayment(i_ecappid in iby_ecapp.ecappid%type,
procedure deletePayment( i_tid in iby_trxn_summaries_all.transactionId%type )
is
l_old_tmid iby_trxn_summaries_all.trxnmid%type;
Line: 700

select iby_trxnsumm_mid_s.nextval
from dual;
Line: 704

select trxnmid , status
from iby_trxn_summaries_all s
where transactionid=ci_tid
and status = 100
-- // status for pending.
and (reqtype = 'ORAPMTREQ' or reqtype = 'ORAPMTCREDIT');
Line: 746

** update the transactions table with the new data.
*/
        update iby_trxn_summaries_all
        set status  = -99,
	    last_update_date = sysdate,
     updatedate = sysdate,
	    last_updated_by = fnd_global.user_id,
	    last_update_login = fnd_global.login_id,
	    object_version_number = 1
        where transactionId = i_tid
        and (reqtype = 'ORAPMTREQ' or reqtype = 'ORAPMTCREDIT');
Line: 759

** Insert record, with values that of latest record and increment the
** tid value by 1.
*/
        insert into iby_trxn_summaries_all
                             ( trxnMId, transactionId, tangibleid,
                                  mpayeeid, payeeid,  bepid, ecappid,
				  org_id, paymentMethodname,
                                  payerid, payerinstrid,
				  amount, currencyNameCode,
                                  reqdate, reqtype, status,
                                  mtangibleId, nlslang, instrtype,
				last_update_date, updatedate, last_updated_by,
				creation_date, created_by,
				last_update_login, object_version_number,needsupdt)

        select l_new_tmid, transactionId, tangibleid,
                                  mpayeeid, payeeid,  bepid, ecappid,
				  org_id, paymentMethodname,
				  payerid, payerinstrid,
                                  amount, currencyNameCode,
                                  sysdate, 'ORAPMTCANC', 14,
                                  mtangibleId, nlslang, 'BANKACCOUNT',
		 		 sysdate, sysdate, fnd_global.user_id,
				 sysdate, fnd_global.user_id,
				fnd_global.login_id, 1,'Y'
        from iby_trxn_summaries_all
        where trxnmid = l_old_tmid;
Line: 788

        insert into iby_trxn_fi
                    (trxnMid, psreqid, splitId,
				last_update_date, last_updated_by,
				creation_date, created_by,
				last_update_login, object_version_number)

        select l_new_tmid, psreqid, splitId,
		 sysdate, fnd_global.user_id,
		 sysdate, fnd_global.user_id,
		fnd_global.login_id, 1
        from iby_trxn_fi
        where trxnmid = l_old_tmid;
Line: 808

end deletePayment;
Line: 823

     update iby_trxn_summaries_all
     set status=i_status
     where trxnmid=i_tmid;
Line: 855

select iby_trxnsumm_mid_s.nextval
from dual;
Line: 859

  SELECT 'Y', trxnmid
    FROM iby_trxn_summaries_all s
   WHERE transactionid=i_tid
   AND  trxntypeid=5
    AND status <> '0'
     ORDER BY reqdate desc;
Line: 867

select trxnmid , status, proc_reference_code
from iby_trxn_summaries_all s
where transactionid=ci_tid
and status in ( 0, 100)
-- // status for pending or success.
and (reqtype = 'ORAPMTREQ')
and trxntypeid is null;
Line: 899

       update iby_trxn_summaries_all
       set   currencynamecode=i_currencycode,
             amount=i_amount,
             proc_reference_code=l_reference_code,
             last_update_date      = sysdate,
             updatedate            = sysdate,
             last_updated_by       = fnd_global.user_id,
             last_update_login     = fnd_global.user_id,
              object_version_number = 1
      where trxnmid=l_new_tmid;
Line: 922

** Insert record, with values that of latest record and increment the
** tid value by 1.
*/
        insert into iby_trxn_summaries_all
                             ( trxnMId, transactionId, tangibleid,
                                  mpayeeid, payeeid,  bepid, ecappid,
				  org_id, paymentMethodname,
                                  payerid, payerinstrid,
				  amount, currencyNameCode,
                                  reqdate, reqtype, status,
                                  mtangibleId, nlslang, instrtype,
				last_update_date, updatedate, last_updated_by,
				creation_date, created_by,
				last_update_login, object_version_number,
                                proc_reference_code, proc_reference_amount, trxntypeid, bepkey,needsupdt
                                 ,payment_channel_code,settledate,settlement_due_date)

        select l_new_tmid, transactionId, tangibleid,
                                  mpayeeid, payeeid,  bepid, ecappid,
				  org_id, paymentMethodname,
				  payerid, payerinstrid,
                                  i_amount, i_currencycode,
                                  sysdate, 'ORAPMTRETURN', 9,
                                  mtangibleId, nlslang, 'BANKACCOUNT',
		 		 sysdate, sysdate, fnd_global.user_id,
				 sysdate, fnd_global.user_id,
				fnd_global.login_id, 1,
                                 proc_reference_code, amount, 5, bepkey,'Y'
                              , payment_channel_code,settledate,settlement_due_date
        from iby_trxn_summaries_all
        where trxnmid = l_old_tmid;
Line: 955

        insert into iby_trxn_fi
                    (trxnMid, psreqid, splitId,
				last_update_date, last_updated_by,
				creation_date, created_by,
				last_update_login, object_version_number)

        select l_new_tmid, psreqid, splitId,
		 sysdate, fnd_global.user_id,
		 sysdate, fnd_global.user_id,
		fnd_global.login_id, 1
        from iby_trxn_fi
        where trxnmid = l_old_tmid;
Line: 976

* Procedure: updateTrxn
* Purpose: Update the transaction status with the return results
*
*/

procedure updateTrxn(
            i_trxnmid in iby_trxn_summaries_all.trxnmid%type,
            i_status in iby_trxn_summaries_all.status%type,
            i_bepcode        IN iby_trxn_summaries_all.BEPCode%TYPE,
            i_bepmessage     IN iby_trxn_summaries_all.BEPMessage%TYPE,
            i_errorlocation  IN iby_trxn_summaries_all.errorlocation%TYPE,
            i_referenceCode  IN iby_trxn_summaries_all.proc_reference_code%TYPE)
is

begin

    UPDATE iby_trxn_summaries_all
          SET
              status                = i_status,
              bepcode               = i_bepcode,
              bepmessage            = i_bepmessage,
              errorlocation         = i_errorlocation,
              last_update_date      = sysdate,
              last_updated_by       = fnd_global.user_id,
              last_update_login     = fnd_global.user_id,
              object_version_number = 1,
              proc_reference_code   = i_referencecode
        WHERE trxnmid               = i_trxnmid;
Line: 1011

end updateTrxn;