index

Package BANINST1.fp_invoice

Common Business interface for the composite entity INVOICE (FP_INVOICE).


Program units
f_api_version   Returns the API version number.
f_exists   Checks to see if an invoice exists in the database.
f_invoice_has_perm_tag   Returns Y if the invoice has fixed asset permanent tags associated with it.
p_cancel   Cancels a posted invoice and forwards it to the approved document table FOBAPPD.
p_complete   Completes an incomplete invoice and forwards it to the appropriate process.
p_copy   This procedure copies all the fields for the header, items and accounting records of an invoice into
p_copy_acctg_vic   This procedure copies acounting rows from a purchase order.
p_copy_po_item_acctg   This procedure copies item and accounting rows from a purchase order.
p_create_invoice_from_po   Procedure to create a new invoice with accounting data from an existing purchase order/blanket order.
p_copy_enc_item_acctg   Procedure to copy item and accounting data from an existing open general encumbrance into an existing Banner invoice.
p_create_invoice_from_enc   Procedure to create a new invoice with accounting data from an existing open general encumbrance.
p_create_pcard_invoices   Procedure to create invoices from bank procurement card transactions that have been loaded to the FABINVT and FARINVT tables.
p_create_refund_invoices   Procedure to create refund invoices from data that has been loaded into the GURAPAY table.
p_delete   Deletes an invoice from the database.
p_distribute   Procedure to distribute amount changes in the invoice items to the accounting sequences.
p_process_edit_rulp   Procedure to process Rule Class editing.
p_register_entity   Registers all the data for an invoice.
p_update_farinva_farintx   Procedure to calculate the cancel fiscal year, fiscal period and the cancellation rule classes, and update the invoice accounting and tax tables with these values.
p_validate_cancel   This procedure validates whether an invoice is eligible for cancellation.
p_validate_cancel_date   This procedure validates the cancel date and the cancel code for an invoice that is slated for cancellation.

Types
invoice_rec   Composite Business Entity record type representing a Banner Invoice.
invoice_ref   Invoice Entity cursor variable type
invoice_tab   Invoice Entity table type indexed by binary integer

Constants
M_ENTITY_NAME   Business Entity Name
M_BASE_TABLE_NAME   Base table name


M_ENTITY_NAME

M_ENTITY_NAME    CONSTANT VARCHAR2(14) := 'INVOICE';

Business Entity Name


M_BASE_TABLE_NAME

M_BASE_TABLE_NAME    CONSTANT VARCHAR2(7) := 'FABINVH';

Base table name


invoice_rec

TYPE invoice_rec IS RECORD (
  r_invoice_code            fabinvh.fabinvh_code%type,
  r_invoice_header_record   fb_invoice_header.invoice_header_rec,
  r_invoice_items_table     fb_invoice_item.invoice_item_tab,
  r_invoice_acctg_table     fb_invoice_acctg.invoice_acctg_tab,
  r_invoice_tax_table       fb_invoice_tax.invoice_tax_tab );

Composite Business Entity record type representing a Banner Invoice.

Parameters
r_invoice_code   The document number of the invoice represented by this record type.
r_invoice_header_record   PL/SQL record type holding one row of invoice header data.
r_invoice_items_table   PL/SQL table type holding all the items on this invoice.
r_invoice_acctg_table   PL/SQL table type holding all the accounting sequences on this invoices.
r_invoice_tax_table   PL/SQL table type holding all the tax rows on this invoice.


invoice_ref

TYPE invoice_ref IS REF CURSOR RETURN invoice_rec;

Invoice Entity cursor variable type


invoice_tab

TYPE invoice_tab IS TABLE OF invoice_rec INDEX BY BINARY_INTEGER;

Invoice Entity table type indexed by binary integer


f_api_version

Function f_api_version RETURN PLS_INTEGER

Returns the API version number.

Returns
Version of the API signature. Changes only when the signature changes.


f_exists

Function f_exists(p_code fabinvh.fabinvh_code%TYPE) RETURN VARCHAR2

Checks to see if an invoice exists in the database.

Parameters
p_code   The unique identifier of an Invoice document. VARCHAR2(8) Required Key

Returns
Y if found, otherwise N.


f_invoice_has_perm_tag

Function f_invoice_has_perm_tag(p_inv_code fabinvh.fabinvh_code%TYPE)
  RETURN VARCHAR2

Returns Y if the invoice has fixed asset permanent tags associated with it.

Parameters
p_inv_code   The invoice document number VARCHAR2(8) Required.


p_cancel

Procedure p_cancel(p_code                fabinvh.fabinvh_code%TYPE,
                   p_cancel_date         fabinvh.fabinvh_cancel_date%TYPE,
                   p_reestablish_payable VARCHAR2 DEFAULT 'N',
                   p_cancel_code         fabinvh.fabinvh_cancel_code%TYPE DEFAULT NULL,
                   p_user_id             fabinvh.fabinvh_user_id%TYPE DEFAULT gb_common.f_sct_user,
                   p_data_origin         fabinvh.fabinvh_data_origin%TYPE DEFAULT NULL,
                   p_cancel_mesg_out     OUT gb_common_strings.err_type)

Cancels a posted invoice and forwards it to the approved document table FOBAPPD.
This logic has been consolidated from FAAINVD.
The following edits and validation will occur.
   Invoice code should not be null
   Cancel date cannot be null
   Invoice document should exist.
   Invoice should have been completed, approved and posted
   Invoice should not have been paid either completely or partially
   Invoice has not been previously cancelled.
   Check run should not be in progress
   This invoice should not be part of the check run
   Reestablish indicator should be Y or N
   Cannot reestablish a recurring payable
   Attach timestamp to cancel date if the cancel date is today.
   Cancel date cannot be less than the transaction date.
   The cancel code is valid
   Cannot reestablish a recurring payable
 
The following tables will also be updated.
 
Invoice header table FABINVH
 FABINVH_CANCEL_IND to Y
 FABINVH_CANCEL_DATE to the user entered cancel date
 FABINVH_CANCEL_CODE to the user entered cancel code
 FABINVH_INVD_RE_ESTABLISH_IND to Y if invoice is to be re-established.
 
Available Balance Table FGBBAVL.
 
If it is a stores commodity then the following tables will also be modified
 FSRVALD
 FTVCOMM
 
If it is a recurring payable then the following table will be updated.
 FABRUIV
 
If this invoice is associated with a blanket order then the following table will be updated
 FPRBLAO
 
==========================================================================

Parameters
p_code   The unique identifier of the Invoice document to be cancelled.   VARCHAR2(8) Required Key
p_cancel_date   The date on which the cancellation is to be posted to the ledgers.  DATE.
p_reestablish_payable   Y - Indicates the invoice has to be reestablished. N - Invoice will not be reestablished. Will default to N. VARCHAR2(1)
p_cancel_code   The reason code validated from FTVCRSN to indicate the reason for cancellation. VARCHAR2(4)
p_user_id   The user ID of the user cancelling the invoice. VARCHAR2(30)
p_data_origin   The source of the update.
p_cancel_mesg_out   An OUT parameter that will have any warning or success message resulting from the processing.


p_complete

Procedure p_complete(p_code            fabinvh.fabinvh_code%TYPE,
                     p_user_id         fabinvh.fabinvh_user_id%TYPE DEFAULT gb_common.f_sct_user,
                     p_completion_ind  VARCHAR2 DEFAULT 'N',
                     p_success_msg_out OUT gb_common_strings.err_type,
                     p_error_msg_out   OUT gb_common_strings.err_type,
                     p_warn_msg_out    OUT gb_common_strings.err_type)

Completes an incomplete invoice and forwards it to the appropriate process.
Following are some of the validations that occur at completion time.
  All header required fields are populated.
  At least one commodity record exists.
  At least one accounting record exists.
  If commodity level, then each commodity should have at least one accounting record.
  All commodity lines are valid.
  All accounting lines are valid.
  Cannot complete a document having transactions in NSF status when approvals are on.
  Check the following for both input and converted amounts. For commodity level accounting, perform the edits for each commodity.
    Accounting amounts are equal to the commodity extended amounts.
    Accounting discount amounts equal to the commodity discount amounts.
    Accounting additional charge amounts equal to the commodity additional charge amounts.
    Accounting tax amounts equal to the commodity tax amounts.
  Percentages should add up to 100.
  Mix of Fixed Asset Accounts with Non-Fixed Asset Accounts will cause incomplete Fixed Asset record.
  If approvals are not on, calculate ftvcomm on order quantity for stores commodities.
  Add up rounding difference to the largest amount.
  If text exists for this invoice in fobtext, update the header text indicator to Y.
  If approvals are on, insert into fobuapp with the total of all farinva amounts.
  If defer edit is on, will insert into fobdinp.
  If approvals are set to override and all edits pass, insert into fobappd.

Parameters
p_code   The unique identifier of the Invoice document to be deleted.   VARCHAR2(8) Required Key
p_user_id   The user ID of the user completing the invoice. VARCHAR2(30)
p_completion_ind   The indicator to specify if the procedure should complete or keep the document in progress.
Y   Forward the document to posting or approval process after successful validation. If the validation fails, records will be in suspense.
N   Perform validation and keep the document in progress.

p_success_msg_out   The success message generated by the procedure.
p_error_msg_out   The error message generated by the procedure.
p_warn_msg_out   The warning message generated by the procedure.


p_copy

Procedure p_copy(p_code_from              fabinvh.fabinvh_code%TYPE,
                 p_code_to_inout          IN OUT fabinvh.fabinvh_code%TYPE,
                 p_user_id_to             fabinvh.fabinvh_user_id%TYPE DEFAULT gb_common.f_sct_user,
                 p_trans_date_to          DATE DEFAULT SYSDATE,
                 p_invoice_date_to        DATE DEFAULT SYSDATE,
                 p_pmt_due_date_to        DATE DEFAULT SYSDATE,
                 p_data_origin_to         fabinvh.fabinvh_data_origin%TYPE DEFAULT NULL,
                 p_invoice_prefix_type_to VARCHAR2 DEFAULT 'I')

This procedure copies all the fields for the header, items and accounting records of an invoice into
 another invoice with the passed in new code and transaction date.

Parameters
p_code_from   The invoice that is going to be copied.  VARCHAR2(8)
p_code_to_inout   The invoice document number for the new invoice. If null or NEXT, the document number will be generated.VARCHAR2(8)
p_user_id_to   The userid of the user invoking this copy function. VARCHAR2(30)
p_trans_date_to   The transaction date for the new invoice.  DATE
p_pmt_due_date_to   The payment due date for the new invoice. DATE
p_data_origin   The source of the data.   VARCHAR2(30)
p_invoice_prefix_type_to   The prefix character for the document code. VARCHAR2(1)


p_copy_acctg_vic

Procedure p_copy_acctg_vic(p_invh_code   FARINVA.FARINVA_INVH_CODE%TYPE,
                           p_pohd_code   FARINVA.FARINVA_POHD_CODE%TYPE,
                           p_item        FARINVA.FARINVA_ITEM%TYPE,
                           p_po_item     FARINVA.FARINVA_PO_ITEM%TYPE,
                           p_user_id     FARINVA.FARINVA_USER_ID%TYPE DEFAULT gb_common.f_sct_user,
                           p_data_origin FARINVA.FARINVA_DATA_ORIGIN%TYPE DEFAULT NULL)

This procedure copies acounting rows from a purchase order.
The invoice header and item must be created prior to invoking this procedure.

Parameters
p_invh_code   The invoice code that is being created. VARCHAR2(8)
p_pohd_code   The Purchase Order document number which is to be referenced on the Invoice. VARCHAR2(8)
p_item   The purchase order item that must be copied.  If this is left null, all items are copied.  NUMBER(4)
p_user_id   The unique identification code of the user who is creating this Invoice document. VARCHAR2(30) Required
p_data_origin   Source system that generated the data. VARCHAR2(30)


p_copy_po_item_acctg

Procedure p_copy_po_item_acctg(p_invh_code     FABINVH.FABINVH_CODE%TYPE,
                               p_vend_inv_code farinvc.farinvc_vend_inv_code%TYPE DEFAULT NULL,
                               p_vend_inv_date farinvc.farinvc_vend_inv_date%TYPE DEFAULT NULL,
                               p_user_id       fabinvh.fabinvh_user_id%TYPE DEFAULT gb_common.f_sct_user,
                               p_data_origin   fabinvh.fabinvh_data_origin%TYPE DEFAULT NULL,
                               p_item          FARINVC.FARINVC_ITEM%TYPE default null)

This procedure copies item and accounting rows from a purchase order.  It can copy all items if not item number is supplied or a single specific item if item is specified.  The invoice header must be created prior to invoking this procedure.

Parameters
p_invh_code   The invoice code that is being created. VARCHAR2(8)
p_vend_inv_code   The Invoice number as supplied by the vendor for this invoice item. VARCHAR2(15)
p_vend_inv_date   The date of the invoice sent by the vendor. DATE
p_user_id   The unique identification code of the user who is creating this Invoice document. VARCHAR2(30) Required
p_data_origin   Source system that generated the data. VARCHAR2(30)
p_item   The purchase order item that must be copied.  If this is left null, all items are copied.  NUMBER(4)


p_create_invoice_from_po

Procedure p_create_invoice_from_po(p_invoice_code_inout  IN OUT fabinvh.fabinvh_code%TYPE,
                                   p_invoice_prefix_type fobseqn.fobseqn_seqno_type%TYPE DEFAULT fb_invoice_header.M_DOC_SEQNO_TYPE,
                                   p_pohd_code           fabinvh.fabinvh_pohd_code%TYPE DEFAULT NULL,
                                   p_user_id             fabinvh.fabinvh_user_id%TYPE DEFAULT gb_common.f_sct_user,
                                   p_vend_inv_code       fabinvh.fabinvh_vend_inv_code%TYPE DEFAULT NULL,
                                   p_invoice_date        fabinvh.fabinvh_invoice_date%TYPE DEFAULT NULL,
                                   p_pmt_due_date        fabinvh.fabinvh_pmt_due_date%TYPE DEFAULT NULL,
                                   p_trans_date          fabinvh.fabinvh_trans_date%TYPE DEFAULT NULL,
                                   p_cr_memo_ind         fabinvh.fabinvh_cr_memo_ind%TYPE DEFAULT 'N',
                                   p_bank_code           fabinvh.fabinvh_bank_code%TYPE DEFAULT NULL,
                                   p_data_origin         fabinvh.fabinvh_data_origin%TYPE DEFAULT NULL,
                                   p_error_message_out   OUT gb_common_strings.err_type)

Procedure to create a new invoice with accounting data from an existing purchase order/blanket order.

Parameters
p_invoice_code_inout   The unique identifier of an Invoice document.  The code may be system-generated. VARCHAR2(8) Required Key
p_invoice_prefix_type   If the invoice document number is to be system-generated from the FOBSEQN table, then the internal prefix to identify the FOBSEQN row based on which the new invoice code will be generated.
p_pohd_code   The Purchase Order document number which is to be referenced on the Invoice. VARCHAR2(8)
p_user_id   The unique identification code of the user who is creating this Invoice document. VARCHAR2(30) Required
p_vend_inv_code   The Invoice number as supplied by the vendor. VARCHAR2(15)
p_invoice_date   A user-defined or system-generated Invoice date.  Basis of calculated Payment Due Date if terms/discount are used. DATE
p_pmt_due_date   The date an Invoice is due. Can be user-defined or calculated based on Invoice terms/discount. DATE
p_trans_date   The date the invoice document will be recorded in the ledgers. DATE
p_cr_memo_ind   Indicates that the Invoice should be processed as a Credit Memo. If Y, the payment will be recorded as a Credit Memo. VARCHAR2(1) Required
p_data_origin   Source system that generated the data. VARCHAR2(30)
p_error_message_out   Any error message generated by the creation of invoice. VARCHAR2


p_copy_enc_item_acctg

Procedure p_copy_enc_item_acctg(p_invoice_code fabinvh.fabinvh_code%TYPE,
                                p_user_id      fabinvh.fabinvh_user_id%TYPE DEFAULT gb_common.f_sct_user,
                                p_data_origin  fabinvh.fabinvh_data_origin%TYPE DEFAULT NULL)

Procedure to copy item and accounting data from an existing open general encumbrance into an existing Banner invoice.

Parameters
p_invoice_code   The unique identifier of an Invoice document.  VARCHAR2(8) Required Key
p_user_id   The unique identification code of the user who is updating this Invoice document. VARCHAR2(30) Required
p_data_origin   Source system that generated the data. VARCHAR2(30)


p_create_invoice_from_enc

Procedure p_create_invoice_from_enc(p_invoice_code_inout    IN OUT fabinvh.fabinvh_code%TYPE,
                                    p_invoice_prefix_type   fobseqn.fobseqn_seqno_type%TYPE DEFAULT fb_invoice_header.M_DOC_SEQNO_TYPE,
                                    p_encumbrance_code      fabinvh.fabinvh_pohd_code%TYPE DEFAULT NULL,
                                    p_vend_pidm             fabinvh.fabinvh_vend_pidm%TYPE DEFAULT NULL,
                                    p_user_id               fabinvh.fabinvh_user_id%TYPE DEFAULT gb_common.f_sct_user,
                                    p_vend_inv_code         fabinvh.fabinvh_vend_inv_code%TYPE DEFAULT NULL,
                                    p_invoice_date          fabinvh.fabinvh_invoice_date%TYPE DEFAULT NULL,
                                    p_pmt_due_date          fabinvh.fabinvh_pmt_due_date%TYPE DEFAULT NULL,
                                    p_trans_date            fabinvh.fabinvh_trans_date%TYPE DEFAULT NULL,
                                    p_cr_memo_ind           fabinvh.fabinvh_cr_memo_ind%TYPE DEFAULT 'N',
                                    p_atyp_code             fabinvh.fabinvh_atyp_code%TYPE DEFAULT NULL,
                                    p_atyp_seq_num          fabinvh.fabinvh_atyp_seq_num%TYPE DEFAULT NULL,
                                    p_bank_code             fabinvh.fabinvh_bank_code%TYPE DEFAULT NULL,
                                    p_one_time_vend_name    fabinvh.fabinvh_one_time_vend_name%TYPE DEFAULT NULL,
                                    p_one_time_house_number fabinvh.fabinvh_one_time_house_number%TYPE DEFAULT NULL,
                                    p_one_time_vend_addr1   fabinvh.fabinvh_one_time_vend_addr1%TYPE DEFAULT NULL,
                                    p_one_time_vend_addr2   fabinvh.fabinvh_one_time_vend_addr2%TYPE DEFAULT NULL,
                                    p_one_time_vend_addr3   fabinvh.fabinvh_one_time_vend_addr3%TYPE DEFAULT NULL,
                                    p_one_time_vend_addr4   fabinvh.fabinvh_one_time_vend_addr4%TYPE DEFAULT NULL,
                                    p_one_time_vend_city    fabinvh.fabinvh_one_time_vend_city%TYPE DEFAULT NULL,
                                    p_one_time_vend_state   fabinvh.fabinvh_one_time_vend_state%TYPE DEFAULT NULL,
                                    p_one_time_vend_zip     fabinvh.fabinvh_one_time_vend_zip%TYPE DEFAULT NULL,
                                    p_one_time_vend_natn    fabinvh.fabinvh_one_time_vend_natn%TYPE DEFAULT NULL,
                                    p_data_origin           fabinvh.fabinvh_data_origin%TYPE DEFAULT NULL,
                                    p_error_message_out     OUT gb_common_strings.err_type)

Procedure to create a new invoice with accounting data from an existing open general encumbrance.

Parameters
p_invoice_code_inout   The unique identifier of an Invoice document.  The code may be system-generated. VARCHAR2(8) Required Key
p_invoice_prefix_type   If the invoice document number is to be system-generated from the FOBSEQN table, then the internal prefix to identify the FOBSEQN row based on which the new invoice code will be generated.
p_encumbrance_code   The General Encumbrance document number which is to be referenced on the Invoice. VARCHAR2(8)
p_vend_pidm   The unique internal identification number of the Invoice vendor. NUMBER(8)
p_user_id   The unique identification code of the user who is creating this Invoice document. VARCHAR2(30) Required
p_vend_inv_code   The Invoice number as supplied by the vendor. VARCHAR2(15)
p_invoice_date   A user-defined or system-generated Invoice date.  Basis of calculated Payment Due Date if terms/discount are used. DATE
p_pmt_due_date   The date an Invoice is due. Can be user-defined or calculated based on Invoice terms/discount. DATE
p_trans_date   The date the invoice document will be recorded in the ledgers. DATE
p_cr_memo_ind   Indicates that the Invoice should be processed as a Credit Memo. If Y, the payment will be recorded as a Credit Memo. VARCHAR2(1) Required
p_atyp_code   Used to identify the vendor address type to which the payment will be made. When using Check Vendor this value will be the address type for the vendor defined in FABINVH_VEND_CHECK_PIDM. VARCHAR2(2)
p_atyp_seq_num   Used to identify the vendor address type sequence to which the payment will be made. When using Check Vendor this value will be the address type sequence for the vendor defined in FABINVH_VEND_CHECK_PIDM. NUMBER(2)
p_bank_code   The Bank Code (as defined in table GXVBANK) to be used for processing the payment of the Invoice. VARCHAR2(2)
p_one_time_vend_name   Name for use with One Time Vendor. VARCHAR2(60)
p_one_time_house_number   House Number for use with One Time Vendor. VARCHAR2(10)
p_one_time_vend_addr1   Address Line 1 for use with One Time Vendor. VARCHAR2(75)
p_one_time_vend_addr2   Address Line 2 for use with One Time Vendor. VARCHAR2(75)
p_one_time_vend_addr3   Address Line 3 for use with One Time Vendor. VARCHAR2(75)
p_one_time_vend_addr4   Address Line 4 for use with One Time Vendor. VARCHAR2(75)
p_one_time_vend_city   City for use with One Time Vendor. VARCHAR2(20)
p_one_time_vend_state   State or Province for use with One Time Vendor. VARCHAR2(3)
p_one_time_vend_zip   Zip or Postal Code for use with One Time Vendor. VARCHAR2(10)
p_one_time_vend_natn   Nation for use with One Time Vendor. VARCHAR2(5)
p_data_origin   Source system that generated the data. VARCHAR2(30)
p_error_message_out   Any error message generated by the creation of invoice. VARCHAR2


p_create_pcard_invoices

Procedure p_create_pcard_invoices(p_system_id        fabinvt.fabinvt_system_id%TYPE,
                                  p_feed_sweep_date  fabinvt.fabinvt_feed_sweep_date%TYPE,
                                  p_trans_date       DATE,
                                  p_bank_code        gxvbank.gxvbank_bank_code%TYPE,
                                  p_data_origin      VARCHAR2,
                                  p_success_mesg_out OUT gb_common_strings.err_type)

Procedure to create invoices from bank procurement card transactions that have been loaded to the FABINVT and FARINVT tables.
This procedure contains the business logic that is currently in the fapinvt process.

Parameters
p_system_id   Contains the system identifier from which the transaction originated.  Must be identified in FTVSDAT. VARCHAR2(8) Required Key
p_feed_sweep_date   The date that the pcard transactions are to be pushed into Banner Finance via the FAPINVT process. The date is calculated as the date the bank tape was processed plus a specified number of lag business days that gives the account managers enough time to review and make any correcting entries.  The lag days are identified on ftvcard. This becomes the Invoice Transaction Date used to post the Invoice in Finance. DATE
p_trans_date   The transaction date on which the invoice should be created in case the feed sweep date is not appropriate DATE
p_bank_code   The default bank code to be used for the invoices for those funds that do not have bank codes associated with it.
p_data_origin   The source of the creation
p_success_mesg_out   If the procedure is successful, this will return a success message.


p_create_refund_invoices

Procedure p_create_refund_invoices(p_bank_code        gxvbank.gxvbank_bank_code%TYPE,
                                   p_data_origin      VARCHAR2,
                                   p_success_mesg_out OUT gb_common_strings.err_type)

Procedure to create refund invoices from data that has been loaded into the GURAPAY table.
This procedure contains the business logic that is currently in the furapay process.

Parameters
p_bank_code   The bank code that will be defaulted into the invoice when the fund does not have a default bank associated with it. VARCHAR2(2)
p_data_origin   The source of the creation.  VARCHAR2(30)
p_success_mesg_out   If the procedure is successful, this will return a success message. VARCHAR2


p_delete

Procedure p_delete(p_code            fabinvh.fabinvh_code%TYPE,
                   p_user_id         fabinvh.fabinvh_user_id%TYPE DEFAULT gb_common.f_sct_user,
                   p_delete_mesg_out OUT gb_common_strings.err_type)

Deletes an invoice from the database. Will delete only incomplete invoices.
Completed invoices can only be disapproved or cancelled after posting to the ledgers.

Parameters
p_code   The unique identifier of the Invoice document to be deleted.   VARCHAR2(8) Required Key
p_user_id   The user ID of the user deleting the invoice. VARCHAR2(30)


p_distribute

Procedure p_distribute(p_invoice_code fabinvh.fabinvh_code%TYPE,
                       p_user_id      fabinvh.fabinvh_user_id%TYPE DEFAULT gb_common.f_sct_user,
                       p_item         farinvc.farinvc_item%TYPE DEFAULT NULL)

Procedure to distribute amount changes in the invoice items to the accounting sequences.
  The invoice form currently executes similar distribution logic
  when a user has modified amounts in the item block and then does a next block. The form distributes the
  changes and the does the wrap up logic to take the user to the completion page.

Parameters
p_invoice_code   The unique identifier of an Invoice document. VARCHAR2(8) Required Key
p_user_id   The user ID of the user deleting the invoice. VARCHAR2(30)
p_item   The unique sequence number directly associated with an invoice commodity record. NUMBER(4) Required Key. This parameter should be valued only if the invoice has commodity level accounting. For document level accounting all item amounts will get distributed.


p_process_edit_rulp

Procedure p_process_edit_rulp(p_rucl_code              farinva.farinva_rucl_code%TYPE,
                              p_trans_date             fabinvh.fabinvh_trans_date%TYPE,
                              p_doc_num                fabinvh.fabinvh_code%TYPE,
                              p_submission_number      fabinvh.fabinvh_submission_number%TYPE,
                              p_item                   farinva.farinva_item%TYPE,
                              p_seq_num                farinva.farinva_seq_num%TYPE,
                              p_user_id                farinva.farinva_user_id%TYPE,
                              p_reversal_ind           fabinvh.fabinvh_cancel_ind%TYPE,
                              p_fsyr_code_in_out       IN OUT farinva.farinva_fsyr_code%TYPE,
                              p_trans_amt_in_out       IN OUT farinva.farinva_appr_amt%TYPE,
                              p_dr_cr_ind_in_out       IN OUT VARCHAR2,
                              p_acci_code_in_out       IN OUT farinva.farinva_acci_code%TYPE,
                              p_coas_code_in_out       IN OUT farinva.farinva_coas_code%TYPE,
                              p_fund_code_in_out       IN OUT farinva.farinva_fund_code%TYPE,
                              p_orgn_code_in_out       IN OUT farinva.farinva_orgn_code%TYPE,
                              p_acct_code_in_out       IN OUT farinva.farinva_acct_code%TYPE,
                              p_prog_code_in_out       IN OUT farinva.farinva_prog_code%TYPE,
                              p_actv_code_in_out       IN OUT farinva.farinva_actv_code%TYPE,
                              p_locn_code_in_out       IN OUT farinva.farinva_locn_code%TYPE,
                              p_bank_code_in_out       IN OUT farinva.farinva_bank_code%TYPE,
                              p_vendor_pidm_in_out     IN OUT fabinvh.fabinvh_vend_pidm%TYPE,
                              p_encb_num_in_out        IN OUT farinva.farinva_pohd_code%TYPE,
                              p_encd_item_num_in_out   IN OUT farinva.farinva_po_item%TYPE,
                              p_encd_seq_num_in_out    IN OUT farinva.farinva_seq_num%TYPE,
                              p_encb_action_ind_in_out IN OUT farinva.farinva_partial_liq_ind%TYPE,
                              p_prjd_code_in_out       IN OUT farinva.farinva_proj_code%TYPE,
                              p_posting_period_in_out  IN OUT farinva.farinva_period%TYPE,
                              p_curr_code_in_out       IN OUT fabinvh.fabinvh_curr_code%TYPE,
                              p_err_tab_in_out         IN OUT fb_common.err_tabtype)

Procedure to process Rule Class editing.
 
Transactions are reviewed according to user defined edits in the Rule Class Edit table (FTVEDIT) and system defined edits for the associated processes in the Rule Class Validation table (FTVRULP).
 
Defaulted values may be returned from the Rule Class Edits where defined.

Parameters
p_rucl_code   The user-entered rule class (as defined in table FTVRUCL) for the invoice accounting sequence. VARCHAR2(4)
p_trans_date   The date the invoice document will be recorded in the ledgers. DATE
p_doc_num   The unique identifier of a invoice document. VARCHAR2(8)
p_submission_number   The submission number associated with the invoice document. NUMBER(2)
p_seq_num   A one-up sequence number associated with each line of a invoice accounting sequence. NUMBER(4)
p_fsyr_code   The fiscal year code (as defined in table FTVFSYR) to be used when posting the transaction to the ledgers. VARCHAR2(2)
p_user_id   The identification code of the user who last updated the invoice accounting sequence. VARCHAR2(30)
p_reversal_ind   An indicator which displays a value of "Y" if the invoice is being cancelled. VARCHAR2(1)
p_trans_amt_in_out   The amount of the invoice accounting sequence. NUMBER(17,2)
p_dr_cr_ind_in_out   Indicates whether an invoice is a credit memo or not VARCHAR2(1)
p_acci_code_in_out   The Index Code (as defined in table FTVACCI) that may be entered to default various accounting elements. VARCHAR2(6)
p_coas_code_in_out   The Chart of Accounts code (as defined in table FTVCOAS) referenced by the invoice accounting sequence. VARCHAR2(1)
p_fund_code_in_out   The Fund Code (as defined in table FTVFUND) referenced by the invoice accounting sequence. VARCHAR2(6)
p_orgn_code_in_out   The Organization Code (as defined in table FTVORGN) referenced by the invoice accounting sequence. VARCHAR2(6)
p_acct_code_in_out   The Account Code (as defined in table FTVACCT) referenced by the invoice accounting sequence. VARCHAR2(6)
p_prog_code_in_out   The Program Code (as defined in table FTVPROG) referenced by the invoice accounting sequence. VARCHAR2(6)
p_actv_code_in_out   The Activity Code (as defined in table FTVACTV) referenced by the invoice accounting sequence. VARCHAR2(6)
p_locn_code_in_out   The Location Code (as defined in table FTVLOCN) referenced by the invoice accounting sequence. VARCHAR2(6)
p_bank_code_in_out   The Bank Code (as defined in table GXVBANK) referenced by the invoice accounting sequence. VARCHAR2(2)
p_vendor_pidm_in_out   The personal identification master record (PIDM) associated with the vendor referenced on the invoice. NUMBER(8)
p_encb_num_in_out   The encumbrance number, if the invoice references an existing encumbrance. VARCHAR2(8)
p_encd_item_num_in_out   The encumbrance item number, if the invoice references an existing encumbrance. NUMBER(4)
p_encd_seq_num_in_out   The sequence number associated with an encumbrance item number. NUMBER(4)
p_encb_action_ind_in_out   Indicates the action to be taken on the encumbrance number, item, and sequence number. VARCHAR2(1)
p_posting_period_in_out   The fiscal period (as defined in table FTVFSPD) to be used when posting the transaction to the ledgers. VARCHAR2(2)
p_curr_code_in_out   The currency (as defined in table GTVCURR) to be used for the processing of the invoice accounting. VARCHAR2(4)
p_err_tab_in_out   A collection of error messages resulting from the editing of the transaction. fb_common.err_tabtype


p_register_entity

Procedure p_register_entity(p_code           fabinvh.fabinvh_code%TYPE,
                            p_operation_type NUMBER DEFAULT gb_event.create_operation)

Registers all the data for an invoice.

Parameters
p_code   The unique identifier of the Invoice document to be deleted.   VARCHAR2(8) Required Key
p_operation_type   The type of change done to the invoice.  Values are
1   - Creating an invoice
2   - Updating an invoice
3   - Deleting an invoice



p_update_farinva_farintx

Procedure p_update_farinva_farintx(p_invh_code      farinva.farinva_invh_code%TYPE,
                                   p_cancel_date    DATE,
                                   p_cancel_user_id VARCHAR2)

Procedure to calculate the cancel fiscal year, fiscal period and the cancellation rule classes, and update the invoice accounting and tax tables with these values.

Parameters
p_invh_code   The unique identifier of the Invoice document to be cancelled. VARCHAR2(8) Required.
p_cancel_date   The date on which the cancellation is to be posted to the ledgers.  DATE.
p_cancel_user_id   The user ID of the user cancelling the invoice. VARCHAR2(30)


p_validate_cancel

Procedure p_validate_cancel(p_code                fabinvh.fabinvh_code%TYPE,
                            p_cancel_date         fabinvh.fabinvh_cancel_date%TYPE,
                            p_reestablish_payable VARCHAR2 DEFAULT 'N',
                            p_cancel_code         fabinvh.fabinvh_cancel_code%TYPE DEFAULT NULL,
                            p_user_id             fabinvh.fabinvh_user_id%TYPE DEFAULT gb_common.f_sct_user,
                            p_error_mesg_out      OUT gb_common_strings.err_type)

This procedure validates whether an invoice is eligible for cancellation.

Parameters
p_code   The unique identifier of the Invoice document to be cancelled.   VARCHAR2(8) Required Key
p_cancel_date   The date on which the cancellation is to be posted to the ledgers.  DATE.
p_reestablish_payable   Y - Indicates that the invoice has to be reestablished. N - Invoice will not be reestablished. Will default to N. VARCHAR2(1)
p_cancel_code   The reason code validated from FTVCRSN to indicate the reason for cancellation. VARCHAR2(4)
p_user_id   The user ID of the user cancelling the invoice. VARCHAR2(30)
p_error_mesg_out   An OUT parameter that will have any warning/success message resulting from the processing.


p_validate_cancel_date

Procedure p_validate_cancel_date(p_trans_date     fabinvh.fabinvh_trans_date%TYPE,
                                 p_cancel_date    fabinvh.fabinvh_Cancel_date%TYPE,
                                 p_cancel_code    fabinvh.fabinvh_cancel_code%TYPE,
                                 p_error_mesg_out OUT gb_common_strings.err_type)

This procedure validates the cancel date and the cancel code for an invoice that is slated for cancellation. The cancellation form FAAINVD invokes this procedure before the invoice can be cancelled.

Parameters
p_trans_date   The transaction date of the posted invoice that has to be cancelled. DATE
p_cancel_date   The date on which the cancellation is to be posted to the ledgers.  DATE.
p_cancel_code   The reason code validated from FTVCRSN to indicate the reason for cancellation. VARCHAR2(4)
p_error_mesg_out   An OUT parameter that will have any warning/success message resulting from the processing