Package BANINST1.fb_invoice_acctg_rules Support subprograms for the Invoice Accounting API (fb_invoice_acctg). |
Program units |
p_register_entity | Register the attribute value pairs to the message cache for delete operations. |
p_register_entity | Register the attribute/value pairs to the message cache for create and update operations. |
f_get_liquidation_type | Function that retrieves the liquidation type for a Purchase Order and Invoice referencing it. |
f_get_commitment_type | Function that retrieves the liquidation type for a Purchase Order and Invoice referencing it. |
p_valid_create | Validates the entered data for create of an invoice accounting record. |
p_valid_delete | Validates that an invoice accounting row can be deleted from the FARINVA table. |
p_valid_update | Validates the entered data for update of an invoice accounting record. |
p_validate_mandatory | Validates that all the mandatory fields are valued. |
p_register_entity
Procedure p_register_entity(p_operation_type NUMBER, p_internal_record_id Gb_Common.internal_record_id_type)
Register the attribute value pairs to the message cache for delete operations.
This signature uses the ROWID only, for the delete operations.
Parameters |
p_operation_type |
Type of DML operation: create,update,delete. NUMBER Required | |
p_internal_record_id |
Database ROWID VARCHAR2(18) required |
p_register_entity
Procedure p_register_entity(p_operation_type NUMBER, 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_seq_num farinva.farinva_seq_num%TYPE, p_user_id farinva.farinva_user_id%TYPE DEFAULT Gb_Common.f_sct_user, p_fsyr_code farinva.farinva_fsyr_code%TYPE, p_period farinva.farinva_period%TYPE, p_eoy_accr_status_ind farinva.farinva_eoy_accr_status_ind%TYPE, p_rucl_code farinva.farinva_rucl_code%TYPE, p_disc_rucl_code farinva.farinva_disc_rucl_code%TYPE, p_tax_rucl_code farinva.farinva_tax_rucl_code%TYPE, p_addl_rucl_code farinva.farinva_addl_rucl_code%TYPE, p_coas_code farinva.farinva_coas_code%TYPE, p_acci_code farinva.farinva_acci_code%TYPE, p_fund_code farinva.farinva_fund_code%TYPE, p_orgn_code farinva.farinva_orgn_code%TYPE, p_acct_code farinva.farinva_acct_code%TYPE, p_prog_code farinva.farinva_prog_code%TYPE, p_actv_code farinva.farinva_actv_code%TYPE, p_locn_code farinva.farinva_locn_code%TYPE, p_bank_code farinva.farinva_bank_code%TYPE, p_invd_amt farinva.farinva_invd_amt%TYPE, p_disc_amt farinva.farinva_disc_amt%TYPE, p_tax_amt farinva.farinva_tax_amt%TYPE, p_addl_chrg_amt farinva.farinva_addl_chrg_amt%TYPE, p_appr_amt farinva.farinva_appr_amt%TYPE, p_prev_paid_amt farinva.farinva_prev_paid_amt%TYPE, p_nsf_override_ind farinva.farinva_nsf_override_ind%TYPE, p_ityp_seq_code farinva.farinva_ityp_seq_code%TYPE, p_proj_code farinva.farinva_proj_code%TYPE, p_susp_ind farinva.farinva_susp_ind%TYPE, p_nsf_susp_ind farinva.farinva_nsf_susp_ind%TYPE, p_partial_liq_ind farinva.farinva_partial_liq_ind%TYPE, p_appr_ind farinva.farinva_appr_ind%TYPE, p_open_paid_ind farinva.farinva_open_paid_ind%TYPE, p_convert_amt farinva.farinva_convert_amt%TYPE, p_convert_disc_amt farinva.farinva_convert_disc_amt%TYPE, p_convert_tax_amt farinva.farinva_convert_tax_amt%TYPE, p_convert_addl_chrg_amt farinva.farinva_convert_addl_chrg_amt%TYPE, p_appr_amt_pct farinva.farinva_appr_amt_pct%TYPE, p_disc_amt_pct farinva.farinva_disc_amt_pct%TYPE, p_addl_amt_pct farinva.farinva_addl_amt_pct%TYPE, p_tax_amt_pct farinva.farinva_tax_amt_pct%TYPE, p_cap_amt farinva.farinva_cap_amt%TYPE, p_data_origin farinva.farinva_data_origin%TYPE, p_internal_record_id Gb_Common.internal_record_id_type)
Register the attribute/value pairs to the message cache for create and update operations.
This signature registers all the parameters.
Parameters |
p_operation_type |
Type of DML operation: create,update,delete. NUMBER Required | |
p_invh_code |
The unique identifier of an Invoice document. VARCHAR2(8) Required Key | |
p_pohd_code |
The Purchase Order or General Encumbrance document number which is referenced on the Invoice, if any. Only populated for Regular or General Encumbrance Invoice types. VARCHAR2(8) | |
p_item |
The reference number which associates an invoice accounting record to the related invoice commodity item. If 0, then invoice accounting record applies to all invoice commodity items (Document Level Accounting). If not 0, then invoice accounting record applies to the invoice commodity item of that number (Commodity Level Accounting). NUMBER(4) Required Key | |
p_po_item |
The item number of the Purchase Order that is referenced by this invoice item. NUMBER(4) | |
p_seq_num |
The system-generated unique number associated with the Item Number of the accounting record. NUMBER(4) Required Key | |
p_user_id |
The unique identification code of the user who last updated the Invoice document. VARCHAR2(30) Required | |
p_fsyr_code |
The fiscal year code (as defined in table FTVFSYR) that is derived from the transaction date on the invoice. The invoice transactions will post to the ledgers in this fiscal year. VARCHAR2(2) | |
p_period |
The fiscal period (as defined in table FTVFSPD) that is derived from the transaction date on the invoice. The invoice transactions will post to the ledgers in this fiscal period of the fiscal year. VARCHAR2(2) | |
p_eoy_accr_status_ind |
Derived status of the accrual period for the entered fiscal year. If Y then accrual posting will be allowed. This value is populated by the payment process for use in payment posting. VARCHAR2(1) | |
p_rucl_code |
The rule class associated with the Approved amount. VARCHAR2(4) Required | |
p_disc_rucl_code |
The rule class associated with the Discount amount. VARCHAR2(4) | |
p_tax_rucl_code |
The rule class associated with the Tax amount. VARCHAR2(4) | |
p_addl_rucl_code |
The rule class associated with the Additional amount. VARCHAR2(4) | |
p_coas_code |
The Chart of Accounts code (as defined in table FTVCOAS) referenced by the invoice transactions. VARCHAR2(1) | |
p_acci_code |
The Index Code (as defined in table FTVACCI) that may be entered to default various accounting elements. VARCHAR2(6) | |
p_fund_code |
The Fund Code (as defined in table FTVFUND) referenced by the invoice transactions. VARCHAR2(6) | |
p_orgn_code |
The Organization Code (as defined in table FTVORGN) referenced by the invoice transactions. VARCHAR2(6) | |
p_acct_code |
The Account Code (as defined in table FTVACCT) referenced by the invoice transactions. May default from the Commodity Code. VARCHAR2(6) | |
p_prog_code |
The Program Code (as defined in table FTVPROG) referenced by the invoice transactions. VARCHAR2(6) | |
p_actv_code |
The Activity Code (as defined in table FTVACTV) referenced by the invoice transactions. VARCHAR2(6) | |
p_locn_code |
The Location Code (as defined in table FTVLOCN) referenced by the invoice transactions. VARCHAR2(6) | |
p_bank_code |
The Bank Code (as defined from table GXVBANK) to be used for processing the payment of the Invoice. This value may default from the Fund Code. VARCHAR2(2) | |
p_invd_amt |
This field is reserved for FURAPAY and PCARD processing. NUMBER(17,2) | |
p_disc_amt |
The discount amount to be distributed to this invoice accounting record. NUMBER(17,2) | |
p_tax_amt |
The tax amount to be distributed to this invoice accounting record. NUMBER(17,2) | |
p_addl_chrg_amt |
The additional amount to be distributed to this invoice accounting record. NUMBER(17,2) | |
p_appr_amt |
The approved amount to be distributed to this invoice accounting record. NUMBER(17,2) | |
p_prev_paid_amt |
The amount is populated with FARINVA_APPR_AMT during payment. NUMBER(17,2) | |
p_nsf_override_ind |
This indicator permits authorized users on the form FOMPROF to bypass a non-sufficient funds condition. VARCHAR2(1) | |
p_ityp_seq_code |
The internal value which represents the user selected income type (as defined in table FTVITYP) for 1099 processing and reporting purposes. Defaults from vendor record (as defined on FTVVEND). NUMBER(2) | |
p_proj_code |
The Project Code (as defined in table FTVPROJ) affected by the invoice transactions. This code is used for Cost Accounting purposes. VARCHAR2(8) | |
p_susp_ind |
Indicates to the user that an item is being held in suspense due to missing or erroneous data content. VARCHAR2(1) Required | |
p_nsf_susp_ind |
Indicates that an item is being held in suspense due to a non-sufficient funds condition. VARCHAR2(1) Required | |
p_partial_liq_ind |
Indicates if related PO item was final liquidated and closed. If T, then final liquidation was processed. VARCHAR2(1) | |
p_appr_ind |
Indicates if the document has been approved. If Y, the invoice accounting record has received final approval. VARCHAR2(1) | |
p_open_paid_ind |
Indicates that the item is Open or Paid. Valid values are O for open or P for paid. During payment the indicator will be updated to P. VARCHAR2(1) | |
p_convert_amt |
The approved amount (as entered in FARINVA_APPR_AMT) is calculated against the exchange rate of the currency code to derive this amount, in base currency. NUMBER(17,2) | |
p_convert_disc_amt |
The discount amount (as entered in FARINVA_DISC_AMT) is calculated against the exchange rate of the currency code to derive this amount, in base currency. NUMBER(17,2) | |
p_convert_tax_amt |
The tax amount (as entered in FARINVA_TAX_AMT) is calculated against the exchange rate of the currency code to derive this amount, in base currency. NUMBER(17,2) | |
p_convert_addl_chrg_amt |
The additional amount (as entered in FARINVA_ADDL_AMT) is calculated against the exchange rate of the currency code to derive this amount, in base currency. NUMBER(17,2) | |
p_appr_amt_pct |
The percentage of the approved amount for the commodity item/document to be distributed to this invoice accounting record. This amount is also derived if no percentage is entered. NUMBER(21,16) | |
p_disc_amt_pct |
The percentage of the discount amount for the commodity item/document to be distributed to this invoice accounting record. This amount is also derived if no percentage is entered. NUMBER(21,16) | |
p_addl_amt_pct |
The percentage of the additional amount for the commodity item/document to be distributed to this invoice accounting record. This amount is also derived if no percentage is entered. NUMBER(21,16) | |
p_tax_amt_pct |
The percentage of the tax amount for the commodity item/document to be distributed to this invoice accounting record. This amount is also derived if no percentage is entered. NUMBER(21,16) | |
p_cap_amt |
The calculated amount for use in the capitalization process for this item. NUMBER(17,2) | |
p_data_origin |
Source system that generated the data. VARCHAR2(30) | |
p_internal_record_id |
Database ROWID VARCHAR2(18) required |
f_get_liquidation_type
Function f_get_liquidation_type(p_pohd_code FPBPOHD.FPBPOHD_CODE%TYPE, p_part_pmt_ind FARINVC.FARINVC_PART_PMT_IND%TYPE, p_single_acctg_ind FABINVH.FABINVH_SINGLE_ACCTG_IND%TYPE) RETURN VARCHAR2
Function that retrieves the liquidation type for a Purchase Order and Invoice referencing it.
Returns the liquidation type
Parameters |
p_pohd_code |
Purchase Order code that is being referenced in the invoice. VARCHAR2(8) | |
p_part_pmt_ind |
The Commodity part payment indicator. VARCHAR2(1) | |
p_single_acctg_ind |
The single accounting indicator on the invoice header. 'Y' for Document Level accounting and 'N' for Commodity Level accounting. VARCHAR2(1) |
f_get_commitment_type
Function f_get_commitment_type(p_pohd_code FPBPOHD.FPBPOHD_CODE%TYPE, p_po_item FGBENCD.FGBENCD_ITEM%TYPE, p_seq_num FGBENCD.FGBENCD_SEQ_NUM%TYPE) RETURN VARCHAR2
Function that retrieves the liquidation type for a Purchase Order and Invoice referencing it.
Returns the commitment type
Parameters |
p_pohd_code |
Purchase Order code that is being referenced in the invoice. VARCHAR2(8) | |
p_po_item |
The Purchase Order item number. NUMBER(4) | |
p_seq_num |
The accounting sequence number NUMBER(4) |
p_valid_create
Procedure p_valid_create(p_acctg_in Fb_Invoice_Acctg.invoice_acctg_rec, p_acctg_out OUT Fb_Invoice_Acctg.invoice_acctg_rec, p_error_msg_out OUT gb_common_strings.err_type)
Validates the entered data for create of an invoice accounting record.
Returns the validated record for update.
Parameters |
p_acctg_in |
Invoice accounting data that has been passed to the API for updating an accounting record. FB_INVOICE_ACCTG.INVOICE_ACCTG_REC | |
p_acctg_out |
Invoice accounting date that is now ready for update of the accounting table. FB_INVOICE_ACCTG.INVOICE_ACCTG_REC | |
p_error_msg_out |
Any error messages that this routine generates during the validation. |
p_valid_delete
Procedure p_valid_delete(p_invh_code IN farinva.farinva_invh_code%TYPE DEFAULT NULL, p_item IN farinva.farinva_item%TYPE DEFAULT NULL, p_seq_num IN farinva.farinva_seq_num%TYPE DEFAULT NULL, p_user_id farinva.farinva_user_id%TYPE DEFAULT Gb_Common.f_sct_user, p_rowid_inout IN OUT Gb_Common.internal_record_id_type, p_error_msg_out OUT gb_common_strings.err_type)
Validates that an invoice accounting row can be deleted from the FARINVA table.
Parameters |
p_invh_code |
Invoice code that needs to be validated. VARCHAR2(8) | |
p_item |
The item corresponding to the row. NUMBER(4) | |
p_seq_num |
The sequence number corresponding to the row. NUMBER(4) | |
p_user_id |
The unique identification code of the user who is attempting to delete the record. VARCHAR2(30) | |
p_rowid_inout |
Database ROWID of the record to be updated. VARCHAR2(18) | |
p_error_msg_out |
Any error messages that this routine generates during the validation. |
p_valid_update
Procedure p_valid_update(p_acctg_rec_inout IN OUT fb_invoice_acctg.invoice_acctg_rec, p_existing_rec fb_invoice_acctg.invoice_acctg_rec, p_error_msg_out OUT gb_common_strings.err_type)
Validates the entered data for update of an invoice accounting record.
Returns the validated record for update.
Parameters |
p_acctg_rec_inout |
Invoice accounting data that has been passed to API for updating an accounting record. FB_INVOICE_ACCTG.INVOICE_ACCTG_REC | |
p_existing_rec |
Invoice accounting data as it exists in the accounting table. FB_INVOICE_ACCTG.INVOICE_ACCTG_REC | |
p_error_msg_out |
Any error messages that this routine generates during the validation. |
p_validate_mandatory
Procedure p_validate_mandatory(p_invh_code FARINVA.FARINVA_INVH_CODE%TYPE, p_item FARINVA.FARINVA_ITEM%TYPE, p_seq_num FARINVA.FARINVA_SEQ_NUM%TYPE, p_user_id FARINVA.FARINVA_USER_ID%TYPE, p_rucl_code FARINVA.FARINVA_RUCL_CODE%TYPE, p_susp_ind FARINVA.FARINVA_SUSP_IND%TYPE, p_nsf_susp_ind FARINVA.FARINVA_NSF_SUSP_IND%TYPE)
Validates that all the mandatory fields are valued.
Parameters |
p_invh_code |
The unique identifier of an Invoice document. VARCHAR2(8) Required Key | |
p_item |
The reference number which associates an invoice accounting record to the related invoice commodity item. | |
p_seq_num |
The system-generated unique number associated with the Item Number of the accounting record. NUMBER(4) Required Key | |
p_user_id |
The unique identification code of the user who is attempting to delete the record. VARCHAR2(30) | |
p_rucl_code |
The rule class associated with the Approved amount. VARCHAR2(4) Required | |
p_susp_ind |
Indicates to the user that an item is being held in suspense due to missing or erroneous data content. VARCHAR2(1) Required | |
p_nsf_susp_ind |
Indicates that an item is being held in suspense due to a non-sufficient funds condition. VARCHAR2(1) Required |