Magidoc

Worksheet
Object

Fields

#

_id

ID !
Non-null

workspaceId

ID !
Non-null

documentNumber

Non-null

The number the workspace's billing-worksheet series issued this worksheet, drawn at create the way an invoice draws its own. Unique within the workspace, and what every surface names the worksheet by.

projectId

ID !
Non-null

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.

clientAccountId

clientAccountName

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

ownerId

Written by assignFinanceOwnerReviewer's worksheet branch alongside reviewerId.

reviewerId

billingReviewerId

status

Non-null

customerInvoiceId

The customer invoice this worksheet was converted into, joined at read time. The link is stored on the invoice, so an invoiced worksheet carries no reference of its own and named nothing back — resolved here rather than denormalized, because the invoice owns it. The id is the pair's other half: a number a reader then has to find by hand is a trail that stops, and it is what lets a surface offer a control into the invoice it names. Both null on a worksheet nothing has billed yet, and on one whose invoice this workspace cannot resolve.

customerInvoiceDocumentNumber

startDate

endDate

sourceLines

lineCount

How many lines this worksheet holds, counted in FinanceWorksheetLines — the collection the detail page and getWorksheetLines read. The embedded sourceLines are the claim the worksheet was built from and a document can carry lines without them, so a count taken there reported 0 lines on a worksheet whose detail listed one. Null on a worksheet returned by a lifecycle mutation, which answers with the document it wrote rather than a counted page.

billableLineCount

How many of lineCount are billable, from the same collection. Null wherever lineCount is.

adjustments

reviewerNotes

submittedAt

submittedBy

pmApprovedAt

pmApprovedBy

billingApprovedAt

billingApprovedBy

rejectedAt

rejectedBy

approvalNote

approvalChain

subtotal

Non-null

taxTotal

Non-null

total

Non-null

createdAt

Non-null

modifiedAt

Non-null

createdBy

ID !
Non-null

modifiedBy

ID !
Non-null

Usages

#

References

#

  • Field getWorksheets from Query