A.10 Table: m_invoices, Package: m_api_invoice - Intergraph Smart Materials - Version 2020 (10.0) - Customization & Programming - Hexagon

Intergraph Smart Materials Classic API Configuration (2020)

Language
English
Product
Intergraph Smart Materials
Subproduct
Classic
Search by Category
Customization & Programming
Smart Materials/Smart Reference Data Version
2020 (10.0)

This API must run in a valid project environment. In order to use this API for all the projects, you must select the Use for APIs check box for exactly one record on the A.20.06.02 User Securities for Projects screen. The user security of that record will then be used to set up the valid environment. For more information about user securities see User Securities for Projects.

A.10.1 Function: import_inv

This function is used to import an invoice.

Argument Name

Type

In/Out

P_INVOICE_REC

RECORD

IN

proj_id

VARCHAR2

IN

ivc_number

VARCHAR2

IN

poh_id

NUMBER

IN

dp_id

NUMBER

IN

ca_id

NUMBER

IN

approved_by

VARCHAR2

IN

invoice_owner

VARCHAR2

IN

po_pp_ind

NUMBER

IN

rfa_ind

VARCHAR2

IN

invoice_amount

NUMBER

IN

ret_amount

NUMBER

IN

paid_amount

NUMBER

IN

invoice_status

VARCHAR2

IN

invoice_create_date

DATE

IN

period_to

DATE

IN

period_from

DATE

IN

invoice_submit_date

DATE

IN

invoice_paid_date

DATE

IN

rfa_date

DATE

IN

approved_date

DATE

IN

erp_status

VARCHAR2

IN

erp_status_date

DATE

IN

erp_message

VARCHAR2

IN

sup_id

NUMBER

IN

pno_id

NUMBER

IN

currency_id

NUMBER

IN

lien_wav_rec_ind

VARCHAR2

IN

final_payment_ind

VARCHAR2

IN

paid_ind

VARCHAR2

IN

invoice_actions

VARCHAR2

IN

P_COMMIT

VARCHAR2

IN

P_RESULT

NUMBER

OUT

P_MESSAGE

VARCHAR2

OUT

P_PROJ_ID

VARCHAR2

IN

The function returns IVC_ID or -1 in case of an error.

A.10.2 Function: import_inv_det

This function is used to import invoice details.

Argument Name

Type

In/Out

P_INV_DET_REC

RECORD

IN

proj_id

VARCHAR2

IN

ivc_id

NUMBER

IN

poli_id

NUMBER

IN

uoc_id

NUMBER

IN

attp_id

NUMBER

IN

dp_id

NUMBER

IN

ivci_id

NUMBER

IN

ivc_amount

NUMBER

IN

invoice_qty

NUMBER

IN

P_COMMIT

VARCHAR2

IN

P_RESULT

NUMBER

OUT

P_MESSAGE

VARCHAR2

OUT

P_PROJ_ID

VARCHAR2

IN

The function returns IVCD_ID or -1 in case of an error.

A.10.3 Procedure: upd_ret_percent

This procedure is used to update the retention amount when the DBA setting INVOICE_RETENTION_CTRL is set to N.

Argument Name

Type

In/Out

P_IVC_NUMBER

VARCHAR2

IN

P_SUP_CODE

VARCHAR2

IN

P_PROJ_ID

VARCHAR2

IN

P_RET_PERCENT

NUMBER

IN

P_RET_AMOUNT

NUMBER

IN

Neither the p_ret_percent nor p_ret_amount must be null to store retention percentage.

A.10.4 Function: get_invoice_status

This function is used to get the status of an invoice.

Argument Name

Type

In/Out

P_IVC_NUMBER

VARCHAR2

IN

P_SUP_CODE

VARCHAR2

IN

P_PROJ_ID

VARCHAR2

IN

A.10.5 Function: get_invoice_field_value

This function is used to get the value from the invoice of the column specified in the parameter.

Argument Name

Type

In/Out

P_IVC_NUMBER

VARCHAR2

IN

P_SUP_CODE

VARCHAR2

IN

P_IVC_FIELD

VARCHAR2

IN

P_PROJ_ID

VARCHAR2

IN

A.10.6 Procedure: upd_invoice_status

This procedure is used to update the invoice status.

Argument Name

Type

In/Out

P_IVC_NUMBER

VARCHAR2

IN

P_SUP_CODE

VARCHAR2

IN

P_STATUS

VARCHAR2

IN

P_PROJ_ID

VARCHAR2

IN

Possible values of the invoice status are as in the following table:

Invoice Status

Invoice Status Description

N

Not Submitted

S

Submitted

NA

Needs Assignment

P

Pending

RFA

Ready for Approval

RFFA

Ready for Final Approval

A

Approval

R

Rejected

PA

Paid

A.10.7 Procedure: upd_erp_fields

This procedure is used to update the ERP fields.

Argument Name

Type

In/Out

P_PROJ_ID

VARCHAR2

IN

P_IVC_NUMBER

VARCHAR2

IN

P_SUP_CODE

VARCHAR2

IN

P_ERP_STATUS

VARCHAR2

IN

P_ERP_STATUS_DATE

DATE

IN

P_ERP_MESSAGE

VARCHAR2

IN

A.10.8 Procedure: upd_invoice_fields

This procedure is used to update values of the invoice columns.

Argument Name

Type

In/Out

P_PROJ_ID

VARCHAR2

IN

P_IVC_NUMBER

VARCHAR2

IN

P_SUP_CODE

VARCHAR2

IN

P_COLUMN_NAME

VARCHAR2

IN

P_COLUMN_VALUE

VARCHAR2

IN

If the column has the date format, enter the value for P_COLUMN_VALUE in DD-MM-YYYY fromat.

For example, if you want to update the ERP_ERROR_MSG column in the M_INVOICES table with the ERP Interface error, the call to this procedure must be set as in the following:

Execute upd_invoice_fields('IVC_1','SUP_1','ERP_ERROR_MSG','ERROR!! Invoice Amount is invalid.');