feat: full wagon cancel, leg board, wagon dates

feat(freight): editable train leg times, SL invoice payer
This commit is contained in:
Marshal
2026-08-15 10:12:37 +00:00
parent c9c2d4dcb3
commit dc38e843a6
31 changed files with 1619 additions and 217 deletions

View File

@@ -959,6 +959,14 @@ export interface IInvoiceCompanyProfile {
reference: string | null;
}
/** Shipping line an invoice is billed to, when `companyId` is null (see `IInvoice`). */
export interface IInvoiceShippingLineCompany {
id: string;
name: string;
email?: string | null;
phoneNumber?: string | null;
}
/** A single billed line on an invoice. */
export interface IInvoiceLine extends BaseEntity {
invoiceId: string;
@@ -975,12 +983,15 @@ export interface IInvoiceLine extends BaseEntity {
export interface IInvoice extends BaseEntity {
invoiceNumber: string;
/** Customer (company) the invoice is billed to. */
companyId: string;
/** Customer (company) the invoice is billed to. Null on a shipping-line invoice — see `shippingLineCompanyId`. */
companyId: string | null;
company?: IInvoiceCompany;
/** Specific company profile billed. */
companyProfileId: string;
companyProfile?: IInvoiceCompanyProfile;
/** The shipping line billed, when this invoice bills batched shipping-line credits. Mutually exclusive with `companyId`. */
shippingLineCompanyId?: string | null;
shippingLineCompany?: IInvoiceShippingLineCompany;
totalAmount: number;
/** Cumulative amount settled so far (supports partial payment). */
paidAmount: number;