Returns a customer's outstanding balance statement, grouped by currency, with aging and the underlying open documents.
Parameters:
| Parameter | Type | Description |
|---|
customer_id | ID! | ID of the customer. |
Example Query:
query GetCustomerStatement($customerId: ID!) {
CustomerStatement(customer_id: $customerId) {
customer_id
as_of
exposure
exposure_currency
currencies {
currency
invoices_due
credits_available
net_due
prepaid_deposits
aging {
not_due
days_1_30
days_31_60
days_61_90
days_over_90
}
lines {
document_type
document_id
label
currency
dated_at
due_at
total
settled
remaining
days_overdue
affects_net
order_id
order_label
}
}
}
}
| Field | Type | Description |
|---|
not_due | Float! | Amount not yet due. |
days_1_30 | Float! | Amount overdue by 1 to 30 days. |
days_31_60 | Float! | Amount overdue by 31 to 60 days. |
days_61_90 | Float! | Amount overdue by 61 to 90 days. |
days_over_90 | Float! | Amount overdue by more than 90 days. |
| Field | Type | Description |
|---|
document_type | String! | Document type. |
document_id | ID! | Document ID. |
label | String! | Document number. |
currency | String! | Document currency. |
dated_at | String | Document date. |
due_at | String | Due date. |
total | Float! | Document total. |
settled | Float! | Settled amount. |
remaining | Float! | Remaining amount. |
days_overdue | Int | Number of days overdue. |
affects_net | Boolean! | Whether the line affects the net amount due. |
order_id | ID | Linked order ID. |
order_label | String | Linked order number. |