index

Package tb_cashier_session

Common Business interface for Cashier Session (CASHIER_SESSION).


Program units
f_api_version   Returns the API version number.
f_exists   Checks to see if a record exists.
f_isequal   Compares two records for equality.
f_query_all   Selects all records for the entity.
f_query_one   Selects one record using key.
f_query_by_rowid   Selects one record using ROWID.
f_query_one_lock   Selects one record and locks it.
f_session_end_date   Selects the end date of a cashier session.
f_session_status   Selects the status of a cashier session.
p_close_cashier_detail   Updates the session number and end date of transaction detail.
p_create   Creates a record.
p_delete   Deletes a record.
p_lock   Locks a record.
p_update   Updates a record.

Types
cashier_session_rec   Business Entity record type
cashier_session_ref   Entity cursor variable type
cashier_session_tab   Entity table type

Constants
M_ENTITY_NAME   Business Entity Name


M_ENTITY_NAME

M_ENTITY_NAME    CONSTANT VARCHAR2(15) := 'CASHIER_SESSION';

Business Entity Name


cashier_session_rec

TYPE cashier_session_rec IS RECORD (
  r_user                    tbbcshr.tbbcshr_user%TYPE,
  r_session_number          tbbcshr.tbbcshr_session_number%TYPE,
  r_start_date              tbbcshr.tbbcshr_start_date%TYPE,
  r_end_date                tbbcshr.tbbcshr_end_date%TYPE,
  r_session_ind             tbbcshr.tbbcshr_session_ind%TYPE,
  r_bank_deposit_number     tbbcshr.tbbcshr_bank_deposit_number%TYPE,
  r_bank_code               tbbcshr.tbbcshr_bank_code%TYPE,
  r_data_origin             tbbcshr.tbbcshr_data_origin%TYPE,
  r_internal_record_id      gb_common.internal_record_id_type);

Business Entity record type


cashier_session_ref

TYPE cashier_session_ref IS REF CURSOR RETURN cashier_session_rec;

Entity cursor variable type


cashier_session_tab

TYPE cashier_session_tab IS TABLE OF cashier_session_rec INDEX BY BINARY_INTEGER;

Entity table type


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_session_number tbbcshr.tbbcshr_session_number%TYPE,
                  p_user           tbbcshr.tbbcshr_user%TYPE,
                  p_rowid          gb_common.internal_record_id_type DEFAULT NULL)
  RETURN VARCHAR2

Checks to see if a record exists.

Parameters
p_session_number   Session number associated with the cashier. NUMBER(5) Required Key
p_user   User ID that is identified as a cashier. VARCHAR2(30) Required Key
p_rowid   Database ROWID of the record to be selected. VARCHAR2(18)

Returns
Y if found, otherwise N.


f_isequal

Function f_isequal(rec_one cashier_session_rec,
                   rec_two cashier_session_rec) RETURN VARCHAR2

Compares two records for equality.
Tests each field of rec_one against the corresponding field of rec_two. Two null values are considered equal.

Parameters
rec_one   The first record to compare. Type cashier_session_rec Required
rec_two   The second record to compare. Type cashier_session_rec Required

Returns
Y if all values in records are equal, otherwise N. Nulls match Nulls.


f_query_all

Function f_query_all(p_user tbbcshr.tbbcshr_user%TYPE)
  RETURN cashier_session_ref

Selects all records for the entity.

Parameters
p_session_number   Session number associated with the cashier. NUMBER(5) Required Key
p_user   User ID that is identified as a cashier. VARCHAR2(30) Required Key

Returns
A cursor variable that will fetch the set of records.


f_query_one

Function f_query_one(p_session_number tbbcshr.tbbcshr_session_number%TYPE,
                     p_user           tbbcshr.tbbcshr_user%TYPE)
  RETURN cashier_session_ref

Selects one record using key.

Parameters
p_session_number   Session number associated with the cashier. NUMBER(5) Required Key
p_user   User ID that is identified as a cashier. VARCHAR2(30) Required Key

Returns
A cursor variable that will fetch exactly one record.


f_query_by_rowid

Function f_query_by_rowid(p_rowid gb_common.internal_record_id_type)
  RETURN cashier_session_ref

Selects one record using ROWID.

Parameters
p_rowid   Database ROWID of the record to be selected. VARCHAR2(18) Required

Returns
A cursor variable that will fetch exactly one record.


f_query_one_lock

Function f_query_one_lock(p_user           tbbcshr.tbbcshr_user%TYPE,
                          p_session_number tbbcshr.tbbcshr_session_number%TYPE,
                          p_rowid          gb_common.internal_record_id_type DEFAULT NULL)
  RETURN cashier_session_ref

Selects one record and locks it.

Parameters
p_session_number   Session number associated with the cashier. NUMBER(5) Required Key
p_user   User ID that is identified as a cashier. VARCHAR2(30) Required Key
p_rowid   Database ROWID of the record to be selected. VARCHAR2(18)

Returns
A cursor variable for one record, locking the record.


f_session_end_date

Function f_session_end_date(p_user           tbbcshr.tbbcshr_user%TYPE,
                            p_session_number tbbcshr.tbbcshr_session_number%TYPE)
  RETURN DATE

Selects the end date of a cashier session.

Parameters
p_session_number   Session number associated with the cashier. NUMBER(5) Required Key
p_user   User ID that is identified as a cashier. VARCHAR2(30) Required Key

Returns
Session End Date (with timestamp).


f_session_status

Function f_session_status(p_user           tbbcshr.tbbcshr_user%TYPE,
                          p_session_number tbbcshr.tbbcshr_session_number%TYPE)
  RETURN VARCHAR2

Selects the status of a cashier session.

Parameters
p_session_number   Session number associated with the cashier. NUMBER(5) Required Key
p_user   User ID that is identified as a cashier. VARCHAR2(30) Required Key

Returns
Session status: C - Closed, F - Final, R - Reported, N - Not Found.


p_close_cashier_detail

Procedure p_close_cashier_detail(p_user               tbbcshr.tbbcshr_user%TYPE,
                                 p_new_session_number tbbcshr.tbbcshr_session_number%TYPE,
                                 p_end_date           tbbcshr.tbbcshr_end_date%TYPE)

Updates the session number and end date of transaction detail.
Tables tbraccd, tbrdepo, tbrmisd, and trraccd are updated when a cashiering session is closed.

The user, session, and end date combination must exist as a closed session in the Cashier Session table (TBBCSHR).

Parameters
p_user   User ID of the cashier who created the transactions. VARCHAR2(30) Required
p_new_session_number   Cashier session number for the closed session. NUMBER(5) Required
p_end_date   End date and time the cashiering session was closed. DATE Required


p_create

Procedure p_create(p_user                tbbcshr.tbbcshr_user%TYPE,
                   p_session_number      tbbcshr.tbbcshr_session_number%TYPE,
                   p_start_date          tbbcshr.tbbcshr_start_date%TYPE DEFAULT NULL,
                   p_end_date            tbbcshr.tbbcshr_end_date%TYPE DEFAULT NULL,
                   p_session_ind         tbbcshr.tbbcshr_session_ind%TYPE,
                   p_bank_deposit_number tbbcshr.tbbcshr_bank_deposit_number%TYPE DEFAULT NULL,
                   p_bank_code           tbbcshr.tbbcshr_bank_code%TYPE DEFAULT NULL,
                   p_data_origin         tbbcshr.tbbcshr_data_origin%TYPE DEFAULT NULL,
                   p_rowid_out           OUT gb_common.internal_record_id_type)

Creates a record.

Parameters
p_user   Userid that is identified as a cashier. VARCHAR2(30) Required Key
p_session_number   Session number associated with the cashier. NUMBER(5) Required Key
p_start_date   Start date of the cashier"s session.  This date is determined by the entry date of the first transaction in the session. DATE
p_end_date   End date of the cashier"s session.  This date is determined by the entry date of the last transaction in the session. DATE
p_session_ind   blank - Open, C - Closed, F - Final, R - Reported. VARCHAR2(1) Required
p_bank_deposit_number   A unique code used by a bank to identify a deposit. VARCHAR2(8)
p_bank_code   Bank code related to the bank deposit number. VARCHAR2(2)
p_data_origin   Source system that last created or updated the data. VARCHAR2(30)
p_rowid_out   Database ROWID of the record to be created. VARCHAR2(18) Required


p_delete

Procedure p_delete(p_session_number tbbcshr.tbbcshr_session_number%TYPE,
                   p_user           tbbcshr.tbbcshr_user%TYPE,
                   p_rowid          gb_common.internal_record_id_type DEFAULT NULL)

Deletes a record.

Parameters
p_session_number   Session number associated with the cashier. NUMBER(5) Required Key
p_user   Userid that is identified as a cashier. VARCHAR2(30) Required Key
p_rowid   Database ROWID of the record to be deleted. VARCHAR2(18)


p_lock

Procedure p_lock(p_session_number tbbcshr.tbbcshr_session_number%TYPE,
                 p_user           tbbcshr.tbbcshr_user%TYPE,
                 p_rowid_inout    IN OUT gb_common.internal_record_id_type)

Locks a record.
If ROWID is not passed in, the record is located using the key values and the ROWID of the locked row is passed in p_rowid_inout

Parameters
p_session_number   Session number associated with the cashier. NUMBER(5) Required Key
p_user   Userid that is identified as a cashier. VARCHAR2(30) Required Key
p_rowid_inout   Database ROWID of the record to be locked. VARCHAR2(18) Required


p_update

Procedure p_update(p_user                tbbcshr.tbbcshr_user%TYPE,
                   p_session_number      tbbcshr.tbbcshr_session_number%TYPE,
                   p_start_date          tbbcshr.tbbcshr_start_date%TYPE DEFAULT dml_common.f_unspecified_date,
                   p_end_date            tbbcshr.tbbcshr_end_date%TYPE DEFAULT dml_common.f_unspecified_date,
                   p_session_ind         tbbcshr.tbbcshr_session_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_bank_deposit_number tbbcshr.tbbcshr_bank_deposit_number%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_bank_code           tbbcshr.tbbcshr_bank_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_data_origin         tbbcshr.tbbcshr_data_origin%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_rowid               gb_common.internal_record_id_type DEFAULT NULL)

Updates a record.

Parameters
p_user   Userid that is identified as a cashier. VARCHAR2(30) Required Key
p_session_number   Session number associated with the cashier. NUMBER(5) Required Key
p_start_date   Start date of the cashier"s session.  This date is determined by the entry date of the first transaction in the session. DATE
p_end_date   End date of the cashier"s session.  This date is determined by the entry date of the last transaction in the session. DATE
p_session_ind   blank - Open, C - Closed, F - Final, R - Reported. VARCHAR2(1) Required
p_bank_deposit_number   A unique code used by a bank to identify a deposit. VARCHAR2(8)
p_bank_code   Bank code related to the bank deposit number. VARCHAR2(2)
p_data_origin   Source system that last created or updated the data. VARCHAR2(30)
p_rowid   Database ROWID of the record to be updated. VARCHAR2(18)