| index

Package mip_parties

Program units

is_tripartite |
get_user_id |
get_user_role |
check_user_role |
get_user_password_created | get the password created date for the given username and password
has_supplier |
add_partyaddress |
add_partyrole |
add_partycontactmech |
add_party |
create_party | allows new parties to be created in the system.
add_address | allows the creation of addresses in the system.
create_party_address | allows an address in the system to be associated with a party
create_party_contact_details | allows party contact details to be stored in the system
update_contact_details | PROCEDURE - update_contact_details allows the contact mechanisms to be updated, setting the old mechanism's end date
add_party_role | allows a role to be assigned to a party
create_relationship | allows a party relationship to be created e.g.
expire_old_addresses | expires any old addresses without an end date.
remove_party | REMOVE_PARTY removes the party and all related information from the system.

is_tripartite

    FUNCTION is_tripartite(p_user_id IN VARCHAR2) RETURN BOOLEAN

get_user_id

    FUNCTION get_user_id(p_username IN VARCHAR2) RETURN NUMBER

get_user_role

    FUNCTION get_user_role(p_username IN VARCHAR2) RETURN VARCHAR2

check_user_role

    FUNCTION check_user_role(p_username IN VARCHAR2
                            ,p_role     IN VARCHAR2) RETURN BOOLEAN

get_user_password_created

    FUNCTION get_user_password_created(p_username IN VARCHAR2
                                      ,p_password IN VARCHAR2) RETURN DATE

get the password created date for the given username and password

Returns

| DATE the date the password was created for authenticated username and password combination

has_supplier

    FUNCTION has_supplier(p_username   IN VARCHAR2
                         ,p_supplierid IN VARCHAR) RETURN BOOLEAN

add_partyaddress

    PROCEDURE add_partyaddress(p_addr_code IN VARCHAR2
                              ,p_prty_id   IN INTEGER)

add_partyrole

    PROCEDURE add_partyrole(p_role_code IN VARCHAR2
                           ,p_prty_id   IN NUMBER)

add_partycontactmech

    PROCEDURE add_partycontactmech(p_contact_mech IN VARCHAR2
                                  ,p_prty_id      IN NUMBER)

add_party

    PROCEDURE add_party(p_role                     IN VARCHAR2
                       ,p_username                 IN VARCHAR2
                       ,p_created_by               IN VARCHAR2
                       ,p_name                     IN VARCHAR2
                       ,p_mkpt_ref                 IN VARCHAR2
                       ,p_shortcode                IN VARCHAR2
                       ,p_lt_7b_contract_ref       IN VARCHAR2
                       ,p_gt_7b_contract_ref       IN VARCHAR2
                       ,p_adversarial_contract_ref IN VARCHAR2
                       ,p_manu_ref                 IN VARCHAR2
                       ,p_description              IN VARCHAR2
                       ,p_status                   IN VARCHAR2
                       ,p_first_name               IN VARCHAR2
                       ,p_last_name                IN VARCHAR2
                       ,p_personal_title           IN VARCHAR2
                       ,p_comments                 IN VARCHAR2
                       ,p_addresscode              IN VARCHAR2
                       ,p_partyrole                IN VARCHAR2
                       ,p_partycontactmech         IN VARCHAR2)

create_party

    PROCEDURE create_party(p_manu_ref                 IN VARCHAR2
                          ,p_created_by               IN VARCHAR2
                          ,p_shortcode                IN VARCHAR2
                          ,p_name                     IN VARCHAR2
                          ,p_description              IN VARCHAR2
                          ,p_mktp_ref                 IN VARCHAR2
                          ,p_lt_7b_contract_ref       IN VARCHAR2
                          ,p_gt_7b_contract_ref       IN VARCHAR2
                          ,p_adversarial_contract_ref IN VARCHAR2
                          ,p_username                 IN VARCHAR2
                          ,p_first_name               IN VARCHAR2
                          ,p_last_name                IN VARCHAR2
                          ,p_personal_title           IN VARCHAR2
                          ,p_comments                 IN VARCHAR2
                          ,p_id                       IN INTEGER
                          ,p_prty_type                IN VARCHAR2
                          ,p_tripartite_member        IN VARCHAR2
                          ,p_password                 IN VARCHAR2
                          ,p_expire_pword             IN NUMBER)

allows new parties to be created in the system.

Parameters

| p_manu_ref | the manufacturer's unique reference
| p_created_by | the user that created the party
| p_shortcode | the mktp short code
| p_name | the organization's name
| p_description | description of the manufacturer
| p_created_on | when the party was created
| p_mktp_ref | the mktp's unique reference
| p_lt_7b_contract_ref |
| p_gt_7b_contract_ref |
| p_adversarial_contract_ref |
| p_username | the username
| p_status | the status of the user
| p_first_name | the user's first name
| p_last_name | the user's last name
| p_personal_title | the user's title
| p_comments | any comments on the user
| p_id | the unique party id
| p_prty_type | the prty type

add_address

    PROCEDURE add_address(p_address addresses%ROWTYPE)

allows the creation of addresses in the system.

Parameters

| p_address | address%ROWTYPE - a record of the address table.

create_party_address

    PROCEDURE create_party_address(p_addr_code IN addresses.code%TYPE
                                  ,p_prty_id   IN parties.id%TYPE
                                  ,p_addr_type IN VARCHAR2)

allows an address in the system to be associated with a party

Parameters

| p_addr_code | - the ID of the address
| p_prty_id | - the ID of the party
| p_addr_type | - the type of address (HOME/OFFICE)

create_party_contact_details

    PROCEDURE create_party_contact_details(p_prty_id           IN parties.id%TYPE
                                          ,p_contact_mech_type IN VARCHAR2
                                          ,p_contact_value     IN VARCHAR2)

allows party contact details to be stored in the system

Parameters

| p_prty_id | - the ID of the party
| p_contact_mech_type | - the type of contact mechanism being created
| p_contact_value | - the value of the contact mechanism

update_contact_details

    PROCEDURE update_contact_details(p_prty_id           IN parties.id%TYPE
                                    ,p_contact_mech_type IN VARCHAR2
                                    ,p_contact_value     IN VARCHAR2)

PROCEDURE - update_contact_details allows the contact mechanisms to be updated, setting the old mechanism's end date

Parameters

| p_prty_id | - the ID of the party
| p_contact_mech_type | - the type of contact mechanism being created
| p_contact_value | - the value of the contact mechanism

add_party_role

    PROCEDURE add_party_role(p_role_code IN VARCHAR2
                            ,p_prty_id   IN NUMBER)

allows a role to be assigned to a party

Parameters

| p_role_code | the role to assign to the party
| p_prty_id | the unique party ID

create_relationship

    PROCEDURE create_relationship(p_from_prty_id   IN VARCHAR2
                                 ,p_from_prty_role IN VARCHAR2
                                 ,p_to_prty_id     IN VARCHAR2
                                 ,p_to_prty_role   IN VARCHAR2)

allows a party relationship to be created e.g. associating a party with a supplier

expire_old_addresses

    PROCEDURE expire_old_addresses(p_prty_id    IN parties.id%TYPE
                                  ,p_addr_code  IN addresses.code%TYPE
                                  ,p_paddr_type IN party_address_roles.rt_code%TYPE)

expires any old addresses without an end date. To be used when a new address is assigned to a party The address's end date is set to today as that is when the new address is valid from. No setting addresses to be used in the future.

Parameters

| p_prty_id | the ID of the party
| p_addr_code | the code of the new address.
| p_addr_type | the type of address HOME/OFFICE

remove_party

    PROCEDURE remove_party(p_prty_id IN NUMBER)

REMOVE_PARTY removes the party and all related information from the system.

Parameters

| p_prty_id | - the ID of the party to remove.