DBA Data[Home] [Help]

APPS.AP_R11_PREPAY_PKG dependencies on AP_PAYMENT_SCHEDULES

Line 302: * -- Step 5p : case p : Prepayment: Insert AP_PAYMENT_SCHEDULES

298: Current_calling_sequence);
299: end if;
300:
301: /*--------------------------------------------------------------------------
302: * -- Step 5p : case p : Prepayment: Insert AP_PAYMENT_SCHEDULES
303: * Call appp_insert_payment_schedule :
304: * Create additional paid Payment Schedule for the Prepayment.
305: * (converse for Unapplication)
306: *--------------------------------------------------------------------------*/

Line 378: * -- Step 8i : case i : Invoice : Update AP_PAYMENT_SCHEDULES

374: Current_calling_sequence);
375:
376:
377: /*--------------------------------------------------------------------------
378: * -- Step 8i : case i : Invoice : Update AP_PAYMENT_SCHEDULES
379: * Call appp_update_payment_schedule :
380: *
381: * 1. Update the Payment Schedules and create new Invoice Payments on the
382: * Invoice to reflect the effective payment (converse for Unapplication)

Line 573: FROM ap_payment_schedules

569: if (X_calling_from <> 'FORM') then
570: debug_info := 'The apply amount is more than amount remaining';
571: SELECT 'Not overapplying'
572: INTO DUMMY
573: FROM ap_payment_schedules
574: WHERE invoice_id = X_invoice_id
575: GROUP BY invoice_id
576: HAVING sum(nvl(amount_remaining, 0)) >= X_amount_apply;
577: end if;

Line 608: FROM ap_payment_schedules

604:
605: debug_info := 'The apply amount is more than amount not on hold';
606: SELECT 'Not applying more than not on hold'
607: INTO DUMMY
608: FROM ap_payment_schedules
609: WHERE invoice_id = X_invoice_id
610: AND hold_flag <> 'Y'
611: GROUP BY invoice_id
612: HAVING sum(nvl(amount_remaining, 0)) >= X_amount_apply;

Line 712: FROM ap_payment_schedules

708: -- of the prepayment invoice.
709: debug_info := 'Get gross amount from 1st payment schedule';
710: SELECT gross_amount
711: INTO C_gross_amount
712: FROM ap_payment_schedules
713: WHERE invoice_id = X_prepay_id
714: AND payment_num = 1;
715: If (X_amount_apply = (C_pay_curr_invoice_amount - C_gross_amount))
716: then

Line 780: -- Get max_pay_num from ap_payment_schedules

776: WHERE invoice_id = X_prepay_id;
777:
778:
779: ---------------------------------------------------------------------
780: -- Get max_pay_num from ap_payment_schedules
781: ---------------------------------------------------------------------
782: debug_info := 'Get max_pay_num';
783: SELECT max(payment_num)
784: INTO X_max_pay_num

Line 785: FROM ap_payment_schedules

781: ---------------------------------------------------------------------
782: debug_info := 'Get max_pay_num';
783: SELECT max(payment_num)
784: INTO X_max_pay_num
785: FROM ap_payment_schedules
786: WHERE invoice_id = X_prepay_id;
787:
788:
789: ---------------------------------------------------------------------

Line 1194: INSERT INTO AP_PAYMENT_SCHEDULES(

1190: new_line_num := X_max_pay_num;
1191:
1192: debug_info := 'Create an addition paid payment schedule';
1193:
1194: INSERT INTO AP_PAYMENT_SCHEDULES(
1195: invoice_id,
1196: payment_num,
1197: last_update_date,
1198: last_updated_by,

Line 1241: FROM ap_payment_schedules

1237: DECODE(X_last_update_login, -999, null, X_last_update_login),
1238: SYSDATE,
1239: X_user_id,
1240: org_id /* Bug 3700128. MOAC Project */
1241: FROM ap_payment_schedules
1242: WHERE invoice_id = X_prepay_id
1243: AND payment_num = X_copy_payment_num;
1244:
1245:

Line 1315: FROM ap_payment_schedules

1311: amount_remaining)
1312: --
1313: -- gross_amount - amount_remaining = amount_paid.<- No database column
1314: --
1315: FROM ap_payment_schedules
1316: WHERE invoice_id = X_invoice_id
1317: AND (payment_status_flag||'' = 'P'
1318: OR payment_status_flag||'' = DECODE(X_amount_positive, 'N', 'Y', 'N'))
1319: ORDER BY DECODE(X_amount_positive,

Line 1373: UPDATE ap_payment_schedules

1369: +-----------------------------------------------------------------------*/
1370:
1371: debug_info := 'Update ap_payment_schedule for the invoice, case 1';
1372:
1373: UPDATE ap_payment_schedules
1374: SET amount_remaining = (amount_remaining -
1375: ap_utilities_pkg.ap_round_precision(
1376: C_amount_apply_remaining,
1377: X_pay_curr_min_unit, X_pay_curr_precision)),

Line 1436: UPDATE ap_payment_schedules

1432: * schedule line. *
1433: *----------------------------------------------------------------------*/
1434:
1435: debug_info := 'Update ap_payment_schedule for the invoice, case 2';
1436: UPDATE ap_payment_schedules
1437: SET amount_remaining = DECODE(X_amount_positive,
1438: 'Y', 0,
1439: gross_amount),
1440: payment_status_flag = DECODE(X_amount_positive,

Line 1560: (Maintain Table AP_INVOICE_PAYMENTS, and AP_PAYMENT_SCHEDULES)

1556:
1557:
1558: /*===========================================================================
1559: This procedure is used for creating the new payment records on the check.
1560: (Maintain Table AP_INVOICE_PAYMENTS, and AP_PAYMENT_SCHEDULES)
1561:
1562: It include 3 steps. In step 3, there are 2 cases:
1563:
1564: 1. Invoice type is prepayment: insert ap_payment_distribution. It separate