Naar de inhoud

← Registry

Construction Act payment timetable

Body

Works out when an interim payment falls due, the payment notice deadline five days later, the final date for payment, and the pay less deadline counted back from that final date, never forward from the due date. Days are counted under section 116: Christmas Day, Good Friday and the contract region's own bank holidays are skipped, weekends are not, so a Scottish job never uses England's list. With no valid payment notice, the payee's claim stands as the notified sum, or the payee's default notice does and moves the final date back by its delay. A contract with a residential occupier gets one sentence saying the Act does not apply. All of it is one deriver.

npx dxcl add construction-payment-timetable
exporteert ConstructionPaymentTimetable · levert 1 nodes op

Voorbeelddata

de JSON waarmee dit voorbeeld is gebouwd
{
  "contract": {
    "region": "SC",
    "dueDateDays": 14,
    "finalDateDays": 30,
    "payLessDays": 7
  },
  "payment": {
    "valuationPeriodEnd": "2026-12-04",
    "claimReceived": "2027-01-12",
    "paymentNoticeIssued": "2027-01-06",
    "defaultNoticeIssued": "2027-01-14"
  },
  "bankHolidays": {
    "SC": [
      "2026-01-01",
      "2026-01-02",
      "2026-04-03",
      "2026-05-04",
      "2026-05-25",
      "2026-08-03",
      "2026-11-30",
      "2026-12-25",
      "2026-12-28",
      "2027-01-01",
      "2027-01-04",
      "2027-03-26",
      "2027-05-03",
      "2027-05-31",
      "2027-08-02",
      "2027-11-30",
      "2027-12-27",
      "2027-12-28"
    ]
  }
}

Gerenderd voorbeeld

elke opstelling op zichzelf gerenderd
arrangement="table" standaard
The four dates in a label and date table, for a timetable read at a glance.
Gerenderd door Docxcelerate tijdens de build Open ↗
arrangement="stacked"
One line per date, for a letter that reads as prose.
Gerenderd door Docxcelerate tijdens de build Open ↗

Opgeloste nodes

wat een renderer krijgt — 1 nodes
payment-timetable section

De bestanden

wat installeren schrijft; het gekozen bestand is de component
your-project/
nodes/construction-payment-timetable.node.tsx
import { arrange, Section, type Section as SectionComponent, useDeriver, useState } from "docxcelerate/template";
import type { ConstructionPaymentTimetableLines } from "../arrangements/construction-payment-timetable/lines.ts";
import { stacked } from "../arrangements/construction-payment-timetable/stacked.arrangement.tsx";
import { table } from "../arrangements/construction-payment-timetable/table.arrangement.tsx";
import constructionPaymentTimetable from "../derivers/construction-payment-timetable.deriver.ts";

/**
 * The statutory payment timetable for one interim payment under a UK
 * construction contract: when payment falls due, the last day for the payer's
 * payment notice, the final date for payment and the last day for a pay less
 * notice. Each mistake below produces a deadline an adjudicator would reject.
 *
 * Counting: a period starts the day after its start date. Christmas Day, Good
 * Friday and the bank holidays of the contract's own region are not counted
 * (section 116). Weekends are, and a deadline that lands on a Saturday stays on
 * the Saturday rather than rolling to Monday.
 *
 * Region: the bank holidays come from the contract's region, so a Scottish job
 * never uses England's list. Northern Ireland is governed by its own Order.
 *
 * Pay less: counted back from the final date for payment as it stands after any
 * postponement, never forward from the due date.
 *
 * Notified sum: when the payer gives no valid payment notice, the payee's claim
 * stands if it arrived before the payment notice deadline (s110B(4)). Otherwise
 * the payee's own default notice stands, and the final date moves back by the
 * days it came after the deadline (s110B(3)). A payment notice after the
 * deadline is printed as late and treated as not given.
 *
 * Residential occupier: the Act does not apply, so one sentence says so and
 * nothing else is printed.
 *
 * All of it is decided in one deriver, because date arithmetic on request data
 * cannot run at publish time. The node only prints what it returns. The s110B
 * readings are interpretations, so have a lawyer confirm them.
 *
 * Installed by `dxcl add construction-payment-timetable`, which also installs
 * its deriver.
 */

/** What this component reads. Add these fields to your document data type. */
export interface ConstructionPaymentTimetableData {
  contract: {
    /**
     * Whose law and whose bank holidays apply: `EW` England and Wales, `SC`
     * Scotland, `NI` Northern Ireland. Required, even for a residential
     * occupier, because it names the Act. Anything else throws.
     */
    region: "EW" | "SC" | "NI";
    /**
     * Whether the contract is with a residential occupier (s106). `true`
     * prints only the "does not apply" sentence, and nothing else is read or
     * checked. Missing or anything but `true` means not residential.
     */
    residentialOccupier?: boolean;
    /**
     * Days after the valuation period ends that payment falls due, under the
     * contract. A whole number, 0 or more (0 is due on the day the period
     * ends). Missing (`undefined` or `null`) means the Scheme applies: due on
     * the later of 7 days after the period ends and receipt of the claim.
     * Negative, fractional or not a number throws.
     */
    dueDateDays?: number;
    /**
     * Days after the due date of the final date for payment. A fixed period,
     * a whole number, 1 or more. Missing means the Scheme's 17. Anything else
     * throws.
     */
    finalDateDays?: number;
    /**
     * The prescribed period for a pay less notice: days before the final date
     * for payment. A whole number, 0 or more (0 is the final date itself).
     * Missing means the Scheme's 7. Anything else throws.
     */
    payLessDays?: number;
  };
  payment: {
    /** The last day of the valuation period, as an ISO 8601 date (`2026-12-04`). Required. */
    valuationPeriodEnd: string;
    /**
     * When the payee's payment claim (application) was received, ISO 8601. A
     * claim states the sum the payee considers due and how it was worked out.
     * Leave the field out for anything that does not. Required when
     * `contract.dueDateDays` is missing, because under the Scheme it can set
     * the due date. When it was received before the payment notice deadline,
     * it stands as the notified sum if no payment notice is given. Missing or
     * `""` means no claim.
     */
    claimReceived?: string;
    /**
     * When the payer (or specified person) gave the payment notice, ISO 8601.
     * It counts only if given on or before the payment notice deadline. A
     * later one prints as late and is treated as not given. Missing or `""`
     * means none was given.
     */
    paymentNoticeIssued?: string;
    /**
     * When the payee gave its own notice in default of the payer's (s110B(2)),
     * ISO 8601. Read only when no valid payment notice was given and the claim
     * does not stand. It is ignored otherwise, because the Act then gives no
     * right to one. When read, it must be after the payment notice deadline,
     * or the deriver throws. Missing or `""` means none yet.
     */
    defaultNoticeIssued?: string;
  };
  /**
   * Bank holidays by region, each an array of ISO 8601 dates. This is the
   * shape of https://www.gov.uk/bank-holidays.json once its keys are mapped
   * to EW/SC/NI. Only `bankHolidays[contract.region]` is read. It is required
   * unless residential, and missing throws. It must contain at least one date
   * in every calendar year the timetable runs through, or the deriver throws,
   * because a year with none means the list is stale. Christmas Day and Good
   * Friday are excluded whether listed or not.
   */
  bankHolidays: { EW?: string[]; SC?: string[]; NI?: string[] };
}

/**
 * Where the dates sit.
 *
 * - `table`: the four dates in a label and date table. The default.
 * - `stacked`: one line per date, for a letter that reads as prose.
 */
export type ConstructionPaymentTimetableArrangement = "table" | "stacked";

/** Props for {@linkcode ConstructionPaymentTimetable}. */
export interface ConstructionPaymentTimetableProps {
  /** Where the dates sit. Defaults to `"table"`. */
  arrangement?: ConstructionPaymentTimetableArrangement;
}

export const ConstructionPaymentTimetable: SectionComponent<ConstructionPaymentTimetableProps> = async (
  { arrangement },
) => {
  const [contract] = useState((data: ConstructionPaymentTimetableData) => data.contract);
  const [payment] = useState((data: ConstructionPaymentTimetableData) => data.payment);
  const [bankHolidays] = useState((data: ConstructionPaymentTimetableData) => data.bankHolidays);
  const t = await useDeriver(constructionPaymentTimetable, [contract, payment, bankHolidays]);

  const lines: ConstructionPaymentTimetableLines = {
    applies: t.applies,
    notApplicable: t.notApplicable,
    basis: t.basis,
    dueDate: t.dueDate,
    paymentNoticeBy: t.paymentNoticeBy,
    finalDate: t.finalDate,
    payLessBy: t.payLessBy,
    noticeLate: t.noticeLate,
    noticeGiven: t.noticeGiven,
    applicationStands: t.applicationStands,
    defaultNotice: t.defaultNotice,
    defaultOpen: t.defaultOpen,
    reckoning: t.reckoning,
  };

  return (
    <Section id="payment-timetable" title="Payment timetable">
      {arrange(arrangement, {
        table: () => table(lines),
        stacked: () => stacked(lines),
      })}
    </Section>
  );
};