Contract billing and revenue recognition
Record a customer or supplier contract with its lines, plan its invoices as a table, let the daily run issue them, then recognise the revenue: policies, performance obligations and the allocation of the price, the holding account, schedules that post each period, milestones, and revenue per customer with the ARR waterfall.
A contract is a record on either side. A customer contract carries lines with a billing model; Alya Books builds an invoice schedule from them as a table you can read and edit before anything is invoiced, and the daily run turns the rows that are due into normal invoices. A supplier contract keeps the supplier's terms, dates and files; its invoices arrive from the supplier and nothing is generated.
The second half of this page, from Revenue recognition on, is what happens to the revenue of those invoices: it waits on a holding account and reaches the income statement as each obligation of the contract is met.
The contract as a document (its PDF drawn from a template, its versions, sending, signing by both sides and amendments) is described in Contracts as documents.
Before you start
- Settings → Accounting → Modules → Contracts must be Enabled. The module is in the Professional plan and above.
- Contract numbers come from their own series (
CT-0001, …) under Settings → Documents → Number series. - A payment link needs a payment gateway under Settings → Payments; a reminder sequence is a cadence under Reminders.
A worked example: a calendar-aligned contract
Golden Trading hosts a clinic's systems for 1,200 a month from 15 January for twelve months, billed on the calendar month.
- Contracts → New contract: side Customer, the clinic as Contact, Name
Cloud hosting, Start date15 January, End date14 Januarynext year, Calendar-aligned billing on, Payment terms14, Issue generated invoices on, a Reminder sequence. Create contract. - On the contract's page, Lines → Add line: Description
Hosting, Billing model Subscription, Quantity1, Unit price1200, Frequency Monthly. Save line. - Activate. The Schedule card fills with thirteen rows: 15 to 31 January for 17 of 31 days (658.06), eleven whole months at 1,200, and 1 to 14 January for 14 of 31 days (541.94). The two partial rows make exactly one month, so the total is 14,400.00.
- Change the first row's Amount in the table (for example to
700): the row is marked edited and keeps its value when the schedule is rebuilt. - Generate invoices with Rows due by today: the preview shows the invoice the run would make. Confirm. The first invoice appears under Invoices as a normal tax invoice: issued, dated 15 January, with the contract number as its Contract reference (BT-12), a payment link and the contract's reminder sequence. The row reads Generated and links to it.
- The second row waits for 1 February: the daily run generates it then, or Generate invoices on that day does. Nothing is generated early.
The billing models
| Model | What the schedule holds |
|---|---|
| Flat rate | one row at the start for quantity × price |
| Subscription | one row per period (monthly, quarterly, yearly) for quantity × price |
| Usage | one row per period whose Quantity you type on the schedule before it is invoiced; the amount follows the line's unit price |
| Milestones | one row per milestone (the quantity is the number of milestones), without a date until you set its Invoice date |
| Prepaid commit | one row at the start for the committed amount |
| Per transaction | no rows until you Record transaction on the schedule: each one becomes a row dated on it |
| Progress | no planned rows: quantity × price is the line's scheduled value, and each progress billing writes one row for its period (see Progress lines) |
A line may carry its own start and end inside the contract's dates. A line without an end plans a year from its start and extends on each rebuild.
Each line also has its VAT: Standard rated (the default), Zero rated, one of the Exempt rates (each with its FTA reason), Reverse charge or Out of scope, from your organisation's tax rates. A new line on an item takes the item's category. The invoices generated from the line carry that VAT, with the exemption reason on a zero-rated or exempt line, and the cash forecast adds the same VAT to the rows still to invoice, so an export contract billed at 0 % is never forecast at 5 %. A line that has generated invoices may still change its VAT; the next invoices carry the new one.
Calendar-aligned or from the start day
- Calendar-aligned billing on: rows run from the first to the last day of the month, quarter or year. The first and last rows are prorated by days, counted inclusively; the two partial rows always add up to one whole period.
- Off (anniversary): rows run from the start day for a whole period; only a final period the end date cuts short is prorated.
- Billing day dates the invoice of a period on that day of its first month (clamped to the month's length); empty dates it on the period's first day.
The schedule table
- Each row shows its line, period, invoice date, quantity, amount and state: Planned, Generated (with its invoice) or Skipped.
- Edit the Amount, the Quantity of a usage row or the Invoice date in the table; the change is saved when you leave the field. An edited row survives Rebuild from lines; a generated row is read only (change its invoice instead).
- Skip a row to leave it out of generation; Plan again brings it back.
- Rebuild from lines replaces the planned rows nobody edited after you change a line or the dates; the totals under the table show planned, generated and total amounts and how many usage rows are still to type.
Generating invoices
- The daily run generates the rows of every active customer contract whose invoice date has come, before it runs the recurring templates. Each contract owns a recurring profile (visible under Recurring Invoices) whose runs list the invoices generated; the profile has no dates of its own.
- Generate invoices on the contract does the same for one contract up to the date you pick, with a preview first.
- Issue generated invoices on: the invoice is issued (the books post it once) and gets a payment link when a gateway is set up. Off: the invoice stays a draft for review. A date in a locked period keeps the invoice a draft.
- The invoice carries the contract number as Contract reference (BT-12) and leaves the order reference alone; its page shows From contract CT-… in the header.
- Deleting a generated draft puts its row back to Planned; the next run makes it again.
Progress lines
A line of the model Progress is billed by the percentage complete, not by date. Quantity × unit price is its scheduled value. Nothing is planned for it on the schedule, and the daily run and Generate invoices leave a contract with a progress line alone.
- The Progress billings card appears on the contract's page once the contract has a progress line. New billing certifies the work done to a date: you type the percent to date on each line and the invoice bills the difference from the last billing.
- The Retention terms on the contract form withhold a percentage of every progress invoice, up to a cap, until you choose Release retention.
- A Milestones line on the same contract is billed by the next billing once its row has an Invoice date.
- Each billing writes one schedule row per line for its period, Generated with its invoice, so the schedule, the cash forecast and the recognition below treat a progress invoice as any other contract invoice.
The walkthrough, the entries and the tax point of the retention are in Progress invoicing and retention. Progress invoicing is part of the Professional and Enterprise plans.
Statuses and what can change
- Draft → Active (a customer contract needs a line; the schedule is built on the first activation) → Paused (nothing is generated) → Active again, or Ended or Cancelled. Cancelled is final.
- Once a contract has generated an invoice, its contact, start date, currency and calendar alignment stay, and a line that generated keeps its model, quantity, price, frequency and dates (
contract_locked). The name, notes, end date, reminder sequence and the lines still to invoice can change. - A contract that generated nothing can be deleted; otherwise end or cancel it.
Amendments
An agreed change to a running contract is an amendment: Versions → Amend on the contract's page drafts a new version with the change, the date it takes effect and the reason. It applies when it is signed, or when a member applies it.
- An amendment may change the quantity and the unit price of a Subscription, Usage, Progress or Per transaction line that has already been invoiced, which a plain edit refuses. The planned schedule rows from the effective date carry the new figures; the rows before it and every generated row keep theirs.
- It may also change the name, the end date, the payment terms, the billing day, Issue generated invoices, the notes, the retention terms and the reminder sequence, and a line's end date. The side, the contact, the currency and the start date never change.
- Once a signed version of the contract is in force, its terms change only by an amendment: an edit is refused (
contract_locked). Issue generated invoices and the reminder sequence can still be edited. - A contract marked Signature required is activated by the last signature on its first version, not by Activate.
The walkthrough and the full rules are in Contracts as documents.
Custom fields
Define fields with the level Contract under Settings → Documents → Custom fields; the Custom fields card on the contract shows them. A contact's Contracts tab lists its contracts on both sides.
Revenue recognition
An invoice says what the customer owes; it does not say when the revenue was earned. With the Revenue recognition module a customer contract follows the five steps of IFRS 15, each of them something you can see on the contract's page.
Before you start
- Settings → Accounting → Modules → Revenue recognition must be Enabled, and so must Schedules. The module is in the Enterprise plan; on another plan the Modules card says so.
- The chart needs the accounts with the roles Revenue awaiting recognition (2235 in the standard chart) and Accrued income (1360). A ledger enabled before those arrived is told so when you allocate: upgrade the pack under Settings → Accounting first.
- Allocate a contract's price before its first invoice is issued. An invoice issued earlier credited revenue directly; undo it and issue it again after the allocation.
The five steps on the contract's page
- The contract. The customer contract of the first half of this page, active.
- The obligations. The Obligations card lists one obligation per contract line with its Policy: Over the service period, At a point in time, On milestones or On usage. A line takes the default policy of its billing model until you pick another.
- The transaction price. The fixed amount the contract invoices: the total of its schedule rows. A usage or per-transaction line is outside it (the card shows Variable) and is recognised as it is invoiced.
- The allocation. Type a Standalone price for each line and choose Allocate. The preview shows what would be written; Confirm applies it. The transaction price is shared in proportion to the standalone prices, the rounding difference on the largest obligation. When exactly one line has no standalone price it takes what the others leave; with more than one missing the allocation is refused until you type them. Once revenue has been recognised on the contract, Allocate is disabled and the card says the allocation and policies stay as they are.
- The schedules. On the Recognition card, Build schedules creates one schedule per obligation. Nothing posts by building them.
A worked example: two obligations, one milestone
Golden Trading sells a clinic a software licence for the year and its implementation, together for 12,000, invoiced on 1 January. Alone the licence sells for 10,000 and the implementation for 5,000.
- On the contract, add the lines
Software licence(flat rate, 9,000, Standalone price10000) andImplementation(flat rate, 3,000, Standalone price5000) and Activate. - On the Obligations card pick Over the service period for the licence and On milestones for the implementation, then Allocate and Confirm. The Allocated price column reads 8,000.00 and 4,000.00: 12,000 shared ten to five.
- Generate invoices for 1 January. The invoice of 12,600.00 posts receivables 12,600.00 against Revenue awaiting recognition 12,000.00 and VAT 600.00. No revenue yet: the invoice's Ledger card shows it.
- On the Recognition card set Recognise to the end of January and choose Recognise to date. The preview says one period posts now, 666.67, and how many later periods stay planned. Confirm: 666.67 moves from the holding account to revenue.
- When the implementation is delivered, Confirm it on the Milestones card with its date. Its 4,000.00 is recognised on that date.
- Each month end the daily run recognises another 666.67 (666.63 in December). At the year's end 12,000.00 has been recognised and the holding account holds nothing for the contract.
At every step the Recognition card shows Allocated, Invoiced, Recognised, Deferred and Unbilled. Deferred is the contract's balance on the holding account, so it always equals what is still to recognise of what was invoiced.
The holding account
- Every line of a contract invoice that belongs to a contract with obligations credits Revenue awaiting recognition instead of its revenue account. The VAT of the invoice is unchanged: it is due when the invoice is issued, whatever the recognition.
- A schedule's entry debits the holding account and credits the policy's Revenue account (none: the item's income account, else your sales default).
- Revenue recognised before it is invoiced (a milestone confirmed ahead of its invoice, a month that ends before the invoice is issued) is debited to Accrued income instead and shows as Unbilled. The next invoice of the contract clears that first and credits the holding account only with the rest.
- Invoices outside a contract are not affected, and deferring the revenue of a single invoice works as before (see Prepaids, accruals and loans).
Policies
Settings → Accounting → Revenue policies lists the policies; four come with the module and Add policy makes more.
| Method | When the revenue is recognised |
|---|---|
| Over the service period | Each month of the line's dates. Equal amount per month gives every month the same amount; By the days of each period gives each month its days' share |
| At a point in time | In one entry on the line's first invoice date |
| On milestones | Each milestone on the date you confirm it |
| On usage | Each usage or per-transaction row on its invoice date, for the amount invoiced |
A policy that obligations use keeps its method and cannot be deleted; switch it off instead and make another.
Percentage of completion
A policy of the method By percentage of completion recognises a progress line as its billings certify it. Add one under Settings → Accounting → Revenue policies → Add policy, with Default for billing model Progress if every progress line should take it, or pick it for the line on the Obligations card before you Allocate.
- The scheduled value of a progress line counts in the transaction price, as the rows of the other fixed models do.
- Each progress invoice credits Revenue awaiting recognition, and Recognise to date recognises the obligation up to the percentage certified. A line allocated AED 100,000.00 and billed to 40 per cent has AED 40,000.00 recognised; billed to 100 per cent, the whole AED 100,000.00, and the holding account holds nothing for it.
- The part not yet certified stays planned without a date until a billing certifies it.
The billings themselves are described in Progress invoicing and retention.
Milestones
- The Milestones card appears when an obligation is recognised on milestones. Add milestone takes a name, an amount or a percent of the allocated price, and a due date. The plan must add up to the obligation's allocated price before the schedules are built; an obligation with no plan is one milestone for the whole of it.
- Confirm asks for the date, shows the entry it would post and posts it on Confirm. An approver confirms, and so does the manager of the contract's project. A date still to come is posted by the daily run on that day.
- A confirmed milestone cannot be changed or removed. To undo it, reverse its entry.
- A date in a locked period is not refused: the page offers to send the change to an approver.
What posts, and when
- Recognise to date builds the schedules and posts only the periods that have ended by the date you pick. The preview names what posts now and how many periods stay planned. Nothing is ever posted for a month that has not ended.
- After that the daily run posts each period on its period end, a point-in-time or usage line on its invoice date, and a milestone when it is confirmed.
- Once revenue has been recognised on a contract, its allocation and policies stay as they are.
- An issued invoice's Schedules card lists the recognition schedules of its contract.
Revenue by customer and the ARR waterfall
Revenue in the sidebar opens two views; both are also in Reports → Library.
- By customer, for the dates you pick: Invoiced, Recognised, Deferred, Usage, MRR and ARR per customer. MRR and ARR come from the subscription lines of the contracts live on the end date.
- ARR waterfall, month by month: Opening ARR, New (customers with none before), Expansion, Contraction, Churn (customers whose ARR fell to nothing) and Closing ARR. The opening plus the four movements is the closing.
- Click a figure to see the contracts and the ledger entries behind it.
Walkthrough
Run the worked example above on a test organisation: allocate (8,000.00 and 4,000.00), issue the invoice (12,000.00 on the holding account), recognise January (666.67), confirm the milestone (4,000.00), and check that Deferred on the Recognition card equals the holding account's balance for the contract. Then open Revenue and find the customer's invoiced, recognised and deferred figures.
Through the API and an AI assistant
Integrations manage contracts under /contracts (the record, /status, /schedule, /schedule/{row}, /generate with X-Preview: true for the preview, /transactions). The MCP tools are list_contracts, get_contract, create_contract, update_contract, set_contract_status, preview_contract_schedule, build_contract_schedule, edit_contract_schedule_row, generate_contract_invoices (asks before it writes) and record_contract_transaction.
Revenue recognition is under /revenue-policies, /contracts/{id}/allocate, /contracts/{id}/obligations, /contracts/{id}/milestones, /milestones/{id}/confirm, /contracts/{id}/recognise and /contracts/{id}/recognition; the two reports are /reports/customer_revenue and /reports/arr_waterfall. The MCP tools are list_revenue_policies, save_revenue_policy, get_contract_obligations, allocate_transaction_price, save_contract_milestone, confirm_milestone (needs the approve consent), apply_recognition_schedule and get_contract_recognition. apply_recognition_schedule posts only the periods that have already ended: its preview names what posts now and what the daily run posts later, and an assistant never posts a future month. See docs.alyabooks.ai.