app.purchase_orders
TablaSeguridad a nivel de fila activa
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).
Clave primaria: id
| Columna | Tipo | Admite nulos | Descripción |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org, derived from app.projects on insert; never accepted from the caller and never changed.Hace referencia a app.organizations.id |
| project_id | uuid | No | Project buying.Hace referencia a app.projects.id |
| po_number | bigint | No | Number from the project's display key sequence, issued on insert. |
| vendor_id | uuid | No | Vendor supplying; never a Blocked or Canceled vendor.Hace referencia a app.vendors.id |
| rfq_response_id | uuid | Sí | Awarded RFQ response the order comes from, when there is one.Hace referencia a app.rfq_responses.id |
| currency_code | character(3) | No | ISO 4217 currency of the order.Hace referencia a private.currencies.currency_code |
| po_state | app.po_state | No | Purchase order state. Changes only through the purchase order RPCs. |
| deleted_at | timestamp with time zone | Sí | Soft delete time. A row with deleted_at set is ignored by every access helper. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Sí | Person who inserted the row, or null for a platform process. Set by the database.Hace referencia a app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Sí | Person who last changed the row, or null for a platform process. Set by the database.Hace referencia a app.people.id |
| delivery_due_on | date | Sí | Date the order is due to be delivered. |
| payment_terms_days | integer | Sí | Days after invoice the order is payable (Net 30 is 30). |
| tax_minor | bigint | Sí | Tax on the order in minor units of currency_code; NULL when not stated (never coerced to 0). |
| shipping_minor | bigint | Sí | Shipping charged on the order in minor units of currency_code; NULL when not stated. |