Package BANINST1.fpkutil Common routines for the finance procurement module (FPKUTIL) |
Program units |
f_get_success_message | Get a message that a document has been successfully forwarded to the forward process. |
p_forward_document | This procedure forwards the document to the appropriate queue and returns any errors or a success message. |
p_check_doc_dates | This procedure checks the transaction, order and delivery dates to validate that they are in appropriate sequence. |
f_is_vendor_edi | This function returns a Y or an N depending on whether a vendor is an EDI vendor or not. |
f_fgbench_exists | This function checks if an encumbrance exists in the encumbrance ledger. |
f_get_tax_details | Function to get the Tax rate details. |
f_get_tax_amount | Function to get the Tax amount. |
f_get_autobuyr_code | Function returns a buyer code using the automatic buyer assignment functionality. |
p_calc_encumb_adjustment | Calculates the amount of encumbrance that needs to be liquidated when a purchase order is being changed and populates the fprpoda_encb_adjt_amt column appropriately |
table_to_string | Converts a table of error messages into a string. |
appenderror | Append new error to the existing error. |
appenderror | Append new error to the existing error table. |
appenderror | Append new error table to the existing error table. |
p_scrubdate | Scrubbing user entered date. |
p_scrubnumb | Scrubbing user entered code. |
p_scrubchar | Scrubbing user entered characters. |
p_is_docacctg_postable | Checks if all the accounting sequences are to be checked at one time using passed in abal_entry_tabtype. |
p_is_docacctg_postable | Checks if all the accounting sequences are to be checked at one time using passed in abal_query_tabtype. |
p_is_foap_postable | Validating one accounting sequence at a time using passed in abal_entry_tabtype. |
p_is_foap_postable | Validating one accounting sequence at a time using passed in abal_query_rectype. |
Types |
coas_tabletype | Chart of accounts table type |
foap_tabletype | Fund table type |
tax_detail_rec | Tax rate record type |
tax_detail_tabl | Tax rate table type |
max_data_entry | Holding user entered date. |
error_mesg_type | Holding error message. |
error_mesg_tabtype | Error message table type |
abal_entry_rectype | Available balance entry record type |
abal_query_rectype | Available balance query record type |
abal_entry_tabtype | Available balance entry table type |
abal_query_tabtype | Available balance query record type |
f_get_success_message
Function f_get_success_message(docname varchar2, doc_code varchar2, forward_process varchar2) return varchar2
Get a message that a document has been successfully forwarded to the forward process.
p_forward_document
Procedure p_forward_document(doc_type ftvdtyp.ftvdtyp_seq_num%type, doc_desc varchar2, doc_Code fgbtrnh.fgbtrnh_doc_Code%type, user_id fobprof.fobprof_user_id%type, complete_ind varchar2, approval_ind varchar2, error_mesg in out varchar2, success_mesg in out varchar2, doc_total number default null, chg_seq number default null, bank_code varchar2 default null, sub_num varchar2 default null)
This procedure forwards the document to the appropriate queue and returns any errors or a success message.
p_check_doc_dates
Procedure p_check_doc_dates(trans_date date, order_date date, deliv_date date, error_mesg in out varchar2)
This procedure checks the transaction, order and delivery dates to validate that they are in appropriate sequence.
f_is_vendor_edi
Function f_is_vendor_edi(vend_pidm FTVVEND.FTVVEND_PIDM%TYPE, vend_atyp ftvvend.ftvvend_atyp_code%type, vend_atyp_seq ftvvend.ftvvend_addr_seqno%type, doc_type varchar2 default 'PO') return varchar2
This function returns a Y or an N depending on whether a vendor is an EDI vendor or not.
coas_tabletype
type coas_tabletype is table of varchar2(1) index by binary_integer;
Chart of accounts table type
foap_tabletype
type foap_tabletype is table of ftvfund.ftvfund_fund_code%type index by binary_integer;
Fund table type
f_fgbench_exists
Function f_fgbench_exists(encumb_num fgbench.fgbench_num%type) return boolean
This function checks if an encumbrance exists in the encumbrance ledger.
tax_detail_rec
type tax_detail_rec is record ( trat_code ftvtrat.ftvtrat_code%type, trat_desc ftvtrat.ftvtrat_desc%type, trat_rate ftvtrat.ftvtrat_rate%type, trat_pay_tax_to ftvtrat.ftvtrat_pay_tax_to%type, trat_priority ftvtrat.ftvtrat_priority_code%type, trat_exempt_pct ftvtrat.ftvtrat_exempt_pct%type, taxable_amt fgbtrnh.fgbtrnh_trans_amt%type, tax_amt fgbtrnh.fgbtrnh_trans_amt%type, rebate_amt fgbtrnh.fgbtrnh_trans_amt%type);
Tax rate record type
tax_detail_tabl
type tax_detail_tabl is table of tax_detail_rec index by binary_integer;
Tax rate table type
f_get_tax_details
Function f_get_tax_details(tgrp ftvtgrp.ftvtgrp_tgrp_code%type, asofdate date, vendor_pidm number, vendor_id varchar2, appr_amt number, disc_amt number, addl_amt number) return tax_detail_tabl
Function to get the Tax rate details.
f_get_tax_amount
Function f_get_tax_amount(tgrp ftvtgrp.ftvtgrp_tgrp_code%type, asofdate date, appr_amt number, disc_amt number, addl_amt number) return number
Function to get the Tax amount.
f_get_autobuyr_code
Function f_get_autobuyr_code(chart_code varchar2, orgn_code varchar2, trans_date date, comm_code varchar2) return varchar2
Function returns a buyer code using the automatic buyer assignment functionality.
p_calc_encumb_adjustment
Procedure p_calc_encumb_adjustment(p_po_code VARCHAR2, p_change_seq_num NUMBER)
Calculates the amount of encumbrance that needs to be liquidated when a purchase order is being changed and populates the fprpoda_encb_adjt_amt column appropriately
max_data_entry
subtype max_data_entry is varchar2(100);
Holding user entered date.
error_mesg_type
subtype error_mesg_type is varchar2(1000);
Holding error message.
error_mesg_tabtype
type error_mesg_tabtype is table of error_mesg_type index by binary_integer;
Error message table type
table_to_string
Function table_to_string(error_tab in error_mesg_tabtype) return varchar2
Converts a table of error messages into a string.
appenderror
Procedure appenderror(origerror in out error_mesg_type, newerror error_mesg_type)
Append new error to the existing error.
appenderror
Procedure appenderror(origerror in out error_mesg_tabtype, newerror error_mesg_type)
Append new error to the existing error table.
appenderror
Procedure appenderror(origerror in out error_mesg_tabtype, newerror error_mesg_tabtype)
Append new error table to the existing error table.
p_scrubdate
Procedure p_scrubdate(indate varchar2, dateformat varchar2, outdate in out date, error_mesg in out fpkutil.error_mesg_tabtype, datename varchar2 default NULL)
Scrubbing user entered date.
p_scrubnumb
Procedure p_scrubnumb(incode VARCHAR2, maxlength NUMBER, outcode IN OUT NUMBER, error_mesg IN OUT Fpkutil.error_mesg_tabtype, codename VARCHAR2 DEFAULT NULL, maxscale NUMBER DEFAULT 0)
Scrubbing user entered code.
p_scrubchar
Procedure p_scrubchar(incode VARCHAR2, maxlength NUMBER, defvalue VARCHAR2, outcode IN OUT VARCHAR2, error_mesg IN OUT Fpkutil.error_mesg_tabtype, codename VARCHAR2 DEFAULT '', toWhichcase VARCHAR2 DEFAULT 'U', errorout VARCHAR2 DEFAULT 'Y')
Scrubbing user entered characters.
abal_entry_rectype
TYPE abal_entry_rectype IS RECORD ( doctype Fpkutil.max_data_entry, doccode Fpkutil.max_data_entry, userid Fpkutil.max_data_entry, trans_date Fpkutil.max_data_entry, seqitem Fpkutil.max_data_entry, seqnum Fpkutil.max_data_entry, coas Fpkutil.max_data_entry, acci Fpkutil.max_data_entry, fund Fpkutil.max_data_entry, orgn Fpkutil.max_data_entry, acct Fpkutil.max_data_entry, prog Fpkutil.max_data_entry, actv Fpkutil.max_data_entry, locn Fpkutil.max_data_entry, percent_dist Fpkutil.max_data_entry, acctg_amt Fpkutil.max_data_entry );
Available balance entry record type
abal_query_rectype
TYPE abal_query_rectype IS RECORD( doc_type fgbtrnd.fgbtrnd_doc_seq_code%TYPE, doc_code fgbtrnd.fgbtrnd_doc_code%TYPE, userid fgbtrnd.fgbtrnd_user_id%TYPE, transdate DATE, item_num fgbtrnd.fgbtrnd_item_num%TYPE, seq_num fgbtrnd.fgbtrnd_seq_num%TYPE, coas fgbtrnd.fgbtrnd_coas_code%TYPE, acci fgbtrnd.fgbtrnd_acci_code%TYPE, fund fgbtrnd.fgbtrnd_fund_code%TYPE, orgn fgbtrnd.fgbtrnd_orgn_code%TYPE, acct fgbtrnd.fgbtrnd_acct_code%TYPE, prog fgbtrnd.fgbtrnd_prog_code%TYPE, actv fgbtrnd.fgbtrnd_actv_code%TYPE, locn fgbtrnd.fgbtrnd_locn_code%TYPE, trans_amt fgbtrnd.fgbtrnd_trans_amt%TYPE, nsf_override_ind VARCHAR2(1) );
Available balance query record type
abal_entry_tabtype
TYPE abal_entry_tabtype IS TABLE OF abal_entry_rectype;
Available balance entry table type
abal_query_tabtype
TYPE abal_query_tabtype IS TABLE OF abal_query_rectype;
Available balance query record type
p_is_docacctg_postable
Procedure p_is_docacctg_postable(all_doc_foaps abal_entry_tabtype, error_mesg_table IN OUT Fpkutil.error_mesg_tabtype, valid_ind IN OUT VARCHAR2)
Checks if all the accounting sequences are to be checked at one time using passed in abal_entry_tabtype.
p_is_docacctg_postable
Procedure p_is_docacctg_postable(all_doc_foaps abal_query_tabtype, error_mesg_table IN OUT Fpkutil.error_mesg_tabtype, valid_ind IN OUT VARCHAR2)
Checks if all the accounting sequences are to be checked at one time using passed in abal_query_tabtype.
p_is_foap_postable
Procedure p_is_foap_postable(one_foap abal_entry_rectype, error_mesg IN OUT Fpkutil.error_mesg_tabtype, valid_ind IN OUT VARCHAR2)
Validating one accounting sequence at a time using passed in abal_entry_tabtype.
p_is_foap_postable
Procedure p_is_foap_postable(one_foap abal_query_rectype, error_mesg IN OUT Fpkutil.error_mesg_tabtype, valid_ind IN OUT VARCHAR2)
Validating one accounting sequence at a time using passed in abal_query_rectype.