> ## Documentation Index
> Fetch the complete documentation index at: https://docs.queryful.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Receivables

> Orders on payment terms (B2B net terms and due on fulfillment), by the order day: what was invoiced, what's outstanding, overdue and paid, and how long payment takes, by company, terms and due month.

Orders on payment terms (B2B net terms and due on fulfillment), by the order day: what was invoiced, what's outstanding, overdue and paid, and how long payment takes, by company, terms and due month.

## Example

```sql theme={null}
FROM receivables
  SHOW invoices, invoiced_amount
  GROUP BY company_name
  SINCE startOfMonth(-1m) UNTIL today
  ORDER BY invoices DESC
```

## Metrics

| Metric | Type | Description |
| - | - | - |
| `invoices` | Number | Orders on payment terms. |
| `invoiced_amount` | Currency | What the orders on payment terms came to. |
| `outstanding_amount` | Currency | What's still to be paid. |
| `overdue_amount` | Currency | What's past its due date and not yet paid. |
| `paid_amount` | Currency | What's been paid. |
| `overdue_invoices` | Number | Invoices past their due date and not yet paid. |
| `average_days_to_pay` | Number | Days from invoice to payment, for paid invoices. |
| `average_days_overdue` | Number | How far past their due date the overdue invoices are. |

## Dimensions

| Dimension | Description |
| - | - |
| `company_name` | The B2B company. |
| `company_location_name` | The company location the order was for. |
| `payment_terms` | Net 30, Due on fulfillment and so on. |
| `payment_status` | Paid, Overdue, or Due (not yet due). |
| `payment_due_month` | The month payment falls due. |
| `order_name` | The order on payment terms. |

## Filters

| Filter | Type | Description |
| - | - | - |
| `company_name` | Text | The B2B company. |
| `company_location_name` | Text | The company location the order was for. |
| `payment_terms` | Text | Net 30, Due on fulfillment and so on. |
| `payment_due_month` | Text | The month payment falls due. |
| `order_name` | Text | The order on payment terms. |
| `payment_status` | Text | Paid, Overdue or Due. |

## Linked records

Fields of the records this dataset reaches can be shown, grouped by and filtered on, written with a dot after the record (for example `order.name`). Each record's page lists its fields.

| Write | Record | Reached through |
| - | - | - |
| `order.<field>` | [Order](https://docs.queryful.app/queryfulql/records/order.md) | Order |
| `order.customer.<field>` | [Customer](https://docs.queryful.app/queryfulql/records/customer.md) | Order › Customer |
| `order.customer.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Order › Customer › Company |
| `order.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Order › Company |
| `order.company_location.<field>` | [Company location](https://docs.queryful.app/queryfulql/records/company_location.md) | Order › Company location |
| `order.company_location.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Order › Company location › Company |
| `order.location.<field>` | [Location](https://docs.queryful.app/queryfulql/records/location.md) | Order › Location |
| `order.market.<field>` | [Market](https://docs.queryful.app/queryfulql/records/market.md) | Order › Market |
| `company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Company |
| `company_location.<field>` | [Company location](https://docs.queryful.app/queryfulql/records/company_location.md) | Company location |
| `company_location.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Company location › Company |
| `shop.<field>` | [Store](https://docs.queryful.app/queryfulql/records/shop.md) | Store |

## Related datasets

* [Payments](https://docs.queryful.app/queryfulql/datasets/payments.md)
* [Payouts](https://docs.queryful.app/queryfulql/datasets/payouts.md)
* [Payout transactions](https://docs.queryful.app/queryfulql/datasets/balance_transactions.md)
* [Disputes](https://docs.queryful.app/queryfulql/datasets/disputes.md)
* [Chargebacks](https://docs.queryful.app/queryfulql/datasets/chargebacks.md)
* [Gift cards](https://docs.queryful.app/queryfulql/datasets/gift_cards.md)
* [Store credit transactions](https://docs.queryful.app/queryfulql/datasets/store_credit_transactions.md)
* [Store credit balance](https://docs.queryful.app/queryfulql/datasets/store_credit_summaries.md)
* [Payment attempts](https://docs.queryful.app/queryfulql/datasets/payment_attempts.md)
* [Payments balance](https://docs.queryful.app/queryfulql/datasets/payments_balance.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.