fct_revenue_invoice_based


Description

Invoice-based accrued revenue. Revenue is recorded when postings are emitted by the invoicing process. Only generated for studios whose configuration enables INVOICE-based accounting. Use this for invoice-led revenue reporting and reconciliation against fct_invoice. For the standard accrual view use fct_revenue; for actual cash inflows use fct_revenue_cash_based.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
revenue_invoice_based_id int8 19 null

Primary key for invoice-based revenue. Identifies a single invoice-based accounting entry.

accounting_date date 13 null

The date the invoice-based revenue entry was posted.

organization_unit_id int8 19 null

The gym (organization_unit) associated with this revenue entry.

revenue_group_id int8 19 null

Human readable grouping for accounting_transaction and credit_account_type, categorizing the type of revenue.

credit_account_number varchar 256 null

Account number of the credit side of the double-entry booking (the revenue account credited).

credit_account_name varchar 256 null

Account name of the credit side of the double-entry booking (the revenue account credited).

debit_account_number varchar 256 null

Account number of the debit side of the double-entry booking (the receivable or cash account debited).

debit_account_name varchar 256 null

Account name of the debit side of the double-entry booking (the receivable or cash account debited).

gross_amount numeric 19,2 null

Gross revenue amount, sign-corrected so that revenue inflows are positive from a studio perspective.

net_amount numeric 19,2 null

Net revenue amount (gross minus tax), sign-corrected from a studio perspective.

tax_amount numeric 19,2 null

Tax portion of the revenue amount, sign-corrected from a studio perspective.

tax_percent numeric 19,2 null

Tax percentage applied to the revenue entry.

currency_id varchar 256 null

The system of money in which the revenue was booked.

customer_id int8 19 null

The customer associated with this revenue entry. Null for non-customer revenue (e.g. anonymous product sales).

contract_id int8 19 null

The contract generating an income. Null if this revenue entry is not about a specific contract (eg a product was sold).

rate_id int8 19 null

The tariff of the contract generating an income. Null if this revenue entry is not about a specific contract (eg a product was sold).

product_id varchar 256 null

The product associated with this revenue entry. Populated for goods sold via POS sale positions and for contract revenue with a product dimension. Null otherwise.

service_period_start_date date 13 null

The start date of the service period associated with this revenue entry, such as the beginning of a billing cycle for a customer’s main contract. Null if not associated with a service period (e.g. sale of a product).

service_period_end_date date 13 null

The end date of the service period associated with this revenue entry, such as the end of a billing cycle for a customer’s main contract. Null if not associated with a service period (e.g. sale of a product).

adjustment_type varchar 256 null
Adjustment type that changes value of price:
  • IDLE_PERIOD – Adjustment due to period when contract is inactive
  • CONTRACT_CANCELLATION – Adjustment due to cancellation of contract
  • CONTRACT_REVERSAL – Adjustment due to reversal of contract
  • CONTRACT_ADJUSTMENT – Adjustment due to adjustment to contract
  • CONTRACT_ADJUSTMENT_CANCELLATION – Overall reductions
  • CONTRACT_REST_MATURITY – Used for all locked charges when contract gets rest maturity
  • BOOKING_ENTRY_REVERSAL – Reversal of charge that is locked
  • BOOKING_ENTRY_REDUCTION – Reduction of the original charge
  • CUSTOM – Custom adjustment
  • CUSTOM_SINGLE_BOOKING_ENTRY – Discount for single booking entry
  • CONSUMPTION_CREDIT_CONVERSION – Adjustment due to normal credit conversion
  • CONSUMPTION_CREDIT_BONUS_CONVERSION – Adjustment due to bonus credit conversion
  • CHECKIN_DISCOUNT – Discount for reaching a certain hours of check-ins for the month
  • CHARGED_BACK – Return of payment
  • Null – No Adjustment
description varchar 65535 null

Free-text description of the revenue entry.

invoice_id int8 19 null

The invoice position (fct_invoice grain) this revenue entry corresponds to, resolved via the underlying booking entry. Populated only when the booking entry maps to exactly one invoice position; otherwise null to avoid revenue duplication.

last_updated timestamptz 35 null

System column. UTC Timestamp at which entry was calculated (lags shortly behind source system).

Relationships