DBA Data[Home] [Help]

APPS.AP_CHECKS_PKG dependencies on AP_PAYMENT_HISTORY

Line 1113: -- ap_payment_history table.

1109:
1110: -- We need to check if the payment is being matured/unmatured during this
1111: -- updated, i.e. if the status_lookup_code is going from ISSUED to MATURED
1112: -- or vice-versa. If yes, then we want to insert/delete a row in the
1113: -- ap_payment_history table.
1114: -- I am putting the logic to figure out NOCOPY if the status has changed in this
1115: -- procedure because it is too messy and bug prone to put it in the form.
1116: -- Some of the issues are - we will need to track the previous and new value
1117: -- of the displayed field and then retrieve the lookup_codes to figure out NOCOPY

Line 1140: debug_info := 'Insert row in Ap_Payment_History for payment maturity';

1136:
1137: If (l_old_status_lookup_code = 'ISSUED' AND
1138: X_status_lookup_code = 'NEGOTIABLE')
1139: Then
1140: debug_info := 'Insert row in Ap_Payment_History for payment maturity';
1141: ap_reconciliation_pkg.recon_payment_history
1142: (X_CHECKRUN_ID => NULL,
1143: X_CHECK_ID => X_check_id,
1144: X_TRANSACTION_TYPE => 'PAYMENT MATURITY',

Line 1169: debug_info := 'Delete maturity row from ap_payment_history';

1165: X_CALLING_SEQUENCE => current_calling_sequence);
1166: Elsif (l_old_status_lookup_code = 'NEGOTIABLE' AND
1167: X_status_lookup_code = 'ISSUED')
1168: Then
1169: debug_info := 'Delete maturity row from ap_payment_history';
1170: ap_reconciliation_pkg.recon_payment_history
1171: (X_CHECKRUN_ID => NULL,
1172: X_CHECK_ID => X_check_id,
1173: X_TRANSACTION_TYPE => 'PAYMENT MATURITY REVERSAL',

Line 1421: -- ap_payment_history for this payment with posted_flag = 'Y'.

1417:
1418: -----------------------------------------------------------------------
1419: -- Function is_maturity_accounted returns TRUE if the maturity event
1420: -- has been accounted for, i.e. a PAYMENT MATURITY row exists in
1421: -- ap_payment_history for this payment with posted_flag = 'Y'.
1422: -- Otherwise it returns a FALSE.
1423: --
1424: FUNCTION is_maturity_accounted(X_check_id IN NUMBER,
1425: X_calling_sequence IN VARCHAR2)

Line 1435: debug_info := 'Selecting from ap_payment_history';

1431: -- Update the calling sequence
1432: --
1433: current_calling_sequence := 'AP_CHECKS_PKG.is_maturity_accounted<-' ||
1434: X_calling_sequence;
1435: debug_info := 'Selecting from ap_payment_history';
1436: SELECT count(*)
1437: INTO l_num_accounted_pay_hist
1438: FROM ap_payment_history
1439: WHERE check_id = X_check_id

Line 1438: FROM ap_payment_history

1434: X_calling_sequence;
1435: debug_info := 'Selecting from ap_payment_history';
1436: SELECT count(*)
1437: INTO l_num_accounted_pay_hist
1438: FROM ap_payment_history
1439: WHERE check_id = X_check_id
1440: AND transaction_type = 'PAYMENT MATURITY'
1441: AND posted_flag = 'Y';
1442:

Line 1465: -- ap_payment_history for this payment.

1461:
1462: -----------------------------------------------------------------------
1463: -- Function is_payment_matured returns TRUE if the maturity event
1464: -- has been created, i.e. a PAYMENT MATURITY row exists in
1465: -- ap_payment_history for this payment.
1466: -- Otherwise it returns a FALSE.
1467: --
1468: FUNCTION is_payment_matured(X_check_id IN NUMBER,
1469: X_calling_sequence IN VARCHAR2)

Line 1479: debug_info := 'Selecting from ap_payment_history';

1475: -- Update the calling sequence
1476: --
1477: current_calling_sequence := 'AP_CHECKS_PKG.is_payment_matured<-' ||
1478: X_calling_sequence;
1479: debug_info := 'Selecting from ap_payment_history';
1480: SELECT count(*)
1481: INTO l_num_pay_hist
1482: FROM ap_payment_history
1483: WHERE check_id = X_check_id

Line 1482: FROM ap_payment_history

1478: X_calling_sequence;
1479: debug_info := 'Selecting from ap_payment_history';
1480: SELECT count(*)
1481: INTO l_num_pay_hist
1482: FROM ap_payment_history
1483: WHERE check_id = X_check_id
1484: AND transaction_type = 'PAYMENT MATURITY';
1485:
1486: If (l_num_pay_hist = 0)

Line 1530: -- ap_invoice_payments and ap_payment_history. Previously, the cursor

1526: -- are unposted (N). The status should be partial (P).
1527: --
1528:
1529: -- Fix for 1375672. Modified the cursor to select the posted_flag from
1530: -- ap_invoice_payments and ap_payment_history. Previously, the cursor
1531: -- selected the cash_posted_flag and accrual_posted_flag (depending upon
1532: -- the accounting option) from ap_invoice_payments only, ignoring
1533: -- the ap_payment_history table.
1534:

Line 1533: -- the ap_payment_history table.

1529: -- Fix for 1375672. Modified the cursor to select the posted_flag from
1530: -- ap_invoice_payments and ap_payment_history. Previously, the cursor
1531: -- selected the cash_posted_flag and accrual_posted_flag (depending upon
1532: -- the accounting option) from ap_invoice_payments only, ignoring
1533: -- the ap_payment_history table.
1534:
1535: -- bug 3676049 Posting status of check is irrespective of Payment Maturity
1536: -- when Payment Accounting = 'CLEARING ONLY'
1537: CURSOR posting_cursor IS

Line 1543: FROM ap_payment_history aph, ap_system_parameters asp

1539: FROM ap_invoice_payments_all
1540: WHERE check_id = l_check_id
1541: UNION ALL
1542: SELECT posted_flag
1543: FROM ap_payment_history aph, ap_system_parameters asp
1544: WHERE check_id = l_check_id
1545: AND nvl(aph.org_id, -99) = nvl(asp.org_id, -99)
1546: AND (nvl(asp.when_to_account_pmt, 'ALWAYS') = 'ALWAYS' or
1547: (nvl(asp.when_to_account_pmt, 'ALWAYS') = 'CLEARING ONLY' and