Skip to content

A Re-Bill Anchored on the Wrong Date

  • Container free time, demurrage, billing deadlines, bill of lading dates and EDI timestamps.

A Re-Bill Anchored on the Wrong Date

A party re-billing a charge it was itself billed counts its 30-day issue window from the date it was itself charged, not from the invoice it received.

The naive approach

// The naive approach: anchored on the original charge
const windows = { issueDays: 30, disputeDays: 30, resolutionDays: 30 };
billingTimeline({ anchorOn: "2026-03-01", invoiceIssuedOn: "2026-04-05" }, windows);
// { invoiceDeadline: "2026-03-31", issuedByDeadline: false, disputeDeadline: "2026-05-05",
//   requestedByDeadline: null, resolutionDeadline: null } — counted from the charge, so the re-bill reads after the deadline

Watch it break

The naive approach silently produces wrong results — there is no GMT equivalent to demonstrate because the failure is not using GMT.

Why

The anchor is whatever date the caller counts from. The received invoice was issued on 10 March, so the re-bill's window runs from that date.

The gmt approach

import { billingTimeline } from "@northguild/gmt/intermodal";

const windows = { issueDays: 30, disputeDays: 30, resolutionDays: 30 };
billingTimeline({ anchorOn: "2026-03-10", invoiceIssuedOn: "2026-04-05" }, windows);
// { invoiceDeadline: "2026-04-09", issuedByDeadline: true, disputeDeadline: "2026-05-05",
//   requestedByDeadline: null, resolutionDeadline: null }

Same widget, working

output 

Change the anchor between 2026-03-01 and 2026-03-10 in the Billing Deadlines widget and watch the verdict flip. The full rules are in Intermodal: Billing Deadlines.