index

Package tb_receivable_rules

Support subprograms for RECEIVABLE.


Program units
f_valid_apply_by   Checks to see if application by transaction or invoice number paid is valid.
f_valid_invoice   Checks to see if invoice number is valid for this account.
p_curr_conv_exch   Calculates the converted amount and exchange difference when Currency Conversion is used.
p_register_entity   Register the attribute/value pairs to the message cache.
p_register_entity   Register the attribute/value pairs to the message cache.
p_valid_create   Validates data entered, sets defaults, and processes edits and security for insert.
p_valid_update   Validates data entered, and processes edits and comparisons for update.


f_valid_apply_by

Function f_valid_apply_by(p_pidm           tbraccd.tbraccd_pidm%TYPE,
                          p_tpay_number    tbraccd.tbraccd_tran_number_paid%TYPE DEFAULT NULL,
                          p_inv_paid       tbraccd.tbraccd_inv_number_paid%TYPE DEFAULT NULL,
                          p_invoice_number tbraccd.tbraccd_invoice_number%TYPE DEFAULT NULL,
                          p_apply_amount   tbraccd.tbraccd_balance%TYPE)
  RETURN VARCHAR2

Checks to see if application by transaction or invoice number paid is valid.

Parameters
p_pidm   Internal Identification Number of the person or non-person account, valid in SPRIDEN. NUMBER(8) Required Key
p_tpay_number   Transaction Number Paid is used in application of payment to force a transaction to liquidate a specific transaction on the account. NUMBER(8)
p_inv_paid   Invoice Number Paid is used in application of payment to force a payment to liquidate a specific group of charges. VARCHAR2(8)
p_invoice_number   Invoice Number identifies a group of charges invoiced via one statement. VARCHAR2(8)
p_apply_amount   Amount of the transaction to be applied. NUMBER(12,2) Required

Returns
Error message if not valid, otherwise null.


f_valid_invoice

Function f_valid_invoice(p_pidm           tbraccd.tbraccd_pidm%TYPE,
                         p_invoice_number tbraccd.tbraccd_invoice_number%TYPE)
  RETURN VARCHAR2

Checks to see if invoice number is valid for this account.

Parameters
p_pidm   Internal Identification Number of the person or non-person account, valid in SPRIDEN. NUMBER(8) Required Key
p_invoice_number   Invoice Number identifies a group of charges invoiced via one statement. VARCHAR2(8) Required

Returns
Error message if not valid, otherwise null.


p_curr_conv_exch

Procedure p_curr_conv_exch(p_pidm              tbraccd.tbraccd_pidm%TYPE,
                           p_curr_code         tbraccd.tbraccd_curr_code%TYPE,
                           p_foreign_amount    tbraccd.tbraccd_foreign_amount%TYPE,
                           p_curr_trans_date   tbraccd.tbraccd_trans_date%TYPE,
                           p_tran_number_paid  tbraccd.tbraccd_tran_number_paid%TYPE DEFAULT NULL,
                           p_inv_number_paid   tbraccd.tbraccd_inv_number_paid%TYPE DEFAULT NULL,
                           p_conv_amount_out   OUT tbraccd.tbraccd_amount%TYPE,
                           p_exchange_diff_out OUT tbraccd.tbraccd_exchange_diff%TYPE,
                           p_error_out         OUT VARCHAR2)

Calculates the converted amount and exchange difference when Currency Conversion is used.
When transaction or invoice number paid is given, then the converted amount is based on the rate in effect as of the bill date (if populated) or transaction date of the charge to which the foreign payment is applied.  Any difference based on the rate in effect as of the transaction date is returned as the exchange difference.

When neither transaction nor invoice number paid is specified, the converted amount is based on the transaction date and the exchange difference remains null.

Parameters
p_pidm   Internal Identification Number of the person or non-person account, valid in SPRIDEN. NUMBER(8) Required
p_curr_code   Foreign currency code used when creating a payment, valid in GTVCURR and GURCURR. VARCHAR2(4) Required
p_foreign_amount   Amount of the transaction stated in foreign currency. NUMBER(12,2) Required
p_curr_trans_date   Transaction date used to calculate value of the currency. DATE Required
p_inv_number_paid   Invoice Number Paid is used to find effective date to use to calculate converted amount and exchange difference. VARCHAR2(8)
p_tran_number_paid   Transaction Number Paid is used to find effective date to use to calculate converted amount and exchange difference. NUMBER(8)
p_conv_amount_out   Calculated amount of the converted foreign currency. NUMBER(12,2)
p_exchange_diff_out   Exchange difference between a foreign currency amount as of the transaction date and the value 1) as of the bill date when processed with Invoice Number Paid or 2) as of the charge transaction date when processed with Transaction Number Paid. NUMBER(12,2)
p_error_out   Error message if any error encountered when processing currency conversion, otherwise null.


p_register_entity

Procedure p_register_entity(p_operation_type     NUMBER,
                            p_internal_record_id VARCHAR2)

Register the attribute/value pairs to the message cache.
This signature uses the rowid only, for the delete operations.

Parameters
p_internal_record_id   Database rowid. VARCHAR2(18)


p_register_entity

Procedure p_register_entity(p_operation_type       NUMBER,
                            p_pidm                 tbraccd.tbraccd_pidm%TYPE,
                            p_tran_number          tbraccd.tbraccd_tran_number%TYPE,
                            p_term_code            tbraccd.tbraccd_term_code%TYPE,
                            p_detail_code          tbraccd.tbraccd_detail_code%TYPE,
                            p_dcat_code            tbbdetc.tbbdetc_dcat_code%TYPE,
                            p_user                 tbraccd.tbraccd_user%TYPE,
                            p_entry_date           tbraccd.tbraccd_entry_date%TYPE,
                            p_amount               tbraccd.tbraccd_amount%TYPE,
                            p_balance              tbraccd.tbraccd_balance%TYPE,
                            p_effective_date       tbraccd.tbraccd_effective_date%TYPE,
                            p_bill_date            tbraccd.tbraccd_bill_date%TYPE,
                            p_due_date             tbraccd.tbraccd_due_date%TYPE,
                            p_desc                 tbraccd.tbraccd_desc%TYPE,
                            p_receipt_number       tbraccd.tbraccd_receipt_number%TYPE,
                            p_tran_number_paid     tbraccd.tbraccd_tran_number_paid%TYPE,
                            p_crossref_pidm        tbraccd.tbraccd_crossref_pidm%TYPE,
                            p_crossref_number      tbraccd.tbraccd_crossref_number%TYPE,
                            p_crossref_detail_code tbraccd.tbraccd_crossref_detail_code%TYPE,
                            p_srce_code            tbraccd.tbraccd_srce_code%TYPE,
                            p_acct_feed_ind        tbraccd.tbraccd_acct_feed_ind%TYPE,
                            p_session_number       tbraccd.tbraccd_session_number%TYPE,
                            p_cshr_end_date        tbraccd.tbraccd_cshr_end_date%TYPE,
                            p_crn                  tbraccd.tbraccd_crn%TYPE,
                            p_crossref_srce_code   tbraccd.tbraccd_crossref_srce_code%TYPE,
                            p_loc_mdt              tbraccd.tbraccd_loc_mdt%TYPE,
                            p_loc_mdt_seq          tbraccd.tbraccd_loc_mdt_seq%TYPE,
                            p_rate                 tbraccd.tbraccd_rate%TYPE,
                            p_units                tbraccd.tbraccd_units%TYPE,
                            p_document_number      tbraccd.tbraccd_document_number%TYPE,
                            p_trans_date           tbraccd.tbraccd_trans_date%TYPE,
                            p_payment_id           tbraccd.tbraccd_payment_id%TYPE,
                            p_invoice_number       tbraccd.tbraccd_invoice_number%TYPE,
                            p_statement_date       tbraccd.tbraccd_statement_date%TYPE,
                            p_inv_number_paid      tbraccd.tbraccd_inv_number_paid%TYPE,
                            p_curr_code            tbraccd.tbraccd_curr_code%TYPE,
                            p_exchange_diff        tbraccd.tbraccd_exchange_diff%TYPE,
                            p_foreign_amount       tbraccd.tbraccd_foreign_amount%TYPE,
                            p_late_dcat_code       tbraccd.tbraccd_late_dcat_code%TYPE,
                            p_feed_date            tbraccd.tbraccd_feed_date%TYPE,
                            p_feed_doc_code        tbraccd.tbraccd_feed_doc_code%TYPE,
                            p_atyp_code            tbraccd.tbraccd_atyp_code%TYPE,
                            p_atyp_seqno           tbraccd.tbraccd_atyp_seqno%TYPE,
                            p_card_type_vr         tbraccd.tbraccd_card_type_vr%TYPE,
                            p_card_exp_date_vr     tbraccd.tbraccd_card_exp_date_vr%TYPE,
                            p_card_auth_number_vr  tbraccd.tbraccd_card_auth_number_vr%TYPE,
                            p_crossref_dcat_code   tbraccd.tbraccd_crossref_dcat_code%TYPE,
                            p_orig_chg_ind         tbraccd.tbraccd_orig_chg_ind%TYPE,
                            p_ccrd_code            tbraccd.tbraccd_ccrd_code%TYPE,
                            p_merchant_id          tbraccd.tbraccd_merchant_id%TYPE,
                            p_tax_rept_year        tbraccd.tbraccd_tax_rept_year%TYPE,
                            p_tax_rept_box         tbraccd.tbraccd_tax_rept_box%TYPE,
                            p_tax_amount           tbraccd.tbraccd_tax_amount%TYPE,
                            p_tax_future_ind       tbraccd.tbraccd_tax_future_ind%TYPE,
                            p_data_origin          tbraccd.tbraccd_data_origin%TYPE,
                            p_create_source        tbraccd.tbraccd_create_source%TYPE,
                            p_cpdt_ind             tbraccd.tbraccd_cpdt_ind%TYPE,
                            p_aidy_code            tbraccd.tbraccd_aidy_code%TYPE,
                            p_stsp_key_sequence    tbraccd.tbraccd_stsp_key_sequence%TYPE,
                            p_period               tbraccd.tbraccd_period%TYPE,
                            p_internal_record_id   VARCHAR2)

Register the attribute/value pairs to the message cache.
This signature registers the all parameters.

Parameters
p_pidm   Internal Identification Number of the person or non-person account, valid in SPRIDEN. NUMBER(8)
p_tran_number   Transaction number (one-up within entity) of the transaction. NUMBER(8)
p_term_code   Term associated with the transaction. For student transactions valid in STVTERM, or ARTERM for non-student transactions. VARCHAR2(6)
p_detail_code   Detail code associated with the transaction, valid in TBBDETC. VARCHAR2(4)
p_category_code   Category code used to group Detail Codes with similar usage.  From TBBDETC, valid in TTVDCAT. VARCHAR2(3)
p_user   User ID of the cashier who created the transaction. VARCHAR2(30)
p_entry_date   Entry date and time of the transaction, when initially created. DATE
p_amount   Amount of the transaction. . NUMBER(12,2)
p_balance   Balance remaining for the transaction, as adjusted by the application of payment process.  A negative balance is a credit on the account; a positive balance is a charge. NUMBER(12,2)
p_effective_date   Effective date of the transaction used to calculate amount due, determine placement on the bill, and control feed to finance system based on Accounts Receivable System Control setting. DATE
p_bill_date   Date that the transaction is billed. DATE
p_due_date   Due date set when the transaction is billed. DATE
p_desc   Free-Form description associated with the transaction.  Default value comes from the Detail Code description (TBBDETC). VARCHAR2(30)
p_receipt_number   Receipt number associated with the transaction, if generated when the transaction was created. NUMBER(8)
p_tran_number_paid   Transaction Number Paid is used in application of payment to force this transaction to liquidate a specific transaction on the account. NUMBER(8)
p_crossref_pidm   Cross Reference internal identification number for third party transactions.  For the third party account, refers to the associated student.  For the student account, refers to the third party, valid in SPRIDEN. NUMBER(8)
p_crossref_number   Cross Reference Number for third party transactions (contract number when source code is C), exemption credits (exemption number when source code is E), or deposits released (deposit transaction number when source code is D). NUMBER(8)
p_crossref_detail_code   Cross Reference Detail Code for contract or exemption credits calculated based on detail code rules, valid in TBBDETC. VARCHAR2(4)
p_srce_code   Source of the transaction when created on the account, including registration, housing, deposit, user entered, and so on.  The default value is user entered transaction (T), valid in TTVSRCE. VARCHAR2(1)
p_acct_feed_ind   Y - Feed transaction, F - Transaction fed, N - Do not feed transaction. VARCHAR2(1)
p_session_number   Cashier session number in which this transaction was posted (0 = current session). NUMBER(5)
p_cshr_end_date   End date and time of the cashiering session for this transaction. DATE
p_crn   Course Reference Number (CRN) of the course which generated the charge, when Track by CRN is used in Fee Assessment. VARCHAR2(5)
p_crossref_srce_code   Cross Reference Source for contract or exemption credits, valid in TTVSRCE. VARCHAR2(1)
p_loc_mdt   Location Management Type.  Valid values are M for monthly charges, T for term-based charges, or D for daily charges. VARCHAR2(1)
p_loc_mdt_seq   Location Management sequence in which monthly charges were added.  Used in subsequent processing to calculate adjustments. NUMBER(2)
p_rate   A per-unit rate used to calculate the amount. Optional for non-student transactions; not allowed for student transactions. NUMBER(12,6)
p_units   Number of Units is multiplied by the specified Rate to calculate the amount. Optional for non-student transactions; not allowed for student transactions. NUMBER(12,6)
p_document_number   Document number that references a source document for the transaction. VARCHAR2(8)
p_trans_date   Transaction date used by the finance system to control posting to the ledgers. DATE
p_payment_id   Free-Form information identifying a payment; often used to record check or credit card number. VARCHAR2(20)
p_invoice_number   Invoice Number identifies a group of charges invoiced via one statement. VARCHAR2(8)
p_statement_date   The date a statement was generated. DATE
p_inv_number_paid   Invoice Number Paid is used in application of payment to force a payment to liquidate a specific group of charges. VARCHAR2(8)
p_curr_code   Foreign currency code used when creating a payment, valid in GTVCURR and GURCURR. VARCHAR2(4)
p_exchange_diff   Exchange difference between a foreign currency amount as of the date entered and the value 1) as of the bill date when processed with Invoice Number Paid or 2) as of the charge transaction date when processed with Transaction Number Paid. NUMBER(12,2)
p_foreign_amount   Amount of the transaction stated in foreign currency. NUMBER(12,2)
p_late_dcat_code   Category of the late charge detail code, valid in TTVDCAT. VARCHAR2(3)
p_feed_date   Date this transaction was fed to the finance system. DATE
p_feed_doc_code   Document code used to feed this transaction to the finance system. VARCHAR2(8)
p_atyp_code   In combination with ATYP_SEQNO, the address where the bill for this transaction will be sent. Required for non-student transactions; not allowed for student transactions. Valid in STVATYP. VARCHAR2(2)
p_atyp_seqno   In combination with ATYP_CODE, the address where the bill for this transaction will be sent. Required for non-student transactions; not allowed for student transactions. Combination valid and active in SPRADDR. NUMBER(2)
p_card_type_vr   Credit Card Type used for Voice Response messages, valid in TTVCCRD. VARCHAR2(1)
p_card_exp_date_vr   Credit card expiration date supplied at time of credit card payment. DATE
p_card_auth_number_vr   Credit card authorization number received when transaction was processed. VARCHAR2(12)
p_crossref_dcat_code   Cross Reference Category Code for contract or exemption credits calculated based on category code rules, valid in TTVDCAT. VARCHAR2(3)
p_orig_chg_ind   Indicates that the transaction is to be considered as an original charge for the Title IV recalculation process, as opposed to subsequent adjustments due to withdrawal.  Valid values are Y (original) or null. VARCHAR2(1)
p_ccrd_code   Code identifying Credit Card Type used in authorizations via gateway, valid in GTVCCRD. VARCHAR2(10)
p_merchant_id   Merchant ID associated with the Process Name Code, Credit Card Type Code, and System Code.  The Merchant ID is included in the credit card payment request transmitted to the vendor handling credit card payments. VARCHAR2(20)
p_tax_rept_year   Tax Year in which the transaction was reported on form 1098-T. NUMBER(4)
p_tax_rept_box   Tax Report Box in which the transaction was reported on form 1098-T.  Values are CB - Qualified Charges Billed, AC - Adjustments to Prior Charges, SG - Scholarship or Grant, AS - Adjustments to Scholarship or Grant. VARCHAR2(2)
p_tax_amount   Tax Amount as reported on form 1098-T.  Sign relates pay type to report box, and may be pro-rated based on allocation rules. NUMBER(12,2)
p_tax_future_ind   Tax Report Future Indicator is valued with Y if the transaction was reported on form 1098-T as a term beginning in a future tax year, or null. VARCHAR2(1)
p_data_origin   Source system that last created or updated the data. VARCHAR2(30)
p_create_source   Source system that initially created the record. VARCHAR2(30)
p_cpdt_ind   Indicates that contract payment detail is used for application of a payment to contract charges. VARCHAR2(1)
p_aidy_code   The aid year associated with the Financial Aid disbursement. VARCHAR2(4)
p_stsp_key_sequence   Key sequence of the study path for the course registration. NUMBER(2)
p_period   The enrollment period code for Financial Aid disbursement. VARCHAR2(15)
p_internal_record_id   Database rowid. VARCHAR2(18)


p_valid_create

Procedure p_valid_create(lv_tbraccd_row_inout IN OUT tbraccd%ROWTYPE,
                         p_override_hold      VARCHAR2,
                         lv_dcat_code_out     OUT tbbdetc.tbbdetc_dcat_code%TYPE)

Validates data entered, sets defaults, and processes edits and security for insert.

Parameters
lv_tbraccd_rec_inout   TBRACCD record with parameter values entered, returned with additional data.
p_override_hold   Parameter to override Accounts Receivable hold. VARCHAR2(1)
N   Check for AR hold (default)
Y   Bypass hold checking

lv_dcat_code_out   Return category code to include value in published message. VARCHAR2(3)


p_valid_update

Procedure p_valid_update(lv_validation_rec_inout IN OUT tb_receivable.receivable_rec,
                         lv_existing_rec         tb_receivable.receivable_rec,
                         lv_dcat_code_out        OUT tbbdetc.tbbdetc_dcat_code%TYPE)

Validates data entered, and processes edits and comparisons for update.

Parameters
lv_validation_rec_inout   Proposed TBRACCD record with update values.
lv_existing_rec   Current TBRACCD record before updates.
lv_dcat_code_out   Return category code to include value in published message. VARCHAR2(3)