Skip to main content

Expense

Represents information about an expense.

type Expense {
id: ID!
isLocked: Boolean!
isOverdue: Boolean!
daysOverdue: Int
_groupMeta: GroupMeta
number: String
status: ExpenseStatus
paymentStatus: ExpensePaymentStatus!
paidAt: Date
effectiveAt: Date
dueAt: Date
currency: CurrencyCode
exchangeRate: Decimal
discount: Decimal
subtotal: Decimal
subtotalExcludingTax: Decimal
tax: Decimal
total: Decimal
amountBasis: AmountBasis
statedAmounts: JSON
externalService: String
externalId: String
externalVersion: Int
otherExternalVersions: [Expense!]!
notes: String
company: Company
person: Contact
lines: [ExpenseLine]
comments: [Comment!]!
followers: [User!]
creator: User
createdAt: DateTimeTz!
updatedAt: DateTimeTz!
deletedAt: DateTimeTz
properties(
where: ExpensePropertiesWhereWhereConditions
orderBy: [ExpensePropertiesOrderByOrderByClause!]
first: Int!
after: String
): PropertyConnection!
structures(
where: ExpenseStructuresWhereWhereConditions
orderBy: [ExpenseStructuresOrderByOrderByClause!]
first: Int!
after: String
): StructureConnection!
projects(
where: ExpenseProjectsWhereWhereConditions
orderBy: [ExpenseProjectsOrderByOrderByClause!]
first: Int!
after: String
): ProjectConnection!
tasks(
where: ExpenseTasksWhereWhereConditions
orderBy: [ExpenseTasksOrderByOrderByClause!]
first: Int!
after: String
): TaskConnection!
letters(
where: ExpenseLettersWhereWhereConditions
orderBy: [ExpenseLettersOrderByOrderByClause!]
first: Int!
after: String
): LetterConnection!
contracts(
where: ExpenseContractsWhereWhereConditions
orderBy: [ExpenseContractsOrderByOrderByClause!]
first: Int!
after: String
): ContractConnection!
files(
where: ExpenseFilesWhereWhereConditions
orderBy: [ExpenseFilesOrderByOrderByClause!]
first: Int!
after: String
): FileConnection!
}

Fields​

Expense.id ● ID! non-null scalar​

Expense's unique identifier.

Expense.isLocked ● Boolean! non-null scalar​

Whether this entity is locked from edits to its contractual fields by its current status.

Expense.isOverdue ● Boolean! non-null scalar​

Whether the due date has passed while the record is still unsettled. Counted in Estonian time, from the day after the due date.

Expense.daysOverdue ● Int scalar​

How many days past its due date an overdue record is. Null when the record is not overdue.

Expense._groupMeta ● GroupMeta object​

Grouping metadata when results are grouped.

Expense.number ● String scalar​

The expense's number.

Expense.status ● ExpenseStatus enum​

Where the expense is in its workflow: submitted, in an approval flow, approved or void.

Expense.paymentStatus ● ExpensePaymentStatus! non-null enum​

Whether the expense is paid. Recorded only once the expense is approved.

The date the expense was paid, set when its payment status is PAID.

Expense.effectiveAt ● Date scalar​

Starting date of the expense.

Expense.dueAt ● Date scalar​

Due date of the expense.

Expense.currency ● CurrencyCode enum​

The expense's currency.

Expense.exchangeRate ● Decimal scalar​

The expense's currency exchange rate.

Expense.discount ● Decimal scalar​

The expense's discount percentage.

Expense.subtotal ● Decimal scalar​

Total of all items on the expense before any expense level discount or exclusive tax is applied.

Expense.subtotalExcludingTax ● Decimal scalar​

The subtotal of the expense before any expense level discount or tax.

Expense.tax ● Decimal scalar​

The amount of tax on this expense. This is the sum of all the tax amounts on this expense.

Expense.total ● Decimal scalar​

Total after discounts and taxes.

Expense.amountBasis ● AmountBasis enum​

Whether the amounts are computed from quantity times unit price or kept exactly as the supplier's e-invoice stated them.

Expense.statedAmounts ● JSON scalar​

The amounts the supplier's e-invoice stated, recorded when the expense was imported: header totals, VAT per rate, the figures of every line, what a recalculation would give, and the differences the import found. Null for an expense that was not imported.

Expense.externalService ● String scalar​

The integration the expense was imported from, for example finbite. Null for an expense entered by hand.

Expense.externalId ● String scalar​

The invoice's identifier in the integration it was imported from.

Expense.externalVersion ● Int scalar​

Which version of the external invoice this is. A supplier's reissue of an invoice already imported is imported as the next version.

Expense.otherExternalVersions ● [Expense!]! non-null object​

The other imported versions of the same external invoice, oldest first.

Expense.notes ● String scalar​

The expense's notes.

Expense.company ● Company object​

The expense's company.

Expense.person ● Contact object​

The expense's client related person.

Expense.lines ● [ExpenseLine] list object​

The individual line items that make up the expense.

Expense.comments ● [Comment!]! non-null object​

The expense's comments.

Expense.followers ● [User!] list object​

The expense's followers.

Expense.creator ● User object​

The user who created this expense.

Expense.createdAt ● DateTimeTz! non-null scalar​

The date and time when the expense was created.

Expense.updatedAt ● DateTimeTz! non-null scalar​

The date and time when the expense was last updated.

Expense.deletedAt ● DateTimeTz scalar​

The date and time when the expense was deleted.

Expense.properties ● PropertyConnection! non-null object​

A list of properties associated with the expense.

Expense.properties.where ● ExpensePropertiesWhereWhereConditions input​
Expense.properties.orderBy ● [ExpensePropertiesOrderByOrderByClause!] list input​
Expense.properties.first ● Int! non-null scalar​

Limits number of fetched items. Maximum allowed value: 50.

Expense.properties.after ● String scalar​

A cursor after which elements are returned.

Expense.structures ● StructureConnection! non-null object​

A list of structures associated with the expense.

Expense.structures.where ● ExpenseStructuresWhereWhereConditions input​
Expense.structures.orderBy ● [ExpenseStructuresOrderByOrderByClause!] list input​
Expense.structures.first ● Int! non-null scalar​

Limits number of fetched items. Maximum allowed value: 50.

Expense.structures.after ● String scalar​

A cursor after which elements are returned.

Expense.projects ● ProjectConnection! non-null object​

A list of projects associated with the expense.

Expense.projects.where ● ExpenseProjectsWhereWhereConditions input​
Expense.projects.orderBy ● [ExpenseProjectsOrderByOrderByClause!] list input​
Expense.projects.first ● Int! non-null scalar​

Limits number of fetched items. Maximum allowed value: 50.

Expense.projects.after ● String scalar​

A cursor after which elements are returned.

Expense.tasks ● TaskConnection! non-null object​

The expense's tasks.

Expense.tasks.where ● ExpenseTasksWhereWhereConditions input​
Expense.tasks.orderBy ● [ExpenseTasksOrderByOrderByClause!] list input​
Expense.tasks.first ● Int! non-null scalar​

Limits number of fetched items. Maximum allowed value: 50.

Expense.tasks.after ● String scalar​

A cursor after which elements are returned.

Expense.letters ● LetterConnection! non-null object​

A list of letters associated with the expense.

Expense.letters.where ● ExpenseLettersWhereWhereConditions input​
Expense.letters.orderBy ● [ExpenseLettersOrderByOrderByClause!] list input​
Expense.letters.first ● Int! non-null scalar​

Limits number of fetched items. Maximum allowed value: 50.

Expense.letters.after ● String scalar​

A cursor after which elements are returned.

Expense.contracts ● ContractConnection! non-null object​

A list of contracts associated with the expense.

Expense.contracts.where ● ExpenseContractsWhereWhereConditions input​
Expense.contracts.orderBy ● [ExpenseContractsOrderByOrderByClause!] list input​
Expense.contracts.first ● Int! non-null scalar​

Limits number of fetched items. Maximum allowed value: 50.

Expense.contracts.after ● String scalar​

A cursor after which elements are returned.

Expense.files ● FileConnection! non-null object​

The expense's files.

Expense.files.where ● ExpenseFilesWhereWhereConditions input​
Expense.files.orderBy ● [ExpenseFilesOrderByOrderByClause!] list input​
Expense.files.first ● Int! non-null scalar​

Limits number of fetched items. Maximum allowed value: 50.

Expense.files.after ● String scalar​

A cursor after which elements are returned.

Returned By​

approveExpense mutation ● cancelExpensePayment mutation ● createExpense mutation ● deleteExpense mutation ● duplicateExpense mutation ● expense query ● markExpenseAsPaid mutation ● markExpenseAsUnpaid mutation ● recalculateExpenseAmounts mutation ● reopenExpense mutation ● restoreExpense mutation ● restoreExpenseAmounts mutation ● scheduleExpensePayment mutation ● updateExpense mutation ● voidExpense mutation

Member Of​

Expense object ● ExpenseEdge object