Magidoc

PurchaseOrder
Object

Fields

#

_id

ID !
Non-null

workspaceId

ID !
Non-null

vendorAccountId

paymentTermId

The payment term used to derive when this order's cash is expected to leave.

vendorAccountName

The vendor's name, joined from the CRM account vendorAccountId points at. Null when the order names no vendor, or names one this workspace cannot resolve — a deleted account, or one that is not its own.

projectId

projectName

Name of the project this document is filed against, resolved at read time and scoped to what the requesting member may see. Null when the project no longer exists or is not visible to them — clients render their unlinked fallback for both, and must never assume the name of a project the reader cannot open.

glCompanyId

The GL company whose books this order belongs to, as the company its documentNumber was drawn under. It holds the payable, and it is the source company of any line charged to another. Null keeps the workspace's one implicit set of books.

documentNumber

Non-null

status

Non-null

revision

How many times this order has been unapproved to be revised. Null on an order that never has been, which reads the same as 0 — still on its first approval.

currency

Non-null

total

Non-null

currencyConversion

commitments

vendorInvoiceLinks

submittedAt

submittedBy

approvedAt

approvedBy

rejectedAt

rejectedBy

cancelledAt

cancelledBy

closedAt

closedBy

approvalNote

approvalRuleRoute

The workspace approval rule that matched at submit, if any. Adds a gate; replaces none.

approvalChain

journalId

paidAt

Set when every linked vendor bill is settled: when the order became fully paid, by whom, and the journal of the payment that settled its last open bill.

paidBy

paymentJournalId

createdAt

Non-null

modifiedAt

Non-null

createdBy

ID !
Non-null

modifiedBy

ID !
Non-null

Usages

#

References

#

  • Field getPurchaseOrders from Query
  • Field updatePurchaseOrderPaymentTerm from Mutation