auditor.acq_invoice_entry_lifecycle (view)

This is a database view, not a base table. It has no triggers, indexes, or FK constraints of its own. Querying this view may be more efficient than joining the underlying tables directly.

Columns

Column Type Nullable Notes

audit_id

bigint

Yes

audit_time

timestamp with time zone

Yes

audit_action

text

Yes

audit_user

integer

Yes

audit_ws

integer

Yes

id

integer

Yes

invoice

integer

Yes

purchase_order

integer

Yes

lineitem

integer

Yes

inv_item_count

integer

Yes

phys_item_count

integer

Yes

note

text

Yes

billed_per_item

boolean

Yes

cost_billed

numeric(8,2)

Yes

actual_cost

numeric(8,2)

Yes

amount_paid

numeric(8,2)

Yes

View Definition

 SELECT '-1'::integer AS audit_id,
    now() AS audit_time,
    '-'::text AS audit_action,
    '-1'::integer AS audit_user,
    '-1'::integer AS audit_ws,
    invoice_entry.id,
    invoice_entry.invoice,
    invoice_entry.purchase_order,
    invoice_entry.lineitem,
    invoice_entry.inv_item_count,
    invoice_entry.phys_item_count,
    invoice_entry.note,
    invoice_entry.billed_per_item,
    invoice_entry.cost_billed,
    invoice_entry.actual_cost,
    invoice_entry.amount_paid
   FROM acq.invoice_entry
UNION ALL
 SELECT acq_invoice_entry_history.audit_id,
    acq_invoice_entry_history.audit_time,
    acq_invoice_entry_history.audit_action,
    acq_invoice_entry_history.audit_user,
    acq_invoice_entry_history.audit_ws,
    acq_invoice_entry_history.id,
    acq_invoice_entry_history.invoice,
    acq_invoice_entry_history.purchase_order,
    acq_invoice_entry_history.lineitem,
    acq_invoice_entry_history.inv_item_count,
    acq_invoice_entry_history.phys_item_count,
    acq_invoice_entry_history.note,
    acq_invoice_entry_history.billed_per_item,
    acq_invoice_entry_history.cost_billed,
    acq_invoice_entry_history.actual_cost,
    acq_invoice_entry_history.amount_paid
   FROM auditor.acq_invoice_entry_history;