Skip to content

app.purchase_orders

TableRow level security on

Purchase orders of a project. The creator cannot approve (sod_po_creator), approval runs spend authority, and a closed production refuses new ones (invariant 10). Totals are derived (app.purchase_order_totals).

Primary key: id

Columns of app.purchase_orders
ColumnTypeNullableDescription
iduuidNoPrimary key, UUID v7.
org_iduuidNoOwning org, derived from app.projects on insert; never accepted from the caller and never changed.References app.organizations.id
project_iduuidNoProject buying.References app.projects.id
po_numberbigintNoNumber from the project's display key sequence, issued on insert.
vendor_iduuidNoVendor supplying; never a Blocked or Canceled vendor.References app.vendors.id
rfq_response_iduuidYesAwarded RFQ response the order comes from, when there is one.References app.rfq_responses.id
currency_codecharacter(3)NoISO 4217 currency of the order.References private.currencies.currency_code
po_stateapp.po_stateNoPurchase order state. Changes only through the purchase order RPCs.
deleted_attimestamp with time zoneYesSoft delete time. A row with deleted_at set is ignored by every access helper.
created_attimestamp with time zoneNoWhen the row was inserted. Set by the database.
created_byuuidYesPerson who inserted the row, or null for a platform process. Set by the database.References app.people.id
updated_attimestamp with time zoneNoWhen the row last changed. Set by the database.
updated_byuuidYesPerson who last changed the row, or null for a platform process. Set by the database.References app.people.id
delivery_due_ondateYesDate the order is due to be delivered.
payment_terms_daysintegerYesDays after invoice the order is payable (Net 30 is 30).
tax_minorbigintYesTax on the order in minor units of currency_code; NULL when not stated (never coerced to 0).
shipping_minorbigintYesShipping charged on the order in minor units of currency_code; NULL when not stated.