DBA Data[Home] [Help]

APPS.OE_PREPAYMENT_PVT dependencies on OE_PAYMENTS

Line 57: FROM oe_payments op

53: IF OE_Commitment_Pvt.Do_Commitment_Sequencing THEN
54: -- Select the committment applied amount if Commitment Sequencing "On"
55: SELECT SUM(ROUND(nvl(op.commitment_applied_amount,0), OE_ORDER_UTIL.G_Precision))
56: INTO l_commitment_total
57: FROM oe_payments op
58: WHERE op.header_id = p_header_id
59: AND NOT EXISTS
60: (SELECT 'Non Invoiceable Item Line'
61: FROM mtl_system_items mti, oe_order_lines_all ool

Line 197: FROM oe_payments

193:
194: BEGIN
195: SELECT nvl(prepaid_amount, 0)
196: INTO l_prepaid_amount
197: FROM oe_payments
198: WHERE header_id= p_header_rec.header_id
199: AND payment_type_code = 'CREDIT_CARD';
200:
201: EXCEPTION WHEN NO_DATA_FOUND THEN

Line 602: l_payment_types_rec OE_PAYMENTS_UTIL.Payment_Types_Rec_Type;

598: l_exists_prepay VARCHAR2(1) := 'N';
599: l_line_id NUMBER;
600: l_payment_set_id NUMBER;
601: l_receipt_number VARCHAR2(30); -- bug 4724845
602: l_payment_types_rec OE_PAYMENTS_UTIL.Payment_Types_Rec_Type;
603: l_hold_result VARCHAR2(30);
604: l_msg_count NUMBER := 0 ;
605: l_msg_data VARCHAR2(2000):= NULL ;
606: l_result_out VARCHAR2(30) := NULL ;

Line 776: FROM OE_PAYMENTS where header_id = p_header_rec.header_id;

772: , p_bank_account_uses_id => l_bank_acct_uses_id
773: ) ;*/
774:
775: SELECT trxn_extension_id into l_trxn_extension_id
776: FROM OE_PAYMENTS where header_id = p_header_rec.header_id;
777: --R12 CC Encryption
778:
779: EXCEPTION WHEN OTHERS THEN
780: FND_MESSAGE.SET_NAME('ONT','OE_VPM_CC_ACCT_NOT_SET');

Line 888: FROM oe_payments

884: -- call create receipt API
885: BEGIN
886: SELECT payment_set_id, check_number -- bug 4724845
887: INTO l_payment_set_id, l_receipt_number
888: FROM oe_payments
889: WHERE header_id = l_header_rec.header_id
890: AND payment_type_code = 'CREDIT_CARD';
891: EXCEPTION WHEN NO_DATA_FOUND THEN
892: l_payment_set_id := null;

Line 944: -- to either insert or update the prepaid amount to oe_payments.

940: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
941: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
942: END IF;
943:
944: -- to either insert or update the prepaid amount to oe_payments.
945: BEGIN
946: SELECT 'Y'
947: INTO l_exists_prepay
948: FROM oe_payments

Line 948: FROM oe_payments

944: -- to either insert or update the prepaid amount to oe_payments.
945: BEGIN
946: SELECT 'Y'
947: INTO l_exists_prepay
948: FROM oe_payments
949: WHERE header_id = l_header_rec.header_id
950: AND payment_type_code = 'CREDIT_CARD';
951: EXCEPTION WHEN NO_DATA_FOUND THEN
952: l_exists_prepay := 'N';

Line 957: UPDATE oe_payments

953: END;
954:
955: IF l_exists_prepay = 'Y' THEN
956: -- update prepaid_amount on oe_order_headers
957: UPDATE oe_payments
958: SET prepaid_amount = nvl(prepaid_amount,0) + l_pending_amount
959: WHERE header_id = l_header_rec.header_id
960: AND payment_type_code = 'CREDIT_CARD';
961: ELSE

Line 979: oe_payments_util.insert_row(p_payment_types_rec => l_payment_types_rec);

975: l_payment_types_rec.created_by := FND_GLOBAL.USER_ID;
976: l_payment_types_rec.last_update_date := SYSDATE;
977: l_payment_types_rec.last_updated_by := FND_GLOBAL.USER_ID;
978:
979: oe_payments_util.insert_row(p_payment_types_rec => l_payment_types_rec);
980:
981: END IF;
982:
983: -- to update line information

Line 1063: FROM oe_payments

1059:
1060: BEGIN
1061: SELECT payment_set_id
1062: INTO l_payment_set_id
1063: FROM oe_payments
1064: WHERE header_id = l_header_rec.header_id
1065: AND payment_type_code = 'CREDIT_CARD';
1066: EXCEPTION WHEN NO_DATA_FOUND THEN
1067: l_payment_set_id := null;

Line 1104: UPDATE oe_payments

1100: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1101: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1102: END IF;
1103:
1104: UPDATE oe_payments
1105: SET prepaid_amount = nvl(prepaid_amount,0) + l_pending_amount
1106: WHERE header_id = p_header_rec.header_id
1107: AND payment_type_code = 'CREDIT_CARD';
1108:

Line 1833: Oe_payments op

1829: Op.payment_number,
1830: Op.payment_amount,
1831: Op.trxn_extension_id --R12 CC Encryption
1832: FROM oe_payment_types_all opt,
1833: Oe_payments op
1834: WHERE opt.payment_type_code = op.payment_type_code
1835: AND op.payment_collection_event = 'PREPAY'
1836: AND op.payment_type_code <> 'COMMITMENT'
1837: AND op.line_id is null

Line 1843: from oe_payments

1839: And opt.org_id=l_org_id; --moac
1840:
1841: cursor payment_count is
1842: select count(payment_type_code)
1843: from oe_payments
1844: where header_id = p_header_id
1845: and line_id is null;
1846:
1847: BEGIN

Line 1867: FROM oe_payments

1863:
1864: BEGIN
1865: SELECT 'Y'
1866: INTO l_payment_exists
1867: FROM oe_payments
1868: WHERE header_id = p_header_id
1869: AND rownum = 1;
1870: EXCEPTION
1871: WHEN NO_DATA_FOUND THEN

Line 1906: FROM oe_payments

1902: IF p_line_id IS NULL THEN
1903: BEGIN
1904: SELECT 'Y'
1905: INTO l_exists_prepay
1906: FROM oe_payments
1907: WHERE payment_collection_event = 'PREPAY'
1908: AND header_id = p_header_id
1909: AND rownum=1;
1910: EXCEPTION WHEN NO_DATA_FOUND THEN

Line 1932: FROM oe_payments

1928: -- get the payment_set_id if exists for the order.
1929: BEGIN
1930: SELECT payment_set_id
1931: INTO l_payment_set_id
1932: FROM oe_payments
1933: WHERE header_id = p_header_id
1934: AND payment_set_id IS NOT NULL
1935: AND rownum = 1;
1936: EXCEPTION WHEN NO_DATA_FOUND THEN

Line 1946: -- in oe_payments table

1942:
1943:
1944: -- call AR API to create receipt for each payment method.
1945: -- l_insert should be set to 'Y' if there are no payment records
1946: -- in oe_payments table
1947: -- and payment information is only present in headers.
1948:
1949: For c_payment_rec IN hdr_payments_cur (p_header_id) LOOP
1950:

Line 2095: oe_debug_pub.add( 'OEXVPPYB: update oe_payments for payment_set_id: '||l_payment_set_id, 3) ;

2091:
2092: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
2093:
2094: IF l_debug_level > 0 THEN
2095: oe_debug_pub.add( 'OEXVPPYB: update oe_payments for payment_set_id: '||l_payment_set_id, 3) ;
2096: END IF;
2097:
2098: UPDATE oe_payments
2099: SET payment_set_id = l_payment_set_id,

Line 2098: UPDATE oe_payments

2094: IF l_debug_level > 0 THEN
2095: oe_debug_pub.add( 'OEXVPPYB: update oe_payments for payment_set_id: '||l_payment_set_id, 3) ;
2096: END IF;
2097:
2098: UPDATE oe_payments
2099: SET payment_set_id = l_payment_set_id,
2100: prepaid_amount = l_pending_amount + l_prepaid_amount,
2101: credit_card_approval_code = l_approval_code
2102: WHERE header_id = p_header_id

Line 2108: FROM oe_payments

2104:
2105: BEGIN
2106: SELECT 'Y'
2107: INTO l_exists_prepay_lines
2108: FROM oe_payments
2109: WHERE payment_collection_event = 'PREPAY'
2110: AND payment_set_id is NULL
2111: AND header_id = p_header_id
2112: AND payment_type_code <> 'COMMITMENT'

Line 2215: UPDATE oe_payments

2211: oe_debug_pub.add( 'OEXVPPYB Process_Payments: after calling create_refund, return status is: '||l_return_status, 3 ) ;
2212: END IF;
2213:
2214: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
2215: UPDATE oe_payments
2216: SET prepaid_amount = nvl(prepaid_amount,0) + l_pending_amount
2217: WHERE header_id = p_header_id
2218: AND nvl(payment_number, -1) = nvl(c_payment_rec.payment_number, -1);
2219:

Line 2293: FROM oe_payments

2289: BEGIN
2290: -- if there exists line level credit card payments.
2291: SELECT 'Y'
2292: INTO l_do_cc_authorization
2293: FROM oe_payments
2294: WHERE payment_type_code = 'CREDIT_CARD'
2295: AND payment_collection_event = 'INVOICE'
2296: AND header_id = p_header_id
2297: AND rownum = 1;

Line 2679: oe_debug_pub.add('updating oe_payments. ',3);

2675: IF Oe_Payment_Trxn_Util.Get_CC_Security_Code_Use = 'REQUIRED'
2676: AND l_line_payment_tbl(i).credit_card_approval_code = 'CVV2_REQUIRED' THEN
2677:
2678: IF l_debug_level > 0 THEN
2679: oe_debug_pub.add('updating oe_payments. ',3);
2680: END IF;
2681:
2682: UPDATE oe_payments
2683: SET credit_card_approval_code = 'CVV2_REQUIRED'

Line 2682: UPDATE oe_payments

2678: IF l_debug_level > 0 THEN
2679: oe_debug_pub.add('updating oe_payments. ',3);
2680: END IF;
2681:
2682: UPDATE oe_payments
2683: SET credit_card_approval_code = 'CVV2_REQUIRED'
2684: WHERE line_id = l_line_payment_tbl(i).line_id
2685: AND header_id = l_line_payment_tbl(i).header_id;
2686: END IF;

Line 2818: FROM oe_payments op

2814:
2815: BEGIN
2816: SELECT sum(nvl(payment_amount, 0))
2817: INTO l_prepaid_total
2818: FROM oe_payments op
2819: WHERE op.payment_collection_event = 'PREPAY'
2820: AND op.header_id = l_header_id;
2821: EXCEPTION
2822: WHEN NO_DATA_FOUND THEN

Line 2865: FROM oe_payments

2861: BEGIN
2862: --check if there exists a line level invoice payment
2863: SELECT payment_type_code, trxn_extension_id
2864: INTO l_payment_type_code, l_trxn_extension_id
2865: FROM oe_payments
2866: WHERE line_id = p_line_id
2867: AND header_id = l_header_id --To avoid FTS on oe_payments table (SQL ID 14882779)
2868: AND nvl(payment_type_code, 'COMMITMENT') <> 'COMMITMENT';
2869:

Line 2867: AND header_id = l_header_id --To avoid FTS on oe_payments table (SQL ID 14882779)

2863: SELECT payment_type_code, trxn_extension_id
2864: INTO l_payment_type_code, l_trxn_extension_id
2865: FROM oe_payments
2866: WHERE line_id = p_line_id
2867: AND header_id = l_header_id --To avoid FTS on oe_payments table (SQL ID 14882779)
2868: AND nvl(payment_type_code, 'COMMITMENT') <> 'COMMITMENT';
2869:
2870: EXCEPTION
2871: WHEN NO_DATA_FOUND THEN

Line 2880: FROM oe_payments

2876:
2877: BEGIN
2878: SELECT payment_type_code, trxn_extension_id
2879: INTO l_payment_type_code, l_trxn_extension_id
2880: FROM oe_payments
2881: WHERE header_id = l_header_id
2882: AND line_id IS NULL
2883: AND nvl(payment_collection_event, 'PREPAY') = 'INVOICE'
2884: AND nvl(payment_type_code, 'COMMITMENT') <> 'COMMITMENT';

Line 3008: FROM oe_payments op

3004:
3005: BEGIN
3006: SELECT payment_set_id
3007: INTO l_payment_set_id
3008: FROM oe_payments op
3009: ,oe_order_lines_all ool
3010: WHERE op.header_id = ool.header_id
3011: AND ool.line_id = p_line_id
3012: AND rownum = 1;

Line 3256: FROM OE_PAYMENTS

3252: --bug 4885313
3253: CURSOR header_payments IS
3254: SELECT payment_number, payment_type_code,
3255: trxn_extension_id --R12 CC Encryption
3256: FROM OE_PAYMENTS
3257: WHERE
3258: (
3259: HEADER_ID = p_header_id
3260: AND line_id is NULL

Line 3272: FROM oe_payments

3268:
3269: CURSOR line_payments IS
3270: SELECT payment_number,payment_type_code,
3271: trxn_extension_id
3272: FROM oe_payments
3273: where header_id = p_header_id
3274: and line_id = p_line_id
3275: AND payment_type_code IN ('CREDIT_CARD','ACH','DIRECT_DEBIT');
3276:

Line 3314: DELETE FROM OE_PAYMENTS

3310: RAISE FND_API.G_EXC_ERROR;
3311: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3312: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3313: ELSIF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
3314: DELETE FROM OE_PAYMENTS
3315: WHERE HEADER_ID = p_header_id
3316: AND LINE_ID = p_line_id
3317: AND payment_number = line_payments_rec.payment_number;
3318: END IF;

Line 3350: DELETE FROM OE_PAYMENTS

3346: RAISE FND_API.G_EXC_ERROR;
3347: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3348: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3349: ELSIF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
3350: DELETE FROM OE_PAYMENTS
3351: WHERE HEADER_ID = p_header_id
3352: AND payment_number = header_payments_rec.payment_number
3353: AND line_id is null;
3354: --Need to update oe_order headers table with

Line 3356: --oe_payments table.

3352: AND payment_number = header_payments_rec.payment_number
3353: AND line_id is null;
3354: --Need to update oe_order headers table with
3355: --null payment type code as it has been deleted from
3356: --oe_payments table.
3357: Update oe_order_headers_all set
3358: payment_type_code = null where
3359: header_id = p_header_id;
3360: IF l_debug_level > 0 THEN

Line 3423: from oe_payments

3419: l_del_payment number := 0; -- 0 means do not delete, 1 means delete.
3420:
3421: cursor payment_count is
3422: select count(payment_type_code)
3423: from oe_payments
3424: where header_id = p_header_id
3425: and line_id is null;
3426:
3427: cursor payment_cur is

Line 3436: from oe_payments

3432: credit_card_holder_name,
3433: credit_card_number,
3434: credit_card_expiration_date,
3435: credit_card_approval_code*/ --R12 CC Encryption
3436: from oe_payments
3437: where header_id = p_header_id
3438: and payment_collection_event = 'INVOICE'
3439: and line_id is null;
3440:

Line 3450: from oe_payments

3446: credit_card_holder_name,
3447: credit_card_number,
3448: credit_card_expiration_date,
3449: credit_card_approval_code*/ --R12 CC Encryption
3450: from oe_payments
3451: where header_id = p_header_id
3452: and ( payment_collection_event = 'PREPAY'
3453: or prepaid_amount is not null )
3454: and line_id is null;

Line 3458: from oe_payments

3454: and line_id is null;
3455:
3456: cursor prepay_count is
3457: select count(payment_type_code)
3458: from oe_payments
3459: where header_id = p_header_id
3460: and (payment_collection_event = 'PREPAY'
3461: or prepaid_amount is not null )
3462: and line_id is null;

Line 3542: from oe_payments

3538: l_trxn_id NUMBER;
3539:
3540: cursor line_payments is
3541: select payment_type_code, payment_trx_id
3542: from oe_payments
3543: where line_id = l_lock_line_id
3544: and header_id = p_header_id;
3545:
3546: --bug3733877

Line 3547: --Cursor to find out if there is an invoice payment in oe_payments

3543: where line_id = l_lock_line_id
3544: and header_id = p_header_id;
3545:
3546: --bug3733877
3547: --Cursor to find out if there is an invoice payment in oe_payments
3548: cursor invoice_payment_check is
3549: select 'Y',payment_number --bug3781675
3550: from oe_payments
3551: where header_id = p_header_id

Line 3550: from oe_payments

3546: --bug3733877
3547: --Cursor to find out if there is an invoice payment in oe_payments
3548: cursor invoice_payment_check is
3549: select 'Y',payment_number --bug3781675
3550: from oe_payments
3551: where header_id = p_header_id
3552: and line_id is null
3553: and nvl(payment_collection_event,'PREPAY') = 'INVOICE';
3554:

Line 3631: /* get the count of records in oe_payments for this order header */

3627: return;
3628: end if; -- if p_action = 'UPDATE_LINE'
3629:
3630:
3631: /* get the count of records in oe_payments for this order header */
3632: p_count := 0;
3633:
3634: open payment_count;
3635: fetch payment_count into p_count;

Line 3638: /* get the count of prepayment records in oe_payments */

3634: open payment_count;
3635: fetch payment_count into p_count;
3636: close payment_count;
3637:
3638: /* get the count of prepayment records in oe_payments */
3639: open prepay_count;
3640: fetch prepay_count into l_prepay_count;
3641: close prepay_count;
3642:

Line 3668: FROM oe_payments

3664:
3665: --bug3733877 start
3666: BEGIN
3667: SELECT nvl(MAX(payment_number),0) INTO l_max_payment_number
3668: FROM oe_payments
3669: WHERE header_id = p_header_id
3670: AND line_id IS NULL;
3671: EXCEPTION
3672: WHEN OTHERS THEN

Line 3867: then -- insert payment record into oe_payments

3863: if p_payment_type_code is not null
3864: and (p_credit_card_number is not null
3865: or p_check_number is not null
3866: or p_payment_type_code = 'CASH' )
3867: then -- insert payment record into oe_payments
3868:
3869: if nvl(l_prepayment_flag, 'N') = 'Y' and
3870: --bug3733877 adding the following condition so that prepayment record gets insterted only when there are no payment record in oe_payments.
3871: p_count = 0 then

Line 3870: --bug3733877 adding the following condition so that prepayment record gets insterted only when there are no payment record in oe_payments.

3866: or p_payment_type_code = 'CASH' )
3867: then -- insert payment record into oe_payments
3868:
3869: if nvl(l_prepayment_flag, 'N') = 'Y' and
3870: --bug3733877 adding the following condition so that prepayment record gets insterted only when there are no payment record in oe_payments.
3871: p_count = 0 then
3872:
3873: OE_OE_TOTALS_SUMMARY.Order_Totals
3874: (

Line 4054: DELETE FROM oe_payments

4050:
4051: else --if p_payment_type_code is null
4052: --bug3733877 start
4053: BEGIN
4054: DELETE FROM oe_payments
4055: WHERE header_id = p_header_id
4056: AND line_id IS NULL
4057: AND nvl(payment_collection_event,'PREPAY') = 'INVOICE';
4058: EXCEPTION

Line 4307: UPDATE oe_payments

4303: END IF;
4304:
4305:
4306: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
4307: UPDATE oe_payments
4308: SET payment_amount = 0, prepaid_amount = 0
4309: WHERE payment_collection_event = 'PREPAY'
4310: AND header_id = p_header_rec.header_id;
4311:

Line 4584: FROM oe_payments

4580:
4581: CURSOR lock_lin_Payments(p_header_id in number,
4582: p_line_id in NUMBER) IS
4583: SELECT payment_type_code
4584: FROM oe_payments
4585: WHERE header_id = p_header_id
4586: AND line_id = p_line_id
4587: AND payment_number is null
4588: FOR UPDATE NOWAIT;

Line 4592: FROM oe_payments

4588: FOR UPDATE NOWAIT;
4589:
4590: CURSOR lock_hdr_Payments(p_header_id NUMBER) IS
4591: SELECT payment_type_code
4592: FROM oe_payments
4593: WHERE header_id = p_header_id
4594: AND payment_number is null
4595: FOR UPDATE NOWAIT;
4596:

Line 4632: -- was able to lock the row. so, go ahead and update oe_payments.

4628: -- issue an error message saying that lock row failed.
4629: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4630: RAISE;
4631: End;
4632: -- was able to lock the row. so, go ahead and update oe_payments.
4633: Begin
4634:
4635: if l_payment_type is not null then
4636:

Line 4637: update oe_payments

4633: Begin
4634:
4635: if l_payment_type is not null then
4636:
4637: update oe_payments
4638: set payment_number = 1
4639: where header_id = p_header_id
4640: and line_id = p_line_id
4641: and payment_number is null

Line 4688: -- was able to lock the row. so, go ahead and update oe_payments.

4684: -- issue an error message saying that lock row failed.
4685: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4686: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4687: End;
4688: -- was able to lock the row. so, go ahead and update oe_payments.
4689: Begin
4690:
4691: update oe_payments
4692: set payment_number = 1

Line 4691: update oe_payments

4687: End;
4688: -- was able to lock the row. so, go ahead and update oe_payments.
4689: Begin
4690:
4691: update oe_payments
4692: set payment_number = 1
4693: where header_id = p_header_id
4694: and payment_number is null;
4695: