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 |
|
Yes |
|
audit_time |
|
Yes |
|
audit_action |
|
Yes |
|
audit_user |
|
Yes |
|
audit_ws |
|
Yes |
|
id |
|
Yes |
|
invoice |
|
Yes |
|
purchase_order |
|
Yes |
|
lineitem |
|
Yes |
|
inv_item_count |
|
Yes |
|
phys_item_count |
|
Yes |
|
note |
|
Yes |
|
billed_per_item |
|
Yes |
|
cost_billed |
|
Yes |
|
actual_cost |
|
Yes |
|
amount_paid |
|
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;