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 240: , p_payment_number IN OE_PAYMENTS.PAYMENT_NUMBER%TYPE DEFAULT NULL --7559372

236: , p_bank_acct_uses_id IN NUMBER
237: , p_trxn_extension_id IN NUMBER --R12 CC Encryption
238: , p_payment_set_id IN OUT NOCOPY NUMBER
239: , p_receipt_number IN OUT NOCOPY VARCHAR2 -- bug 4724845
240: , p_payment_number IN OE_PAYMENTS.PAYMENT_NUMBER%TYPE DEFAULT NULL --7559372
241: , x_payment_response_error_code OUT NOCOPY VARCHAR2
242: , p_approval_code IN OUT NOCOPY VARCHAR2
243: , x_msg_count OUT NOCOPY NUMBER
244: , x_msg_data OUT NOCOPY VARCHAR2

Line 633: l_payment_types_rec OE_PAYMENTS_UTIL.Payment_Types_Rec_Type;

629: l_exists_prepay VARCHAR2(1) := 'N';
630: l_line_id NUMBER;
631: l_payment_set_id NUMBER;
632: l_receipt_number VARCHAR2(30); -- bug 4724845
633: l_payment_types_rec OE_PAYMENTS_UTIL.Payment_Types_Rec_Type;
634: l_hold_result VARCHAR2(30);
635: l_msg_count NUMBER := 0 ;
636: l_msg_data VARCHAR2(2000):= NULL ;
637: l_result_out VARCHAR2(30) := NULL ;

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

803: , p_bank_account_uses_id => l_bank_acct_uses_id
804: ) ;*/
805:
806: SELECT trxn_extension_id into l_trxn_extension_id
807: FROM OE_PAYMENTS where header_id = p_header_rec.header_id;
808: --R12 CC Encryption
809:
810: EXCEPTION WHEN OTHERS THEN
811: FND_MESSAGE.SET_NAME('ONT','OE_VPM_CC_ACCT_NOT_SET');

Line 923: FROM oe_payments

919: -- call create receipt API
920: BEGIN
921: SELECT payment_set_id, check_number -- bug 4724845
922: INTO l_payment_set_id, l_receipt_number
923: FROM oe_payments
924: WHERE header_id = l_header_rec.header_id
925: AND payment_type_code = 'CREDIT_CARD';
926: EXCEPTION WHEN NO_DATA_FOUND THEN
927: l_payment_set_id := null;

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

975: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
976: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
977: END IF;
978:
979: -- to either insert or update the prepaid amount to oe_payments.
980: BEGIN
981: SELECT 'Y'
982: INTO l_exists_prepay
983: FROM oe_payments

Line 983: FROM oe_payments

979: -- to either insert or update the prepaid amount to oe_payments.
980: BEGIN
981: SELECT 'Y'
982: INTO l_exists_prepay
983: FROM oe_payments
984: WHERE header_id = l_header_rec.header_id
985: AND payment_type_code = 'CREDIT_CARD';
986: EXCEPTION WHEN NO_DATA_FOUND THEN
987: l_exists_prepay := 'N';

Line 992: UPDATE oe_payments

988: END;
989:
990: IF l_exists_prepay = 'Y' THEN
991: -- update prepaid_amount on oe_order_headers
992: UPDATE oe_payments
993: SET prepaid_amount = nvl(prepaid_amount,0) + l_pending_amount
994: WHERE header_id = l_header_rec.header_id
995: AND payment_type_code = 'CREDIT_CARD';
996: ELSE

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

1010: l_payment_types_rec.created_by := FND_GLOBAL.USER_ID;
1011: l_payment_types_rec.last_update_date := SYSDATE;
1012: l_payment_types_rec.last_updated_by := FND_GLOBAL.USER_ID;
1013:
1014: oe_payments_util.insert_row(p_payment_types_rec => l_payment_types_rec);
1015:
1016: END IF;
1017:
1018: -- to update line information

Line 1101: FROM oe_payments

1097:
1098: BEGIN
1099: SELECT payment_set_id
1100: INTO l_payment_set_id
1101: FROM oe_payments
1102: WHERE header_id = l_header_rec.header_id
1103: AND payment_type_code = 'CREDIT_CARD';
1104: EXCEPTION WHEN NO_DATA_FOUND THEN
1105: l_payment_set_id := null;

Line 1142: UPDATE oe_payments

1138: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1139: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1140: END IF;
1141:
1142: UPDATE oe_payments
1143: SET prepaid_amount = nvl(prepaid_amount,0) + l_pending_amount
1144: WHERE header_id = p_header_rec.header_id
1145: AND payment_type_code = 'CREDIT_CARD';
1146:

Line 1883: Oe_payments op

1879: Op.payment_number,
1880: Op.payment_amount,
1881: Op.trxn_extension_id --R12 CC Encryption
1882: FROM oe_payment_types_all opt,
1883: Oe_payments op
1884: WHERE opt.payment_type_code = op.payment_type_code
1885: AND op.payment_collection_event = 'PREPAY'
1886: AND op.payment_type_code <> 'COMMITMENT'
1887: AND op.line_id is null

Line 1893: from oe_payments

1889: And opt.org_id=l_org_id; --moac
1890:
1891: cursor payment_count is
1892: select count(payment_type_code)
1893: from oe_payments
1894: where header_id = p_header_id
1895: and line_id is null;
1896:
1897: l_order_total number; -- Added for bug 8478559

Line 1919: FROM oe_payments

1915:
1916: BEGIN
1917: SELECT 'Y'
1918: INTO l_payment_exists
1919: FROM oe_payments
1920: WHERE header_id = p_header_id
1921: AND rownum = 1;
1922: EXCEPTION
1923: WHEN NO_DATA_FOUND THEN

Line 1958: FROM oe_payments

1954: IF p_line_id IS NULL THEN
1955: BEGIN
1956: SELECT 'Y'
1957: INTO l_exists_prepay
1958: FROM oe_payments
1959: WHERE payment_collection_event = 'PREPAY'
1960: AND header_id = p_header_id
1961: AND rownum=1;
1962: EXCEPTION WHEN NO_DATA_FOUND THEN

Line 1984: FROM oe_payments

1980: -- get the payment_set_id if exists for the order.
1981: BEGIN
1982: SELECT payment_set_id
1983: INTO l_payment_set_id
1984: FROM oe_payments
1985: WHERE header_id = p_header_id
1986: AND payment_set_id IS NOT NULL
1987: AND rownum = 1;
1988: EXCEPTION WHEN NO_DATA_FOUND THEN

Line 2007: update oe_payments

2003: END IF;
2004:
2005: l_order_total := OE_OE_TOTALS_SUMMARY.Outbound_Order_Total(p_header_id => p_header_id, p_all_lines => 'Y');
2006:
2007: update oe_payments
2008: set payment_amount = ((payment_percentage * l_order_total) / 100)
2009: where header_id = p_header_id
2010: and payment_collection_event = 'PREPAY'
2011: and payment_type_code <> 'COMMITMENT'

Line 2027: -- in oe_payments table

2023:
2024:
2025: -- call AR API to create receipt for each payment method.
2026: -- l_insert should be set to 'Y' if there are no payment records
2027: -- in oe_payments table
2028: -- and payment information is only present in headers.
2029:
2030: For c_payment_rec IN hdr_payments_cur (p_header_id) LOOP
2031:

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

2175:
2176: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
2177:
2178: IF l_debug_level > 0 THEN
2179: oe_debug_pub.add( 'OEXVPPYB: update oe_payments for payment_set_id: '||l_payment_set_id, 3) ;
2180: END IF;
2181:
2182: UPDATE oe_payments
2183: SET payment_set_id = l_payment_set_id,

Line 2182: UPDATE oe_payments

2178: IF l_debug_level > 0 THEN
2179: oe_debug_pub.add( 'OEXVPPYB: update oe_payments for payment_set_id: '||l_payment_set_id, 3) ;
2180: END IF;
2181:
2182: UPDATE oe_payments
2183: SET payment_set_id = l_payment_set_id,
2184: prepaid_amount = l_pending_amount + l_prepaid_amount,
2185: credit_card_approval_code = l_approval_code
2186: WHERE header_id = p_header_id

Line 2192: FROM oe_payments

2188:
2189: BEGIN
2190: SELECT 'Y'
2191: INTO l_exists_prepay_lines
2192: FROM oe_payments
2193: WHERE payment_collection_event = 'PREPAY'
2194: AND payment_set_id is NULL
2195: AND header_id = p_header_id
2196: AND payment_type_code <> 'COMMITMENT'

Line 2302: UPDATE oe_payments

2298: oe_debug_pub.add( 'OEXVPPYB Process_Payments: after calling create_refund, return status is: '||l_return_status, 3 ) ;
2299: END IF;
2300:
2301: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
2302: UPDATE oe_payments
2303: SET prepaid_amount = nvl(prepaid_amount,0) + l_pending_amount
2304: WHERE header_id = p_header_id
2305: AND nvl(payment_number, -1) = nvl(c_payment_rec.payment_number, -1);
2306:

Line 2381: FROM oe_payments

2377: BEGIN
2378: -- if there exists line level credit card payments.
2379: SELECT 'Y'
2380: INTO l_do_cc_authorization
2381: FROM oe_payments
2382: WHERE payment_type_code = 'CREDIT_CARD'
2383: AND payment_collection_event = 'INVOICE'
2384: AND header_id = p_header_id
2385: AND rownum = 1;

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

2807: IF Oe_Payment_Trxn_Util.Get_CC_Security_Code_Use = 'REQUIRED'
2808: AND l_line_payment_tbl(i).credit_card_approval_code = 'CVV2_REQUIRED' THEN
2809:
2810: IF l_debug_level > 0 THEN
2811: oe_debug_pub.add('updating oe_payments. ',3);
2812: END IF;
2813:
2814: UPDATE oe_payments
2815: SET credit_card_approval_code = 'CVV2_REQUIRED'

Line 2814: UPDATE oe_payments

2810: IF l_debug_level > 0 THEN
2811: oe_debug_pub.add('updating oe_payments. ',3);
2812: END IF;
2813:
2814: UPDATE oe_payments
2815: SET credit_card_approval_code = 'CVV2_REQUIRED'
2816: WHERE line_id = l_line_payment_tbl(i).line_id
2817: AND header_id = l_line_payment_tbl(i).header_id;
2818: END IF;

Line 2950: FROM oe_payments op

2946:
2947: BEGIN
2948: SELECT sum(nvl(payment_amount, 0))
2949: INTO l_prepaid_total
2950: FROM oe_payments op
2951: WHERE op.payment_collection_event = 'PREPAY'
2952: AND op.header_id = l_header_id;
2953: EXCEPTION
2954: WHEN NO_DATA_FOUND THEN

Line 2997: FROM oe_payments

2993: BEGIN
2994: --check if there exists a line level invoice payment
2995: SELECT payment_type_code, trxn_extension_id
2996: INTO l_payment_type_code, l_trxn_extension_id
2997: FROM oe_payments
2998: WHERE line_id = p_line_id
2999: AND header_id = l_header_id --To avoid FTS on oe_payments table (SQL ID 14882779)
3000: AND nvl(payment_type_code, 'COMMITMENT') <> 'COMMITMENT';
3001:

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

2995: SELECT payment_type_code, trxn_extension_id
2996: INTO l_payment_type_code, l_trxn_extension_id
2997: FROM oe_payments
2998: WHERE line_id = p_line_id
2999: AND header_id = l_header_id --To avoid FTS on oe_payments table (SQL ID 14882779)
3000: AND nvl(payment_type_code, 'COMMITMENT') <> 'COMMITMENT';
3001:
3002: EXCEPTION
3003: WHEN NO_DATA_FOUND THEN

Line 3012: FROM oe_payments

3008:
3009: BEGIN
3010: SELECT payment_type_code, trxn_extension_id
3011: INTO l_payment_type_code, l_trxn_extension_id
3012: FROM oe_payments
3013: WHERE header_id = l_header_id
3014: AND line_id IS NULL
3015: AND nvl(payment_collection_event, 'PREPAY') = 'INVOICE'
3016: AND nvl(payment_type_code, 'COMMITMENT') <> 'COMMITMENT';

Line 3140: FROM oe_payments op

3136: -- Bug 7757937
3137: BEGIN
3138: SELECT payment_set_id
3139: INTO l_payment_set_id
3140: FROM oe_payments op
3141: ,oe_order_lines_all ool
3142: WHERE op.header_id = ool.header_id
3143: AND ool.line_id = p_line_id
3144: AND op.payment_collection_event = 'PREPAY'

Line 3390: FROM OE_PAYMENTS

3386: --bug 4885313
3387: CURSOR header_payments IS
3388: SELECT payment_number, payment_type_code,
3389: trxn_extension_id --R12 CC Encryption
3390: FROM OE_PAYMENTS
3391: WHERE
3392: (
3393: HEADER_ID = p_header_id
3394: AND line_id is NULL

Line 3406: FROM oe_payments

3402:
3403: CURSOR line_payments IS
3404: SELECT payment_number,payment_type_code,
3405: trxn_extension_id
3406: FROM oe_payments
3407: where header_id = p_header_id
3408: and line_id = p_line_id
3409: AND payment_type_code IN ('CREDIT_CARD','ACH','DIRECT_DEBIT');
3410:

Line 3448: DELETE FROM OE_PAYMENTS

3444: RAISE FND_API.G_EXC_ERROR;
3445: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3446: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3447: ELSIF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
3448: DELETE FROM OE_PAYMENTS
3449: WHERE HEADER_ID = p_header_id
3450: AND LINE_ID = p_line_id
3451: AND payment_number = line_payments_rec.payment_number;
3452: END IF;

Line 3484: DELETE FROM OE_PAYMENTS

3480: RAISE FND_API.G_EXC_ERROR;
3481: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3482: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3483: ELSIF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
3484: DELETE FROM OE_PAYMENTS
3485: WHERE HEADER_ID = p_header_id
3486: AND payment_number = header_payments_rec.payment_number
3487: AND line_id is null;
3488: --Need to update oe_order headers table with

Line 3490: --oe_payments table.

3486: AND payment_number = header_payments_rec.payment_number
3487: AND line_id is null;
3488: --Need to update oe_order headers table with
3489: --null payment type code as it has been deleted from
3490: --oe_payments table.
3491: Update oe_order_headers_all set
3492: payment_type_code = null where
3493: header_id = p_header_id;
3494: IF l_debug_level > 0 THEN

Line 3557: from oe_payments

3553: l_del_payment number := 0; -- 0 means do not delete, 1 means delete.
3554:
3555: cursor payment_count is
3556: select count(payment_type_code)
3557: from oe_payments
3558: where header_id = p_header_id
3559: and line_id is null;
3560:
3561: cursor payment_cur is

Line 3570: from oe_payments

3566: credit_card_holder_name,
3567: credit_card_number,
3568: credit_card_expiration_date,
3569: credit_card_approval_code*/ --R12 CC Encryption
3570: from oe_payments
3571: where header_id = p_header_id
3572: and payment_collection_event = 'INVOICE'
3573: and line_id is null;
3574:

Line 3584: from oe_payments

3580: credit_card_holder_name,
3581: credit_card_number,
3582: credit_card_expiration_date,
3583: credit_card_approval_code*/ --R12 CC Encryption
3584: from oe_payments
3585: where header_id = p_header_id
3586: and ( payment_collection_event = 'PREPAY'
3587: or prepaid_amount is not null )
3588: and line_id is null;

Line 3592: from oe_payments

3588: and line_id is null;
3589:
3590: cursor prepay_count is
3591: select count(payment_type_code)
3592: from oe_payments
3593: where header_id = p_header_id
3594: and (payment_collection_event = 'PREPAY'
3595: or prepaid_amount is not null )
3596: and line_id is null;

Line 3676: from oe_payments

3672: l_trxn_id NUMBER;
3673:
3674: cursor line_payments is
3675: select payment_type_code, payment_trx_id
3676: from oe_payments
3677: where line_id = l_lock_line_id
3678: and header_id = p_header_id;
3679:
3680: --bug3733877

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

3677: where line_id = l_lock_line_id
3678: and header_id = p_header_id;
3679:
3680: --bug3733877
3681: --Cursor to find out if there is an invoice payment in oe_payments
3682: cursor invoice_payment_check is
3683: select 'Y',payment_number --bug3781675
3684: from oe_payments
3685: where header_id = p_header_id

Line 3684: from oe_payments

3680: --bug3733877
3681: --Cursor to find out if there is an invoice payment in oe_payments
3682: cursor invoice_payment_check is
3683: select 'Y',payment_number --bug3781675
3684: from oe_payments
3685: where header_id = p_header_id
3686: and line_id is null
3687: and nvl(payment_collection_event,'PREPAY') = 'INVOICE';
3688:

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

3761: return;
3762: end if; -- if p_action = 'UPDATE_LINE'
3763:
3764:
3765: /* get the count of records in oe_payments for this order header */
3766: p_count := 0;
3767:
3768: open payment_count;
3769: fetch payment_count into p_count;

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

3768: open payment_count;
3769: fetch payment_count into p_count;
3770: close payment_count;
3771:
3772: /* get the count of prepayment records in oe_payments */
3773: open prepay_count;
3774: fetch prepay_count into l_prepay_count;
3775: close prepay_count;
3776:

Line 3802: FROM oe_payments

3798:
3799: --bug3733877 start
3800: BEGIN
3801: SELECT nvl(MAX(payment_number),0) INTO l_max_payment_number
3802: FROM oe_payments
3803: WHERE header_id = p_header_id
3804: AND line_id IS NULL;
3805: EXCEPTION
3806: WHEN OTHERS THEN

Line 4001: then -- insert payment record into oe_payments

3997: if p_payment_type_code is not null
3998: and (p_credit_card_number is not null
3999: or p_check_number is not null
4000: or p_payment_type_code = 'CASH' )
4001: then -- insert payment record into oe_payments
4002:
4003: if nvl(l_prepayment_flag, 'N') = 'Y' and
4004: --bug3733877 adding the following condition so that prepayment record gets insterted only when there are no payment record in oe_payments.
4005: p_count = 0 then

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

4000: or p_payment_type_code = 'CASH' )
4001: then -- insert payment record into oe_payments
4002:
4003: if nvl(l_prepayment_flag, 'N') = 'Y' and
4004: --bug3733877 adding the following condition so that prepayment record gets insterted only when there are no payment record in oe_payments.
4005: p_count = 0 then
4006:
4007: OE_OE_TOTALS_SUMMARY.Order_Totals
4008: (

Line 4188: DELETE FROM oe_payments

4184:
4185: else --if p_payment_type_code is null
4186: --bug3733877 start
4187: BEGIN
4188: DELETE FROM oe_payments
4189: WHERE header_id = p_header_id
4190: AND line_id IS NULL
4191: AND nvl(payment_collection_event,'PREPAY') = 'INVOICE';
4192: EXCEPTION

Line 4441: UPDATE oe_payments

4437: END IF;
4438:
4439:
4440: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
4441: UPDATE oe_payments
4442: SET payment_amount = 0, prepaid_amount = 0
4443: WHERE payment_collection_event = 'PREPAY'
4444: AND header_id = p_header_rec.header_id;
4445:

Line 4718: FROM oe_payments

4714:
4715: CURSOR lock_lin_Payments(p_header_id in number,
4716: p_line_id in NUMBER) IS
4717: SELECT payment_type_code
4718: FROM oe_payments
4719: WHERE header_id = p_header_id
4720: AND line_id = p_line_id
4721: AND payment_number is null
4722: FOR UPDATE NOWAIT;

Line 4726: FROM oe_payments

4722: FOR UPDATE NOWAIT;
4723:
4724: CURSOR lock_hdr_Payments(p_header_id NUMBER) IS
4725: SELECT payment_type_code
4726: FROM oe_payments
4727: WHERE header_id = p_header_id
4728: AND payment_number is null
4729: FOR UPDATE NOWAIT;
4730:

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

4762: -- issue an error message saying that lock row failed.
4763: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4764: RAISE;
4765: End;
4766: -- was able to lock the row. so, go ahead and update oe_payments.
4767: Begin
4768:
4769: if l_payment_type is not null then
4770:

Line 4771: update oe_payments

4767: Begin
4768:
4769: if l_payment_type is not null then
4770:
4771: update oe_payments
4772: set payment_number = 1
4773: where header_id = p_header_id
4774: and line_id = p_line_id
4775: and payment_number is null

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

4818: -- issue an error message saying that lock row failed.
4819: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4820: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4821: End;
4822: -- was able to lock the row. so, go ahead and update oe_payments.
4823: Begin
4824:
4825: update oe_payments
4826: set payment_number = 1

Line 4825: update oe_payments

4821: End;
4822: -- was able to lock the row. so, go ahead and update oe_payments.
4823: Begin
4824:
4825: update oe_payments
4826: set payment_number = 1
4827: where header_id = p_header_id
4828: and payment_number is null;
4829: