DBA Data[Home] [Help]

APPS.AP_R11_PREPAY_PKG dependencies on AP_INVOICES

Line 38: PROCEDURE appp_update_ap_invoices(

34: X_org_id OUT NOCOPY NUMBER,
35: X_calling_from IN VARCHAR2,
36: X_calling_sequence IN VARCHAR2);
37:
38: PROCEDURE appp_update_ap_invoices(
39: X_invoice_id IN NUMBER,
40: X_prepay_id IN NUMBER,
41: X_amount_apply IN NUMBER,
42: X_prepay_curr_amount_apply IN NUMBER,

Line 231: * -- Step 2p : case p: Prepayment: Update AP_INVOICES

227: X_calling_from,
228: Current_calling_sequence);
229:
230: /*--------------------------------------------------------------------------
231: * -- Step 2p : case p: Prepayment: Update AP_INVOICES
232: * Call appp_update_ap_invoices:
233: * 1. Reduce the prepayment amount (invoice_amount) become
234: * (invoice_amount - amount_apply)
235: * 2. Reduce amount_paid, invoice_distribution_total, and base_amount

Line 232: * Call appp_update_ap_invoices:

228: Current_calling_sequence);
229:
230: /*--------------------------------------------------------------------------
231: * -- Step 2p : case p: Prepayment: Update AP_INVOICES
232: * Call appp_update_ap_invoices:
233: * 1. Reduce the prepayment amount (invoice_amount) become
234: * (invoice_amount - amount_apply)
235: * 2. Reduce amount_paid, invoice_distribution_total, and base_amount
236: * as well

Line 240: ap_r11_prepay_pkg.appp_update_ap_invoices(

236: * as well
237: * (converse for Unapplication)
238: *
239: *--------------------------------------------------------------------------*/
240: ap_r11_prepay_pkg.appp_update_ap_invoices(
241: '',
242: X_prepay_id,
243: X_amount_apply,
244: P_prepay_curr_amount_apply,

Line 353: * -- Step 7i : case i: Invoice : Update AP_INVOICES

349: Current_calling_sequence);
350:
351:
352: /*--------------------------------------------------------------------------
353: * -- Step 7i : case i: Invoice : Update AP_INVOICES
354: * Call appp_update_ap_invoices:
355: * 1. Add the amount_apply to amount_paid for refelecting the payment
356: * amount change.
357: * 2. Update discount_amount_taken, payment_status_flag as well

Line 354: * Call appp_update_ap_invoices:

350:
351:
352: /*--------------------------------------------------------------------------
353: * -- Step 7i : case i: Invoice : Update AP_INVOICES
354: * Call appp_update_ap_invoices:
355: * 1. Add the amount_apply to amount_paid for refelecting the payment
356: * amount change.
357: * 2. Update discount_amount_taken, payment_status_flag as well
358: * (converse for Unapplication)

Line 364: ap_r11_prepay_pkg.appp_update_ap_invoices(

360: * type payment distributions depends upon the payment_status_flag of the
361: * invoice. Since the next step also creates payment dists, we should
362: * first update the payment_status_flag on the invoice.
363: *--------------------------------------------------------------------------*/
364: ap_r11_prepay_pkg.appp_update_ap_invoices(
365: X_invoice_id,
366: '',
367: X_amount_apply,
368: P_prepay_curr_amount_apply,

Line 461: | | | ap_invoices.original_prepayment_amount)

457: | X_orig_amount | No | original_prepayment_amount from |
458: | | | ap_invoice.(0 if NULL) |
459: +---------------------------------------------------------------------+
460: | X_dist_item_amount | No | (ap_invoice_distributions.amount / |
461: | | | ap_invoices.original_prepayment_amount)
462: | | | * X_amount_apply |
463: +---------------------------------------------------------------------+
464: | X_dist_tax_amount | No | X_amount_apply - X_dist_item_amount |
465: +---------------------------------------------------------------------+

Line 589: FROM ap_invoices

585: if (X_calling_from <> 'FORM') then
586: debug_info := 'The apply amount is more than available amount';
587: SELECT 'Not applying more than available'
588: INTO DUMMY
589: FROM ap_invoices
590: WHERE invoice_id = X_prepay_id
591: AND invoice_amount >= X_amount_apply;
592: end if;
593:

Line 602: FROM ap_invoices

598:
599: debug_info := 'Get the invoice number';
600: SELECT invoice_num
601: INTO invoice_number
602: FROM ap_invoices
603: WHERE invoice_id = X_invoice_id;
604:
605: debug_info := 'The apply amount is more than amount not on hold';
606: SELECT 'Not applying more than not on hold'

Line 628: FROM ap_invoices

624: C_pay_curr_invoice_amount,
625: C_invoice_amount, C_currency_code,
626: C_payment_cross_rate,
627: C_orig_prepay_amount
628: FROM ap_invoices
629: WHERE invoice_id = X_prepay_id;
630:
631:
632: ---------------------------------------------------------------------

Line 685: FROM ap_invoices

681: INTO X_pay_curr_min_unit, X_pay_curr_precision,
682: C_pay_curr_min_unit, C_pay_curr_precision
683: FROM fnd_currencies
684: WHERE currency_code = ( SELECT payment_currency_code
685: FROM ap_invoices
686: WHERE invoice_id = X_prepay_id);
687:
688:
689: ---------------------------------------------------------------------

Line 760: FROM ap_invoices_all I, ap_invoice_distributions D1,

756: C_pay_curr_min_unit, C_pay_curr_precision)))
757: INTO X_orig_amount,
758: X_dist_item_amount,
759: X_dist_tax_amount
760: FROM ap_invoices_all I, ap_invoice_distributions D1,
761: ap_invoice_distributions_all D2
762: WHERE I.invoice_id = X_prepay_id
763: AND D1.invoice_id = I.invoice_id
764: AND D1.distribution_line_number = 1

Line 879: * This procedure is used for two case (Maintain AP_INVOICES)

875:
876:
877:
878: /*=========================================================================
879: * This procedure is used for two case (Maintain AP_INVOICES)
880: *
881: * Case 1. Prepayment:
882: * 1.1 Reduce the prepayment amount (invoice_amount) become
883: * (invoice_amount - amount_apply)

Line 897: PROCEDURE appp_update_ap_invoices(

893: * (Invoice: prepay_id is NULL; Prepayment: invoice_id is NULL)
894: *
895: ==========================================================================*/
896:
897: PROCEDURE appp_update_ap_invoices(
898: X_invoice_id IN NUMBER,
899: X_prepay_id IN NUMBER,
900: X_amount_apply IN NUMBER,
901: X_prepay_curr_amount_apply IN NUMBER,

Line 915: current_calling_sequence := 'appp_update_ap_invoices<-'||X_calling_sequence;

911:
912: BEGIN
913: -- Update the calling sequence
914: --
915: current_calling_sequence := 'appp_update_ap_invoices<-'||X_calling_sequence;
916:
917: if (X_invoice_id is NULL) then /* Update prepayment info */
918:
919: debug_info := 'Update ap_invoice for reducing the amount';

Line 921: UPDATE ap_invoices

917: if (X_invoice_id is NULL) then /* Update prepayment info */
918:
919: debug_info := 'Update ap_invoice for reducing the amount';
920:
921: UPDATE ap_invoices
922: SET invoice_amount = invoice_amount - X_prepay_curr_amount_apply,
923: pay_curr_invoice_amount = nvl(pay_curr_invoice_amount, invoice_amount)
924: - X_amount_apply,
925: amount_paid = amount_paid - X_amount_apply,

Line 941: UPDATE ap_invoices

937: WHERE invoice_id = X_prepay_id;
938:
939: else /* Update invoice info*/
940:
941: UPDATE ap_invoices
942: SET amount_paid = nvl(amount_paid, 0) +
943: ap_utilities_pkg.ap_round_precision(
944: X_amount_apply, X_min_unit, X_precision),
945: discount_amount_taken = nvl(discount_amount_taken, 0),

Line 982: END appp_update_ap_invoices;

978: end if;
979:
980: APP_EXCEPTION.RAISE_EXCEPTION;
981:
982: END appp_update_ap_invoices;
983:
984:
985:
986:

Line 988: * This procedure is used for maintain AP_INVOICES_DISTRIBUTIONS

984:
985:
986:
987: /*=========================================================================
988: * This procedure is used for maintain AP_INVOICES_DISTRIBUTIONS
989: *
990: * -- Only prepayment need to add new distribution line.
991: * -- the parameter X_invoice is only used for insert other_invoice_id
992: *

Line 1634: FROM ap_invoices

1630: --
1631: debug_info := 'Get invoice_type';
1632: SELECT invoice_type_lookup_code
1633: INTO C_invoice_type
1634: FROM ap_invoices
1635: WHERE invoice_id = X_new_invoice_id;
1636:
1637: -- Bug 3907029. Added this sql statement to get the payment type for the
1638: -- check to pass in to the create events API

Line 1782: FROM ap_invoice_payments P, ap_invoices I, ap_system_parameters ASP

1778: X_user_id,
1779: 'PREPAY',
1780: X_prepay_id,
1781: I.org_id /* Bug 3700128. MOAC Project */
1782: FROM ap_invoice_payments P, ap_invoices I, ap_system_parameters ASP
1783: WHERE I.invoice_id = X_new_invoice_id
1784: AND P.invoice_payment_id = X_copy_inv_pay_id
1785: AND ASP.set_of_books_id = I.set_of_books_id;
1786: